Esempio n. 1
0
 public void SetMsg(string _msg, string purpose, string _bot = "")
 {
     _purpose = purpose;
     this.MsgTextBlockMainMsg.Text = _msg;
     this.MsgLabelTop.Text         = purpose;
     ChkTagOption.IsChecked        = Properties.Settings.Default.TagOtherViews;
     if (purpose.Contains("Tag"))
     {
         TagOption.Visibility = System.Windows.Visibility.Visible;
     }
     else
     {
         TagOption.Visibility = System.Windows.Visibility.Collapsed;
     }
     if (_closable)
     {
         MsgLabelBot.Text     = "Ok Already";
         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();
 }
Esempio n. 2
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;
            }
        }