Example #1
0
        virtual public void ChangeStatus(RegionStatus status)
        {
            if (_myStatus == status)
            {
                return;
            }

            _myStatus = status;

            switch (_myStatus)
            {
            case RegionStatus.Normal:
                Stroke   = new SolidColorBrush(Colors.White);
                Fill     = new SolidColorBrush(Colors.Transparent);
                Selected = false;
                Hover    = false;
                break;

            case RegionStatus.NormalHover:
                Stroke = new SolidColorBrush(Colors.White);
                Fill   = new SolidColorBrush(new Color {
                    A = 100, R = 255, G = 0, B = 41
                });
                Selected = false;
                Hover    = true;
                break;

            case RegionStatus.Selected:
                Stroke = new SolidColorBrush(new Color {
                    A = 255, R = 255, G = 0, B = 41
                });
                Fill     = new SolidColorBrush(Colors.Transparent);
                Selected = true;
                Hover    = false;
                break;

            case RegionStatus.SelectedHover:
                Stroke = new SolidColorBrush(new Color {
                    A = 255, R = 255, G = 0, B = 41
                });
                Fill = new SolidColorBrush(new Color {
                    A = 100, R = 255, G = 0, B = 41
                });
                Selected = true;
                Hover    = true;
                break;

            case RegionStatus.Watching:
                Stroke = new SolidColorBrush(new Color {
                    A = 255, R = 4, G = 61, B = 246
                });
                Fill     = new SolidColorBrush(Colors.Transparent);
                Selected = true;
                Hover    = false;
                break;

            default:
                break;
            }
        }
Example #2
0
        override public void ChangeStatus(RegionStatus status)
        {
            if (_myStatus == status)
            {
                return;
            }

            _myStatus = status;

            switch (_myStatus)
            {
            case RegionStatus.Normal:
                MyColor      = new SolidColorBrush(Colors.White);
                MyColorSolid = new SolidColorBrush(Colors.Transparent);
                Selected     = false;
                break;

            case RegionStatus.NormalHover:
                MyColor      = new SolidColorBrush(Colors.White);
                MyColorSolid = new SolidColorBrush(new Color {
                    A = 100, R = 255, G = 0, B = 41
                });
                Selected = false;
                break;

            case RegionStatus.Selected:
                MyColor = new SolidColorBrush(new Color {
                    A = 255, R = 255, G = 0, B = 41
                });
                MyColorSolid = new SolidColorBrush(Colors.Transparent);
                Selected     = true;
                break;

            case RegionStatus.SelectedHover:
                MyColor = new SolidColorBrush(new Color {
                    A = 255, R = 255, G = 0, B = 41
                });
                MyColorSolid = new SolidColorBrush(new Color {
                    A = 100, R = 255, G = 0, B = 41
                });
                Selected = true;
                break;

            case RegionStatus.Watching:
                MyColor = new SolidColorBrush(new Color {
                    A = 255, R = 4, G = 61, B = 246
                });
                MyColorSolid = new SolidColorBrush(Colors.Transparent);
                Selected     = true;
                break;

            default:
                MyColor      = new SolidColorBrush(Colors.Red);
                MyColorSolid = new SolidColorBrush(Colors.Red);
                Selected     = true;
                break;
            }
        }
Example #3
0
 virtual public void ChangeStatus(RegionStatus status)
 {
     if (status == RegionStatus.Normal)
     {
         Stroke   = new SolidColorBrush(Colors.White);
         Fill     = new SolidColorBrush(Colors.Transparent);
         Selected = false;
         Hover    = false;
     }
     else if (status == RegionStatus.NormalHover)
     {
         Stroke = new SolidColorBrush(new Color {
             A = 255, R = 255, G = 0, B = 41
         });
         Fill = new SolidColorBrush(new Color {
             A = 100, R = 255, G = 0, B = 41
         });
         Selected = false;
         Hover    = true;
     }
     else if (status == RegionStatus.Selected)
     {
         Stroke = new SolidColorBrush(new Color {
             A = 255, R = 255, G = 0, B = 41
         });
         Fill     = new SolidColorBrush(Colors.Transparent);
         Selected = true;
         Hover    = false;
     }
     else if (status == RegionStatus.SelectedHover)
     {
         Stroke = new SolidColorBrush(new Color {
             A = 255, R = 255, G = 0, B = 41
         });
         Fill = new SolidColorBrush(new Color {
             A = 100, R = 255, G = 0, B = 41
         });
         Selected = true;
         Hover    = true;
     }
     else if (status == RegionStatus.Watching)
     {
         Stroke = new SolidColorBrush(new Color {
             A = 255, R = 4, G = 61, B = 246
         });
         Fill     = new SolidColorBrush(Colors.Transparent);
         Selected = true;
         Hover    = false;
     }
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Region"/> class.
 /// </summary>
 public Region()
 {
     Neighbours   = new Regions();
     RegionStatus = RegionStatus.Initialized;
 }