Exemplo n.º 1
0
 // Token: 0x06000111 RID: 273 RVA: 0x00006FE4 File Offset: 0x000051E4
 public override int Run()
 {
     ExSetupUI.exitCode = (ExitCode)base.Run();
     if (ExSetupUI.exitCode == ExitCode.Success)
     {
         bool flag = false;
         if (base.ParsedArguments.ContainsKey("mode"))
         {
             SetupOperations setupOperations = (SetupOperations)base.ParsedArguments["mode"];
             if (setupOperations == SetupOperations.Install || setupOperations == SetupOperations.Upgrade)
             {
                 flag = SetupLauncherHelper.IsRestart(base.ParsedArguments);
                 if (flag)
                 {
                     this.TryAddUpdatesParameterCopyMspFiles(SetupLauncherHelper.GetUpdatesDirFromRegistry(), Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "Temp\\ExchangeSetup\\MspTemp"), Path.Combine(SetupHelper.WindowsDir, "Temp\\ExchangeSetup"));
                 }
             }
         }
         SetupWizard mainForm = new SetupWizard(this, !flag, SetupLauncherHelper.IsExchangeInstalled());
         if (ExSetupUI.exitCode == ExitCode.Success)
         {
             SplashScreen.SplashInstance.Hide();
             Application.Run(mainForm);
         }
         SplashScreen.SplashInstance.CloseSplash();
     }
     return((int)ExSetupUI.exitCode);
 }
Exemplo n.º 2
0
        public void Init()
        {
            var ops = new SetupOperations();

            ops.TruncateTableNamesTable();
            ops.PopulateTableNamesTable();
        }
Exemplo n.º 3
0
        public void TableNamesHasRecords_SetupOperations()
        {
            var ops         = new SetupOperations();
            var recordCount = ops.TableNamesRecordCount();

            Assert.IsTrue(ops.HasException == false);
            Assert.IsTrue(recordCount > 0);
        }
Exemplo n.º 4
0
        public void AddDiscounts()
        {
            SetupOperations setup = new SetupOperations();

            setup.ClearDiscounts();
            setup.AddDiscount("ThreeA", "3A", 130);
            setup.AddDiscount("TwoB", "2B", 45);
            setup.AddDiscount("CnD", "C+D", 30);
        }
Exemplo n.º 5
0
        public void TruncateTableNamesTable()
        {
            var ops    = new SetupOperations();
            var result = ops.TruncateTableNamesTable();

            Assert.IsTrue(ops.HasException == false);
            Assert.IsTrue(result,
                          "Expected TableNames table to have been truncated");
        }
Exemplo n.º 6
0
        public void Test_Scenario_Three()
        {
            SetupOperations setup  = new SetupOperations();
            Order           order3 = setup.LoadCart(new List <char> {
                'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'C', 'D'
            });
            decimal grandTotal = setup.CalculateCharge(order3);

            Assert.AreEqual((decimal)280, grandTotal);
        }
Exemplo n.º 7
0
        void AddSKUs()
        {
            SetupOperations setup = new SetupOperations();

            setup.ClearSKUs();
            setup.AddSKU("A", 50);
            setup.AddSKU("B", 30);
            setup.AddSKU("C", 20);
            setup.AddSKU("D", 15);
        }