コード例 #1
0
 private void tsmiSignOut_Click(object sender, EventArgs e)
 {
     UserHelper.SignOutUser();
     SetLeftMenuButtonsVisibility(false);
     msPrincipal.Visible = false;
     lblUser.Text        = string.Empty;
     ViewManager.SetMainControl(ERMTControl.Login);
 }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
 private void tsmiReorderFactorsCurrentModel_Click(object sender, EventArgs e)
 {
     ViewManager.SetMainControl(ERMTControl.ModelReorderFactors);
 }
コード例 #4
0
 private void tsmiEditCurrentModel_Click(object sender, EventArgs e)
 {
     ViewManager.SetMainControl(ERMTControl.ModelEdit);
 }
コード例 #5
0
 private void tsmiShowTestControl_Click(object sender, EventArgs e)
 {
     ViewManager.SetMainControl(ERMTControl.TestUserControl);
 }
コード例 #6
0
 private void tsmiCreateNewModel_Click(object sender, EventArgs e)
 {
     ViewManager.SetMainControl(ERMTControl.ModelNew);
 }
コード例 #7
0
 private void tsmiMarkerTypes_Click(object sender, EventArgs e)
 {
     ViewManager.SetMainControl(ERMTControl.MarkerTypeCRUD);
 }
コード例 #8
0
 private void pbRiskAndAction_Click(object sender, EventArgs e)
 {
     ViewManager.SetMainControl(ERMTControl.RiskActionRegister);
 }
コード例 #9
0
 private void tsmiModifyPhase_Click(object sender, EventArgs e)
 {
     ViewManager.SetMainControl(ERMTControl.ElectoralCycleModifyPhase);
 }
コード例 #10
0
 private void tsmiViewFactors_Click(object sender, EventArgs e)
 {
     ViewManager.SetMainControl(ERMTControl.KnowledgeResources);
 }
コード例 #11
0
 private void tsmiReorderFactors_Click(object sender, EventArgs e)
 {
     ViewManager.SetMainControl(ERMTControl.FactorReorder);
 }
コード例 #12
0
 private void tsmiModifyFactor_Click(object sender, EventArgs e)
 {
     ViewManager.SetMainControl(ERMTControl.FactorModify);
 }
コード例 #13
0
 private void pbRiskMapping_Click(object sender, EventArgs e)
 {
     ViewManager.SetMainControl(ERMTControl.RiskMapping);
 }
コード例 #14
0
 private void tsmiAbout_Click(object sender, EventArgs e)
 {
     ViewManager.SetMainControl(ERMTControl.About);
 }
コード例 #15
0
 private void tsmiAdminRegions_Click(object sender, EventArgs e)
 {
     ViewManager.SetMainControl(ERMTControl.EditRegion);
 }
コード例 #16
0
 private void tsmiChangePassword_Click(object sender, EventArgs e)
 {
     ViewManager.SetMainControl(ERMTControl.UserResetPassword);
 }
コード例 #17
0
 private void tsmiAddNewUser_Click(object sender, EventArgs e)
 {
     ViewManager.SetMainControl(ERMTControl.UserNew);
 }
コード例 #18
0
 private void tsmiModifyExistingUser_Click(object sender, EventArgs e)
 {
     ViewManager.SetMainControl(ERMTControl.UserModify);
 }
コード例 #19
0
 private void pbElectoralCycle_Click(object sender, EventArgs e)
 {
     ViewManager.SetMainControl(ERMTControl.ElectoralCycle);
 }