Пример #1
0
 public void SetFormProperties()
 {
     string user = RegistryAccess.DefaultUsername;
     if (LocalDatabase.ContainsUser(user))
     {
         this.Text = string.Format(this.Tag.ToString(), user, LocalDatabase.GetUserid(user));
     }
     else
     {
         string msg = "Looks like you didn't set a default user-name." + Environment.NewLine;
         msg += "It is extremely important to set a default user-name to enable many features." + Environment.NewLine;
         msg += "Press OK to set it now. Or, you can set it later from the menu bar options.";
         if (MessageBox.Show(msg, Application.ProductName, MessageBoxButtons.OKCancel)
             == System.Windows.Forms.DialogResult.OK)
         {
             Interactivity.ShowUserNameForm();
         }
     }
 }
Пример #2
0
 private void setDefaultUserToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Interactivity.ShowUserNameForm();
 }
Пример #3
0
 private void username_button1_Click(object sender, EventArgs e)
 {
     Interactivity.ShowUserNameForm();
 }