SusceptorBrush.cs 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows.Media;
  6. using Aitex.Core.Equipment.SusceptorDefine;
  7. namespace Aitex.Core.UI.Control
  8. {
  9. public class SusceptorBrush
  10. {
  11. public static SolidColorBrush OnEnteringBrush = new SolidColorBrush(Colors.LightCyan);
  12. public static SolidColorBrush BackgroundBrush = new SolidColorBrush(Color.FromArgb(255, 0xA3, 0xA8, 0xB5));
  13. public static SolidColorBrush StrokeBrush = new SolidColorBrush(Colors.Black);
  14. //Wafer Type
  15. public static SolidColorBrush SapphireBrush = new SolidColorBrush(Color.FromRgb(0xFC, 0xEF, 0xEF));
  16. public static SolidColorBrush SiliconChipBrush = new SolidColorBrush(Colors.White);
  17. public static SolidColorBrush SiliconCarbidBrush = new SolidColorBrush(Color.FromRgb(118, 140, 145));
  18. public static SolidColorBrush DiamondBrush = new SolidColorBrush(Colors.LightBlue);
  19. public static SolidColorBrush DummyBrush = new SolidColorBrush(Colors.Yellow);
  20. //SusceptorStatus Type
  21. public static SolidColorBrush EmptyBrush = new SolidColorBrush(Color.FromRgb(0x3B, 0x3B, 0x3B));
  22. public static SolidColorBrush UnprocessedBrush = new SolidColorBrush(Colors.White);
  23. public static SolidColorBrush ProcessingBrush = new SolidColorBrush(Colors.Green);
  24. public static SolidColorBrush ProcessedBrush = new SolidColorBrush(Colors.Blue);
  25. public static SolidColorBrush ErrorBrush = new SolidColorBrush(Colors.Red);
  26. public static SolidColorBrush GetBrush(SusceptorStatus status)
  27. {
  28. switch (status)
  29. {
  30. case SusceptorStatus.Unprocessed: return SusceptorBrush.UnprocessedBrush;
  31. case SusceptorStatus.Preprocessing:
  32. case SusceptorStatus.InProcessing: return ProcessingBrush;
  33. case SusceptorStatus.Processed:return ProcessedBrush;
  34. case SusceptorStatus.Failed:
  35. case SusceptorStatus.Troubled:return ErrorBrush;
  36. case SusceptorStatus.Empty:
  37. default: return EmptyBrush;
  38. }
  39. }
  40. public static SolidColorBrush GetBrush(WaferType type)
  41. {
  42. switch (type)
  43. {
  44. case WaferType.Sapphire:
  45. return SapphireBrush;
  46. case WaferType.SiliconChip:
  47. return SiliconChipBrush;
  48. case WaferType.SiliconCarbid:
  49. return SiliconCarbidBrush;
  50. case WaferType.Diamond:
  51. return DiamondBrush;
  52. default:
  53. return EmptyBrush;
  54. }
  55. }
  56. public static SolidColorBrush GetNotchBackgroundBrush(SusceptorStatus susceptorStatus, WaferType waferType, WaferStatus waferStatus)
  57. {
  58. if (waferType != WaferType.Empty)
  59. return waferStatus == WaferStatus.Dummy ? DummyBrush :
  60. (susceptorStatus == SusceptorStatus.Empty ? GetBrush(waferType) : GetBrush(susceptorStatus));
  61. else
  62. return EmptyBrush;
  63. }
  64. }
  65. }