GetInstance() public static méthode

public static GetInstance ( ) : ConfigForm
Résultat ConfigForm
 //设置
 private void ConfigMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         configForm = ConfigForm.GetInstance();
         configForm.ReloadConfigHandlor += new ConfigForm.ReloadConfigHandler(ReloadNavigation);
         configForm.Show();
         configForm.Activate();
     }
     catch
     { }
 }
Exemple #2
0
 private void BtnSet_Click(object sender, EventArgs e)
 {
     try
     {
         ConfigForm form = ConfigForm.GetInstance();
         form.ReloadConfigHandlor += new ConfigForm.ReloadConfigHandler(InitSearchAndConfigWebsite);
         form.Show();
         form.Activate();
     }
     catch (Exception ex)
     {
         log.WriteLog(ex.ToString());
     }
 }
 //设置
 private void ConfigToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         form_Config = ConfigForm.GetInstance();
         form_Config.ReloadConfigHandlor += new ConfigForm.ReloadConfigHandler(ReloadNavigation);
         form_Config.Show();
         form_Config.Activate();
     }
     catch (Exception ex)
     {
         log.WriteLog(ex.ToString());
     }
 }