/// <summary> /// Raises the <see cref="E:System.Windows.Application.Startup" /> event. /// </summary> /// <param name="e">A <see cref="T:System.Windows.StartupEventArgs" /> that contains the event data.</param> protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); MainModel model = new MainModel(); MainViewModel viewModel = new MainViewModel(model); this.MainWindow = new MainWindow(viewModel); this.MainWindow.Show(); }
/// <summary> /// Initializes a new instance of the <see cref="MainWindow"/> class. /// </summary> /// <param name="viewModel">View model object</param> public MainWindow(MainViewModel viewModel) //: base() { // // Set Falyouts if (viewModel != null) { viewModel.Flyouts = this.Flyouts; viewModel.Window = this; } this.DataContext = this.ViewModel = viewModel; InitializeComponent(); }
/// <summary> /// Initializes a new instance of the <see cref="CommandSettings"/> class. /// </summary> /// <param name="viewModel">The view model.</param> public CommandSettings(MainViewModel viewModel) { this.viewModel = viewModel; }
/// <summary> /// Initializes a new instance of the <see cref="ServerSettings"/> class. /// </summary> /// <param name="viewModel">The view model.</param> internal ServerSettings(MainViewModel viewModel) { this.viewModel = viewModel; this.Address = "localhost"; }