public MainWindowViewModel() { LoadedCommand = new DelegateCommand(OnLoaded); OpenSettingsCommand = new DelegateCommand(OnOpenSettingsCommand); ExitSettingsCommand = new DelegateCommand(OnExitSettingsCommand); fileWriter = new FileWriter(); this.settingsViewModel = new SettingsViewModel(); this.telnetViewerViewModel = new TelnetViewerViewModel(fileWriter); this.connectionDetailsViewModel = new ConnectionDetailsViewModel(this.settingsViewModel.DefaultSettings, this.telnetViewerViewModel, fileWriter); this.quickCommandsViewModel = new QuickCommandsViewModel(this.settingsViewModel.DefaultSettings, this.telnetViewerViewModel); }
public async Task <IActionResult> Details(string id) { var wallet = await _walletService.GetWalletAsync(_walletOptions.WalletConfiguration, _walletOptions.WalletCredentials); var model = new ConnectionDetailsViewModel { Connection = await _connectionService.GetAsync(wallet, id), Messages = await _recordService.SearchAsync <PrivateMessageRecord>(wallet, SearchQuery.Equal(nameof(PrivateMessageRecord.ConnectionId), id), null, 10) }; return(View(model)); }
public async Task <IActionResult> Details(string id, bool?trustPingSuccess = null) { var context = new AgentContext { Wallet = await _walletService.GetWalletAsync(_walletOptions.WalletConfiguration, _walletOptions.WalletCredentials) }; var model = new ConnectionDetailsViewModel { Connection = await _connectionService.GetAsync(context, id), Messages = await _recordService.SearchAsync <BasicMessageRecord>(context.Wallet, SearchQuery.Equal(nameof(BasicMessageRecord.ConnectionId), id), null, 10), TrustPingSuccess = trustPingSuccess }; return(View(model)); }