コード例 #1
0
ファイル: MainForm.cs プロジェクト: ihssene-nasa/jColorPicker
 public MainForm()
 {
     InitializeComponent();
     SetupHotyKeys();
     if (PreferenceManager.Database.FirstTime || ShowGuide)
     {
         jLabel1.Text      = "HI!";
         sortImage.Visible = jLabel2.Visible = ColorValue.Visible = PictureBox_MyLogo.Visible = PictureBox_JHUILogo.Visible = jColorEditor1.Visible = DeletePalette.Visible = AddNewPalette.Visible = SettingsImage.Visible = AddColorImage.Visible = jColorPalette1.Visible = ColorNow.Visible = PaletteSelector.Visible = jScreenColorPicker1.Visible = false;
         this.Text         = "";
         messages          = new Anim[]
         {
             new Anim(1, "HI!"),
             new Anim(4, "My name is J Color Picker, J is the initial of my maker Johnny.", new Control[] { PictureBox_MyLogo }),
             new Anim(4, "I started out as a demo for the Johnny Hex UI Framework or JHUI for short.", new Control[] { PictureBox_JHUILogo }, PictureBox_MyLogo),
             new Anim(3, "I am a grown color utility now,", new Control[] { PictureBox_MyLogo }, null),
             new Anim(3, "I can copy and store any color just like physical color palette.", null, null),
             new Anim(4, "Let's begin!", null, PictureBox_MyLogo),
             new Anim(4, "This is the color picker.", new Control[] { jScreenColorPicker1 }, null),
             new Anim(10, "Hold down your mouse over the grid to pick a color,", null, null),
             new Anim(3, "or you can press ALT + C .", null, null),
             new Anim(4, "The color will be displayed here.", new Control[] { ColorValue, jLabel2, ColorNow, jColorEditor1 }, null),
             new Anim(6, "The color is auto-saved to your clipboard,", null, null),
             new Anim(4, "so you can press CTRL + V to paste.", null, null),
             new Anim(6, "Put your mouse over the other controls for help", null, null),
             new Anim(3f, "Happy Designing!", new Control[] { sortImage, DeletePalette, AddNewPalette, SettingsImage, AddColorImage, jColorPalette1, PaletteSelector }, PictureBox_JHUILogo, true),
             new Anim(0, "", null, jLabel1, false, true),
         };
         ColorValue.BringToFront();
         ThisAnimator = new JBehavor();
         ThisAnimator.InvokeRepeating(TypText, 0.1f);
         PreferenceManager.Database.FirstTime = false;
         PreferenceManager.Save();
         canAnimate = true;
     }
     else
     {
         canAnimate = false;
         PictureBox_MyLogo.Visible = PictureBox_JHUILogo.Visible = jLabel1.Visible = false;
     }
     this.TopMost = PreferenceManager.Database.StayOnTop;
 }