Initial commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Media;
|
||||
using Ui.ProductionControls.Enums;
|
||||
|
||||
namespace Ui.ProductionControls.Converter
|
||||
{
|
||||
public static class ImgStatusToColor
|
||||
{
|
||||
public static Brush GetBrush(ImgStatus status)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
case ImgStatus.Init:
|
||||
return Brushes.White;
|
||||
case ImgStatus.Waiting:
|
||||
return Brushes.LightGray;
|
||||
case ImgStatus.InProgress:
|
||||
return Brushes.LightYellow;
|
||||
case ImgStatus.Success:
|
||||
return Brushes.LightGreen;
|
||||
case ImgStatus.Warning:
|
||||
return Brushes.Orange;
|
||||
case ImgStatus.Error:
|
||||
return Brushes.IndianRed;
|
||||
default:
|
||||
return Brushes.White;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using Ui.ProductionControls.Enums;
|
||||
|
||||
namespace Ui.ProductionControls.Converter
|
||||
{
|
||||
public static class ImgToImage
|
||||
{
|
||||
static string Path = $"{AppDomain.CurrentDomain.BaseDirectory}\\Images\\";
|
||||
static string Ending = ".png";
|
||||
public static string GetImagePath(Img imgState)
|
||||
{
|
||||
switch (imgState)
|
||||
{
|
||||
case Img.Default:
|
||||
return $"{Path}default{Ending}";
|
||||
case Img.Cloud:
|
||||
return $"{Path}cloud{Ending}";
|
||||
case Img.Compare:
|
||||
return $"{Path}compare{Ending}";
|
||||
case Img.Error:
|
||||
return $"{Path}error{Ending}";
|
||||
case Img.Irda:
|
||||
return $"{Path}irda{Ending}";
|
||||
case Img.Login:
|
||||
return $"{Path}login{Ending}";
|
||||
case Img.Plugin:
|
||||
return $"{Path}plugin{Ending}";
|
||||
case Img.Success:
|
||||
return $"{Path}success{Ending}";
|
||||
case Img.Waiting:
|
||||
return $"{Path}waiting{Ending}";
|
||||
case Img.Warning:
|
||||
return $"{Path}warning{Ending}";
|
||||
case Img.BarcodeScanner:
|
||||
return $"{Path}barcodeScanner{Ending}";
|
||||
default:
|
||||
return $"{Path}default{Ending}";
|
||||
}
|
||||
|
||||
}
|
||||
public static string GetText(Img imgState)
|
||||
{
|
||||
switch (imgState)
|
||||
{
|
||||
case Img.Default:
|
||||
return $" - ";
|
||||
case Img.Cloud:
|
||||
return $"Get Data";
|
||||
case Img.Compare:
|
||||
return $"Compare";
|
||||
case Img.Error:
|
||||
return $"Error";
|
||||
case Img.Irda:
|
||||
return $"IrDA communication";
|
||||
case Img.Login:
|
||||
return $"Login";
|
||||
case Img.Plugin:
|
||||
return $"Plugin connector";
|
||||
case Img.Success:
|
||||
return $"Success";
|
||||
case Img.Waiting:
|
||||
return $"Waiting";
|
||||
case Img.Warning:
|
||||
return $"Warning";
|
||||
case Img.BarcodeScanner:
|
||||
return $"Scan barcode";
|
||||
default:
|
||||
return $"?";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user