Beispiel #1
0
        private void RandomColorPair()
        {
            Random rand    = new Random();
            int    randInt = rand.Next(0, 1);

            switch (randInt)
            {
            case 0:
                ClrA = ColorExt.ToBrush(System.Drawing.Color.AliceBlue);
                ClrB = ColorExt.ToBrush(System.Drawing.Color.Cornsilk);
                break;

            case 1:
                ClrA = ColorExt.ToBrush(System.Drawing.Color.Cornsilk);
                ClrB = ColorExt.ToBrush(System.Drawing.Color.AliceBlue);
                break;

            case 2:
                ClrA = ColorExt.ToBrush(System.Drawing.Color.Bisque);
                ClrB = ColorExt.ToBrush(System.Drawing.Color.BlanchedAlmond);
                break;

            case 3:
                ClrA = ColorExt.ToBrush(System.Drawing.Color.Lavender);
                ClrB = ColorExt.ToBrush(System.Drawing.Color.LavenderBlush);
                break;

            default:
                ClrA = ColorExt.ToBrush(System.Drawing.Color.AliceBlue);
                ClrB = ColorExt.ToBrush(System.Drawing.Color.Cornsilk);
                break;
            }
        }
Beispiel #2
0
 public void SetMsg(string _msg, string purpose, string _bot = "", bool LeftText = false)
 {
     _purpose = purpose;
     MsgTextBlockMainMsg.Text = _msg;
     MsgLabelTop.Text         = purpose;
     /// tag behavior
     ChkTagOption.IsChecked = Properties.Settings.Default.TagOtherViews;
     if (purpose.Contains("Tag"))
     {
         TagOption.Visibility = System.Windows.Visibility.Visible;
     }
     else
     {
         TagOption.Visibility = System.Windows.Visibility.Collapsed;
     }
     /// lefttext option
     if (LeftText)
     {
         MsgTextBlockMainMsg.TextAlignment = TextAlignment.Left;
     }
     /// timeout option
     if (_optTimeOut > 0)    // auto timeout mode
     {
         MsgLabelBot.Visibility = System.Windows.Visibility.Collapsed;
     }
     /// closable option
     if (_closable)
     {
         MsgLabelBot.Text     = "Ok, I get it.";
         MsgLabelBot.FontSize = 18;
         if (_anErr)
         {
             ClrA             = ColorExt.ToBrush(System.Drawing.Color.LavenderBlush);
             Body.BorderBrush = ColorExt.ToBrush(System.Drawing.Color.Red);
         }
     }
     else
     {
         if (_bot != "")
         {
             MsgLabelBot.Text = _bot;
         }
     }
     FlipColor();
 }
Beispiel #3
0
 public void ContextChangeColorState()
 {
     Body.Background = ColorExt.ToBrush(System.Drawing.Color.MediumAquamarine);
 }
Beispiel #4
0
 public void NormalColorState()
 {
     Body.Background = ColorExt.ToBrush(System.Drawing.Color.AliceBlue);
 }
Beispiel #5
0
 public void MatchingColorState()
 {
     Body.Background = ColorExt.ToBrush(System.Drawing.Color.Aquamarine);
 }