Inheritance: System.Windows.Forms.Control
Exemple #1
0
        public ResourceSelectionControl(ResourceControl resourceControl)
        {
            resourceSplitter = new Splitter( );

            resourceListBox  = new ResourceListBox( );
            resourceTreeView = new ResourceTreeView(resourceListBox);
            resourceListBox.ResourceTreeView = resourceTreeView;

            SuspendLayout( );

            // resourceListBox
            resourceListBox.Size        = new Size(592, 328);
            resourceListBox.Dock        = DockStyle.Fill;
            resourceListBox.TabIndex    = 0;
            resourceListBox.ContextMenu = resourceControl.InternalContextMenu;

            // resourceTreeView
            resourceTreeView.Dock = DockStyle.Left;
            resourceTreeView.Size = new Size(150, 328);

            // resourceSplitter
            resourceSplitter.Dock     = DockStyle.Left;
            resourceSplitter.MinExtra = 150;
            resourceSplitter.MinSize  = 150;

            Controls.Add(resourceListBox);
            Controls.Add(resourceSplitter);
            Controls.Add(resourceTreeView);

            ResumeLayout(false);
        }
        public ResourceSelectionControl( ResourceControl resourceControl )
        {
            resourceSplitter = new Splitter( );

            resourceListBox = new ResourceListBox( );
            resourceTreeView = new ResourceTreeView( resourceListBox );
            resourceListBox.ResourceTreeView = resourceTreeView;

            SuspendLayout( );

            // resourceListBox
            resourceListBox.Size = new Size( 592, 328 );
            resourceListBox.Dock = DockStyle.Fill;
            resourceListBox.TabIndex = 0;
            resourceListBox.ContextMenu = resourceControl.InternalContextMenu;

            // resourceTreeView
            resourceTreeView.Dock = DockStyle.Left;
            resourceTreeView.Size = new Size( 150, 328 );

            // resourceSplitter
            resourceSplitter.Dock = DockStyle.Left;
            resourceSplitter.MinExtra = 150;
            resourceSplitter.MinSize = 150;

            Controls.Add( resourceListBox );
            Controls.Add( resourceSplitter );
            Controls.Add( resourceTreeView );

            ResumeLayout( false );
        }
Exemple #3
0
        public ResourceContentControl(ResourceControl resourceControl)
        {
            imagePanel     = new ImagePanel(this);
            textPanel      = new TextPanel(this);
            colorPanel     = new ColorPanel(this);
            byteArrayPanel = new ByteArrayPanel(this);

            SuspendLayout( );

            activePanel = textPanel;

            Controls.Add(textPanel);

            ResumeLayout(false);

            change_Resource_Content = new ResourceControl.ChangeResourceContentDelegate(resourceControl.ChangeResourceContent);
        }
        public ResourceContentControl( ResourceControl resourceControl )
        {
            imagePanel = new ImagePanel( this );
            textPanel = new TextPanel( this );
            colorPanel = new ColorPanel( this );
            byteArrayPanel = new ByteArrayPanel( this );

            SuspendLayout( );

            activePanel = textPanel;

            Controls.Add( textPanel );

            ResumeLayout( false );

            change_Resource_Content = new ResourceControl.ChangeResourceContentDelegate( resourceControl.ChangeResourceContent );
        }
Exemple #5
0
        private void InitializeComponent( )
        {
            menuItemFile   = new MenuItem( );
            menuItemNew    = new MenuItem( );
            menuItemLoad   = new MenuItem( );
            menuItemSave   = new MenuItem( );
            menuItemSaveAs = new MenuItem( );
            menuItemDash1  = new MenuItem( );
            menuItemExit   = new MenuItem( );

            menuItemResources = new MenuItem( );
            menuItemAddString = new MenuItem( );
            menuItemAddFiles  = new MenuItem( );
            menuItemAddColor  = new MenuItem( );
            menuItemDash2     = new MenuItem( );
            menuItemDelete    = new MenuItem( );
            menuItemCopy      = new MenuItem( );
            menuItemPaste     = new MenuItem( );
            menuItemDash3     = new MenuItem( );
            menuItemRename    = new MenuItem( );

            menuItemHelp  = new MenuItem( );
            menuItemAbout = new MenuItem( );

            mainMenu = new MainMenu( );

            resourceControl = new ResourceControl( );

            statusBar = new StatusBar( );

            SuspendLayout( );

            // menuItemFile
            menuItemFile.Index = 0;
            menuItemFile.MenuItems.AddRange(new MenuItem[] {
                menuItemNew,
                menuItemLoad,
                menuItemSave,
                menuItemSaveAs,
                menuItemDash1,
                menuItemExit
            });
            menuItemFile.Text = "&File";

            // menuItemNew
            menuItemNew.Index  = 0;
            menuItemNew.Text   = "&New";
            menuItemNew.Click += new EventHandler(OnMenuItemNewClick);

            // menuItemLoad
            menuItemLoad.Index  = 1;
            menuItemLoad.Text   = "L&oad";
            menuItemLoad.Click += new EventHandler(OnMenuItemLoadClick);

            // menuItemSave
            menuItemSave.Index  = 2;
            menuItemSave.Text   = "&Save";
            menuItemSave.Click += new EventHandler(OnMenuItemSaveClick);

            // menuItemSaveAs
            menuItemSaveAs.Index  = 3;
            menuItemSaveAs.Text   = "S&ave as";
            menuItemSaveAs.Click += new EventHandler(OnMenuItemSaveAsClick);

            // menuItemDash
            menuItemDash1.Index = 4;
            menuItemDash1.Text  = "-";

            // menuItemExit
            menuItemExit.Index  = 5;
            menuItemExit.Text   = "E&xit";
            menuItemExit.Click += new EventHandler(OnMenuItemExitClick);

            // menuItemResources
            menuItemResources.Index = 1;
            menuItemResources.MenuItems.AddRange(new MenuItem[] {
                menuItemAddString,
                menuItemAddFiles,
                menuItemAddColor,
                menuItemDash2,
                menuItemDelete,
                menuItemCopy,
                menuItemPaste,
                menuItemDash3,
                menuItemRename
            });
            menuItemResources.Text = "Resources";

            // menuItemAddString
            menuItemAddString.Index  = 0;
            menuItemAddString.Text   = "Add S&tring";
            menuItemAddString.Click += new EventHandler(OnMenuItemAddStringClick);

            // menuItemAddFiles
            menuItemAddFiles.Index  = 1;
            menuItemAddFiles.Text   = "Add Fi&le(s)";
            menuItemAddFiles.Click += new EventHandler(OnMenuItemAddFilesClick);

            // menuItemAddColor
            menuItemAddColor.Index  = 2;
            menuItemAddColor.Text   = "Add Colo&r";
            menuItemAddColor.Click += new EventHandler(OnMenuItemAddColorClick);

            // menuItemDash2
            menuItemDash2.Index = 3;
            menuItemDash2.Text  = "-";

            // menuItemDelete
            menuItemDelete.Index  = 4;
            menuItemDelete.Text   = "&Delete";
            menuItemDelete.Click += new EventHandler(OnMenuItemDeleteClick);

            // menuItemCopy
            menuItemCopy.Index  = 5;
            menuItemCopy.Text   = "&Copy";
            menuItemCopy.Click += new EventHandler(OnMenuItemCopyClick);

            // menuItemPaste
            menuItemPaste.Index  = 6;
            menuItemPaste.Text   = "Paste";
            menuItemPaste.Click += new EventHandler(OnMenuItemPasteClick);

            menuItemDash3.Index = 7;
            menuItemDash3.Text  = "-";

            menuItemRename.Index  = 8;
            menuItemRename.Text   = "Rename";
            menuItemRename.Click += new EventHandler(OnMenuItemRenameClick);

            // menuItemHelp
            menuItemHelp.Index = 2;
            menuItemHelp.MenuItems.AddRange(new MenuItem[] {
                menuItemAbout
            });
            menuItemHelp.Text = "&Help";

            // menuItemAbout
            menuItemAbout.Index  = 0;
            menuItemAbout.Text   = "A&bout";
            menuItemAbout.Click += new EventHandler(OnMenuItemAboutClick);

            // mainMenu
            mainMenu.MenuItems.AddRange(new MenuItem[] {
                menuItemFile,
                menuItemResources,
                menuItemHelp
            });

            // resourceControl
            resourceControl.Dock = DockStyle.Fill;
            resourceControl.InternalContextMenu.MenuItems.AddRange(new MenuItem[] {
                menuItemAddString.CloneMenu( ),
                menuItemAddFiles.CloneMenu( ),
                menuItemAddColor.CloneMenu( ),
                menuItemDash2.CloneMenu( ),
                menuItemDelete.CloneMenu( ),
                menuItemCopy.CloneMenu( ),
                menuItemPaste.CloneMenu( ),
                menuItemRename.CloneMenu( )
            });

            // statusBar
            StatusBarPanel panel1 = new StatusBarPanel( );
            StatusBarPanel panel2 = new StatusBarPanel( );

            panel1.BorderStyle   = StatusBarPanelBorderStyle.Sunken;
            panel1.AutoSize      = StatusBarPanelAutoSize.Spring;
            panel2.BorderStyle   = StatusBarPanelBorderStyle.Sunken;
            panel2.AutoSize      = StatusBarPanelAutoSize.Spring;
            statusBar.ShowPanels = true;
            statusBar.Panels.Add(panel1);
            statusBar.Panels.Add(panel2);

            resourceControl.ParentStatusBar = statusBar;

            // MainForm
//			AutoScaleBaseSize = new Size( 5, 14 );
            ClientSize = new Size(592, 541);

            Menu = mainMenu;
            Text = "New Resource.resx";

            ResumeLayout(false);

            Controls.Add(resourceControl);
            Controls.Add(statusBar);
        }
Exemple #6
0
        private void InitializeComponent( )
        {
            menuItemFile = new MenuItem( );
            menuItemNew = new MenuItem( );
            menuItemLoad = new MenuItem( );
            menuItemSave = new MenuItem( );
            menuItemSaveAs = new MenuItem( );
            menuItemDash1 = new MenuItem( );
            menuItemExit = new MenuItem( );

            menuItemResources = new MenuItem( );
            menuItemAddString = new MenuItem( );
            menuItemAddFiles = new MenuItem( );
            menuItemAddColor = new MenuItem( );
            menuItemDash2 = new MenuItem( );
            menuItemDelete = new MenuItem( );
            menuItemCopy = new MenuItem( );
            menuItemPaste = new MenuItem( );
            menuItemDash3 = new MenuItem( );
            menuItemRename = new MenuItem( );

            menuItemHelp = new MenuItem( );
            menuItemAbout = new MenuItem( );

            mainMenu = new MainMenu( );

            resourceControl = new ResourceControl( );

            statusBar = new StatusBar( );

            SuspendLayout( );

            // menuItemFile
            menuItemFile.Index = 0;
            menuItemFile.MenuItems.AddRange( new MenuItem[] {
                                menuItemNew,
                                menuItemLoad,
                                menuItemSave,
                                menuItemSaveAs,
                                menuItemDash1,
                                menuItemExit} );
            menuItemFile.Text = "&File";

            // menuItemNew
            menuItemNew.Index = 0;
            menuItemNew.Text = "&New";
            menuItemNew.Click += new EventHandler( OnMenuItemNewClick );

            // menuItemLoad
            menuItemLoad.Index = 1;
            menuItemLoad.Text = "L&oad";
            menuItemLoad.Click += new EventHandler( OnMenuItemLoadClick );

            // menuItemSave
            menuItemSave.Index = 2;
            menuItemSave.Text = "&Save";
            menuItemSave.Click += new EventHandler( OnMenuItemSaveClick );

            // menuItemSaveAs
            menuItemSaveAs.Index = 3;
            menuItemSaveAs.Text = "S&ave as";
            menuItemSaveAs.Click += new EventHandler( OnMenuItemSaveAsClick );

            // menuItemDash
            menuItemDash1.Index = 4;
            menuItemDash1.Text = "-";

            // menuItemExit
            menuItemExit.Index = 5;
            menuItemExit.Text = "E&xit";
            menuItemExit.Click += new EventHandler( OnMenuItemExitClick );

            // menuItemResources
            menuItemResources.Index = 1;
            menuItemResources.MenuItems.AddRange( new MenuItem[] {
                                     menuItemAddString,
                                     menuItemAddFiles,
                                     menuItemAddColor,
                                     menuItemDash2,
                                     menuItemDelete,
                                     menuItemCopy,
                                     menuItemPaste,
                                     menuItemDash3,
                                     menuItemRename } );
            menuItemResources.Text = "Resources";

            // menuItemAddString
            menuItemAddString.Index = 0;
            menuItemAddString.Text = "Add S&tring";
            menuItemAddString.Click += new EventHandler( OnMenuItemAddStringClick );

            // menuItemAddFiles
            menuItemAddFiles.Index = 1;
            menuItemAddFiles.Text = "Add Fi&le(s)";
            menuItemAddFiles.Click += new EventHandler( OnMenuItemAddFilesClick );

            // menuItemAddColor
            menuItemAddColor.Index = 2;
            menuItemAddColor.Text = "Add Colo&r";
            menuItemAddColor.Click += new EventHandler( OnMenuItemAddColorClick );

            // menuItemDash2
            menuItemDash2.Index = 3;
            menuItemDash2.Text = "-";

            // menuItemDelete
            menuItemDelete.Index = 4;
            menuItemDelete.Text = "&Delete";
            menuItemDelete.Click += new EventHandler( OnMenuItemDeleteClick );

            // menuItemCopy
            menuItemCopy.Index = 5;
            menuItemCopy.Text = "&Copy";
            menuItemCopy.Click += new EventHandler( OnMenuItemCopyClick );

            // menuItemPaste
            menuItemPaste.Index = 6;
            menuItemPaste.Text = "Paste";
            menuItemPaste.Click += new EventHandler( OnMenuItemPasteClick );

            menuItemDash3.Index = 7;
            menuItemDash3.Text = "-";

            menuItemRename.Index = 8;
            menuItemRename.Text = "Rename";
            menuItemRename.Click += new EventHandler( OnMenuItemRenameClick );

            // menuItemHelp
            menuItemHelp.Index = 2;
            menuItemHelp.MenuItems.AddRange( new MenuItem[] {
                                menuItemAbout} );
            menuItemHelp.Text = "&Help";

            // menuItemAbout
            menuItemAbout.Index = 0;
            menuItemAbout.Text = "A&bout";
            menuItemAbout.Click += new EventHandler( OnMenuItemAboutClick );

            // mainMenu
            mainMenu.MenuItems.AddRange( new MenuItem[] {
                                menuItemFile,
                                menuItemResources,
                                menuItemHelp} );

            // resourceControl
            resourceControl.Dock = DockStyle.Fill;
            resourceControl.InternalContextMenu.MenuItems.AddRange( new MenuItem[] {
                                               menuItemAddString.CloneMenu( ),
                                               menuItemAddFiles.CloneMenu( ),
                                               menuItemAddColor.CloneMenu( ),
                                               menuItemDash2.CloneMenu( ),
                                               menuItemDelete.CloneMenu( ),
                                               menuItemCopy.CloneMenu( ),
                                               menuItemPaste.CloneMenu( ),
                                               menuItemRename.CloneMenu( )
                                           } );

            // statusBar
            StatusBarPanel panel1 = new StatusBarPanel( );
            StatusBarPanel panel2 = new StatusBarPanel( );

            panel1.BorderStyle = StatusBarPanelBorderStyle.Sunken;
            panel1.AutoSize = StatusBarPanelAutoSize.Spring;
            panel2.BorderStyle = StatusBarPanelBorderStyle.Sunken;
            panel2.AutoSize = StatusBarPanelAutoSize.Spring;
            statusBar.ShowPanels = true;
            statusBar.Panels.Add( panel1 );
            statusBar.Panels.Add( panel2 );

            resourceControl.ParentStatusBar = statusBar;

            // MainForm
            //			AutoScaleBaseSize = new Size( 5, 14 );
            ClientSize = new Size( 592, 541 );

            Menu = mainMenu;
            Text = "New Resource.resx";

            ResumeLayout( false );

            Controls.Add( resourceControl );
            Controls.Add( statusBar );
        }