Example #1
0
        private async void AddContact_Load(object sender, EventArgs e)
        {
            LayoutModifier.centerControlHorizontally(this.addBtn);
            this.MaximizeBox  = false;
            this.AcceptButton = addBtn;
            try
            {
                using (var database = new Database())
                {
                    await database.openDatabaseAsync();

                    allUsers_ = await database.selectAllUsersAsync();
                }
                this.usrname.AutoCompleteCustomSource.AddRange(allUsers_.Select(u => u.username_).Where(u => u.Equals(UserMain.user_.username_) == false).ToArray());
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                Logs logs = new Logs();
                logs.writeException(ex);
            }
        }
Example #2
0
 static public void centerControl(Control ctrlToCenter)
 {
     LayoutModifier.centerControlHorizontally(ctrlToCenter);
     LayoutModifier.centerControlVertically(ctrlToCenter);
 }
Example #3
0
 private void Welcome_Load(object sender, EventArgs e)
 {
     LayoutModifier.centerControlHorizontally(signInBtn);
     this.MaximizeBox = false;
 }