public RunModelSystemPage(SingleWindowGUI xtmf) { this.XTMF = xtmf; this.ProgressReports = this.XTMF.XTMF.Configuration.ProgressReports; InitializeComponent(); this.ProgressReports.ListChanged += new ListChangedEventHandler(ProgressReports_ListChanged); this.ProgressReports.BeforeRemove += new EventHandler <ListChangedEventArgs>(ProgressReports_BeforeRemove); this.SubProgressBars.ListChanged += new ListChangedEventHandler(SubProgressBars_ListChanged); this.SubProgressBars.BeforeRemove += new EventHandler <ListChangedEventArgs>(SubProgressBars_BeforeRemove); this.Timer = new DispatcherTimer(); this.Timer.Interval = TimeSpan.FromMilliseconds(1000 / 30); this.Timer.Tick += new EventHandler(Timer_Tick); this.Loaded += new RoutedEventHandler(RunModelSystemPage_Loaded); this.Unloaded += new RoutedEventHandler(RunModelSystemPage_Unloaded); this.ProjectDirectory = System.IO.Path.GetFullPath(this.XTMF.XTMF.Configuration.ProjectDirectory); if (Environment.OSVersion.Platform == PlatformID.Win32NT) { var major = Environment.OSVersion.Version.Major; if (major > 6 || (major >= 6 && Environment.OSVersion.Version.Minor >= 1)) { Windows7OrAbove = true; this.TaskbarInformation = this.XTMF.TaskbarItemInfo = new TaskbarItemInfo(); } } }
public RunModelSystemPage(SingleWindowGUI xtmf) { this.XTMF = xtmf; this.ProgressReports = this.XTMF.XTMF.Configuration.ProgressReports; InitializeComponent(); this.ProgressReports.ListChanged += new ListChangedEventHandler( ProgressReports_ListChanged ); this.ProgressReports.BeforeRemove += new EventHandler<ListChangedEventArgs>( ProgressReports_BeforeRemove ); this.SubProgressBars.ListChanged += new ListChangedEventHandler( SubProgressBars_ListChanged ); this.SubProgressBars.BeforeRemove += new EventHandler<ListChangedEventArgs>( SubProgressBars_BeforeRemove ); this.Timer = new DispatcherTimer(); this.Timer.Interval = TimeSpan.FromMilliseconds( 1000 / 30 ); this.Timer.Tick += new EventHandler( Timer_Tick ); this.Loaded += new RoutedEventHandler( RunModelSystemPage_Loaded ); this.Unloaded += new RoutedEventHandler( RunModelSystemPage_Unloaded ); this.ProjectDirectory = System.IO.Path.GetFullPath( this.XTMF.XTMF.Configuration.ProjectDirectory ); if ( Environment.OSVersion.Platform == PlatformID.Win32NT ) { var major = Environment.OSVersion.Version.Major; if ( major > 6 || ( major >= 6 && Environment.OSVersion.Version.Minor >= 1 ) ) { Windows7OrAbove = true; this.TaskbarInformation = this.XTMF.TaskbarItemInfo = new TaskbarItemInfo(); } } }
private void StartRun(XTMFRun run, string runName) { Run = run; Dispatcher.BeginInvoke(new Action(() => { MainWindow.Us.SetWindowName(this, "Run - " + runName); RunNameLabel.Text = runName; })); ProgressReports = Run.Configuration.ProgressReports; ProgressReports.ListChanged += new ListChangedEventHandler(ProgressReports_ListChanged); ProgressReports.BeforeRemove += new EventHandler <ListChangedEventArgs>(ProgressReports_BeforeRemove); SubProgressBars.ListChanged += new ListChangedEventHandler(SubProgressBars_ListChanged); SubProgressBars.BeforeRemove += new EventHandler <ListChangedEventArgs>(SubProgressBars_BeforeRemove); Run.RunComplete += Run_RunComplete; Run.RunStarted += Run_RunStarted; Run.RuntimeError += Run_RuntimeError; Run.RuntimeValidationError += Run_RuntimeValidationError; Run.ValidationStarting += Run_ValidationStarting; Run.ValidationError += Run_ValidationError; RunDirectory = Run.RunDirectory; Timer = new DispatcherTimer(); Timer.Interval = TimeSpan.FromMilliseconds(1000 / 30); Timer.Tick += new EventHandler(Timer_Tick); if (Environment.OSVersion.Platform == PlatformID.Win32NT) { var major = Environment.OSVersion.Version.Major; if (major > 6 || (major >= 6 && Environment.OSVersion.Version.Minor >= 1)) { Windows7OrAbove = true; MainWindow.Us.TaskbarItemInfo = TaskbarInformation = new TaskbarItemInfo(); TaskbarInformation.ProgressState = TaskbarItemProgressState.Normal; TaskbarInformation.ProgressValue = 0; } } this.ConsoleOutput.DataContext = new ConsoleOutputController(this); this.ConsoleBorder.DataContext = this.ConsoleOutput.DataContext; StartRunAsync(); Timer.Start(); }
private void StartRun(XTMFRun run, string runName) { Run = run; Dispatcher.BeginInvoke(new Action(() => { MainWindow.Us.SetWindowName(this, "Run - " + runName); RunNameLabel.Text = runName; })); ProgressReports = Run.Configuration.ProgressReports; ProgressReports.ListChanged += new ListChangedEventHandler(ProgressReports_ListChanged); ProgressReports.BeforeRemove += new EventHandler<ListChangedEventArgs>(ProgressReports_BeforeRemove); SubProgressBars.ListChanged += new ListChangedEventHandler(SubProgressBars_ListChanged); SubProgressBars.BeforeRemove += new EventHandler<ListChangedEventArgs>(SubProgressBars_BeforeRemove); Run.RunComplete += Run_RunComplete; Run.RunStarted += Run_RunStarted; Run.RuntimeError += Run_RuntimeError; Run.RuntimeValidationError += Run_RuntimeValidationError; Run.ValidationStarting += Run_ValidationStarting; Run.ValidationError += Run_ValidationError; RunDirectory = Run.RunDirectory; Timer = new DispatcherTimer(); Timer.Interval = TimeSpan.FromMilliseconds(1000 / 30); Timer.Tick += new EventHandler(Timer_Tick); if (Environment.OSVersion.Platform == PlatformID.Win32NT) { var major = Environment.OSVersion.Version.Major; if (major > 6 || (major >= 6 && Environment.OSVersion.Version.Minor >= 1)) { Windows7OrAbove = true; MainWindow.Us.TaskbarItemInfo = TaskbarInformation = new TaskbarItemInfo(); TaskbarInformation.ProgressState = TaskbarItemProgressState.Normal; TaskbarInformation.ProgressValue = 0; } } this.ConsoleOutput.DataContext = new ConsoleOutputController(this); this.ConsoleBorder.DataContext = this.ConsoleOutput.DataContext; StartRunAsync(); Timer.Start(); }
public ConfigurationProxy(Configuration realConfig, IProject activeProject) { _RealConfiguration = realConfig; ProjectRepository = new ProjectRepositoryProxy(_RealConfiguration.ProjectRepository, activeProject); ProgressReports = new BindingListWithRemoving <IProgressReport>(); }
private void StartRun(ModelSystemEditingSession session, string runName) { string error = null; Dispatcher.BeginInvoke(new Action(() => { MainWindow.Us.SetWindowName(this, "Run - " + runName); RunNameLabel.Text = runName; })); Run = session.Run(runName, ref error); ProgressReports = Run.Configuration.ProgressReports; Run.RunComplete += Run_RunComplete; Run.RunStarted += Run_RunStarted; Run.RuntimeError += Run_RuntimeError; Run.RuntimeValidationError += Run_RuntimeValidationError; Run.ValidationStarting += Run_ValidationStarting; Run.ValidationError += Run_ValidationError; RunDirectory = Run.RunDirectory; Timer = new DispatcherTimer(); Timer.Interval = TimeSpan.FromMilliseconds(1000 / 30); Timer.Tick += new EventHandler(Timer_Tick); if(Environment.OSVersion.Platform == PlatformID.Win32NT) { var major = Environment.OSVersion.Version.Major; if(major > 6 || (major >= 6 && Environment.OSVersion.Version.Minor >= 1)) { Windows7OrAbove = true; TaskbarInformation = new TaskbarItemInfo(); } } StartRunAsync(); Timer.Start(); }
public ConfigurationProxy(Configuration realConfig, IProject activeProject) { RealConfiguration = realConfig; ProjectRepository = new ProjectRepositoryProxy(RealConfiguration.ProjectRepository, activeProject); ProgressReports = new BindingListWithRemoving<IProgressReport>(); }
/// <summary> /// </summary> /// <param name="session"></param> /// <param name="run"></param> /// <param name="runName"></param> /// <param name="immediateRun"></param> /// <param name="launchedFrom"></param> public RunWindow(ModelSystemEditingSession session, XTMFRun run, string runName, DateTime delayedStartTime, ModelSystemDisplay launchedFrom = null, SchedulerWindow schedulerWindow = null) { InitializeComponent(); ErrorVisibility = Visibility.Collapsed; Session = session; Run = run; SchedulerWindow = schedulerWindow; OpenDirectoryButton.IsEnabled = true; Dispatcher.BeginInvoke(new Action(() => { RunNameLabel.Text = runName; RunNameText.Text = runName; IsRunClearable = false; })); if (launchedFrom != null) { _launchedFromModelSystemDisplay = launchedFrom; } _progressReports = Run.Configuration.ProgressReports; _progressReports.ListChanged += ProgressReports_ListChanged; _progressReports.BeforeRemove += ProgressReports_BeforeRemove; _subProgressBars.ListChanged += SubProgressBars_ListChanged; _subProgressBars.BeforeRemove += SubProgressBars_BeforeRemove; Run.RunCompleted += Run_RunComplete; Run.RunStarted += Run_RunStarted; Run.RuntimeError += Run_RuntimeError; Run.RuntimeValidationError += Run_RuntimeValidationError; Run.ValidationStarting += RunOnValidationStarting; Run.ValidationError += RunOnValidationError; ErrorGroupBox.Visibility = Visibility.Collapsed; BaseGrid.RowDefinitions[1].Height = new GridLength(0); _runDirectory = Run.RunDirectory; _timer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(100) }; _isFinished = false; _wasCanceled = false; _timer.Tick += Timer_Tick; if (Environment.OSVersion.Platform == PlatformID.Win32NT) { var major = Environment.OSVersion.Version.Major; if (major > 6 || major >= 6 && Environment.OSVersion.Version.Minor >= 1) { _windows7OrAbove = true; MainWindow.Us.TaskbarItemInfo = _taskbarInformation = new TaskbarItemInfo(); _taskbarInformation.ProgressState = TaskbarItemProgressState.Normal; _taskbarInformation.ProgressValue = 0; } } ConfigureLogger(); var conc = new ConsoleOutputController(this, Run, iLog); ConsoleOutput.DataContext = conc; _consoleAppener.ConsoleOutputController = conc; ConsoleBorder.DataContext = ConsoleOutput.DataContext; session.ExecuteDelayedRun(run, delayedStartTime); DetailsGroupBox.DataContext = this; StartRunAsync(); _timer.Start(); }