public MainWindow(WelcomeWindow pCallerWindow, CoordinatorConnection pConnection, StartMode pMode, string pPath) { InitializeComponent(); callerWindow = pCallerWindow; switch (pMode) { case StartMode.New: { presentationHandler = new PresentationHandling(pConnection, pMode, pPath, this); connectPresentationWithUI(); break; } case StartMode.Open: { presentationHandler = new PresentationHandling(pConnection, pMode, pPath, this); connectPresentationWithUI(); break; } default: { presentationHandler = new PresentationHandling(pConnection, this); connectPresentationWithUI(); break; } } //set initial stage selection to first stage if (presentationHandler.openPresentation.stages.Count > 0) { presentationHandler.SelectedStage = presentationHandler.openPresentation.stages[0]; } }
public MainWindow(WelcomeWindow pCallerWindow) { InitializeComponent(); callerWindow = pCallerWindow; //Initialize the Presentation handler presentationHandler = new PresentationHandling(new CoordinatorConnection(), this); //connect Presentation in Presentation handler to UI stageList.ItemsSource = presentationHandler.openPresentation.stages; presentationHandler.openPresentation.stages.Add(new Stage("Test Stage")); }