示例#1
0
 public SteamServersMain()
 {
     InitializeComponent(); this.Activate();
     this.components.SetStyle(this);
     this.FormBorderStyle = FormBorderStyle.None;
     Region = Region.FromHrgn(Gdi32.CreateRoundRectRgn(0, 0, Width, Height, 5, 5));
 }
示例#2
0
 public SplashScreen()
 {
     InitializeComponent();
     this.components.SetStyle(this);
     this.FormBorderStyle = FormBorderStyle.None;
     Region = System.Drawing.Region.FromHrgn(Gdi32.CreateRoundRectRgn(0, 0, Width, Height, 5, 5));
 }
示例#3
0
        public SteamGuard(string EmailorPhone, string user)
        {
            InitializeComponent(); this.Activate();
            this.components.SetStyle(this);
            this.FormBorderStyle = FormBorderStyle.None;
            Region = Region.FromHrgn(Gdi32.CreateRoundRectRgn(0, 0, Width, Height, 5, 5));

            foreach (var button in this.Controls.OfType <MetroFramework.Controls.MetroButton>())
            {
                IntPtr ptr = Gdi32.CreateRoundRectRgn(1, 1, button.Width, button.Height, 5, 5);
                button.Region = Region.FromHrgn(ptr);
                Gdi32.DeleteObject(ptr);
            }

            lbl_account.Text = user;
            if (EmailorPhone == "Phone")
            {
                lbl_infoemailorPhone.Text = "Enter your two-factor authentication code";
                lbl_emojiInfo.Text        = "📱";
            }
            else
            {
                lbl_infoemailorPhone.Text = "Enter Steam Guard code from your email";
                lbl_emojiInfo.Text        = "📧";
                MongoToolTip.SetToolTip(lbl_emojiInfo, EmailorPhone);
            }
        }
示例#4
0
        public Main()
        {
            InitializeComponent();

            SystemEvents.PowerModeChanged   += OnPowerChange;
            lbl_infoversion.Text             = Program.Version;
            ChatLoggerTabControl.SelectedTab = metroTab_AddAcc;
            this.components.SetStyle(this);
            Region = Region.FromHrgn(Gdi32.CreateRoundRectRgn(0, 0, Width, Height, 5, 5));

            IntPtr ptrLogout = Gdi32.CreateRoundRectRgn(1, 1, btn_logout.Width, btn_logout.Height, 5, 5);

            btn_logout.Region = Region.FromHrgn(ptrLogout);
            Gdi32.DeleteObject(ptrLogout);
            foreach (Control tab in ChatLoggerTabControl.Controls)
            {
                TabPage tabPage = (TabPage)tab;
                foreach (Control control in tabPage.Controls.OfType <MetroButton>())
                {
                    IntPtr ptr = Gdi32.CreateRoundRectRgn(1, 1, control.Width, control.Height, 5, 5);
                    control.Region = Region.FromHrgn(ptr);
                    Gdi32.DeleteObject(ptr);
                }
            }


            lbl_connecting.Visible          = false;
            lbl_currentUsername.Visible     = false;
            btnLabel_PersonaAndFlag.Visible = false;
            btn_logout.Visible         = false;
            panel_steamStates.Visible  = false;
            picBox_SteamAvatar.Visible = false;
        }
示例#5
0
        public NotificationForm(string title, string desc)
        {
            InitializeComponent();
            this.components.SetStyle(this);
            Region = Region.FromHrgn(Gdi32.CreateRoundRectRgn(0, 0, Width, Height, 0, 0));

            // this.lbl_title.Text = title;
            this.txtBox_desc.Text = desc;

            lbl_time.Text = DateTime.Now.ToString("HH:mm");
        }
示例#6
0
        public AddAcc()
        {
            InitializeComponent(); this.Activate();
            this.components.SetStyle(this);
            this.FormBorderStyle = FormBorderStyle.None;
            Region = System.Drawing.Region.FromHrgn(Gdi32.CreateRoundRectRgn(0, 0, Width, Height, 5, 5));

            IntPtr ptr = Gdi32.CreateRoundRectRgn(1, 1, btn_addAcc.Width, btn_addAcc.Height, 5, 5);

            btn_addAcc.Region = Region.FromHrgn(ptr);
            Gdi32.DeleteObject(ptr);
        }
示例#7
0
 public AccSettings()
 {
     InitializeComponent();
     this.components.SetStyle(this);
     Region = Region.FromHrgn(Gdi32.CreateRoundRectRgn(0, 0, Width, Height, 5, 5));
     foreach (var button in this.Controls.OfType <MetroFramework.Controls.MetroButton>())
     {
         IntPtr ptr = Gdi32.CreateRoundRectRgn(1, 1, button.Width, button.Height, 5, 5);
         button.Region = Region.FromHrgn(ptr);
         Gdi32.DeleteObject(ptr);
     }
 }
示例#8
0
 /// <summary>Rounds the region of the control.</summary>
 /// <param name="control">The control to round.</param>
 /// <param name="rounding">The amount of rounding.</param>
 public static void RoundRegion(Control control, int rounding)
 {
     try
     {
         control.Region = Region.FromHrgn(Gdi32.CreateRoundRectRgn(0, 0, control.Width, control.Height, rounding, rounding));
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         throw;
     }
 }
示例#9
0
        public Update(string up)
        {
            InitializeComponent();

            lbl_infoversion.Text = up;
            this.components.SetStyle(this);
            Region = Region.FromHrgn(Gdi32.CreateRoundRectRgn(0, 0, Width, Height, 5, 5));

            IntPtr ptr = Gdi32.CreateRoundRectRgn(1, 1, btn_installupdate.Width, btn_installupdate.Height, 5, 5);

            btn_installupdate.Region = Region.FromHrgn(ptr);
            Gdi32.DeleteObject(ptr);
        }
示例#10
0
 public AFKMessages()
 {
     InitializeComponent();
     this.components.SetStyle(this);
     this.FormBorderStyle = FormBorderStyle.None;
     Region = Region.FromHrgn(Gdi32.CreateRoundRectRgn(0, 0, Width, Height, 5, 5));
     foreach (var button in this.Controls.OfType <MetroButton>())
     {
         IntPtr ptr = Gdi32.CreateRoundRectRgn(1, 1, button.Width, button.Height, 5, 5);
         button.Region = Region.FromHrgn(ptr);
         Gdi32.DeleteObject(ptr);
     }
 }
示例#11
0
 /// <summary>Rounds the region of the control.</summary>
 /// <param name="form">The form control to round.</param>
 /// <param name="rounding">The amount of rounding.</param>
 public static void RoundRegion(Form form, int rounding)
 {
     try
     {
         form.FormBorderStyle = FormBorderStyle.None;
         form.Region          = Region.FromHrgn(Gdi32.CreateRoundRectRgn(0, 0, form.Width, form.Height, rounding, rounding));
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         throw;
     }
 }
示例#12
0
        //https://stackoverflow.com/questions/6932792/how-to-create-a-custom-messagebox
        public Info(string title, string description)
        {
            InitializeComponent();
            this.components.SetStyle(this);
            this.lbl_title.Text   = title;
            this.txtBox_info.Text = description;
            this.FormBorderStyle  = FormBorderStyle.None;
            Region = Region.FromHrgn(Gdi32.CreateRoundRectRgn(0, 0, Width, Height, 5, 5));

            IntPtr ptr = Gdi32.CreateRoundRectRgn(1, 1, btn_okinfo.Width, btn_okinfo.Height, 5, 5);

            btn_okinfo.Region = Region.FromHrgn(ptr);
            Gdi32.DeleteObject(ptr);
        }
示例#13
0
 public ProfileBackground()
 {
     InitializeComponent();
     this.Activate();
     this.FormBorderStyle = FormBorderStyle.None;
     this.components.SetStyle(this);
     Region = System.Drawing.Region.FromHrgn(Gdi32.CreateRoundRectRgn(0, 0, Width, Height, 5, 5));
     foreach (var button in this.Controls.OfType <MetroFramework.Controls.MetroButton>())
     {
         IntPtr ptr = Gdi32.CreateRoundRectRgn(1, 1, button.Width, button.Height, 5, 5);
         button.Region = Region.FromHrgn(ptr);
         Gdi32.DeleteObject(ptr);
     }
 }
示例#14
0
        /// <summary>
        /// https://stackoverflow.com/questions/6932792/how-to-create-a-custom-messagebox
        /// </summary>
        /// <param name="title"></param>
        public Info(string title, string description)
        {
            InitializeComponent();
            this.components.SetStyle(this);
            this.lbl_title.Text   = title;
            this.txtBox_info.Text = description;
            this.FormBorderStyle  = FormBorderStyle.None;
            Region = Region.FromHrgn(Gdi32.CreateRoundRectRgn(0, 0, Width, Height, 5, 5));

            foreach (Button control in this.Controls.OfType <MetroButton>())
            {
                IntPtr ptr = Gdi32.CreateRoundRectRgn(1, 1, control.Width, control.Height, 5, 5);
                control.Region = Region.FromHrgn(ptr);
                Gdi32.DeleteObject(ptr);
            }
        }
示例#15
0
        public GatherSteamGroups()
        {
            InitializeComponent();
            this.components.SetStyle(this);
            Region = Region.FromHrgn(Gdi32.CreateRoundRectRgn(0, 0, Width, Height, 5, 5));
            this.MercuryTabControlGroups.SelectedIndex = 0;

            foreach (Control tab in MercuryTabControlGroups.Controls)
            {
                TabPage tabPage = (TabPage)tab;
                foreach (Control control in tabPage.Controls.OfType <MetroButton>())
                {
                    IntPtr ptr = Gdi32.CreateRoundRectRgn(1, 1, control.Width, control.Height, 5, 5);
                    control.Region = Region.FromHrgn(ptr);
                    Gdi32.DeleteObject(ptr);
                }
            }
        }
示例#16
0
        public CSGSITools_Form()
        {
            InitializeComponent();

            this.FormBorderStyle = FormBorderStyle.None;
            Region = Region.FromHrgn(Gdi32.CreateRoundRectRgn(0, 0, Width, Height, 5, 5));

            lbl_currentMap.Visible        = false;
            lbl_CTRounds.Visible          = false;
            lbl_TRounds.Visible           = false;
            lbl_playerstate.Visible       = false;
            lbl_currentRoundState.Visible = false;

            cb_Alertsounds.SelectedIndex = 0;
            cb_focus.SelectedIndex       = 0;
            combo_states.SelectedIndex   = 8;

            TrolhaTimer.Tick += TrolhaTimer_Tick;
            lbl_version.Text  = Program.Version;

            physicalMonitors = DisplayConfiguration.GetPhysicalMonitors(DisplayConfiguration.GetCurrentMonitor());
        }
示例#17
0
 public AlertForm()
 {
     InitializeComponent();
     this.FormBorderStyle = FormBorderStyle.None;
     Region = System.Drawing.Region.FromHrgn(Gdi32.CreateRoundRectRgn(0, 0, Width, Height, 20, 20).DangerousGetHandle());
 }