public static FRM_Users Instance() { if (instance == null) { instance = new FRM_Users(); } return(instance); }
public FRM_CadUser(FRM_Users frm_lstUser, int id_usuario) { InitializeComponent(); frm_lstUserLocal = frm_lstUser; id_usuarioLocal = id_usuario; rdbPadrao.Checked = true; txtNome.CharacterCasing = CharacterCasing.Upper; cmbPerfil.SelectedIndex = 0; CarregarDept(); if (id_usuarioLocal != 0) { VisualizarUser(); } }
public void mUser_Click(object sender, EventArgs e) { for (int intIndex = Application.OpenForms.Count - 1; intIndex > 0; intIndex--) { if (Application.OpenForms[intIndex] != this) { Application.OpenForms[intIndex].Close(); } } FRM_Users form_user = FRM_Users.Instance(); form_user.MdiParent = this; form_user.Show(); }
private void FRM_Users_FormClosed(object sender, FormClosedEventArgs e) { instance = null; }