private void DrawFinal() { stepNumber = LabSessionManager.GetStepCount() - 1; MWindow.mainCanvas.Children.Clear(); DrawObj.DrawFinal(); MWindow.TextBoxStepNumber.Text = stepNumber.ToString(); MWindow.Next.IsEnabled = false; MWindow.Previous.IsEnabled = true; MWindow.Initial.IsEnabled = true; MWindow.Final.IsEnabled = false; }
public override void StartResearch() { //MWindow.Start.Content = "Stop"; MWindow.Start.IsEnabled = false; MWindow.mainCanvas.Children.Clear(); MWindow.ChartData = null; activesCount.Clear(); ResearchStepNumber = 0; UpdateStepNumber(); Dispatcher.CurrentDispatcher.Invoke(DispatcherPriority.Background, new Action(() => { DrawObj.DrawFinal(); })); DrawActivationProcess(); MWindow.Start.IsEnabled = true; //MWindow.Start.Content = "Start"; }
public override void StartResearch() { //MWindow.Start.Content = "Stop"; trianglesCountCollection = new ObservableCollection <KeyValuePair <int, int> >(); edgesToRemove = new List <EdgesAddedOrRemoved>(); edgesToChangeColor = new List <EdgesAddedOrRemoved>(); MWindow.Start.IsEnabled = false; MWindow.mainCanvas.Children.Clear(); MWindow.ChartData = null; ResearchStepNumber = 0; MWindow.TextBoxStepNumber.Text = "0"; Application.Current.Dispatcher.Invoke(DispatcherPriority.Background, new Action(() => { DrawObj.DrawFinal(); })); DrawEvolutionProcess(); MWindow.Start.IsEnabled = true; //MWindow.Start.Content = "Start"; }
public override void OnWindowSizeChanged() { if (DrawObj != null) { if (stepNumber == 0 && StepCount != 0) { DrawObj.DrawInitial(); } else if (stepNumber == StepCount - 1 && StepCount != 0) { DrawObj.DrawFinal(); } else { DrawObj.DrawInitial(); for (int i = 0; i <= stepNumber; ++i) { DrawObj.DrawNext(i); } } } }