示例#1
0
文件: Emoji.cs 项目: jackle1127/Emoji
 public Emoji()
 {
     InitializeComponent();
     this.ControlBox = false;
     if (!Properties.Settings.Default.saved)
     {
         this.Left = Screen.FromControl(this).Bounds.Width - this.Width;
         this.Top  = Screen.FromControl(this).Bounds.Height - this.Height;
         updateSettings();
     }
     else
     {
         Settings.load();
         this.Top    = Settings.currentTop;
         this.Left   = Settings.currentLeft;
         this.Width  = Settings.currentWidth;
         this.Height = Settings.currentHeight;
     }
     frmSettings = new FrmSettings();
     for (int i = 0; i < races.Length; i++)
     {
         races[i]          = new PictureBox();
         races[i].SizeMode = PictureBoxSizeMode.AutoSize;
         races[i].Image    = (Image)Properties.Resources.ResourceManager.GetObject("race_" + i);
         races[i].Top      = 2;
         if (i == 0)
         {
             races[i].Left = lblSkinColor.Left + lblSkinColor.Width + 5;
         }
         else
         {
             races[i].Left = races[i - 1].Left + races[i - 1].Width + 5;
         }
         races[i].Tag    = i;
         races[i].Click += (sender, e) => {
             Model.race = (int)((PictureBox)sender).Tag;
             revalidateRace();
         };
         this.Controls.Add(races[i]);
     }
     notifyIcon.Icon = this.Icon;
     Model.race      = 0;
     Model.cat       = 0;
     Model.races     = ((String)Properties.Resources.ResourceManager.GetObject("races")).Split(Model.delimiterEach);
     String[] potato = Model.races;
     revalidateRace();
     revalidateCat();
 }
示例#2
0
文件: Emoji.cs 项目: jackle1127/Emoji
 public Emoji() {
     InitializeComponent();
     this.ControlBox = false;
     if (!Properties.Settings.Default.saved) {
         this.Left = Screen.FromControl(this).Bounds.Width - this.Width;
         this.Top = Screen.FromControl(this).Bounds.Height - this.Height;
         updateSettings();
     } else {
         Settings.load();
         this.Top = Settings.currentTop;
         this.Left = Settings.currentLeft;
         this.Width = Settings.currentWidth;
         this.Height = Settings.currentHeight;
     }
     frmSettings = new FrmSettings();
     for (int i = 0; i < races.Length; i++) {
         races[i] = new PictureBox();
         races[i].SizeMode = PictureBoxSizeMode.AutoSize;
         races[i].Image = (Image) Properties.Resources.ResourceManager.GetObject("race_" + i);
         races[i].Top = 2;
         if (i == 0) {
             races[i].Left = lblSkinColor.Left + lblSkinColor.Width + 5;
         } else {
             races[i].Left = races[i - 1].Left + races[i - 1].Width + 5;
         }
         races[i].Tag = i;
         races[i].Click += (sender, e) => {
             Model.race = (int) ((PictureBox) sender).Tag;
             revalidateRace();
         };
         this.Controls.Add(races[i]);
     }
     notifyIcon.Icon = this.Icon;
     Model.race = 0;
     Model.cat = 0;
     Model.races = ((String)Properties.Resources.ResourceManager.GetObject("races")).Split(Model.delimiterEach);
     String[] potato = Model.races;
     revalidateRace();
     revalidateCat();
 }