formatowanie kodu
This commit is contained in:
@@ -100,7 +100,7 @@ namespace Haftmittel
|
|||||||
{
|
{
|
||||||
List<Historia> czysta = new List<Historia>();
|
List<Historia> czysta = new List<Historia>();
|
||||||
|
|
||||||
if (h.Count() > 2)
|
if (h.Count > 2)
|
||||||
{
|
{
|
||||||
string temp = h.FirstOrDefault().wartosc.Trim();
|
string temp = h.FirstOrDefault().wartosc.Trim();
|
||||||
czysta.Add(h.FirstOrDefault());
|
czysta.Add(h.FirstOrDefault());
|
||||||
@@ -312,7 +312,7 @@ namespace Haftmittel
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
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
|
try
|
||||||
@@ -321,7 +321,7 @@ namespace Haftmittel
|
|||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
MessageBox.Show(string.Format("Problem z tabelą {0}", _dtL.TableName));
|
MessageBox.Show($"Problem z tabelą {_dtL.TableName}");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ namespace Haftmittel
|
|||||||
{
|
{
|
||||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
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;
|
return Brushes.Red;
|
||||||
}
|
}
|
||||||
@@ -28,17 +28,16 @@ namespace Haftmittel
|
|||||||
|
|
||||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace Haftmittel
|
|||||||
{
|
{
|
||||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -31,9 +31,9 @@ namespace Haftmittel
|
|||||||
|
|
||||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user