Example #1
0
        public static void Apply(System.Windows.Forms.Form Form, int _Elipse)
        {
            int num  = 0;
            int num1 = 0;
            int num2;

            try
            {
                Form.FormBorderStyle = FormBorderStyle.None;
                Form.Region          = Region.FromHrgn(Elipse.CreateRoundRectRgn(0, 0, Form.Width, Form.Height, _Elipse, _Elipse));
            }
            catch (Exception exception)
            {
            }
            do
            {
                if (num != num1)
                {
                    break;
                }
                num1 = 1;
                num2 = num;
                num  = 1;
            }while (1 <= num2);
        }
Example #2
0
 private void ServoFlatButton_Resize(object sender, EventArgs e)
 {
     if (this.limage.Image != null)
     {
         this.limage.Width = this.limage.Height;
     }
     else
     {
         this.limage.Width = 0;
     }
     if (this.rimage.Image != null)
     {
         this.rimage.Width = this.rimage.Height;
     }
     else
     {
         this.rimage.Width = 0;
     }
     this.rimage.Top = base.Height / 2 - this.rimage.Height / 2;
     this.limage.Top = this.rimage.Top;
     if (this.IconMarginLeft <= 0)
     {
         this.limage.Left = this.limage.Top;
     }
     else
     {
         this.limage.Left = this.IconMarginLeft;
     }
     if (this.IconMarginRight <= 0)
     {
         this.rimage.Left = base.Width - this.rimage.Width - this.rimage.Top;
     }
     else
     {
         this.rimage.Left = this.IconMarginRight;
     }
     this.txttext.Top = base.Height / 2 - this.txttext.Height / 2;
     this.method_0();
     Elipse.Apply(this, this.int_0);
 }