Пример #1
0
 public SetupPrereqChecks(SetupMode mode, SetupRole role, GlobalParameters globalParameters)
 {
     this.mode                = mode;
     this.role                = role;
     this.globalParameters    = globalParameters;
     this.DataProviderFactory = new DataProviderFactory();
 }
Пример #2
0
 private void methodValueChanged(object sender, PropertyChangedEventArgs args)
 {
     singleEventHandlerScope.Try(() =>
     {
         GlobalParameters.SetParamValueOnMatching(((ParamViewModel)sender));
     });
 }
Пример #3
0
        protected override void InternalProcessRecord()
        {
            TaskLogger.LogEnter();
            ITopologyConfigurationSession topologyConfigurationSession = DirectorySessionFactory.Default.CreateTopologyConfigurationSession(ConsistencyMode.FullyConsistent, ADSessionSettings.FromRootOrgScopeSet(), 468, "InternalProcessRecord", "f:\\15.00.1497\\sources\\dev\\Management\\src\\Management\\Deployment\\TestSetupPrerequisites.cs");
            string           targetDir                   = (this.TargetDir != null) ? this.TargetDir.ToString() : null;
            Version          exchangeVersion             = new Version(this.ExchangeVersion);
            int              adamport                    = this.ADAMPort;
            int              adamsslport                 = this.ADAMSSLPort;
            bool             createPublicDB              = this.CreatePublicDB;
            bool             customerFeedbackEnabled     = this.CustomerFeedbackEnabled != null && this.CustomerFeedbackEnabled.Value;
            string           newProvisionedServerName    = this.NewProvisionedServerName;
            string           removeProvisionedServerName = this.RemoveProvisionedServerName;
            Fqdn             fqdn             = topologyConfigurationSession.ServerSettings.PreferredGlobalCatalog(TopologyProvider.LocalForestFqdn);
            GlobalParameters globalParameters = new GlobalParameters(targetDir, exchangeVersion, adamport, adamsslport, createPublicDB, customerFeedbackEnabled, newProvisionedServerName, removeProvisionedServerName, (fqdn != null) ? fqdn : "", (this.DomainController != null) ? this.DomainController.ToString() : "", this.PrepareDomain, this.PrepareSCT, this.PrepareOrganization, this.PrepareSchema, this.PrepareAllDomains, this.ADInitError, this.LanguagePackDir, this.LanguagesAvailableToInstall, this.SufficientLanguagePackDiskSpace, this.LanguagePacksInstalled, this.AlreadyInstallUMLanguages, this.LanguagePackVersioning, this.ActiveDirectorySplitPermissions != null && this.ActiveDirectorySplitPermissions.Value, this.SetupRoles, this.GetIgnoreFilesInUseFlag(), this.HostingDeploymentEnabled, this.PathToDCHybridConfigFile, this.IsDatacenter);

            try
            {
                TaskLogger.LogAllAsInfo = true;
                SetupPrereqChecks setupPrereqChecks = new SetupPrereqChecks(this.PrereqSetupMode, this.PrereqSetupRoles, globalParameters);
                setupPrereqChecks.DoCheckPrereqs(new Action <int>(this.WriteProgressRecord), this);
            }
            finally
            {
                TaskLogger.LogAllAsInfo = false;
            }
            TaskLogger.LogExit();
        }
Пример #4
0
        public Dictionary <int, List <Error> > GetErrors()
        {
            ErrorsDict = new Dictionary <int, List <Error> >();

            using (var document = WordprocessingDocument.Open(filePath, true))
            {
                var styles = document.MainDocumentPart.StyleDefinitionsPart.Styles.DocDefaults;
                XmlData = document.MainDocumentPart.Document.Body;

                SetDefaults(styles);
                SetChapters();
                SetAttributes();

                glParameters = new GlobalParameters(Attributes["pgMar"][0],
                                                    Attributes["pgMar"][1],
                                                    Attributes["pgMar"][2],
                                                    Attributes["pgMar"][3]);

                foreach (var chapter in Chapters)
                {
                    var erList = new List <Error>();
                    foreach (var paragraph in chapter.Value.Paragraphs)
                    {
                        erList.AddRange(paragraph.ErrorList);
                    }

                    if (erList.Count > 0)
                    {
                        ErrorsDict.Add(chapter.Key, erList);
                    }
                }

                return(ErrorsDict);
            }
        }
Пример #5
0
        private GlobalParameters GetGlobalParameters(OpenXmlElement XML)
        {
            GlobalParameters globalParameters = new GlobalParameters(true);

            foreach (var parameter in XML)
            {
                if (parameter.LocalName == NameInXML.PageMargin)
                {
                    var attributes = parameter.GetAttributes();

                    var top = attributes.First(a => a.LocalName == "top").Value.ToString();
                    globalParameters.AddParameter(NameForUsers.MarginTop, top, ValueManager.ValueTypes.Sm);

                    var bottom = attributes.First(a => a.LocalName == "bottom").Value.ToString();
                    globalParameters.AddParameter(NameForUsers.MarginBottom, bottom, ValueManager.ValueTypes.Sm);

                    var left = attributes.First(a => a.LocalName == "left").Value.ToString();
                    globalParameters.AddParameter(NameForUsers.MarginLeft, left, ValueManager.ValueTypes.Sm);

                    var right = attributes.First(a => a.LocalName == "right").Value.ToString();
                    globalParameters.AddParameter(NameForUsers.MarginRight, right, ValueManager.ValueTypes.Sm);
                }
            }

            return(globalParameters);
        }
Пример #6
0
        public void InitializeColorParameters()
        {
            GlobalParameters param = PlayerInfo.GetGlobalParameters();

            normalCol    = param.normal;
            rareCol      = param.rare;
            epicCol      = param.epic;
            legendaryCol = param.legendary;
        }
Пример #7
0
 /// <summary>
 /// Load all dictionary entries from the given file.
 /// </summary>
 public void Load(string fileName)
 {
     _entries.Clear();
     _noUpdateEvents = true;
     GlobalParameters.SetGlobalParameters();
     Append(fileName);
     ParameterUpdater.Update();
     _noUpdateEvents = false;
 }
Пример #8
0
        private void BuildDropProbabilityTable()
        {
            GlobalParameters param = PlayerInfo.GetGlobalParameters();

            normalDropLimit = param.normalDropRate;
            rareDropLimit   = normalDropLimit + param.rareDropRate;
            epicDropLimit   = rareDropLimit + param.epicDropRate;

            modifierProbability = param.modifierProbability;
        }
 public ActionResult Edit(GlobalParameters globalparameters)
 {
     if (ModelState.IsValid)
     {
         db.Entry(globalparameters).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     //ViewBag.CurrencyID = new SelectList(db.Currencies, "ID", "FullDescription", globalparameters.CurrencyID);
     return(View(globalparameters));
 }
        // GET: /GlobalParameters/Edit/5

        public ActionResult Edit(int id = 0)
        {
            GlobalParameters globalparameters = db.GlobalParameteres.Find(id);

            if (globalparameters == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CurrencyID = new SelectList(db.Currencies, "ID", "FullDescription", globalparameters.CurrencyID);
            return(View(globalparameters));
        }
Пример #11
0
 /// <summary>
 /// Merge the source context into the dest context
 /// </summary>
 /// <param name="context">The other context</param>
 /// <returns>The result of the merge</returns>
 public void MergeGlobalContexts(JObject context)
 {
     if (GlobalParameters == null)
     {
         GlobalParameters = context;
     }
     else if (context != null)
     {
         GlobalParameters.Merge(context,new JsonMergeSettings { MergeArrayHandling=MergeArrayHandling.Replace,MergeNullValueHandling=MergeNullValueHandling.Merge});
     }
 }
Пример #12
0
        public CourseWork()
        {
            GlobalParameters = new GlobalParameters(
                Math.Round(2 * Consts.Sm).ToString(),
                Math.Round(1.5 * Consts.Sm).ToString(),
                Math.Round(2 * Consts.Sm).ToString(),
                Math.Round(3 * Consts.Sm).ToString());



            ParagraphParameters = new ParagraphParameters((14 * Consts.Pt).ToString(), "Times New Roman");
        }
Пример #13
0
 // Use this for initialization
 void Start()
 {
     fallenPins              = new List <GameObject>();
     grabbedPins             = new List <GameObject>();
     pinSaverSystem          = GameObject.Find("pin saver");
     pinCleanerSystem        = GameObject.Find("pin cleaner");
     pinCleanerTarget        = GameObject.Find("cleaner target");
     pinSaverTarget          = GameObject.Find("saver target");
     pinCleanerRecoverTarget = GameObject.Find("cleaner recover target");
     parameters              = GameObject.Find("RightLane").GetComponent <GlobalParameters>();
     parameters.initNextFrame();
 }
Пример #14
0
        public CourseWork()
        {
            GlobalParameters = new GlobalParameters(false);
            GlobalParameters.AddParameter(NameForUsers.MarginTop, "2", ValueManager.ValueTypes.Sm);
            GlobalParameters.AddParameter(NameForUsers.MarginBottom, "2", ValueManager.ValueTypes.Sm);
            GlobalParameters.AddParameter(NameForUsers.MarginLeft, "3", ValueManager.ValueTypes.Sm);
            GlobalParameters.AddParameter(NameForUsers.MarginRight, "1,5", ValueManager.ValueTypes.Sm);

            TextParameters = new TextParameters(false);
            TextParameters.AddParameter(NameForUsers.FontFamily, "Times New Roman", ValueManager.ValueTypes.FontFamily);
            TextParameters.AddParameter(NameForUsers.FontSize, "14", ValueManager.ValueTypes.Pt);
        }
Пример #15
0
 public void Accept(Isop.Client.Transfer.Root res)
 {
     root = res;
     foreach (var pvm in res.GlobalParameters.Select(Map))
     {
         GlobalParameters.Add(pvm);
     }
     foreach (var cvm in res.Controllers.Select(Map))
     {
         Controllers.Add(cvm);
     }
 }
Пример #16
0
        public static void IsChargeAlert(Charge charge)
        {
            TCRMDBContext _db = new TCRMDBContext();
            //add try catch in higher level
            GlobalParameters globalParameters = new GlobalParameters();

            globalParameters = _db.GlobalParameteres.First();
            int AlertRangeInDays = globalParameters.AlertRangeInDays;
            int daysToChargeDue  = (int)(charge.ChargeDate - DateTime.Now).TotalDays;

            if (daysToChargeDue < globalParameters.AlertRangeInDays)
            {
                charge.IsAlert = true;
            }
        }
Пример #17
0
        public void Load_MapTest()
        {
            //arrange
            Terrain          terra        = new Terrain();
            GlobalParameters glb_settings = new GlobalParameters();

            glb_settings.set_map_dim_parameters(60, 40);
            terra.glb_settings = glb_settings;

            //act
            terra.Load_Map();
            var expected = (int)TerrainKind.grass;

            //assert
            Assert.AreEqual(terra.MapTerrain[0, 0], expected);
        }
Пример #18
0
        public void FriendFoeInitialisationTest()
        {
            //arrange
            Terrain          terra        = new Terrain();
            GlobalParameters glb_settings = new GlobalParameters();

            glb_settings.set_map_dim_parameters(60, 40);
            terra.glb_settings = glb_settings;

            //act
            terra.FriendFoeInitialisation();
            var expected = (int)FriendFoeKind.foe;

            //assert
            Assert.AreEqual(terra.FriendFoe[30, 0], expected);
        }
Пример #19
0
        private GlobalParameters GetExampleGlobalParameters()
        {
            var globalParameters = new GlobalParameters
            {
                InstrumentName        = "Test",
                DateStarted           = "08/09/2017 8:00:00 am",
                NumFrames             = 10,
                TimeOffset            = 10000,
                BinWidth              = 1.0,
                Bins                  = 138000,
                TOFCorrectionTime     = 0.0f,
                FrameDataBlobVersion  = 0.1f,     // Legacy parameter that was always 0.1
                ScanDataBlobVersion   = 0.1f,     // Legacy parameter that was always 0.1
                TOFIntensityType      = "ADC",
                DatasetType           = "",
                Prescan_TOFPulses     = 50,
                Prescan_Accumulations = 20,
                Prescan_TICThreshold  = 300,
                Prescan_Continuous    = false,
                Prescan_Profile       = "SA_4ms.txt"
            };

            return(globalParameters);
        }
Пример #20
0
    // Update is called once per frame
    //void Update () {

    //}

    public static void ClearCandy()
    {
        PlayerPrefs.DeleteAll();
        GlobalParameters.clear();
    }
Пример #21
0
 private void Awake()
 {
     Params             = this;
     Global_GUID_length = 5;
 }
Пример #22
0
 } 

 public MLRequest() 

 {
     
            this.Inputs = new Inputs(); 
            this.GlobalParameters = new GlobalParameters(); 

 }
 internal ConfigurationBuilder(GlobalParameters global)
 {
     GlobalBuilder = new GlobalConfigurationBuilder(global);
 }
Пример #24
0
 internal void LoadInfo()
 {
     _globalParams = Controller.GlobalParameters.Clone();
     globalParametersBindingSource.DataSource = _globalParams;
 }
Пример #25
0
 internal GlobalConfigurationBuilder(GlobalParameters parameters)
 {
     Parameters = parameters;
 }
Пример #26
0
        public BaseItem()
        {
            var refItem = this;

            GlobalParameters.Register(ref refItem);
        }
Пример #27
0
 public PrereqAnalysis(IDataProviderFactory dataSourceProvider, PrereqAnalysisMemberBuilder memberBuilder, PrereqConclusionSetBuilder conclusionSetBuilder, SetupMode setupModes, SetupRole setupRoles, GlobalParameters prereqAnalysisParameters, AnalysisThreading threadMode) : base(dataSourceProvider, memberBuilder, conclusionSetBuilder, (Microsoft.Exchange.Management.Deployment.Analysis.AnalysisMember x) => (!x.Features.HasFeature <ModeFeature>() || x.Features.GetFeature <ModeFeature>().Contains(setupModes)) && (!x.Features.HasFeature <RoleFeature>() || x.Features.GetFeature <RoleFeature>().Contains(setupRoles)), (Microsoft.Exchange.Management.Deployment.Analysis.AnalysisMember x) => (!x.Features.HasFeature <ModeFeature>() || x.Features.GetFeature <ModeFeature>().Contains(setupModes)) && (!x.Features.HasFeature <RoleFeature>() || x.Features.GetFeature <RoleFeature>().Contains(setupRoles)), threadMode)
 {
     this.setupModes = setupModes;
     this.setupRoles = setupRoles;
     this.prereqAnalysisParameters = prereqAnalysisParameters;
     this.BuildPrereqSettings();
     this.BuildPrereqRules();
 }
Пример #28
0
        public Parameters(GlobalParameters globalParameter)
        {
            InitializeComponent();

            DataContext = globalParameter;
        }
Пример #29
0
 // Use this for initialization
 void Start()
 {
     parameters = GameObject.Find("RightLane").GetComponent <GlobalParameters>();
 }
Пример #30
0
 private void Clear()
 {
     this.root = new Isop.Client.Transfer.Root();
     GlobalParameters.Clear();
     Controllers.Clear();
 }