public void ShowWindow(Type windowName, DockState dockState) { var showWindowEvent = new EventShowWindow(); showWindowEvent.WindowName = windowName; showWindowEvent.DockState = dockState; showWindowEvent.Post(); }
public void ShowWindow(EventShowWindow viewEvent) { Type windowName = viewEvent.WindowName; DockState dockState = viewEvent.DockState; try { var window = (DockContent)Activator.CreateInstance(windowName); if (OnShowWindow != null) { OnShowWindow(this, window, dockState); } } catch (Exception ex) { ShowSystemException(ex); } }
public void ValidateConfiguration() { var tileRootDir = ConfigurationManager.GetString(EditorConfigConstants.TileRootDirectory); var configErrors = new StringBuilder(); if (tileRootDir.IsNullOrWhiteSpace()) { configErrors.AppendLine(" - Tile Root Directory is not set"); } if (configErrors.Length > 0) { var openSettingsEvent = new EventShowWindow(); openSettingsEvent.DockState = DockState.Document; openSettingsEvent.WindowName = typeof(FrmSettings); var okButtonContainer = new OkButtonContainer(); okButtonContainer.ButtonText = "Open Settings"; okButtonContainer.ButtonEvent = openSettingsEvent; EventShowDialog.ShowOkDialog("Configuration Error", string.Format("The configuration file is missing paramters:\n{0}", configErrors), okButtonContainer); } }