• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Types.ContentDocument类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中AGS.Types.ContentDocument的典型用法代码示例。如果您正苦于以下问题:C# ContentDocument类的具体用法?C# ContentDocument怎么用?C# ContentDocument使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ContentDocument类属于AGS.Types命名空间,在下文中一共展示了ContentDocument类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ShowPane

        public void ShowPane(ContentDocument doc)
        {
            RemoveItemsFromLastPane();

            if ((doc == null) || (doc.ToolbarCommands == null))
            {
                return;
            }

            if (_toolBar.Items.Count > 0)
            {
                _toolBar.Items.Add(_paneSpecificSeparator);
            }

            foreach (MenuCommand command in doc.ToolbarCommands)
            {
                ToolStripButton button = new ToolStripButton(string.Empty, Factory.GUIController.ImageList.Images[command.IconKey], new EventHandler(ToolbarEventHandler), command.ID);
                button.Tag = doc;
                button.ToolTipText = command.Name;
                button.Enabled = command.Enabled;
                if (command.Checked)
                {
                    button.CheckState = CheckState.Checked;
                }
                _toolBar.Items.Add(button);
                _buttonsForCurrentPane.Add(button);
            }
        }
开发者ID:Aquilon96,项目名称:ags,代码行数:28,代码来源:ToolBarManager.cs


示例2: SettingsComponent

 public SettingsComponent(GUIController guiController, AGSEditor agsEditor)
     : base(guiController, agsEditor)
 {
     _settingsPane = new GeneralSettings();
     _document = new ContentDocument(_settingsPane, "General Settings", this);
     _guiController.RegisterIcon("SettingsIcon", Resources.ResourceManager.GetIcon("iconsett.ico"));
     _guiController.ProjectTree.AddTreeRoot(this, "GeneralSettings", "General Settings", "SettingsIcon");
 }
开发者ID:sonneveld,项目名称:agscj,代码行数:8,代码来源:SettingsComponent.cs


示例3: AddOrShowPane

 public void AddOrShowPane(ContentDocument pane)
 {
     if (!tabbedDocumentContainer1.ContainsDocument(pane))
     {
         tabbedDocumentContainer1.AddDocument(pane);
     }
     tabbedDocumentContainer1.SetActiveDocument(pane);
 }
开发者ID:sonneveld,项目名称:agscj,代码行数:8,代码来源:frmMain.cs


示例4: RecreateDocument

 private void RecreateDocument()
 {
     if (_document != null)
     {
         _document.Dispose();
     }
     _editor = new TextParserEditor(_agsEditor.CurrentGame.TextParser);
     _document = new ContentDocument(_editor, "Text Parser", this, ICON_KEY);
 }
开发者ID:Aquilon96,项目名称:ags,代码行数:9,代码来源:TextParserComponent.cs


示例5: SpriteManagerComponent

 public SpriteManagerComponent(GUIController guiController, AGSEditor agsEditor)
     : base(guiController, agsEditor)
 {
     _sprEditor = new SpriteManager();
     _editorPane = new ContentDocument(_sprEditor, "Sprites", this);
     _guiController.RegisterIcon("SpriteManagerIcon", Resources.ResourceManager.GetIcon("iconspr.ico"));
     _guiController.ProjectTree.AddTreeRoot(this, TOP_LEVEL_COMMAND_ID, "Sprites", "SpriteManagerIcon");
     Factory.Events.ShowSpriteManager += new EditorEvents.ShowSpriteManagerHandler(Events_ShowSpriteManager);
     RefreshDataFromGame();
 }
开发者ID:sonneveld,项目名称:agscj,代码行数:10,代码来源:SpriteManagerComponent.cs


示例6: RecreateDocument

 private void RecreateDocument()
 {
     if (_document != null)
     {
         _document.Dispose();
     }
     _editor = new LipSyncEditor(_agsEditor.CurrentGame.LipSync);
     _document = new ContentDocument(_editor, "Lip sync", this);
     _document.SelectedPropertyGridObject = _editor.EditingLipSync;
 }
开发者ID:sonneveld,项目名称:agscj,代码行数:10,代码来源:LipSyncComponent.cs


示例7: WelcomeComponent

        public WelcomeComponent(GUIController guiController, AGSEditor agsEditor)
            : base(guiController, agsEditor)
        {
            _welcomePane = new WelcomePane(guiController);
            _document = new ContentDocument(_welcomePane, "Start Page", this, ICON_KEY);

            _guiController.RegisterIcon(ICON_KEY, Resources.ResourceManager.GetIcon("menu_help_showstart.ico"));

            _menuCommands.Commands.Add(new MenuCommand(SHOW_START_PAGE_COMMAND, "Show Start Page", ICON_KEY));
            _guiController.AddMenuItems(this, _menuCommands);
        }
开发者ID:Aquilon96,项目名称:ags,代码行数:11,代码来源:WelcomeComponent.cs


示例8: AddDocument

 public void AddDocument(ContentDocument pane)
 {
     if (_panes.Count == 0)
     {
         contentPane1.Visible = true;
         tabsPanel.Visible = true;
         this.BackColor = Color.FromKnownColor(KnownColor.Control);
     }
     pane.Visible = true;
     _panes.Insert(0, pane);
     _panesInOrderUsed.Insert(0, pane);
     tabsPanel.Invalidate();
 }
开发者ID:sonneveld,项目名称:agscj,代码行数:13,代码来源:TabbedDocumentContainer.cs


示例9: RefreshPropertyGridForDocument

 public void RefreshPropertyGridForDocument(ContentDocument document)
 {
     if (document == null)
     {
         this.SetPropertyObjectList(null);
         this.SetPropertyObject(null);
     }
     else
     {
         this.SetPropertyObjectList(document.PropertyGridObjectList);
         if (document.SelectedPropertyGridObjects != null)
         {
             this.SetPropertyObjects(document.SelectedPropertyGridObjects);
         }
         else
         {
             this.SetPropertyObject(document.SelectedPropertyGridObject);
         }
     }
 }
开发者ID:Aquilon96,项目名称:ags,代码行数:20,代码来源:frmMain.cs


示例10: LoadDifferentRoom

        private bool LoadDifferentRoom(UnloadedRoom newRoom)
        {
            if ((_roomSettings != null) && (_roomSettings.Visible))
            {
                // give them a chance to save the current room first
                bool cancelLoad = false;
                ((RoomSettingsEditor)_roomSettings.Control).PanelClosing(true, ref cancelLoad);
                if (cancelLoad)
                {
                    return false;
                }
            }

            // lock to stop the load proceeding until a save has finished,
            // just to make sure we don't end up with a race condition if
            // the user is madly clicking around
            lock (_roomLoadingOrSavingLock)
            {
                UnloadCurrentRoomAndGreyOutTree();

                if (!File.Exists(newRoom.FileName))
                {
                    _guiController.ShowMessage("The file '" + newRoom.FileName + "' was not found. Unable to open this room.", MessageBoxIcon.Warning);
                }
                else
                {
                    CompileMessages errors = new CompileMessages();

                    LoadNewRoomIntoMemory(newRoom, errors);

                    _loadedRoom.RoomModifiedChanged += _modifiedChangedHandler;

                    string paneTitle = "Room " + _loadedRoom.Number + (_loadedRoom.Modified ? " *" : "");

                    _roomSettings = new ContentDocument(new RoomSettingsEditor(_loadedRoom), paneTitle, this, ConstructPropertyObjectList(_loadedRoom));
                    _roomSettings.SelectedPropertyGridObject = _loadedRoom;
                    ((RoomSettingsEditor)_roomSettings.Control).SaveRoom += new RoomSettingsEditor.SaveRoomHandler(RoomEditor_SaveRoom);
                    ((RoomSettingsEditor)_roomSettings.Control).AbandonChanges += new RoomSettingsEditor.AbandonChangesHandler(RoomsComponent_AbandonChanges);

                    if (_loadedRoom.Modified)
                    {
                        CreateOrShowScript(_loadedRoom);
                    }

                    if (_roomScriptEditors.ContainsKey(_loadedRoom.Number))
                    {
                        ((ScriptEditor)_roomScriptEditors[_loadedRoom.Number].Control).Room = _loadedRoom;
                        if (_loadedRoom.Modified)
                        {
                            ((ScriptEditor)_roomScriptEditors[_loadedRoom.Number].Control).ScriptModifiedExternally();
                        }
                    }

                    ProjectTree treeController = _guiController.ProjectTree;
                    treeController.ChangeNodeIcon(this, TREE_PREFIX_ROOM_NODE + _loadedRoom.Number, ROOM_ICON_LOADED);
                    treeController.ChangeNodeIcon(this, TREE_PREFIX_ROOM_SETTINGS + _loadedRoom.Number, ROOM_ICON_LOADED);

                    _guiController.ShowOutputPanel(errors);
                }

                return true;
            }
        }
开发者ID:sonneveld,项目名称:agscj,代码行数:63,代码来源:RoomsComponent.cs


示例11: RecreateDocument

 private void RecreateDocument()
 {
     _document = new ContentDocument(_palEditor, "Colours", this, ICON_KEY,
         ConstructPropertyObjectList());
 }
开发者ID:Aquilon96,项目名称:ags,代码行数:5,代码来源:PaletteComponent.cs


示例12: Refresh

 public void Refresh(List<ContentDocument> documents, ContentDocument activeDocument)
 {
     RemoveAllButStartupWindows();
     AddDocuments(documents, activeDocument);
 }
开发者ID:Aquilon96,项目名称:ags,代码行数:5,代码来源:WindowsMenuManager.cs


示例13: tabbedDocumentContainer1_ActiveDocumentChanging

 private void tabbedDocumentContainer1_ActiveDocumentChanging(ContentDocument newActiveDocument)
 {
     if (tabbedDocumentContainer1.ActiveDocument != null)
     {
         // Remember which pane and item were selected on the property grid,
         // so that we can restore them later
         tabbedDocumentContainer1.ActiveDocument.SelectedPropertyGridTab = propertiesPanel.SelectedTab.TabName;
         if (propertiesPanel.SelectedGridItem != null)
         {
             tabbedDocumentContainer1.ActiveDocument.SelectedPropertyGridItem = propertiesPanel.SelectedGridItem.Label;
         }
     }
 }
开发者ID:sonneveld,项目名称:agscj,代码行数:13,代码来源:frmMain.cs


示例14: tabbedDocumentContainer1_ActiveDocumentChanged

        private void tabbedDocumentContainer1_ActiveDocumentChanged(ContentDocument newActiveDocument)
        {
            RefreshPropertyGridForDocument(newActiveDocument);

            if (newActiveDocument != null)
            {
                RestoreSelectedPropertyGridItem(newActiveDocument);
            }

            if (OnActiveDocumentChanged != null)
            {
                OnActiveDocumentChanged();
            }
        }
开发者ID:sonneveld,项目名称:agscj,代码行数:14,代码来源:frmMain.cs


示例15: DrawPane

        private bool DrawPane(Graphics graphics, ContentDocument pane, bool selected, int x, int y)
        {
            Pen borderPen = Pens.Gray;
            int textWidth = (int)graphics.MeasureString(pane.Name, _selectedPaneFont).Width + 5;
            if (x + TAB_HEIGHT + textWidth >= btnListAll.Left)
            {
                // going off the edge of the screen
                return false;
            }
            GraphicsPath path = new GraphicsPath();
            path.AddLine(x, y + TAB_HEIGHT, x + TAB_HEIGHT, y);
            path.AddLine(x + TAB_HEIGHT, y, x + TAB_HEIGHT + textWidth, y);
            path.AddLine(x + TAB_HEIGHT + textWidth, y, x + TAB_HEIGHT + textWidth, y + TAB_HEIGHT);
            path.CloseFigure();
            if (selected)
            {
                graphics.FillPath(Brushes.White, path);
            }
            graphics.DrawPath(borderPen, path);

            System.Drawing.Font fontToUse = _unselectedPaneFont;
            if (selected)
            {
                fontToUse = _selectedPaneFont;
            }
            graphics.DrawString(pane.Name, fontToUse, Brushes.Black, x + TAB_HEIGHT, y + 2);

            graphics.DrawLine(borderPen, 0, tabsPanel.ClientSize.Height - 1, tabsPanel.ClientSize.Width - 1, tabsPanel.ClientSize.Height - 1);

            pane.TabXOffset = x;
            pane.TabWidth = TAB_HEIGHT + textWidth;
            return true;
        }
开发者ID:sonneveld,项目名称:agscj,代码行数:33,代码来源:TabbedDocumentContainer.cs


示例16: AddOrShowPane

 public void AddOrShowPane(ContentDocument pane)
 {
     _mainForm.AddOrShowPane(pane);
 }
开发者ID:CisBetter,项目名称:ags,代码行数:4,代码来源:GUIController.cs


示例17: RemoveAllDocumentsExcept

        public void RemoveAllDocumentsExcept(ContentDocument pane)
        {
            List<ContentDocument> newPaneList = new List<ContentDocument>();

            ContentDocument[] copyOfPaneList = _panes.ToArray();
            foreach (ContentDocument doc in copyOfPaneList)
            {
                if (doc != pane)
                {
                    bool cancelled = false;
                    doc.Control.PanelClosing(true, ref cancelled);
                    if (cancelled)
                    {
                        newPaneList.Add(doc);
                    }
                    else
                    {
                        doc.Visible = false;
                    }
                }
            }

            _panes = newPaneList;
            _panes.Add(pane);
            _panesInOrderUsed = new List<ContentDocument>();
            foreach (ContentDocument doc in _panes)
            {
                _panesInOrderUsed.Add(doc);
            }
            if (pane != _currentPane)
            {

                SetActiveDocument(pane);
            }
            tabsPanel.Invalidate();
        }
开发者ID:sonneveld,项目名称:agscj,代码行数:36,代码来源:TabbedDocumentContainer.cs


示例18: UpdateSize

 private void UpdateSize(ContentDocument pane)
 {
     pane.Control.Size = contentPane1.ClientSize;
 }
开发者ID:sonneveld,项目名称:agscj,代码行数:4,代码来源:TabbedDocumentContainer.cs


示例19: RemoveDocument

 public void RemoveDocument(ContentDocument pane)
 {
     RemoveDocument(pane, false);
 }
开发者ID:sonneveld,项目名称:agscj,代码行数:4,代码来源:TabbedDocumentContainer.cs


示例20: ShowTabContextMenu

 private void ShowTabContextMenu(ContentDocument document, Point position)
 {
     EventHandler onClick = new EventHandler(TreeContextMenuEventHandler);
     ContextMenuStrip menu = new ContextMenuStrip();
     menu.Tag = document;
     menu.Items.Add(new ToolStripMenuItem("Close", null, onClick, MENU_ITEM_CLOSE));
     menu.Items.Add(new ToolStripMenuItem("Close all others", null, onClick, MENU_ITEM_CLOSE_ALL_BUT_THIS));
     menu.Show(tabsPanel, position);
 }
开发者ID:sonneveld,项目名称:agscj,代码行数:9,代码来源:TabbedDocumentContainer.cs



注:本文中的AGS.Types.ContentDocument类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Types.Game类代码示例发布时间:2022-05-24
下一篇:
C# Editor.RoomEditorState类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap