private void tsmiSignOut_Click(object sender, EventArgs e) { UserHelper.SignOutUser(); SetLeftMenuButtonsVisibility(false); msPrincipal.Visible = false; lblUser.Text = string.Empty; ViewManager.SetMainControl(ERMTControl.Login); }
private static void Main(string[] args) { Trace.WriteLine("Program.cs"); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); #if !DEBUG Splash.ShowSplash(500); Thread.Sleep(4000); Splash.Fadeout(); #endif //LogHelper.ConfigureLog(); ConfigurationSettingsHelper.SetInstanceEndpointAddress(); Boolean serverAvailable = ConfigurationSettingsHelper.TestServer(); if (!serverAvailable) { CustomMessageBox.ShowError(ResourceHelper.GetResourceText("ServerConnectionError")); ServerSettings s = new ServerSettings(); s.ShowDialog(); Application.Exit(); } else { XmlDocument doc = new XmlDocument(); String configFileName = Utils.DirectoryAndFileHelper.LanguageConfigurationFile; if (File.Exists(configFileName)) { doc.Load(configFileName); try { CultureInfo uiCulture = new CultureInfo(doc.DocumentElement.Attributes["culture"].Value); CultureInfo culture = new CultureInfo("en-GB"); //Thread.CurrentThread.CurrentCulture = culture; Thread.CurrentThread.CurrentCulture = culture; Thread.CurrentThread.CurrentUICulture = uiCulture; } catch (System.Globalization.CultureNotFoundException) { } } PrincipalForm principalForm = ViewManager.CreatePrincipalForm(); ViewManager.SetMainControl(ERMTControl.Login); Application.Run(principalForm); } }
private void tsmiReorderFactorsCurrentModel_Click(object sender, EventArgs e) { ViewManager.SetMainControl(ERMTControl.ModelReorderFactors); }
private void tsmiEditCurrentModel_Click(object sender, EventArgs e) { ViewManager.SetMainControl(ERMTControl.ModelEdit); }
private void tsmiShowTestControl_Click(object sender, EventArgs e) { ViewManager.SetMainControl(ERMTControl.TestUserControl); }
private void tsmiCreateNewModel_Click(object sender, EventArgs e) { ViewManager.SetMainControl(ERMTControl.ModelNew); }
private void tsmiMarkerTypes_Click(object sender, EventArgs e) { ViewManager.SetMainControl(ERMTControl.MarkerTypeCRUD); }
private void pbRiskAndAction_Click(object sender, EventArgs e) { ViewManager.SetMainControl(ERMTControl.RiskActionRegister); }
private void tsmiModifyPhase_Click(object sender, EventArgs e) { ViewManager.SetMainControl(ERMTControl.ElectoralCycleModifyPhase); }
private void tsmiViewFactors_Click(object sender, EventArgs e) { ViewManager.SetMainControl(ERMTControl.KnowledgeResources); }
private void tsmiReorderFactors_Click(object sender, EventArgs e) { ViewManager.SetMainControl(ERMTControl.FactorReorder); }
private void tsmiModifyFactor_Click(object sender, EventArgs e) { ViewManager.SetMainControl(ERMTControl.FactorModify); }
private void pbRiskMapping_Click(object sender, EventArgs e) { ViewManager.SetMainControl(ERMTControl.RiskMapping); }
private void tsmiAbout_Click(object sender, EventArgs e) { ViewManager.SetMainControl(ERMTControl.About); }
private void tsmiAdminRegions_Click(object sender, EventArgs e) { ViewManager.SetMainControl(ERMTControl.EditRegion); }
private void tsmiChangePassword_Click(object sender, EventArgs e) { ViewManager.SetMainControl(ERMTControl.UserResetPassword); }
private void tsmiAddNewUser_Click(object sender, EventArgs e) { ViewManager.SetMainControl(ERMTControl.UserNew); }
private void tsmiModifyExistingUser_Click(object sender, EventArgs e) { ViewManager.SetMainControl(ERMTControl.UserModify); }
private void pbElectoralCycle_Click(object sender, EventArgs e) { ViewManager.SetMainControl(ERMTControl.ElectoralCycle); }