public Vendoring() { Blacklist.Clear(); myStep = Steps.PortHome; AddChild(new Decorator(rem => myStep == Steps.PortHome,PortHome())); AddChild(new Decorator(rem => myStep == Steps.Identify, new Action((ActionDelegate)IdentifyItems))); AddChild(new Decorator(rem => myStep == Steps.MoveToStash, MoveTo(getStash(null), Steps.InteractStash))); AddChild(new Decorator(rem => myStep == Steps.InteractStash, new Action((ActionDelegate)InteractWithStash))); AddChild(new Decorator(rem => myStep == Steps.Stash, new Action((ActionDelegate)Stash))); AddChild(new Decorator(rem => myStep == Steps.MoveToSmithy, MoveTo(GetSmithy(null), Steps.InteractSmithy))); AddChild(new Decorator(rem => myStep == Steps.InteractSmithy, new Action((ActionDelegate)InteractWithSmithy))); AddChild(new Decorator(rem => myStep == Steps.Salvage, new Action((ActionDelegate)Salvage))); AddChild(new Decorator(rem => myStep == Steps.MoveToStash2, MoveTo(getStash(null), Steps.InteractStash2))); AddChild(new Decorator(rem => myStep == Steps.InteractStash2, new Action((ActionDelegate)InteractWithStash2))); AddChild(new Decorator(rem => myStep == Steps.Stash2, new Action((ActionDelegate)Stash2))); AddChild(new Decorator(rem => myStep == Steps.MoveToRepair, MoveTo(getRepairman(null), Steps.TalkRepairman))); AddChild(new Decorator(rem => myStep == Steps.TalkRepairman, new Action((ActionDelegate)TalkToRepairman))); AddChild(new Decorator(rem => myStep == Steps.Repair, new Action((ActionDelegate)RepairAndSell))); AddChild(new Decorator(rem => myStep == Steps.MoveToPortal, MoveTo(getPortal(null), Steps.TakePortal))); AddChild(new Decorator(rem => myStep == Steps.TakePortal,new Action((ActionDelegate)TakePortal))); }
public StepSettings(string [] args) { if (args != null) { for (int i = 0; i < args.Length; i++) { if (string.Compare(args[i], GET_PROJECTS, true) == 0) steps |= Steps.GetProjectsFromDXVCS; else if (string.Compare(args[i], BUILD_PROJECTS, true) == 0) steps |= Steps.Build; else if (string.Compare(args[i], TEST_PROJECTS, true) == 0) steps |= Steps.RunTests; else if (string.Compare(args[i], ENV_INIT, true) == 0) steps |= Steps.EnvironmentInitialization; else if (string.Compare(args[i], REMOVE_PROJECTS, true) == 0) steps |= Steps.RemoveProjectsDirectories; else if (string.Compare(args[i], COPY_PROJECTS, true) == 0 && i < args.Length - 1) { CopyPath = args[i + 1]; steps |= Steps.CopyDirs; } else if (string.Compare(args[i], COLLECT_ARTIFATCS, true) == 0) steps |= Steps.CollectArtifacts; else if(string.Compare(args[i], INSTALL_TESTBUILD, true) == 0) steps |= Steps.InstalTestbuild; } } if ((steps & AllSteps) == Steps.NoSteps || (steps & AllSteps) == Steps.CollectArtifacts) steps |= defaultSteps; }
public void NextStep(){ switch (step) { case Steps.None: step = Steps.Amplitudes; InstructionText.text = "Assign amplitudes"; AmplitudesCont.gameObject.SetActive(true); FillDropdown(BodypartSelectors[0]); BodypartSelectors[0].value = Settings.Instance.GetAllowedBodyParts(true).IndexOf(Settings.Instance.BodyPartTreated); BodypartSelectors[0].RefreshShownValue(); FillDropdown(BodypartSelectors[1]); BodypartSelectors[1].value = Settings.Instance.GetAllowedBodyParts(false).IndexOf(Settings.Instance.BodyPartHealthy); BodypartSelectors[1].RefreshShownValue(); DifficultyGroup.gameObject.SetActive(false); IntensitySliders[0].SetValue(Settings.Instance.GetProperty(Settings.SettingsTypes.AmplitudeA), true); IntensitySliders[1].SetValue(Settings.Instance.GetProperty(Settings.SettingsTypes.AmplitudeB), true); break; case Steps.Amplitudes: step = Steps.Diff; InstructionText.text = "Set Difficulty"; AmplitudesCont.gameObject.SetActive(false); DifficultyGroup.gameObject.SetActive(true); DiffToggles[Settings.Instance.CurrentDifficulty].isOn = true; DiffToggleGroup.NotifyToggleOn(DiffToggles[Settings.Instance.CurrentDifficulty]); break; case Steps.Diff: FlowManager.Instance.UserSetupEnded(); break; } }
/// <summary>/// Перегрузка конструктора CStep /// </summary> internal static IStep StepsBuilder(ICoordinates coord,Steps step) { IStep s = new CStep (); s.setCoord ( coord ); s.setTypeOfStep (step); return s; }
public StepPage(Steps step) { Title = string.Format("{0}: Pick an Activity", StepNames.LookUpStepNameGivenCode (step)); Debug.WriteLine ("Screen for step: " + step); theStep = step; lblStepTotal = new Label () { FontSize = 14, FontAttributes = FontAttributes.Italic, HorizontalOptions = LayoutOptions.Center, TextColor = Color.Red, }; tableRoot = new TableRoot ("TableRoot"); ts = new TableSection (); tableView = new TableView { Intent = TableIntent.Form, Root = tableRoot, }; // Define command for the items in the TableView. navigateCommand = new Command<Activity> (async (Activity a) => { Debug.WriteLine ("navigate to Activity =" + a.FullName); Page page = new ActivityPage (a); await this.Navigation.PushAsync (page); }); ListSubTasks (); //Title = string.Format("{0} ({1} points earned)", StepNames.LookUpStepNameGivenCode (theStep), ListSubTasks ()); }
public void ExecuteCommand_CommandIsSubclass_CommandHandlerForSubclassIsExecuted() { using(var steps = new Steps()) { steps.ExecuteChildCommand(); steps.VerifyChildCommandWasExecuted(); } }
public void Run(AttributeMetadata att, string newAttributeSchemaName, Steps stepsToPerform, Action actions, AttributeMetadata newAttributeType = null) { var state = GetApplicationMigrationState(Service, att, newAttributeSchemaName, actions); AssertValidStepsForState(att.SchemaName, newAttributeSchemaName, stepsToPerform, state, actions); var oldAtt = state.Old; var tmpAtt = state.Temp; var newAtt = state.New; switch (actions) { case Action.RemoveTemp: RemoveTemp(stepsToPerform, tmpAtt); break; case Action.Rename: case Action.Rename | Action.ChangeType: CreateNew(newAttributeSchemaName, stepsToPerform, oldAtt, ref newAtt, newAttributeType); // Create or Retrieve the New Attribute MigrateToNew(stepsToPerform, oldAtt, newAtt, actions); RemoveExisting(stepsToPerform, oldAtt); break; case Action.ChangeCase: case Action.ChangeCase | Action.ChangeType: case Action.ChangeType: CreateTemp(stepsToPerform, oldAtt, ref tmpAtt, newAttributeType); // Either Create or Retrieve the Temp MigrateToTemp(stepsToPerform, oldAtt, tmpAtt, actions); RemoveExisting(stepsToPerform, oldAtt); CreateNew(newAttributeSchemaName, stepsToPerform, tmpAtt, ref newAtt, newAttributeType); MigrateToNew(stepsToPerform, tmpAtt, newAtt, actions); RemoveTemp(stepsToPerform, tmpAtt); break; } }
public void ExecuteCommand_VerificationPasses_CommandIsExecuted() { using(var steps = new Steps()) { steps.ExecuteCommand(); steps.VerifyCommandWasExecuted(); } }
public static string LookUpStepNameGivenCode(Steps stepCode) { if (!StepDictionary.ContainsKey (stepCode)) { return "Unknown"; } else { return StepDictionary [stepCode]; } }
public void ExecuteCommand_VerificationFails_CommandIsNotExecuted() { using(var steps = new Steps()) { steps.ExecuteInvalidCommand(); steps.VerifyCommandWasNotExecuted(); steps.VerifyValidationExeceptionWasThrown(); } }
public IncomingProcess(WMSClient MainProcess, DataTable dt) : base(MainProcess, 1) { BusinessProcessType = ProcessType.Incoming; processStep = Steps.DocumentSelecting; dataTable = dt; ShowDocsList(); }
public Activity() { Step = 0; SubStep = 0; FullName = "Default Activity"; Score = 0; OneTimeOnly = false; }
public Activity(Steps step, string fullName, int score, bool oneTimeOnly) { Step = step; SubStep = UniqueCode++; FullName = fullName; Score = score; OneTimeOnly = oneTimeOnly; }
// Update is called once per frame void Update() { if (StartAnimation == true) { Timer += Time.deltaTime; switch (state) { case Steps.S_FadeOut: FadeOutBox.GetComponent<Fading>().isFadeIn = true; Ship.GetComponent<Translation>().enabled = true; if (FadeOutBox.GetComponent<Fading>().isComplete == true) { state = Steps.S_BringInHelpScreen; } break; case Steps.S_BringInHelpScreen: Ship.GetComponent<Translation>().enabled = false; HelpPage.GetComponent<Translation>().enabled = true; if (Timer > 2) { state = Steps.S_BringBlackBoxesToScreen; Timer = 0; } break; case Steps.S_BringBlackBoxesToScreen: TopBlackBox.GetComponent<Translation>().enabled = true; BotBlackBox.GetComponent<Translation>().enabled = true; if (Timer > 2) { state = Steps.S_BringInEntities; Timer = 0; } break; case Steps.S_BringInEntities: if (Timer > 0) { Ship2.GetComponent<Fading>().enabled = true; Asteroid.GetComponent<Fading>().enabled = true; } if (Timer > 0.5) { Instructions.GetComponent<Fading>().enabled = true; } if (Timer > 1) { ReturnButton.GetComponent<Fading>().enabled = true; } break; } } }
public Insec(AzirMain azir) { steps = Steps.firstCalcs; Clickposition = new Vector3(0, 0, 0); this.azir = azir; Game.OnUpdate += Game_OnUpdate; Game.OnWndProc += Game_OnWndProc; Drawing.OnDraw += Drawing_OnDraw; }
public void AddPropertyError_ErrorIsAddedToErrorCollectionAndHasErrorIsTrue() { using(var steps = new Steps()) { steps.AddError("Test Property", "Test"); steps.VerifyErrorExists("Test Property", "Test"); steps.VerifyHasError(); } }
public void BuyGadget() { Steps steps = new Steps(); steps.NavigateTo("http://rozetka.com.ua"); steps.SearchProduct("Galaxy S4"); steps.AddProductToBaket("Galaxy S4", 1); steps.Checkout(); steps.AssertTotal(5999); }
public void Delete_EntityDoesntExists_NoChange() { using(var store = new Store(BuildConfiguration())) { OnStoreCreate(store); using(var steps = new Steps(store)) { var person = CreatePerson(1); // Arrange steps.BeginConversation(); // Act steps.DeletePerson(person); } } }
public void Get_EntityDoesntExist_ReturnsNull() { using(var store = new Store(BuildConfiguration())) { OnStoreCreate(store); using(var steps = new Steps(store)) { // Arrange steps.BeginConversation(); // Act steps.IssueGetPerson(Guid.NewGuid()); // Assert steps.VerifyRetrievedPersonIsNull(); } } }
bool StartProcess() { try { Steps.RightClickOnServer(Config.ServerOptions_SQLAUTHSERVER); Steps.ClickProperties(); Steps.TestSQLAuthentication(); Steps.SelectRequiredServer(Config.ServerOptions_SQLAUTHSERVER); Steps.ClickOnDataBasesTab(); Steps.ClickOnMirroringInDB(); Steps.VerifyMirroringViewInDataBases(); } catch (Exception ex) { Reports.ReportLog(ex.Message, Reports.SQLdmReportLevel.Fail, null, Config.TestCaseName); } return(true); }
/// <summary> /// Merges the results of the provided sub queries /// </summary> public CollectionQuery <TOutput, From> Union <TOutput>(params ITraversalQuery <T, TOutput>[] paths) { if (paths.Length < 1) { throw new ArgumentException("Must have at least one path"); } string step = "union("; var itemList = new List <string>(); foreach (var item in paths) { itemList.Add("__." + item.ToString()); } step += string.Join(", ", itemList); step += ")"; Steps.Add(step); return(new CollectionQuery <TOutput, From>(this)); }
/// <summary> /// A traverser is returned if and only if all conditons yield a result /// </summary> public CollectionQuery <TOutput, From> And <TOutput>(params ITraversalQuery <T, TOutput>[] conditions) { if (conditions.Length == 0) { throw new ArgumentNullException("Must provide at least one condition"); } string step = "and("; List <string> stepStrings = new List <string>(); foreach (var condition in conditions) { stepStrings.Add(condition.ToString()); } step += string.Join(",", stepStrings); step += ")"; Steps.Add(step); return(new CollectionQuery <TOutput, From>(this)); }
bool StartProcess() { try { //Steps.RightClickOnServer(Config.ServerOptions_CMWIN2016S8); //Steps.ClickProperties(); //Steps.TestSQLAuthentication(); Steps.SelectRequiredServer(Config.ServerOptions_CMWIN2016S8); Steps.ClickOnResourcesTab(); Steps.ClickOnSummaryInResourcesTab(); Steps.VerifySummaryViewInResources(); } catch (Exception ex) { Reports.ReportLog(ex.Message, Reports.SQLdmReportLevel.Fail, null, Config.TestCaseName); } return(true); }
bool StartProcess() { try { Steps.RightClickOnServer(Config.ServerOptions_CMWIN2016S8); Steps.ClickProperties(); Steps.TestSQLAuthentication(); Steps.SelectRequiredServer(Config.ServerOptions_CMWIN2016S8); Steps.ClickOnDataBasesTab(); Steps.ClickOnTablesAndIndexesInDB(); Steps.VerifyTablesAndIndexesInDataBases(); } catch (Exception ex) { Reports.ReportLog(ex.Message, Reports.SQLdmReportLevel.Fail, null, Config.TestCaseName); } return(true); }
bool StartProcess() { try { Steps.SelectRequiredServer(Config.ServerOptions_DEFAULTSERVER); Steps.VerifyDashboardView(); Steps.ClickOnServicesTab(); Steps.VerifySummaryInServices(); Steps.ClickOnSqlAgentJobsInServices(); Steps.VerifySqlAgentJobsInServices(); Steps.VerifySqlAgentJobsJobsHistoryInServices(); } catch (Exception ex) { Reports.ReportLog(ex.Message, Reports.SQLdmReportLevel.Fail, null, Config.TestCaseName); } return(true); }
protected override void createGlobalEnvironments(XdmNode catalog, XPathCompiler xpc) { Environment environment = null; Environment defaultEnv = null; try { defaultEnv = localEnvironments["default"]; } catch (Exception) { } foreach (XdmNode env in catalog.Select(Steps.Descendant("environment"))) { environment = Environment.processEnvironment( this, xpc, env, globalEnvironments, defaultEnv); } buildDependencyDictionary(driverProc, environment); }
bool StartProcess() { try { Steps.RightClickOnServer(Config.ServerOptions_CMWIN2016S8); Steps.ClickProperties(); Steps.TestSQLAuthentication(); Steps.SelectRequiredServer(Config.ServerOptions_CMWIN2016S8); Steps.ClickOnQueriesTab(); Steps.ClickOnStatementMode(); Steps.VerifyStatementModeIsDisplayed(); } catch (Exception ex) { Reports.ReportLog(ex.Message, Reports.SQLdmReportLevel.Fail, null, Config.TestCaseName); } return(true); }
bool StartProcess() { try { Steps.ClickOnTools(); Steps.SelectGroomingOption(); Common.WaitForSync(10000); Steps.VerifyAggregateforecastingValue(); Steps.ClickOnCancel(); Common.UpdateStatus(1); // 1 : Pass } catch (Exception ex) { Common.UpdateStatus(5); // 5 : fail Reports.ReportLog(ex.Message, Reports.SQLdmReportLevel.Fail, null, Config.TestCaseName); } return(true); }
bool StartProcess() { try { Steps.SelectRequiredServer(Config.ServerOptions_DEFAULTSERVER); Steps.VerifyDashboardView(); Steps.ClickOnTimeLineInOverView(); Common.WaitForSync(5000); Steps.VerifyTimeLineInOverView(); Common.UpdateStatus(1); // 1 : Pass } catch (Exception ex) { Common.UpdateStatus(5); // 5 : fail Reports.ReportLog(ex.Message, Reports.SQLdmReportLevel.Fail, null, Config.TestCaseName); } return(true); }
bool StartProcess() { try { Steps.SelectRequiredServer(Config.ServerOptions_TMSSQL2016); Steps.VerifyDashboardView(); Steps.ClickOnResourcesTab(); Steps.ClickOnSummaryInResourcesTab(); Steps.VerifySummaryViewInResources(); Steps.ClickOnProcedureCacheInResourcesTab(); Steps.VerifyProcedureCacheInResources(); } catch (Exception ex) { Reports.ReportLog(ex.Message, Reports.SQLdmReportLevel.Fail, null, Config.TestCaseName); } return(true); }
public void TestCase1() { Steps step = new Steps(driver); step.LoginAsUser(User2.login, User2.password); step.SendMessage(message1); step.LogOut(); step.LoginAsUser(User3.login, User3.password); step.MarkLetterAsSpam(message1.text); step.LogOut(); step.LoginAsUser(User2.login, User2.password); step.SendMessage(message2); step.LogOut(); step.LoginAsUser(User3.login, User3.password); bool actualResult = step.CheckSpamFolder(message2.text); Assert.IsTrue(actualResult); }
private void IsStepExpandedChanged(object sender, EventArgs e) { var step = sender as Step; if (step == null) { return; } if (step.IsStepExpanded) { foreach (var s in Steps.Where(x => x.IsStepExpanded && x != step)) { s.IsStepExpanded = false; } } IsStepExpanded = Steps.Any(x => x.IsStepExpanded); }
bool StartProcess() { try { Steps.ClickAdministration(); Steps.ClickApplicationSecurity(); Steps.ClickEnableSecurity(); Steps.AcceptExceptionMessage(); Steps.ClickToAddUsers(); Steps.ClickNextButton(); Steps.EnterDomianUserName(Constants.NewSqlUser); Steps.SelectSqlAuthentication(); Steps.ClickNextButton(); Steps.ClickOptionBtn_ViewDataAcknowledgwAlarm(); Steps.ClickNextButton(); Steps.SelectServers(); Steps.ClickAddButton(); Steps.ClickNextButton(); Steps.ClickFinishButton(); Steps.VerifySqlUserAdded(); //Login DM with SQL Steps.ConnectDMRepo(); AutomationSQLdm.Grooming_Modifications.Steps.ClickOnTools(); Steps.SelectSnoozeAlertMenuItem(); // will create for maintaince mode Steps.SelectMaintainceModeMenuItem(); // AutomationSQLdm.Grooming_Modifications.Steps.ClickOnTools(); //uncomment it will required here. // Steps.VerifySnoozeAlertApplied(); // will create for maintaince mode // will delete the below code , kept just for reference // Steps.ClickServersInLeftPane(); // Steps.RightClickMonitoredServer(); // Steps.ClickMaintainceModeContextMenu(); Steps.VerifyMaintainceModeContextMenuItems(); // Steps.EnableMaintainceMode(); // Steps.VerifyMaintainceModeIsChanged(); } catch (Exception ex) { Validate.Fail(ex.Message); } return(true); }
bool StartProcess() { try { Preconditions.Steps.QueryAnalyserTab(); //Preconditions.Steps.SelectDBFromComboBox(Config.ADSDB); Preconditions.Steps.SelectTable_ShortcutKey(); Preconditions.Steps.QueryAnalyserTab(); //Preconditions.Steps.SelectDBFromComboBox(Config.ADSDB1, true); Preconditions.Steps.SelectSecondTable_ShortcutKey(); Steps.ClickOnTools(); Steps.SelectCompareTools(); Steps.SelectResultCompare(); Steps.ClickOnResultTab(); Steps.ClickOnResultSet1(); Steps.ClickOnResultSet2(); Steps.ClickOnOkButton(); Steps.CompareResult(); Steps.ClickOnRefresh(); Steps.ClickOnResultTab(); Steps.ClickOnResultListSet1(); Steps.ClickOnResultListSet2(); Steps.ClickOnOkButton(); Steps.CompareResult(); Steps.Save(); Steps.Browse(); Steps.EnterFileName(); Steps.SaveHtml(); Steps.ClickOnOk(); Steps.Navigate(); Steps.ClickOnSpreadSheet(); Steps.ResultCompareFilters(); } catch (Exception ex) { Reports.ReportLog(ex.Message, Reports.ADSReportLevel.Fail, null, Configuration.Config.TestCaseName); } return(true); }
public static bool SolveBrute(Grid grid) { var workGrid = grid.Copy(); for (var y = 0; y < workGrid.Length; y++) { for (var x = 0; x < workGrid.Length; x++) { var cell = workGrid.GetCell(x, y); if (!cell.Value.HasValue) { cell.Value = 1; while (!workGrid.Valid()) { cell.Value++; if (cell.Value > workGrid.Length) { return(false); } } if (SolveBrute(workGrid)) { Steps.Add(workGrid); return(true); } else { cell.Value++; while (!workGrid.Valid()) { cell.Value++; if (cell.Value > workGrid.Length) { return(false); } } } } } } return(workGrid.Solved()); }
public override bool TryParse() { if (!base.TryParse()) { return(false); } // sub-contexts and steps SubContexts.Clear(); Steps.Clear(); ReportNodeType[] childNodes = Node.ReportNode; if (childNodes != null) { foreach (ReportNodeType node in childNodes) { // try to add as a step report StepReport step = Steps.TryParseAndAdd(node, this.Node); if (step != null) { AllStepsEnumerator.Add(step); AllStepsEnumerator.Merge(step.AllStepsEnumerator); continue; } // try to add as a sub context report ContextReport subContext = SubContexts.TryParseAndAdd(node, this.Node); if (subContext != null) { AllStepsEnumerator.Merge(subContext.AllStepsEnumerator); continue; } } // update duration for the last step since it is the end of the context StepReport lastStep = ((TestReport)OwnerTest).LastStep; if (lastStep != null) { TimeSpan ts = lastStep.StartTime - StartTime; lastStep.UpdateDuration(DurationSeconds - (decimal)ts.TotalSeconds); } } return(true); }
bool StartProcess() { try { Steps.RightClickonserver(); Steps.ClickonQueryBuilder(); Steps.DragTablepanetoCentralpane(); Steps.ClickQARun(); Steps.VerifyTableOptions(); Steps.VerifyOtherOptions(); Steps.ClickOnClose(); Steps.ClickonDiscard(); } catch (Exception ex) { Reports.ReportLog(ex.Message, Reports.ADSReportLevel.Fail, null, Configuration.Config.TestCaseName); } return(true); }
private async Task Synchronize(SyncType syncType = SyncType.Normal) { try { IsSynchronizing = true; Steps.Clear(); var agent = this.syncHelper.GetSyncAgent(this.UseHttp); // all config are applied on server side if http is enabled if (!this.UseHttp) { agent.Configuration.OverwriteConfiguration = this.Overwrite; if (this.SyncDirection == SyncDirection.DownloadOnly || this.SyncDirection == SyncDirection.UploadOnly) { foreach (var t in agent.Configuration) { t.SyncDirection = this.SyncDirection; } } } agent.SyncProgress += SyncProgress; var s = await agent.SynchronizeAsync(syncType, CancellationToken.None); if (s.TotalChangesDownloaded > 0) { await RefreshAsync(); } agent.SyncProgress -= SyncProgress; } catch (Exception ex) { MessageDialog cd = new MessageDialog($"Can't synhronize: {ex.Message}"); await cd.ShowAsync(); } finally { IsSynchronizing = false; } }
static void Main(string[] args) { do { Robot robot = new Robot(); string start = robot.Pos(); Steps cmd = null; bool flag = false; SetField(); do { HandleInputCommand(robot, ref cmd, ref flag); if (flag) { Console.WriteLine("Incorrect input command!"); } else { try { cmd(); } catch (Exception ex) { Console.WriteLine(ex.Message); } Console.WriteLine($"Start position {start}"); Console.WriteLine($"Current position {robot.Pos()}"); start = robot.Pos(); } PrintField(robot); Console.WriteLine("Нажмите ESC, чтобы выйти, или Enter,чтобы ввести еще одну команду..."); } while (Console.ReadKey().Key != ConsoleKey.Escape); Console.WriteLine(" Для выхода нажмите ESC..."); } while (Console.ReadKey().Key != ConsoleKey.Escape); }
static void Main(string[] args) { Console.WriteLine("Подождите, идёт обработка"); Create_Out_File(); Head(); int MaxStep = 1; int Record = 0; const int Steps = 1000000; for (int Step = 1; Step <= Steps; Step++) { WriteLine("================================================================"); WriteLine("Шаг " + Step.ToString()); WriteLine(""); Game NewGame = new Game(Randomizer); Write(NewGame.Result()); WriteLine("Результат: "); if (NewGame.FinalStep > MaxStep) { WriteLine("!!! Новый рекорд: " + NewGame.FinalStep + " шагов !!!"); MaxStep = NewGame.FinalStep; Record = Step; } if (NewGame.FinalStep == 64) { WriteLine("!!! ПОБЕДА !!! Вся доска пройдена !!!"); MaxStep = NewGame.FinalStep; Console.WriteLine("!!! ПОБЕДА !!! Вся доска пройдена !!!"); Console.ReadKey(); return; } WriteLine("Цель не достигнута"); WriteLine(""); WriteLine(""); } WriteLine("================================================================"); WriteLine("Всего шагов: " + Steps.ToString()); WriteLine("Рекорд: " + MaxStep.ToString() + " из 64 (Шаг " + Record.ToString() + ")."); Console.WriteLine("Расчёт закончен."); Console.ReadKey(); }
public void NextStep(Steps step) { _step = step; if (step == Steps.GrandChampionTrash) { tirionNPC.Yell("Welcome, champions. " + "Today, before the eyes of your leaders and peers, you will prove yourselves worthy combatants."); tirionNPC.Emote(EmoteType.SimpleTalk); CallDelayed(5000, () => { tirionNPC.Yell("You will first be facing three of the Grand Champions of the Tournament! " + "These fierce contenders have beaten out all others to reach the pinnacle of skill in the joust."); tirionNPC.Emote(EmoteType.SimpleTalk); SetupGrandChampions(); }); } }
/// <summary> /// Call <see cref="RetrievalMethod.Normalize"/> on all contained <see cref="IRecipeStep"/>s. /// </summary> /// <param name="feedUri">The feed the data was originally loaded from.</param> /// <remarks>This method should be called to prepare a <see cref="Feed"/> for solver processing. Do not call it if you plan on serializing the feed again since it may loose some of its structure.</remarks> public override void Normalize(FeedUri feedUri) { #region Sanity checks if (feedUri == null) { throw new ArgumentNullException(nameof(feedUri)); } #endregion base.Normalize(feedUri); // Apply if-0install-version filter Steps.RemoveAll(FilterMismatch); foreach (var step in Steps) { step.Normalize(feedUri); } }
/// <summary> /// Returns true if PipelineRunImpllinks instances are equal /// </summary> /// <param name="other">Instance of PipelineRunImpllinks to be compared</param> /// <returns>Boolean</returns> public bool Equals(PipelineRunImpllinks other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Nodes == other.Nodes || Nodes != null && Nodes.Equals(other.Nodes) ) && ( Log == other.Log || Log != null && Log.Equals(other.Log) ) && ( Self == other.Self || Self != null && Self.Equals(other.Self) ) && ( Actions == other.Actions || Actions != null && Actions.Equals(other.Actions) ) && ( Steps == other.Steps || Steps != null && Steps.Equals(other.Steps) ) && ( Class == other.Class || Class != null && Class.Equals(other.Class) )); }
private async Task Synchronize(SyncType syncType = SyncType.Normal) { try { IsSynchronizing = true; Steps.Clear(); var agent = this.syncHelper.GetSyncAgent(this.UseHttp); // all config are applied on server side if http is enabled if (!this.UseHttp) { if (this.SyncDirection == SyncDirection.DownloadOnly || this.SyncDirection == SyncDirection.UploadOnly) { foreach (var t in agent.Setup.Tables) { t.SyncDirection = this.SyncDirection; } } } var progress = new Progress <ProgressArgs>(pa => Output(pa.Message)); var s = await agent.SynchronizeAsync(syncType, CancellationToken.None, progress); Output(s.ToString()); if (s.TotalChangesDownloaded > 0) { await RefreshAsync(); } } catch (Exception ex) { MessageDialog cd = new MessageDialog($"Can't synhronize: {ex.Message}"); await cd.ShowAsync(); } finally { IsSynchronizing = false; } }
bool StartProcess() { try { Steps.SelectServer(Config.ServerOptions_DEFAULTSERVER); Steps.RightClickOnServerQP(Config.ServerOptions_DEFAULTSERVER); Steps.ClickPropertiesQP(); Steps.ClickOnWaitMonitoringtab(); Steps.VerifyUseExtendedEventsCheckboxisEnabled(); Steps.ClickOnOkInMSSP(); Common.UpdateStatus(1); // 1 : Pass } catch (Exception ex) { Common.UpdateStatus(5); // 5 : fail Reports.ReportLog(ex.Message, Reports.SQLdmReportLevel.Fail, null, Config.TestCaseName); } return(true); }
bool StartProcess() { try { Steps.SelectRequiredServer(Config.ServerOptions_DEFAULTSERVER); Steps.VerifyDashboardView(); Steps.ClickOnDataBasesTab(); Steps.VerifySummaryInDataBases(); Steps.ClickOnMirroringInDB(); Steps.VerifyMirroringViewInDataBases(); Common.UpdateStatus(1); // 1 : Pass } catch (Exception ex) { Common.UpdateStatus(5); // 5 : fail Reports.ReportLog(ex.Message, Reports.SQLdmReportLevel.Fail, null, Config.TestCaseName); } return(true); }
bool StartProcess() { try { Steps.RightClickOnServer(Config.ServerOptions_CMWIN2016S8); Steps.ClickProperties(); Steps.TestSQLAuthentication(); Steps.SelectRequiredServer(Config.ServerOptions_CMWIN2016S8); Steps.ClickOnSessions(); Steps.VerifySummarygraphsUnderSessions(); Common.UpdateStatus(1); // 1 : Pass } catch (Exception ex) { Common.UpdateStatus(5); // 5 : fail Reports.ReportLog(ex.Message, Reports.SQLdmReportLevel.Fail, null, Config.TestCaseName); } return(true); }
bool StartProcess() { try { Steps.RightClickOnServer(Config.ServerOptions_SQLAUTHSERVER); Steps.ClickProperties(); Steps.TestSQLAuthentication(); Steps.SelectRequiredServer(Config.ServerOptions_SQLAUTHSERVER); Steps.ClickOnQueriesTab(); Steps.VerifySignatureModeIsDisplayed(); Common.UpdateStatus(1); // 1 : Pass } catch (Exception ex) { Common.UpdateStatus(5); // 5 : fail Reports.ReportLog(ex.Message, Reports.SQLdmReportLevel.Fail, null, Config.TestCaseName); } return(true); }
public virtual void Dispose() { foreach (var disposable in _disposables) { disposable.Dispose(); } _disposables.Clear(); foreach (var step in Steps) { step.Dispose(); } Steps.Clear(); CurrentStep.Value = null; Wizard = null; }
public void Delete_EntityExists_EntityIsRemoved() { using(var store = new Store(BuildConfiguration())) { OnStoreCreate(store); using(var steps = new Steps(store)) { var person = CreatePerson(1); // Arrange steps.BeginConversation(); steps.SavePerson(person); // Act steps.DeletePerson(person); // Assert steps.VerifyPersonDoesntExist(person); } } }
// Use this for initialization void Start () { FadeOutBox = GameObject.Find("FadeOutBox"); Ship = GameObject.Find("ShipIcon"); HelpPage = GameObject.Find("HelpPage"); TopBlackBox = GameObject.Find("HelpTopBlackBox"); BotBlackBox = GameObject.Find("HelpBotBlackBox"); Ship2 = GameObject.Find("Ship"); Instructions = GameObject.Find("Instructions"); Asteroid = GameObject.Find("Asteroid"); ReturnButton = GameObject.Find("ReturnButton"); state = Steps.S_FadeOut ; StartAnimation = false; Timer = 0f; }
/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> public void Update(GameTime gameTime) { if (GamePad.GetState(PlayerIndex.One).Buttons.Start == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Enter) || Keyboard.GetState().IsKeyDown(Keys.Space)) { SceneManager.state = SceneManager.Scenes.game; MediaPlayer.Stop(); } // TODO: Add your update logic here float elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds; switch (intro) { case Steps.Music: MediaPlayer.Play(jingle); intro = Steps.NHLin; break; case Steps.NHLin: nhlfadeeffect += 0.01f; counter++; if (counter == 150) intro = Steps.NHLout; break; case Steps.NHLout: nhlfadeeffect -= 0.01f; counter--; if (counter == -10) { counter = 0; intro = Steps.Vroem; } break; case Steps.Vroem: bunnyx += 20; counter++; if (counter == 80) { counter = 0; intro = Steps.Team13in; } break; case Steps.Team13in: teamfadeeffect += 0.01f; counter++; if (counter == 150) intro = Steps.Team13out; break; case Steps.Team13out: teamfadeeffect -= 0.01f; counter--; if (counter == -10) { counter = 0; intro = Steps.Exit; } break; case Steps.Exit: if (controller != null) SceneManager.state = SceneManager.Scenes.game; break; } }
private void AssertValidStepsForState(string existingSchemaName, string newSchemaName, Steps stepsToPerform, AttributeMigrationState state, Action actions) { if (actions.HasFlag(Action.ChangeType) && existingSchemaName == newSchemaName && state.Old != null && state.New != null) { Trace("Only an attribute type change has been requested. Attempting to differentiate between existing and new."); if (state.Temp == null) { Trace("No Temporary Attribute was found. Treating New as not yet created."); state.New = null; } else if (state.Old.GetType() == state.Temp.GetType()) { if (stepsToPerform.HasFlag(Steps.RemoveExistingAttribute) || stepsToPerform.HasFlag(Steps.CreateNewAttribute) || stepsToPerform.HasFlag(Steps.MigrateToTemp)) { Trace("A Temporary Attribute was found and a request has been made to either remove the existing attribute, create a new attribute, or migrate to temp. Treating New as not yet created."); state.New = null; } else { Trace("A Temporary Attribute was found and a request has not been made to either remove the existing attribute, create a new attribute, or migrate to temp. Treating New as already created."); state.Old = null; } } else { Trace("A Temporary Attribute was found and the current Attribute Type is different. Treating New as not yet created."); state.New = null; } } Trace("Validating Current CRM State Before Preforming Steps:"); if (stepsToPerform.HasFlag(Steps.CreateTemp) && state.Temp != null) { throw new InvalidOperationException("Unable to Create Temp! Temp " + state.Temp.EntityLogicalName + "." + state.Temp.LogicalName + " already exists!"); } if (stepsToPerform.HasFlag(Steps.MigrateToTemp)) { // Can only Migrate if old already exists if (state.Old == null) { throw new InvalidOperationException("Unable to Migrate! Existing Attribute " + existingSchemaName + " does not exist!"); } // Can only Migrate if Tmp already exists, or temp will be created if (!(state.Temp != null || stepsToPerform.HasFlag(Steps.CreateTemp))) { throw new InvalidOperationException("Unable to Migrate! Temporary Attribute " + existingSchemaName + TempPostfix + " does not exist!"); } } if (stepsToPerform.HasFlag(Steps.RemoveExistingAttribute)) { if (state.Old == null) { AssertInvalidState("Unable to Remove Existing Attribute! Attribute " + existingSchemaName + " does not exist!"); } // Can only Remove existing if Tmp already exists, or temp will be created, or if performing rename and there is a Create if (!(state.Temp != null || stepsToPerform.HasFlag(Steps.CreateTemp) || (!string.Equals(existingSchemaName, newSchemaName, StringComparison.OrdinalIgnoreCase) && stepsToPerform.HasFlag(Steps.CreateNewAttribute)))) { AssertInvalidState("Unable to Remove Existing Attribute! Temporary Attribute " + existingSchemaName + TempPostfix + " does not exist!"); } // Can only Remove existing if Tmp will be migrated, or has been migrated if (!((actions.HasFlag(Action.ChangeCase) && stepsToPerform.HasFlag(Steps.MigrateToTemp)) || (actions.HasFlag(Action.Rename) && stepsToPerform.HasFlag(Steps.MigrateToNewAttribute)))) { try { AssertCanDelete(Service, state.Old); } catch { AssertInvalidState("Unable to Remove Existing! Existing Attribute " + existingSchemaName + " has not been migrated to Temporary Attribute!"); } } } if (stepsToPerform.HasFlag(Steps.CreateNewAttribute)) { // Can only Create Global if Local does not exist or will be removed if (!(state.Old == null || stepsToPerform.HasFlag(Steps.RemoveExistingAttribute))) { AssertInvalidState("Unable to create new Attribute! Old Attribute " + existingSchemaName + " still exists!"); } // Can only Create Global if doesn't already exist if (state.New != null) { AssertInvalidState("Unable to create new Attribute! New Attribute " + existingSchemaName + " already exists!"); } } if (stepsToPerform.HasFlag(Steps.MigrateToNewAttribute)) { // Can only Migrate To New if Temp Exists, or Creating a Temp, or There is a Rename and the Old Already Exists if (!(state.Temp != null || stepsToPerform.HasFlag(Steps.CreateTemp) || (actions.HasFlag(Action.Rename) && state.Old != null))) { AssertInvalidState("Unable to Migrate! Temp Attribute " + existingSchemaName + TempPostfix + " does not exist!"); } // Can only Migrate if New Already exists, or New will be created if (!(state.New != null || stepsToPerform.HasFlag(Steps.CreateNewAttribute))) { AssertInvalidState("Unable to Migrate! New Attribute " + existingSchemaName + " does not exist!"); } } if (stepsToPerform.HasFlag(Steps.RemoveTemp)) { // Can Only remove Temp if it exists, or will exist if (!(state.Temp != null || stepsToPerform.HasFlag(Steps.CreateTemp))) { AssertInvalidState("Unable to Remove Temp! Temp Attribute " + existingSchemaName + TempPostfix + " does not exist!"); } // Can Only remove Temp if new Attribute Already exists, or if only step is RemoveTemp if (!(state.New != null || stepsToPerform.HasFlag(Steps.CreateNewAttribute) || stepsToPerform == Steps.RemoveTemp)) { AssertInvalidState("Unable to Migrate! New Attribute " + existingSchemaName + " does not exist!"); } // Can only Remove tmp if global will be migrated, or has been migrated if (!stepsToPerform.HasFlag(Steps.MigrateToNewAttribute)) { try { AssertCanDelete(Service, state.Temp); } catch { AssertInvalidState("Unable to Remove Old Attribute! Old Attribute " + existingSchemaName + " has not been migrated to Temporary Attribute!"); } } } }
private void MigrateToTemp(Steps stepsToPerform, AttributeMetadata oldAtt, AttributeMetadata tmpAtt, Action actions) { if (stepsToPerform.HasFlag(Steps.MigrateToTemp)) { Trace("Beginning Step: Migrate To Temp"); MigrateAttribute(oldAtt, tmpAtt, actions); Trace("Completed Step: Migrate To Temp" + Environment.NewLine); } }
private void RemoveExisting(Steps stepsToPerform, AttributeMetadata oldAtt) { if (stepsToPerform.HasFlag(Steps.RemoveExistingAttribute)) { Trace("Beginning Step: Remove Existing Attribute"); DeleteField(Service, oldAtt); Trace("Completed Step: Remove Existing Attribute" + Environment.NewLine); } }
public void StartUserSetup(){ step = Steps.None; NextStep (); }
private void RemoveTemp(Steps stepsToPerform, AttributeMetadata tmpAtt) { if (stepsToPerform.HasFlag(Steps.RemoveTemp)) { Trace("Beginning Step: Remove Temporary Field"); DeleteField(Service, tmpAtt); Trace("Completed Step: Remove Temporary Field" + Environment.NewLine); } }
public UserScript(User.User user) { this.user = user; currentStep = Steps.SPLASH; lastStep = Steps.NONE; }
private void CreateNew(string newAttributeSchemaName, Steps stepsToPerform, AttributeMetadata attributeToCopy, ref AttributeMetadata createdAttributeOrAttributeIfAlreadyCreated, AttributeMetadata newAttributeType) { if (stepsToPerform.HasFlag(Steps.CreateNewAttribute)) { Trace("Beginning Step: Create New Attribute"); createdAttributeOrAttributeIfAlreadyCreated = createdAttributeOrAttributeIfAlreadyCreated ?? CreateAttributeWithDifferentName(Service, attributeToCopy, newAttributeSchemaName, newAttributeType); Trace("Completed Step: Create New Attribute" + Environment.NewLine); } }