Example #1
0
        public UtilityPanel(Form1 display)
        {
            this.display = display;
            this.Controls.Add(button1);
            this.Controls.Add(button2);
            this.Controls.Add(button3);
            this.Controls.Add(button4);
            this.Controls.Add(button5);
            this.Controls.Add(button6);
            //this.Size = new Size(100, MainForm.ClientRectangle.Height);
            this.Anchor         = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom;
            this.MouseEnter    += new EventHandler(OnMouseEnter);
            this.MouseLeave    += new EventHandler(OnMouseLeave);
            time.Interval       = 30;
            time.Tick          += new EventHandler(OnTimeTick);
            tmp                 = x;
            button1.Location    = new Point(20, 67);
            button2.Location    = new Point(20, 178);
            button3.Location    = new Point(20, 289);
            button4.Location    = new Point(20, 400);
            button5.Location    = new Point(20, 506);
            button6.Location    = new Point(20, 616);
            button1.Size        = new Size(62, 65);
            button2.Size        = new Size(61, 65);
            button3.Size        = new Size(61, 65);
            button4.Size        = new Size(61, 65);
            button5.Size        = new Size(61, 65);
            button6.Size        = new Size(61, 65);
            button1.Image       = CollectionImage.Button_u_Panel[0];
            button2.Image       = CollectionImage.Button_u_Panel[1];
            button3.Image       = CollectionImage.Button_u_Panel[2];
            button4.Image       = CollectionImage.Button_u_Panel[5];
            button5.Image       = CollectionImage.Button_u_Panel[4];
            button6.Image       = CollectionImage.Button_u_Panel[3];
            button1.MouseEnter += new EventHandler(button1_MouseEnter);
            button2.MouseEnter += new EventHandler(button2_MouseEnter);
            button3.MouseEnter += new EventHandler(button3_MouseEnter);
            button4.MouseEnter += new EventHandler(button4_MouseEnter);
            //button6.MouseEnter += new EventHandler(button6_MouseEnter);
            button1.MouseLeave += new EventHandler(button1_MouseLeave);
            button2.MouseLeave += new EventHandler(button2_MouseLeave);
            button3.MouseLeave += new EventHandler(button3_MouseLeave);
            button4.MouseLeave += new EventHandler(button4_MouseLeave);
            //button6.MouseLeave += new EventHandler(button6_MouseLeave);
            button1.MouseClick += new MouseEventHandler(button1_MouseClick);
            button2.MouseClick += new MouseEventHandler(button2_MouseClick);
            button3.MouseClick += new MouseEventHandler(button3_MouseClick);
            button5.MouseClick += new MouseEventHandler(button5_MouseClick);
            button4.MouseClick += new MouseEventHandler(button4_MouseClick);
            button6.MouseClick += new MouseEventHandler(button6_MouseClick);

            button6.Enabled = false;
            //ControlRegion.CreateGraphicPath(button1, ImageAnimation.Button_u_Panel[0]);
            ControlRegion.CreateControl(this, global::UIT_Pokemon.Properties.Resources.panel1);

            this.Image    = global::UIT_Pokemon.Properties.Resources.panel1;
            this.Location = new Point(-90, 0);
            //b.Dispose();
            //this.Invalidate();
        }
Example #2
0
 public Piece(int x, int y)
 {
     X = x;
     Y = y;
     ControlRegion.CreateControl(this, CollectionImage.PokemonImage[1, 0]);
     this.Location = new Point(Information.StartLocation.X + x * Information.PokemonPieceSize.Width - x * 6, Information.StartLocation.Y + y * Information.PokemonPieceSize.Height - y * 3);
     //this.Anchor = AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Top;
 }
Example #3
0
 public RibbonButton(String str)
 {
     _Text = str;
     ControlRegion.CreateControl(this, global::UIT_Pokemon.Properties.Resources.button);
     this.SetStyle(ControlStyles.Opaque, false);
     this.FlatAppearance.BorderSize = 0;
     this.BackColor               = Color.Transparent;
     this.MouseEnter             += new EventHandler(RibbonButton_MouseEnter);
     this.MouseLeave             += new EventHandler(RibbonButton_MouseLeave);
     this.BackgroundImageLayout   = System.Windows.Forms.ImageLayout.Stretch;
     this.UseVisualStyleBackColor = true;
 }
Example #4
0
        //int Score = 0;
        public Limittime(Form1 form)
        {
            this.form            = form;
            this.Location        = new Point(75, 10);
            this.BackgroundImage = global::UIT_Pokemon.Properties.Resources.PokemonTime;
            ControlRegion.CreateControl(this, global::UIT_Pokemon.Properties.Resources.PokemonTime);
            BG.Location = new Point(80, 0);

            //Score = form.Score;
            this.Controls.Add(BG);
            //BG.BackgroundImage = global::UIT_Pokemon.Properties.Resources.PokemonTime;
            ControlRegion.CreateControl(BG, UIT_Pokemon.Properties.Resources.PokemonTime.Clone(new Rectangle(80, 0, 1000, 47), System.Drawing.Imaging.PixelFormat.DontCare));
            BG.Image            = UIT_Pokemon.Properties.Resources.PokemonTime.Clone(new Rectangle(80, 0, 1000, 47), System.Drawing.Imaging.PixelFormat.DontCare);
            BG.Paint           += new PaintEventHandler(BG_Paint);
            this.DoubleBuffered = true;
        }
Example #5
0
 public SpecilButton(int i)
 {
     tmp = i;
     if (tmp == 0)
     {
         ControlRegion.CreateControl(this, global::UIT_Pokemon.Properties.Resources.nextbutton);
         this.Image = global::UIT_Pokemon.Properties.Resources.nextbutton;
         this.Font  = new Font("", 16, FontStyle.Bold);
     }
     else
     {
         this.Size = new Size(120, 110);
         this.Font = new Font("", 10, FontStyle.Bold);
     }
     this.MouseEnter += new EventHandler(SpecilButton_MouseEnter);
     this.MouseLeave += new EventHandler(SpecilButton_MouseLeave);
     this.MouseDown  += new MouseEventHandler(SpecilButton_MouseDown);
     this.MouseUp    += new MouseEventHandler(SpecilButton_MouseUp);
     this.ForeColor   = Color.Chocolate;
     this.Paint      += new PaintEventHandler(SpecilButton_Paint);
 }
Example #6
0
        public OptionPanel(Form1 display)
        {
            this.display = display;
            this.x       = display.ClientRectangle.Width - 17;
            this.y       = display.ClientRectangle.Height;
            tmp          = x;
            tmp_x        = x;
            //this.Size = new Size(110, y);
            this.Anchor      = AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom;
            this.MouseEnter += new EventHandler(OnMouseEnter);
            this.MouseLeave += new EventHandler(OnMouseLeave);
            time.Interval    = 30;
            this.Location    = new Point(x - 5, 0);
            ControlRegion.CreateControl(this, global::UIT_Pokemon.Properties.Resources.option_panel);
            this.Image = global::UIT_Pokemon.Properties.Resources.option_panel;

            time.Tick += new EventHandler(OnTimeTick);
            this.Controls.Add(button1);
            this.Controls.Add(button2);
            this.Controls.Add(button3);
            this.Controls.Add(button4);
            this.Controls.Add(button5);
            this.Controls.Add(button6);
            button1.Location = new Point(21, 66);
            button2.Location = new Point(24, 168);
            button3.Location = new Point(25, 271);
            button4.Location = new Point(27, 380);
            button5.Location = new Point(27, 484);
            button6.Location = new Point(28, 586);
            button1.Size     = new Size(62, 65);
            button2.Size     = new Size(61, 65);
            button3.Size     = new Size(61, 65);
            button4.Size     = new Size(61, 65);
            button5.Size     = new Size(61, 65);
            button6.Size     = new Size(61, 65);
            ControlRegion.CreateControl(button1, CollectionImage.Button_option[0]);
            ControlRegion.CreateControl(button2, CollectionImage.Button_option[1]);
            ControlRegion.CreateControl(button3, CollectionImage.Button_option[2]);
            ControlRegion.CreateControl(button4, CollectionImage.Button_option[3]);
            ControlRegion.CreateControl(button5, CollectionImage.Button_option[4]);
            ControlRegion.CreateControl(button6, CollectionImage.Button_option[5]);

            button1.Image       = CollectionImage.Button_option[0];
            button2.Image       = CollectionImage.Button_option[1];
            button3.Image       = CollectionImage.Button_option[2];
            button4.Image       = CollectionImage.Button_option[3];
            button5.Image       = CollectionImage.Button_option[4];
            button6.Image       = CollectionImage.Button_option[5];
            button1.MouseEnter += new EventHandler(button1_MouseEnter);
            button2.MouseEnter += new EventHandler(button2_MouseEnter);
            button3.MouseEnter += new EventHandler(button3_MouseEnter);
            button4.MouseEnter += new EventHandler(button4_MouseEnter);
            button5.MouseEnter += new EventHandler(button5_MouseEnter);
            button6.MouseEnter += new EventHandler(button6_MouseEnter);
            button1.MouseLeave += new EventHandler(button1_MouseLeave);
            button2.MouseLeave += new EventHandler(button2_MouseLeave);
            button3.MouseLeave += new EventHandler(button3_MouseLeave);
            button4.MouseLeave += new EventHandler(button4_MouseLeave);
            button5.MouseLeave += new EventHandler(button5_MouseLeave);
            button6.MouseLeave += new EventHandler(button6_MouseLeave);
            button1.MouseClick += new MouseEventHandler(button1_MouseClick);
            button2.MouseClick += new MouseEventHandler(button2_MouseClick);
            button3.MouseClick += new MouseEventHandler(button3_MouseClick);
            button4.MouseClick += new MouseEventHandler(button4_MouseClick);
            button5.MouseClick += new MouseEventHandler(button5_MouseClick);
            button6.MouseClick += new MouseEventHandler(button6_MouseClick);
        }