public void ProgressModal() { if (CurrentWall == null) { throw new Exception("Selected Element is not a wall"); } CurrentControl = new Controls.ProgressMonitorControl(); CurrentControl.MaxValue = 100; CurrentUI = new Views.ProgressMonitorView(); CurrentUI.DataContext = CurrentControl; CurrentUI.Closed += CurrentUI_Closed; CurrentUI.ContentRendered += FireUPModal; CurrentUI.ShowDialog(); }
internal void ProgressModeless() { if (CurrentWall == null) { throw new Exception("Selected Element is not a wall"); } Views.ProgressMonitorView currentUI = new Views.ProgressMonitorView(); Events.ProcessEventHandler progressEventHandler = new Events.ProcessEventHandler(); progressEventHandler.CurrentWall = CurrentWall; progressEventHandler.CurrentUI = currentUI; Controls.ProgressMonitorControl currentControl = new Controls.ProgressMonitorControl(); currentControl.MaxValue = 200; progressEventHandler.CurrentControl = currentControl; ExternalEvent = ExternalEvent.Create(progressEventHandler); currentUI.DataContext = currentControl; currentUI.ContentRendered += CurrentUI_ContentRendered; currentUI.Topmost = true; currentUI.Show(); }