formatowanie kodu

This commit is contained in:
2025-10-31 15:05:50 +01:00
parent 5996598d2a
commit 0f0a78954c
3 changed files with 12 additions and 13 deletions

View File

@@ -100,7 +100,7 @@ namespace Haftmittel
{
List<Historia> czysta = new List<Historia>();
if (h.Count() > 2)
if (h.Count > 2)
{
string temp = h.FirstOrDefault().wartosc.Trim();
czysta.Add(h.FirstOrDefault());
@@ -312,7 +312,7 @@ namespace Haftmittel
}
catch (Exception ex)
{
MessageBox.Show(string.Format("Problem z tabelą {0}. {1}", _dtTowar.TableName, ex.Message));
MessageBox.Show($"Problem z tabelą {_dtTowar.TableName}. {ex.Message}");
}
try
@@ -321,7 +321,7 @@ namespace Haftmittel
}
catch (Exception)
{
MessageBox.Show(string.Format("Problem z tabelą {0}", _dtL.TableName));
MessageBox.Show($"Problem z tabelą {_dtL.TableName}");
}
#endregion

View File

@@ -9,9 +9,9 @@ namespace Haftmittel
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value is bool)
if (value is bool v)
{
if ((bool)value)
if (v)
{
return Brushes.Red;
}
@@ -28,17 +28,16 @@ namespace Haftmittel
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value is Brushes)
if (value is Brush b)
{
if ((value as Brush) == Brushes.Red)
if (b == Brushes.Red)
{
return true;
}
else
{
return false;
}
}
}
else
{

View File

@@ -12,9 +12,9 @@ namespace Haftmittel
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is bool)
if (value is bool b)
{
if ((bool)value)
if (b)
{
return 1;
}
@@ -31,9 +31,9 @@ namespace Haftmittel
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is double)
if (value is double d)
{
return ((double)value == 1);
return d == 1;
}
else
{