예제 #1
0
 internal MainMenuManager(MenuStrip mainMenu, WindowsMenuManager windowsMenuManager)
 {
     _mainMenu = mainMenu;
     _windowsMenuManager = windowsMenuManager;
     _onClick = new EventHandler(MenuEventHandler);
 }
예제 #2
0
        public void Initialize(AGSEditor agsEditor)
        {
            if (_mainForm == null)
            {
                _agsEditor = agsEditor;
                _interactiveTasks = new InteractiveTasks(_agsEditor.Tasks);
                _mainForm = new frmMain();
                SetEditorWindowSizeFromRegistry();
                _treeManager = new ProjectTree(_mainForm.projectPanel.projectTree);
                _treeManager.OnContextMenuClick += new ProjectTree.MenuClickHandler(_mainForm_OnMenuClick);
                _toolBarManager = new ToolBarManager(_mainForm.toolStrip);
                WindowsMenuManager windowsMenuManager = new WindowsMenuManager(_mainForm.windowsToolStripMenuItem,
                    _mainForm.GetStartupPanes(), _mainForm.mainContainer);
                _menuManager = new MainMenuManager(_mainForm.mainMenu, windowsMenuManager);
                _mainForm.OnEditorShutdown += new frmMain.EditorShutdownHandler(_mainForm_OnEditorShutdown);
                _mainForm.OnPropertyChanged += new frmMain.PropertyChangedHandler(_mainForm_OnPropertyChanged);
                _mainForm.OnPropertyObjectChanged += new frmMain.PropertyObjectChangedHandler(_mainForm_OnPropertyObjectChanged);
                _mainForm.OnActiveDocumentChanged += new frmMain.ActiveDocumentChangedHandler(_mainForm_OnActiveDocumentChanged);
                _mainForm.OnMainWindowActivated += new EventHandler(_mainForm_OnMainWindowActivated);
                _menuManager.OnMenuClick += new MainMenuManager.MenuClickHandler(_mainForm_OnMenuClick);
                AutoComplete.BackgroundCacheUpdateStatusChanged += new AutoComplete.BackgroundCacheUpdateStatusChangedHandler(AutoComplete_BackgroundCacheUpdateStatusChanged);
                SystemEvents.DisplaySettingsChanged += new EventHandler(SystemEvents_DisplaySettingsChanging);

                RegisterIcon("GameIcon", Resources.ResourceManager.GetIcon("game.ico"));
                RegisterIcon("CompileErrorIcon", Resources.ResourceManager.GetIcon("eventlogError.ico"));
                RegisterIcon("CompileWarningIcon", Resources.ResourceManager.GetIcon("eventlogWarn.ico"));
                _mainForm.SetTreeImageList(_imageList);
                _mainForm.mainMenu.ImageList = _imageList;
                _mainForm.pnlOutput.SetImageList(_imageList);
                //_mainForm.SetProjectTreeLocation(_agsEditor.Preferences.ProjectTreeOnRight);

                ViewUIEditor.ViewSelectionGUI = new ViewUIEditor.ViewSelectionGUIType(ShowViewChooserFromPropertyGrid);
                SpriteSelectUIEditor.SpriteSelectionGUI = new SpriteSelectUIEditor.SpriteSelectionGUIType(ShowSpriteChooserFromPropertyGrid);
                CustomPropertiesUIEditor.CustomPropertiesGUI = new CustomPropertiesUIEditor.CustomPropertiesGUIType(ShowPropertiesEditorFromPropertyGrid);
                PropertyTabInteractions.UpdateEventName = new PropertyTabInteractions.UpdateEventNameHandler(PropertyTabInteractions_UpdateEventName);
                ScriptFunctionUIEditor.OpenScriptEditor = new ScriptFunctionUIEditor.OpenScriptEditorHandler(ScriptFunctionUIEditor_OpenScriptEditor);
                ScriptFunctionUIEditor.CreateScriptFunction = new ScriptFunctionUIEditor.CreateScriptFunctionHandler(ScriptFunctionUIEditor_CreateScriptFunction);
                RoomMessagesUIEditor.ShowRoomMessagesEditor = new RoomMessagesUIEditor.RoomMessagesEditorType(ShowRoomMessageEditorFromPropertyGrid);
                CustomResolutionUIEditor.CustomResolutionSetGUI = new CustomResolutionUIEditor.CustomResolutionGUIType(ShowCustomResolutionChooserFromPropertyGrid);
            }
        }
예제 #3
0
 internal MainMenuManager(MenuStrip mainMenu, WindowsMenuManager windowsMenuManager)
 {
     _mainMenu           = mainMenu;
     _windowsMenuManager = windowsMenuManager;
     _onClick            = new EventHandler(MenuEventHandler);
 }