| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 | using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows.Media;using Aitex.Core.Equipment.SusceptorDefine;namespace Aitex.Core.UI.Control{    public class SusceptorBrush    {        public static SolidColorBrush OnEnteringBrush = new SolidColorBrush(Colors.LightCyan);        public static SolidColorBrush BackgroundBrush = new SolidColorBrush(Color.FromArgb(255, 0xA3, 0xA8, 0xB5));        public static SolidColorBrush StrokeBrush = new SolidColorBrush(Colors.Black);        //Wafer Type        public static SolidColorBrush SapphireBrush = new SolidColorBrush(Color.FromRgb(0xFC, 0xEF, 0xEF));        public static SolidColorBrush SiliconChipBrush = new SolidColorBrush(Colors.White);        public static SolidColorBrush SiliconCarbidBrush = new SolidColorBrush(Color.FromRgb(118, 140, 145));        public static SolidColorBrush DiamondBrush = new SolidColorBrush(Colors.LightBlue);        public static SolidColorBrush DummyBrush = new SolidColorBrush(Colors.Yellow);        //SusceptorStatus Type        public static SolidColorBrush EmptyBrush = new SolidColorBrush(Color.FromRgb(0x3B, 0x3B, 0x3B));        public static SolidColorBrush UnprocessedBrush = new SolidColorBrush(Colors.White);        public static SolidColorBrush ProcessingBrush = new SolidColorBrush(Colors.Green);        public static SolidColorBrush ProcessedBrush = new SolidColorBrush(Colors.Blue);        public static SolidColorBrush ErrorBrush = new SolidColorBrush(Colors.Red);        public static SolidColorBrush GetBrush(SusceptorStatus status)        {            switch (status)            {                case SusceptorStatus.Unprocessed: return SusceptorBrush.UnprocessedBrush;                case SusceptorStatus.Preprocessing:                case SusceptorStatus.InProcessing: return ProcessingBrush;                case SusceptorStatus.Processed:return ProcessedBrush;                case SusceptorStatus.Failed:                case SusceptorStatus.Troubled:return ErrorBrush;                case SusceptorStatus.Empty:                default:                    return EmptyBrush;            }        }        public static SolidColorBrush GetBrush(WaferType type)        {            switch (type)            {                case WaferType.Sapphire:                    return SapphireBrush;                case WaferType.SiliconChip:                    return SiliconChipBrush;                case WaferType.SiliconCarbid:                    return SiliconCarbidBrush;                case WaferType.Diamond:                    return DiamondBrush;                default:                    return EmptyBrush;            }        }        public static SolidColorBrush GetNotchBackgroundBrush(SusceptorStatus susceptorStatus, WaferType waferType, WaferStatus waferStatus)        {            if (waferType != WaferType.Empty)                return waferStatus == WaferStatus.Dummy ? DummyBrush :                    (susceptorStatus == SusceptorStatus.Empty ? GetBrush(waferType) : GetBrush(susceptorStatus));            else                return EmptyBrush;        }    }}
 |