Beispiel #1
0
        public void ShowWindow(Type windowName, DockState dockState)
        {
            var showWindowEvent = new EventShowWindow();

            showWindowEvent.WindowName = windowName;
            showWindowEvent.DockState  = dockState;
            showWindowEvent.Post();
        }
Beispiel #2
0
        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);
            }
        }
Beispiel #3
0
        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);
            }
        }