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(); } } }
private void setDefaultUserToolStripMenuItem_Click(object sender, EventArgs e) { Interactivity.ShowUserNameForm(); }
private void username_button1_Click(object sender, EventArgs e) { Interactivity.ShowUserNameForm(); }