private void OnStartServer() { var server = new Shared.Model.Server(this.CurrentIP, (int)this.Port) { WelcomeMessage = this.Topic }; this.StartServer?.Invoke(this, server); this.NavigateToViewModel(new ReceiveDataViewModel(server) { Topic = this.Topic }); }
public ReceiveDataViewModel(Shared.Model.Server server) { this._server = server; this.GroupItemsCommand = new RelayCommand<object>(this.OnGroupItems); this.Suggestions = new ObservableCollection<SuggestionItemGroup>(); this.StartServerCommand = new RelayCommand(this.StartServer); this.MenuItems.Insert(0, new MenuItemViewModel("Auswertung") { SubItems = { new MenuItemViewModel("Drucken") { Command =new RelayCommand(this.OnPrintAnalysis), }, //new MenuItemViewModel("Daten an Clients senden") //{ // Command =new RelayCommand(this.OnSendAnalysisToClients), //}, }, }); this.MenuItems.Insert(0, new MenuItemViewModel("Server") { SubItems = { (this._stopServer = new MenuItemViewModel("Server anhalten") { IsCheckable=true, Command = new RelayCommand(this.OnStopServer), }), }, }); this.MenuItems.Insert(0, new MenuItemViewModel("Datei") { SubItems = { new MenuItemViewModel("Daten Exportieren") { Command =new RelayCommand(this.OnExportData), }, new MenuItemViewModel("Daten Importieren") { Command =new RelayCommand(this.OnImportData), }, }, }); }
public ReceiveDataViewModel(Shared.Model.Server server) { this._server = server; this.GroupItemsCommand = new RelayCommand <object>(this.OnGroupItems); this.Suggestions = new ObservableCollection <SuggestionItemGroup>(); this.StartServerCommand = new RelayCommand(this.StartServer); this.MenuItems.Insert(0, new MenuItemViewModel("Auswertung") { SubItems = { new MenuItemViewModel("Drucken") { Command = new RelayCommand(this.OnPrintAnalysis), }, //new MenuItemViewModel("Daten an Clients senden") //{ // Command =new RelayCommand(this.OnSendAnalysisToClients), //}, }, }); this.MenuItems.Insert(0, new MenuItemViewModel("Server") { SubItems = { (this._stopServer = new MenuItemViewModel("Server anhalten") { IsCheckable = true, Command = new RelayCommand(this.OnStopServer), }), }, }); this.MenuItems.Insert(0, new MenuItemViewModel("Datei") { SubItems = { new MenuItemViewModel("Daten Exportieren") { Command = new RelayCommand(this.OnExportData), }, new MenuItemViewModel("Daten Importieren") { Command = new RelayCommand(this.OnImportData), }, }, }); }