protected override void ChangeStatus(UiStatus newStatus) { switch (newStatus) { case UiStatus.Backlog: if (backLog == null) return; if (messageWindow != null) messageWindow.Close(); if (selection != null) selection.Close(); if (backLog != null) backLog.Open(); engine.Config.IsSkip = false; break; case UiStatus.HideMessageWindow: if (messageWindow != null) messageWindow.Close(); if (selection != null) selection.Close(); if(backLog != null) backLog.Close(); engine.Config.IsSkip = false; break; case UiStatus.Default: if (messageWindow != null) messageWindow.Open(); if (selection != null) selection.Open(); if (backLog != null) backLog.Close(); break; } this.status = newStatus; }
protected override void ChangeStatus(UiStatus newStatus) { switch (newStatus) { case UiStatus.Backlog: if (backLog == null) { return; } if (messageWindow != null) { messageWindow.Close(); } if (selection != null) { selection.Close(); } if (backLog != null) { backLog.Open(); } engine.Config.IsSkip = false; break; case UiStatus.HideMessageWindow: if (messageWindow != null) { messageWindow.Close(); } if (selection != null) { selection.Close(); } if (backLog != null) { backLog.Close(); } engine.Config.IsSkip = false; break; case UiStatus.Default: if (messageWindow != null) { messageWindow.Open(); } if (selection != null) { selection.Open(); } if (backLog != null) { backLog.Close(); } break; } this.status = newStatus; }
public async ValueTask BuildAsync(string databaseDirectoryPath, OmniAddress listenAddress, CancellationToken cancellationToken = default) { _databaseDirectoryPath = databaseDirectoryPath; _listenAddress = listenAddress; ArgumentNullException.ThrowIfNull(_databaseDirectoryPath); ArgumentNullException.ThrowIfNull(_listenAddress); try { _uiState = await UiStatus.LoadAsync(Path.Combine(_databaseDirectoryPath, UI_STATE_FILE_NAME)); _intaractorProvider = new IntaractorProvider(_databaseDirectoryPath, _listenAddress, BytesPool.Shared); var serviceCollection = new ServiceCollection(); serviceCollection.AddSingleton(_uiState); serviceCollection.AddSingleton <IIntaractorProvider>(_intaractorProvider); serviceCollection.AddSingleton <IBytesPool>(BytesPool.Shared); serviceCollection.AddSingleton <IApplicationDispatcher, ApplicationDispatcher>(); serviceCollection.AddSingleton <IMainWindowProvider, MainWindowProvider>(); serviceCollection.AddSingleton <IClipboardService, ClipboardService>(); serviceCollection.AddSingleton <IDialogService, DialogService>(); serviceCollection.AddSingleton <INodesFetcher, NodesFetcher>(); serviceCollection.AddTransient <MainWindowViewModel>(); serviceCollection.AddTransient <SettingsWindowViewModel>(); serviceCollection.AddTransient <MultiLineTextInputWindowViewModel>(); serviceCollection.AddTransient <StatusControlViewModel>(); serviceCollection.AddTransient <PeersControlViewModel>(); serviceCollection.AddTransient <DownloadControlViewModel>(); serviceCollection.AddTransient <UploadControlViewModel>(); serviceCollection.AddTransient <SignaturesControlViewModel>(); _serviceProvider = serviceCollection.BuildServiceProvider(); } catch (OperationCanceledException e) { _logger.Debug(e); throw; } catch (Exception e) { _logger.Error(e); throw; } }
protected abstract void ChangeStatus(UiStatus newStatus);
//ウインドウ閉じるボタンが押された void OnTapCloseWindow() { Status = UiStatus.HideMessageWindow; }
protected override void ChangeStatus(UiStatus newStatus) { switch (newStatus) { case UiStatus.Backlog: if (backLog == null) { return; } MessageWindow.Close(); if (selection != null) { selection.Close(); } Engine.Config.IsSkip = false; if (backLog != null) { backLog.Open(); } if (config != null) { config.Close(); } if (menu != null) { menu.Close(); } if (config != null) { inventory.Close(); } if (itemDetail != null) { itemDetail.Close(); } break; case UiStatus.HideMessageWindow: MessageWindow.Close(); if (selection != null) { selection.Close(); } Engine.Config.IsSkip = false; if (backLog != null) { backLog.Close(); } if (config != null) { config.Close(); } if (menu != null) { menu.Close(); } if (inventory != null) { inventory.Close(); } if (itemDetail != null) { itemDetail.Close(); } break; case UiStatus.Menu: MessageWindow.Close(); if (selection != null) { selection.Close(); } Engine.Config.IsSkip = false; if (menu != null) { menu.Open(); } if (config != null) { config.Close(); } if (backLog != null) { backLog.Close(); } if (inventory != null) { inventory.Close(); } if (itemDetail != null) { itemDetail.Close(); } break; case UiStatus.Config: MessageWindow.Close(); if (selection != null) { selection.Close(); } Engine.Config.IsSkip = false; if (config != null) { config.Open(); } if (menu != null) { menu.Close(); } if (backLog != null) { backLog.Close(); } if (inventory != null) { inventory.Close(); } if (itemDetail != null) { itemDetail.Close(); } break; case UiStatus.Inventory: MessageWindow.Close(); if (selection != null) { selection.Close(); } Engine.Config.IsSkip = false; if (inventory != null) { inventory.Open(); } if (config != null) { config.Close(); } if (menu != null) { menu.Close(); } if (backLog != null) { backLog.Close(); } if (itemDetail != null) { itemDetail.Close(); } break; case UiStatus.ItemDetail: MessageWindow.Close(); if (selection != null) { selection.Close(); } Engine.Config.IsSkip = false; if (itemDetail != null) { itemDetail.Open(); } if (inventory != null) { inventory.Close(); } if (config != null) { config.Close(); } if (menu != null) { menu.Close(); } if (backLog != null) { backLog.Close(); } break; case UiStatus.Default: MessageWindow.Open(); if (selection != null) { selection.Open(); } Engine.Config.IsSkip = false; if (backLog != null) { backLog.Close(); } if (menu != null) { menu.Close(); } if (config != null) { config.Close(); } if (inventory != null) { inventory.Close(); } if (itemDetail != null) { itemDetail.Close(); } break; } this.status = newStatus; }
public void SetStatus(UiStatus aStatus) { m_SpawnObject = aStatus.gameObject; m_Status = aStatus; }
public MainViewModel() { ResultLog = new ResultLog(); UndoRedo = new UndoRedoFrameworkView(DesktopApp.Instance.UndoRedo); UiStatus.StopProgress(); }