Beispiel #1
0
 private void InitializeComponent()
 {
     this.menuToolsAntialiasing = new PdnMenuItem();
     this.menuToolsAlphaBlending = new PdnMenuItem();
     this.menuToolsSeperator = new ToolStripSeparator();
     // 
     // ToolsMenu
     //
     this.DropDownItems.AddRange(
         new ToolStripItem[]
         {
             this.menuToolsAntialiasing,
             this.menuToolsAlphaBlending,
             this.menuToolsSeperator
         });
     this.Name = "Menu.Tools";
     this.Text = PdnResources.GetString("Menu.Tools.Text");
     // 
     // menuToolsAntiAliasing
     // 
     this.menuToolsAntialiasing.Name = "AntiAliasing";
     this.menuToolsAntialiasing.Click += new System.EventHandler(MenuToolsAntiAliasing_Click);
     //
     // menuToolsAlphaBlending
     //
     this.menuToolsAlphaBlending.Name = "AlphaBlending";
     this.menuToolsAlphaBlending.Click += new EventHandler(MenuToolsAlphaBlending_Click);
 }
Beispiel #2
0
 private void InitializeComponent()
 {
     this.menuToolsAntialiasing  = new PdnMenuItem();
     this.menuToolsAlphaBlending = new PdnMenuItem();
     this.menuToolsSeperator     = new ToolStripSeparator();
     //
     // ToolsMenu
     //
     this.DropDownItems.AddRange(
         new ToolStripItem[]
     {
         this.menuToolsAntialiasing,
         this.menuToolsAlphaBlending,
         this.menuToolsSeperator
     });
     this.Name = "Menu.Tools";
     this.Text = PdnResources.GetString("Menu.Tools.Text");
     //
     // menuToolsAntiAliasing
     //
     this.menuToolsAntialiasing.Name   = "AntiAliasing";
     this.menuToolsAntialiasing.Click += new System.EventHandler(MenuToolsAntiAliasing_Click);
     //
     // menuToolsAlphaBlending
     //
     this.menuToolsAlphaBlending.Name   = "AlphaBlending";
     this.menuToolsAlphaBlending.Click += new EventHandler(MenuToolsAlphaBlending_Click);
 }
Beispiel #3
0
        protected override void OnDropDownOpening(EventArgs e)
        {
            if (!this.toolsListInit)
            {
                this.DropDownItems.Clear();
                this.DropDownItems.Add(this.menuToolsAntialiasing);
                this.DropDownItems.Add(this.menuToolsAlphaBlending);
                this.DropDownItems.Add(this.menuToolsSeperator);

                foreach (ToolInfo toolInfo in DocumentWorkspace.ToolInfos)
                {
                    PdnMenuItem mi = new PdnMenuItem(toolInfo.Name, null, this.menuTools_ClickHandler);
                    mi.SetIcon(toolInfo.Image);
                    mi.Tag = toolInfo;
                    this.DropDownItems.Add(mi);
                }

                this.toolsListInit = true;
            }

            Type currentToolType;

            if (AppWorkspace.ActiveDocumentWorkspace != null)
            {
                currentToolType = AppWorkspace.ActiveDocumentWorkspace.GetToolType();
            }
            else
            {
                currentToolType = null;
            }

            foreach (ToolStripItem tsi in this.DropDownItems)
            {
                PdnMenuItem mi = tsi as PdnMenuItem;

                if (mi != null)
                {
                    ToolInfo toolInfo = mi.Tag as ToolInfo;

                    if (toolInfo != null)
                    {
                        if (toolInfo.ToolType == currentToolType)
                        {
                            mi.Checked = true;
                        }
                        else
                        {
                            mi.Checked = false;
                        }
                    }
                }
            }

            this.menuToolsAntialiasing.Checked  = AppWorkspace.AppEnvironment.AntiAliasing;
            this.menuToolsAlphaBlending.Checked = AppWorkspace.AppEnvironment.AlphaBlending;

            base.OnDropDownOpening(e);
        }
Beispiel #4
0
        protected override void OnDropDownOpening(EventArgs e)
        {
            if (!this.toolsListInit)
            {
                this.DropDownItems.Clear();
                this.DropDownItems.Add(this.menuToolsAntialiasing);
                this.DropDownItems.Add(this.menuToolsAlphaBlending);
                this.DropDownItems.Add(this.menuToolsSeperator);

                foreach (ToolInfo toolInfo in DocumentWorkspace.ToolInfos)
                {
                    PdnMenuItem mi = new PdnMenuItem(toolInfo.Name, null, this.menuTools_ClickHandler);
                    mi.SetIcon(toolInfo.Image);
                    mi.Tag = toolInfo;
                    this.DropDownItems.Add(mi);
                }

                this.toolsListInit = true;
            }

            Type currentToolType;

            if (AppWorkspace.ActiveDocumentWorkspace != null)
            {
                currentToolType = AppWorkspace.ActiveDocumentWorkspace.GetToolType();
            }
            else
            {
                currentToolType = null;
            }

            foreach (ToolStripItem tsi in this.DropDownItems)
            {
                PdnMenuItem mi = tsi as PdnMenuItem;

                if (mi != null)
                {
                    ToolInfo toolInfo = mi.Tag as ToolInfo;

                    if (toolInfo != null)
                    {
                        if (toolInfo.ToolType == currentToolType)
                        {
                            mi.Checked = true;
                        }
                        else
                        {
                            mi.Checked = false;
                        }
                    }
                }
            }

            this.menuToolsAntialiasing.Checked = AppWorkspace.AppEnvironment.AntiAliasing;
            this.menuToolsAlphaBlending.Checked = AppWorkspace.AppEnvironment.AlphaBlending;

            base.OnDropDownOpening(e);
        }
Beispiel #5
0
 private void menuTools_ClickHandler(object sender, System.EventArgs e)
 {
     if (AppWorkspace.ActiveDocumentWorkspace != null)
     {
         PdnMenuItem mi       = (PdnMenuItem)sender;
         ToolInfo    toolInfo = (ToolInfo)mi.Tag;
         AppWorkspace.ActiveDocumentWorkspace.SetToolFromType(toolInfo.ToolType);
     }
 }
Beispiel #6
0
 private void InitializeComponent()
 {
     this.menuImageCrop           = new PdnMenuItem();
     this.menuImageResize         = new PdnMenuItem();
     this.menuImageCanvasSize     = new PdnMenuItem();
     this.menuImageSeparator1     = new ToolStripSeparator();
     this.menuImageFlipHorizontal = new PdnMenuItem();
     this.menuImageFlipVertical   = new PdnMenuItem();
     this.menuImageSeparator2     = new ToolStripSeparator();
     this.menuImageRotate90CW     = new PdnMenuItem();
     this.menuImageRotate90CCW    = new PdnMenuItem();
     this.menuImageRotate180      = new PdnMenuItem();
     this.menuImageSeparator3     = new ToolStripSeparator();
     this.menuImageFlatten        = new PdnMenuItem();
     //
     // ImageMenu
     //
     this.DropDownItems.AddRange(
         new System.Windows.Forms.ToolStripItem[]
     {
         this.menuImageCrop,
         this.menuImageResize,
         this.menuImageCanvasSize,
         this.menuImageSeparator1,
         this.menuImageFlipHorizontal,
         this.menuImageFlipVertical,
         this.menuImageSeparator2,
         this.menuImageRotate90CW,
         this.menuImageRotate90CCW,
         this.menuImageRotate180,
         this.menuImageSeparator3,
         this.menuImageFlatten
     });
     this.Name = "Menu.Image";
     this.Text = PdnResources.GetString("Menu.Image.Text");
     //
     // menuImageCrop
     //
     this.menuImageCrop.Name         = "Crop";
     this.menuImageCrop.Click       += new System.EventHandler(this.MenuImageCrop_Click);
     this.menuImageCrop.ShortcutKeys = Keys.Control | Keys.Shift | Keys.X;
     //
     // menuImageResize
     //
     this.menuImageResize.Name         = "Resize";
     this.menuImageResize.ShortcutKeys = Keys.Control | Keys.R;
     this.menuImageResize.Click       += new System.EventHandler(this.MenuImageResize_Click);
     //
     // menuImageCanvasSize
     //
     this.menuImageCanvasSize.Name         = "CanvasSize";
     this.menuImageCanvasSize.ShortcutKeys = Keys.Control | Keys.Shift | Keys.R;
     this.menuImageCanvasSize.Click       += new System.EventHandler(this.MenuImageCanvasSize_Click);
     //
     // menuImageFlipHorizontal
     //
     this.menuImageFlipHorizontal.Name   = "FlipHorizontal";
     this.menuImageFlipHorizontal.Click += new System.EventHandler(this.MenuImageFlipHorizontal_Click);
     //
     // menuImageFlipVertical
     //
     this.menuImageFlipVertical.Name   = "FlipVertical";
     this.menuImageFlipVertical.Click += new System.EventHandler(this.MenuImageFlipVertical_Click);
     //
     // menuImageRotate90CW
     //
     this.menuImageRotate90CW.Name         = "Rotate90CW";
     this.menuImageRotate90CW.ShortcutKeys = Keys.Control | Keys.H;
     this.menuImageRotate90CW.Click       += new System.EventHandler(this.MenuImageRotate90CW_Click);
     //
     // menuImageRotate90CCW
     //
     this.menuImageRotate90CCW.Name         = "Rotate90CCW";
     this.menuImageRotate90CCW.ShortcutKeys = Keys.Control | Keys.G;
     this.menuImageRotate90CCW.Click       += new System.EventHandler(this.MenuImageRotate90CCW_Click);
     //
     // menuImageRotate180
     //
     this.menuImageRotate180.Name         = "Rotate180";
     this.menuImageRotate180.Click       += new System.EventHandler(this.MenuImageRotate180_Click);
     this.menuImageRotate180.ShortcutKeys = Keys.Control | Keys.J;
     //
     // menuImageFlatten
     //
     this.menuImageFlatten.Name         = "Flatten";
     this.menuImageFlatten.ShortcutKeys = Keys.Control | Keys.Shift | Keys.F;
     this.menuImageFlatten.Click       += new System.EventHandler(this.MenuImageFlatten_Click);
 }
Beispiel #7
0
        private void InitializeComponent()
        {
            this.menuHelpHelpTopics       = new PdnMenuItem();
            this.menuHelpSeparator1       = new ToolStripSeparator();
            this.menuHelpPdnWebsite       = new PdnMenuItem();
            this.menuHelpSeparator2       = new ToolStripSeparator();
            this.menuHelpLanguage         = new PdnMenuItem();
            this.menuHelpLanguageSentinel = new PdnMenuItem();
            this.menuHelpSeparator3       = new ToolStripSeparator();
#if CRASH
            this.menuHelpCrash = new PdnMenuItem();
#endif
            this.menuHelpAbout = new PdnMenuItem();
            //
            // HelpMenu
            //
            this.DropDownItems.AddRange(
                new ToolStripItem[]
            {
                this.menuHelpHelpTopics,
                this.menuHelpSeparator1,
                this.menuHelpPdnWebsite,
                this.menuHelpSeparator2,
                this.menuHelpLanguage,
                this.menuHelpSeparator3,
#if CRASH
                this.menuHelpCrash,
#endif
                this.menuHelpAbout
            });
            this.Name = "Menu.Help";
            this.Text = PdnResources.GetString("Menu.Help.Text");
            //
            // menuHelpHelpTopics
            //
            this.menuHelpHelpTopics.Name         = "HelpTopics";
            this.menuHelpHelpTopics.ShortcutKeys = Keys.F1;
            this.menuHelpHelpTopics.Click       += new System.EventHandler(this.MenuHelpHelpTopics_Click);
            //
            // menuHelpPdnWebsite
            //
            this.menuHelpPdnWebsite.Name   = "PdnWebsite";
            this.menuHelpPdnWebsite.Click += new EventHandler(MenuHelpPdnWebsite_Click);
            //
            // menuHelpLanguage
            //
            this.menuHelpLanguage.Name = "Language";
            this.menuHelpLanguage.DropDownItems.AddRange(
                new ToolStripItem[]
            {
                this.menuHelpLanguageSentinel
            });
            this.menuHelpLanguage.DropDownOpening += new EventHandler(MenuHelpLanguage_DropDownOpening);
            //
            // menuHelpLanguageSentinel
            //
            this.menuHelpLanguageSentinel.Text = "(sentinel)";
            //

#if CRASH
            //
            // menuHelpCrash
            this.menuHelpCrash.Name         = "Crash";
            this.menuHelpCrash.Text         = "Crash!";
            this.menuHelpCrash.ShortcutKeys = Keys.Control | Keys.Alt | Keys.X;
            this.menuHelpCrash.Click       += delegate { ((Control)null).Dispose(); };
#endif

            //
            // menuHelpAbout
            //
            this.menuHelpAbout.Name   = "About";
            this.menuHelpAbout.Click += new System.EventHandler(this.MenuHelpAbout_Click);
        }
Beispiel #8
0
 private void InitializeComponent()
 {
     this.menuLayersAddNewLayer     = new PdnMenuItem();
     this.menuLayersDeleteLayer     = new PdnMenuItem();
     this.menuLayersDuplicateLayer  = new PdnMenuItem();
     this.menuLayersMergeLayerDown  = new PdnMenuItem();
     this.menuLayersImportFromFile  = new PdnMenuItem();
     this.menuLayersSeparator1      = new ToolStripSeparator();
     this.menuLayersFlipHorizontal  = new PdnMenuItem();
     this.menuLayersFlipVertical    = new PdnMenuItem();
     this.menuLayersSeparator2      = new ToolStripSeparator();
     this.menuLayersLayerProperties = new PdnMenuItem();
     //
     // LayersMenu
     //
     this.DropDownItems.AddRange(
         new ToolStripItem[]
     {
         this.menuLayersAddNewLayer,
         this.menuLayersDeleteLayer,
         this.menuLayersDuplicateLayer,
         this.menuLayersMergeLayerDown,
         this.menuLayersImportFromFile,
         this.menuLayersSeparator1,
         this.menuLayersFlipHorizontal,
         this.menuLayersFlipVertical,
         this.menuLayersSeparator2,
         this.menuLayersLayerProperties
     });
     this.Name = "Menu.Layers";
     this.Text = PdnResources.GetString("Menu.Layers.Text");
     //
     // menuLayersAddNewLayer
     //
     this.menuLayersAddNewLayer.Name         = "AddNewLayer";
     this.menuLayersAddNewLayer.ShortcutKeys = Keys.Control | Keys.Shift | Keys.N;
     this.menuLayersAddNewLayer.Click       += new System.EventHandler(this.MenuLayersAddNewLayer_Click);
     //
     // menuLayersDeleteLayer
     //
     this.menuLayersDeleteLayer.Name         = "DeleteLayer";
     this.menuLayersDeleteLayer.ShortcutKeys = Keys.Control | Keys.Shift | Keys.Delete;
     this.menuLayersDeleteLayer.Click       += new System.EventHandler(this.MenuLayersDeleteLayer_Click);
     //
     // menuLayersDuplicateLayer
     //
     this.menuLayersDuplicateLayer.Name         = "DuplicateLayer";
     this.menuLayersDuplicateLayer.ShortcutKeys = Keys.Control | Keys.Shift | Keys.D;
     this.menuLayersDuplicateLayer.Click       += new System.EventHandler(this.MenuLayersDuplicateLayer_Click);
     //
     // menuLayersMergeDown
     //
     this.menuLayersMergeLayerDown.Name         = "MergeLayerDown";
     this.menuLayersMergeLayerDown.ShortcutKeys = Keys.Control | Keys.M;
     this.menuLayersMergeLayerDown.Click       += new EventHandler(MenuLayersMergeDown_Click);
     //
     // menuLayersImportFromFile
     //
     this.menuLayersImportFromFile.Name   = "ImportFromFile";
     this.menuLayersImportFromFile.Click += new System.EventHandler(this.MenuLayersImportFromFile_Click);
     //
     // menuLayersFlipHorizontal
     //
     this.menuLayersFlipHorizontal.Name   = "FlipHorizontal";
     this.menuLayersFlipHorizontal.Click += new System.EventHandler(this.MenuLayersFlipHorizontal_Click);
     //
     // menuLayersFlipVertical
     //
     this.menuLayersFlipVertical.Name   = "FlipVertical";
     this.menuLayersFlipVertical.Click += new System.EventHandler(this.MenuLayersFlipVertical_Click);
     //
     // menuLayersLayerProperties
     //
     this.menuLayersLayerProperties.Name         = "LayerProperties";
     this.menuLayersLayerProperties.ShortcutKeys = Keys.F4;
     this.menuLayersLayerProperties.Click       += new System.EventHandler(this.MenuLayersLayerProperties_Click);
 }
Beispiel #9
0
 private void InitializeComponent()
 {
     this.menuFileNew                  = new PdnMenuItem();
     this.menuFileOpen                 = new PdnMenuItem();
     this.menuFileOpenRecent           = new PdnMenuItem();
     this.menuFileOpenRecentSentinel   = new PdnMenuItem();
     this.menuFileClose                = new PdnMenuItem();
     this.menuFileSeparator1           = new ToolStripSeparator();
     this.menuFileSave                 = new PdnMenuItem();
     this.menuFileSaveAs               = new PdnMenuItem();
     this.menuFileSeparator2           = new ToolStripSeparator();
     this.menuFileViewPluginLoadErrors = new PdnMenuItem();
     this.menuFileSeparator3           = new ToolStripSeparator();
     this.menuFileExit                 = new PdnMenuItem();
     //
     // FileMenu
     //
     this.DropDownItems.AddRange(GetMenuItemsToAdd(true));
     this.Name = "Menu.File";
     this.Text = PdnResources.GetString("Menu.File.Text");
     //
     // menuFileNew
     //
     this.menuFileNew.Name         = "New";
     this.menuFileNew.ShortcutKeys = Keys.Control | Keys.N;
     this.menuFileNew.Click       += new System.EventHandler(this.MenuFileNew_Click);
     //
     // menuFileOpen
     //
     this.menuFileOpen.Name         = "Open";
     this.menuFileOpen.ShortcutKeys = Keys.Control | Keys.O;
     this.menuFileOpen.Click       += new System.EventHandler(this.MenuFileOpen_Click);
     //
     // menuFileOpenRecent
     //
     this.menuFileOpenRecent.Name = "OpenRecent";
     this.menuFileOpenRecent.DropDownItems.AddRange(
         new ToolStripItem[]
     {
         this.menuFileOpenRecentSentinel
     });
     this.menuFileOpenRecent.DropDownOpening += new System.EventHandler(this.MenuFileOpenRecent_DropDownOpening);
     //
     // menuFileOpenRecentSentinel
     //
     this.menuFileOpenRecentSentinel.Text = "sentinel";
     //
     // menuFileClose
     //
     this.menuFileClose.Name         = "Close";
     this.menuFileClose.Click       += new EventHandler(MenuFileClose_Click);
     this.menuFileClose.ShortcutKeys = Keys.Control | Keys.W;
     //
     // menuFileSave
     //
     this.menuFileSave.Name         = "Save";
     this.menuFileSave.ShortcutKeys = Keys.Control | Keys.S;
     this.menuFileSave.Click       += new System.EventHandler(this.MenuFileSave_Click);
     //
     // menuFileSaveAs
     //
     this.menuFileSaveAs.Name         = "SaveAs";
     this.menuFileSaveAs.ShortcutKeys = Keys.Control | Keys.Shift | Keys.S;
     this.menuFileSaveAs.Click       += new System.EventHandler(this.MenuFileSaveAs_Click);
     //
     // menuFileViewPluginLoadErrors
     //
     this.menuFileViewPluginLoadErrors.Name   = "ViewPluginLoadErrors";
     this.menuFileViewPluginLoadErrors.Click += new EventHandler(MenuFileViewPluginLoadErrors_Click);
     //
     // menuFileExit
     //
     this.menuFileExit.Name   = "Exit";
     this.menuFileExit.Click += new System.EventHandler(this.MenuFileExit_Click);
 }
Beispiel #10
0
 private void InitializeComponent()
 {
     this.menuWindowResetWindowLocations = new PdnMenuItem();
     this.menuWindowSeperator1 = new ToolStripSeparator();
     this.menuWindowTranslucent = new PdnMenuItem();
     this.menuWindowSeperator2 = new ToolStripSeparator();
     this.menuWindowTools = new PdnMenuItem();
     this.menuWindowHistory = new PdnMenuItem();
     this.menuWindowLayers = new PdnMenuItem();
     this.menuWindowColors = new PdnMenuItem();
     this.menuWindowSeparator3 = new ToolStripSeparator();
     this.menuWindowOpenMdiList = new PdnMenuItem();
     this.menuWindowNextTab = new PdnMenuItem();
     this.menuWindowPreviousTab = new PdnMenuItem();
     //
     // WindowMenu
     //
     this.DropDownItems.AddRange(
         new ToolStripItem[] 
         {
             this.menuWindowResetWindowLocations,
             this.menuWindowSeperator1,
             this.menuWindowTranslucent,
             this.menuWindowSeperator2,
             this.menuWindowTools,
             this.menuWindowHistory,
             this.menuWindowLayers,
             this.menuWindowColors,
             this.menuWindowSeparator3,
             this.menuWindowOpenMdiList,
             this.menuWindowNextTab,
             this.menuWindowPreviousTab
         });
     this.Name = "Menu.Window";
     this.Text = PdnResources.GetString("Menu.Window.Text");
     // 
     // menuWindowResetWindowLocations
     // 
     this.menuWindowResetWindowLocations.Name = "ResetWindowLocations";
     this.menuWindowResetWindowLocations.Click += new System.EventHandler(this.MenuWindowResetWindowLocations_Click);
     // 
     // menuWindowTranslucent
     // 
     this.menuWindowTranslucent.Name = "Translucent";
     this.menuWindowTranslucent.Click += new System.EventHandler(this.MenuWindowTranslucent_Click);
     // 
     // menuWindowTools
     // 
     this.menuWindowTools.Name = "Tools";
     this.menuWindowTools.ShortcutKeys = Keys.F5;
     this.menuWindowTools.Click += new System.EventHandler(this.MenuWindowTools_Click);
     // 
     // menuWindowHistory
     // 
     this.menuWindowHistory.Name = "History";
     this.menuWindowHistory.ShortcutKeys = Keys.F6;
     this.menuWindowHistory.Click += new System.EventHandler(this.MenuWindowHistory_Click);
     // 
     // menuWindowLayers
     // 
     this.menuWindowLayers.Name = "Layers";
     this.menuWindowLayers.ShortcutKeys = Keys.F7;
     this.menuWindowLayers.Click += new System.EventHandler(this.MenuWindowLayers_Click);
     // 
     // menuWindowColors
     // 
     this.menuWindowColors.Name = "Colors";
     this.menuWindowColors.ShortcutKeys = Keys.F8;
     this.menuWindowColors.Click += new System.EventHandler(this.MenuWindowColors_Click);
     //
     // menuWindowOpenMdiList
     //
     this.menuWindowOpenMdiList.Name = "OpenMdiList";
     this.menuWindowOpenMdiList.ShortcutKeys = Keys.Control | Keys.Q;
     this.menuWindowOpenMdiList.Click += new EventHandler(MenuWindowOpenMdiList_Click);
     //
     // menuWindowNextTab
     //
     this.menuWindowNextTab.Name = "NextTab";
     this.menuWindowNextTab.ShortcutKeys = Keys.Control | Keys.Tab;
     this.menuWindowNextTab.Click += new EventHandler(MenuWindowNextTab_Click);
     //
     // menuWindowPreviousTab
     //
     this.menuWindowPreviousTab.Name = "PreviousTab";
     this.menuWindowPreviousTab.ShortcutKeys = Keys.Control | Keys.Shift | Keys.Tab;
     this.menuWindowPreviousTab.Click += new EventHandler(MenuWindowPreviousTab_Click);
 }
Beispiel #11
0
        private void InitializeComponent()
        {
            this.menuHelpHelpTopics = new PdnMenuItem();
            this.menuHelpSeparator1 = new ToolStripSeparator();
            this.menuHelpPdnWebsite = new PdnMenuItem();
            this.menuHelpDonate = new PdnMenuItem();
            this.menuHelpForum = new PdnMenuItem();
            this.menuHelpTutorials = new PdnMenuItem();
            this.menuHelpPlugins = new PdnMenuItem();
            this.menuHelpSendFeedback = new PdnMenuItem();
            this.menuHelpSeparator2 = new ToolStripSeparator();
            this.menuHelpLanguage = new PdnMenuItem();
            this.menuHelpLanguageSentinel = new PdnMenuItem();
            this.menuHelpCheckForUpdates = new CheckForUpdatesMenuItem();
            this.menuHelpSeparator3 = new ToolStripSeparator();
            this.menuHelpAbout = new PdnMenuItem();
            //
            // HelpMenu
            //
            this.DropDownItems.AddRange(
                new ToolStripItem[]
                {
                    this.menuHelpHelpTopics,
                    this.menuHelpSeparator1,
                    this.menuHelpPdnWebsite,
                    this.menuHelpDonate,
                    this.menuHelpForum,
                    this.menuHelpTutorials,
                    this.menuHelpPlugins,
                    this.menuHelpSendFeedback,
                    this.menuHelpSeparator2,
                    this.menuHelpLanguage,
                    this.menuHelpCheckForUpdates,
                    this.menuHelpSeparator3,
                    this.menuHelpAbout
                });
            this.Name = "Menu.Help";
            this.Text = PdnResources.GetString("Menu.Help.Text");
            //
            // menuHelpHelpTopics
            //
            this.menuHelpHelpTopics.Name = "HelpTopics";
            this.menuHelpHelpTopics.ShortcutKeys = Keys.F1;
            this.menuHelpHelpTopics.Click += new System.EventHandler(this.MenuHelpHelpTopics_Click);
            //
            // menuHelpPdnWebsite
            //
            this.menuHelpPdnWebsite.Name = "PdnWebsite";
            this.menuHelpPdnWebsite.Click += new EventHandler(MenuHelpPdnWebsite_Click);
            //
            // menuHelpDonate
            //
            this.menuHelpDonate.Name = "Donate";
            this.menuHelpDonate.Click += new EventHandler(MenuHelpDonate_Click);
            this.menuHelpDonate.Font = Utility.CreateFont(this.menuHelpDonate.Font.Name, this.menuHelpDonate.Font.Size, this.menuHelpDonate.Font.Style | FontStyle.Italic);
            //
            // menuHelpForum
            //
            this.menuHelpForum.Name = "Forum";
            this.menuHelpForum.Click += new EventHandler(MenuHelpForum_Click);
            //
            // menuHelpTutorials
            //
            this.menuHelpTutorials.Name = "Tutorials";
            this.menuHelpTutorials.Click += new EventHandler(MenuHelpTutorials_Click);
            //
            // menuHelpPlugins
            //
            this.menuHelpPlugins.Name = "Plugins";
            this.menuHelpPlugins.Click += new EventHandler(MenuHelpPlugins_Click);
            //
            // menuHelpSendFeedback
            //
            this.menuHelpSendFeedback.Name = "SendFeedback";
            this.menuHelpSendFeedback.Click += new EventHandler(MenuHelpSendFeedback_Click);
            //
            // menuHelpLanguage
            //
            this.menuHelpLanguage.Name = "Language";
            this.menuHelpLanguage.DropDownItems.AddRange(
                new ToolStripItem[]
                {
                    this.menuHelpLanguageSentinel
                });
            this.menuHelpLanguage.DropDownOpening += new EventHandler(MenuHelpLanguage_DropDownOpening);
            //
            // menuHelpLanguageSentinel
            //
            this.menuHelpLanguageSentinel.Text = "(sentinel)";
            //
            // menuHelpCheckForUpdates
            //
            // (left blank on purpose)

            //
            // menuHelpAbout
            //
            this.menuHelpAbout.Name = "About";
            this.menuHelpAbout.Click += new System.EventHandler(this.MenuHelpAbout_Click);
        }
Beispiel #12
0
 private void InitializeComponent()
 {
     this.menuEditUndo = new PdnMenuItem();
     this.menuEditRedo = new PdnMenuItem();
     this.menuEditSeparator1 = new ToolStripSeparator();
     this.menuEditCut = new PdnMenuItem();
     this.menuEditCopy = new PdnMenuItem();
     this.menuEditPaste = new PdnMenuItem();
     this.menuEditPasteInToNewLayer = new PdnMenuItem();
     this.menuEditPasteInToNewImage = new PdnMenuItem();
     this.menuEditSeparator2 = new ToolStripSeparator();
     this.menuEditEraseSelection = new PdnMenuItem();
     this.menuEditFillSelection = new PdnMenuItem();
     this.menuEditInvertSelection = new PdnMenuItem();
     this.menuEditSelectAll = new PdnMenuItem();
     this.menuEditDeselect = new PdnMenuItem();
     //
     // EditMenu
     //
     this.DropDownItems.AddRange(
         new ToolStripItem[]
         {
             this.menuEditUndo,
             this.menuEditRedo,
             this.menuEditSeparator1,
             this.menuEditCut,
             this.menuEditCopy,
             this.menuEditPaste,
             this.menuEditPasteInToNewLayer,
             this.menuEditPasteInToNewImage,
             this.menuEditSeparator2,
             this.menuEditEraseSelection,
             this.menuEditFillSelection,
             this.menuEditInvertSelection,
             this.menuEditSelectAll,
             this.menuEditDeselect
         });
     this.Name = "Menu.Edit";
     this.Text = PdnResources.GetString("Menu.Edit.Text");
     //
     // menuEditUndo
     //
     this.menuEditUndo.Name = "Undo";
     this.menuEditUndo.ShortcutKeys = Keys.Control | Keys.Z;
     this.menuEditUndo.Click += new System.EventHandler(this.MenuEditUndo_Click);
     //
     // menuEditRedo
     //
     this.menuEditRedo.Name = "Redo";
     this.menuEditRedo.ShortcutKeys = Keys.Control | Keys.Y;
     this.menuEditRedo.Click += new System.EventHandler(this.MenuEditRedo_Click);
     //
     // menuEditCut
     //
     this.menuEditCut.Name = "Cut";
     this.menuEditCut.ShortcutKeys = Keys.Control | Keys.X;
     this.menuEditCut.Click += new System.EventHandler(this.MenuEditCut_Click);
     //
     // menuEditCopy
     //
     this.menuEditCopy.Name = "Copy";
     this.menuEditCopy.ShortcutKeys = Keys.Control | Keys.C;
     this.menuEditCopy.Click += new System.EventHandler(this.MenuEditCopy_Click);
     //
     // menuEditPaste
     //
     this.menuEditPaste.Name = "Paste";
     this.menuEditPaste.ShortcutKeys = Keys.Control | Keys.V;
     this.menuEditPaste.Click += new System.EventHandler(this.MenuEditPaste_Click);
     //
     // menuEditPasteInToNewLayer
     //
     this.menuEditPasteInToNewLayer.Name = "PasteInToNewLayer";
     this.menuEditPasteInToNewLayer.ShortcutKeys = Keys.Control | Keys.Shift | Keys.V;
     this.menuEditPasteInToNewLayer.Click += new System.EventHandler(this.MenuEditPasteInToNewLayer_Click);
     //
     // menuEditPasteInToNewImage
     //
     this.menuEditPasteInToNewImage.Name = "PasteInToNewImage";
     this.menuEditPasteInToNewImage.ShortcutKeys = Keys.Control | Keys.Alt | Keys.V;
     this.menuEditPasteInToNewImage.Click += new EventHandler(MenuEditPasteInToNewImage_Click);
     //
     // menuEditEraseSelection
     //
     this.menuEditEraseSelection.Name = "EraseSelection";
     this.menuEditEraseSelection.ShortcutKeys = Keys.Delete;
     this.menuEditEraseSelection.Click += new System.EventHandler(this.MenuEditClearSelection_Click);
     //
     // menuEditFillSelection
     //
     this.menuEditFillSelection.Name = "FillSelection";
     this.menuEditFillSelection.ShortcutKeyDisplayString = PdnResources.GetString("Menu.Edit.FillSelection.ShortcutKeysDisplayString");
     this.menuEditFillSelection.Click += new EventHandler(MenuEditFillSelection_Click);
     //
     // menuEditInvertSelection
     //
     this.menuEditInvertSelection.Name = "InvertSelection";
     this.menuEditInvertSelection.Click += new System.EventHandler(this.MenuEditInvertSelection_Click);
     this.menuEditInvertSelection.ShortcutKeys = Keys.Control | Keys.I;
     //
     // menuEditSelectAll
     //
     this.menuEditSelectAll.Name = "SelectAll";
     this.menuEditSelectAll.ShortcutKeys = Keys.Control | Keys.A;
     this.menuEditSelectAll.Click += new System.EventHandler(this.MenuEditSelectAll_Click);
     //
     // menuEditDeselect
     //
     this.menuEditDeselect.Name = "Deselect";
     this.menuEditDeselect.ShortcutKeys = Keys.Control | Keys.D;
     this.menuEditDeselect.Click += new System.EventHandler(this.MenuEditDeselect_Click);
 }
Beispiel #13
0
        private void AddEffectsToMenu()
        {
            // Fill the menu with the effect names, and "..." if it is configurable
            EffectsCollection effectsCollection = this.Effects;
            Type[] effectTypes = effectsCollection.Effects;
            bool withShortcuts = EnableEffectShortcuts;

            List<Effect> newEffects = new List<Effect>();
            foreach (Type type in effectsCollection.Effects)
            {
                try
                {
                    ConstructorInfo ci = type.GetConstructor(Type.EmptyTypes);
                    Effect effect = (Effect)ci.Invoke(null);

                    if (FilterEffects(effect))
                    {
                        newEffects.Add(effect);
                    }
                }

                catch
                {
                    // We don't want a DLL that can't be figured out to cause the app to crash
                    continue;
                }
            }

            newEffects.Sort(
                delegate(Effect lhs, Effect rhs)
                {
                    return string.Compare(lhs.Name, rhs.Name, true);
                });

            List<string> subMenuNames = new List<string>();

            foreach (Effect effect in newEffects)
            {
                if (!string.IsNullOrEmpty(effect.SubMenuName))
                {
                    subMenuNames.Add(effect.SubMenuName);
                }
            }

            subMenuNames.Sort(
                delegate(string lhs, string rhs)
                {
                    return string.Compare(lhs, rhs, true);
                });

            string lastSubMenuName = null;
            foreach (string subMenuName in subMenuNames)
            {
                if (subMenuName == lastSubMenuName)
                {
                    // skip duplicate names
                    continue;
                }

                PdnMenuItem subMenu = new PdnMenuItem(subMenuName, null, null);
                DropDownItems.Add(subMenu);
                lastSubMenuName = subMenuName;
            }

            foreach (Effect effect in newEffects)
            {
                AddEffectToMenu(effect, withShortcuts);
            }
        }
Beispiel #14
0
        private void PopulateMenu()
        {
            this.DropDownItems.Clear();

            if (EnableRepeatEffectMenuItem && this.lastEffect != null)
            {
                string repeatFormat = PdnResources.GetString("Effects.RepeatMenuItem.Format");
                string menuName = string.Format(repeatFormat, lastEffect.Name);
                PdnMenuItem pmi = new PdnMenuItem(menuName, this.lastEffect.Image, RepeatEffectMenuItem_Click);
                pmi.Name = "RepeatEffect(" + this.lastEffect.GetType().FullName + ")";
                pmi.ShortcutKeys = Keys.Control | Keys.F; 
                this.DropDownItems.Add(pmi);

                ToolStripSeparator tss = new ToolStripSeparator();
                this.DropDownItems.Add(tss);
            }

            AddEffectsToMenu();

            Triple<Assembly, Type, Exception>[] errors = this.Effects.GetLoaderExceptions();

            for (int i = 0; i < errors.Length; ++i)
            {
                AppWorkspace.ReportEffectLoadError(errors[i]);
            }
        }
Beispiel #15
0
 private void InitializeComponent()
 {
     this.menuWindowResetWindowLocations = new PdnMenuItem();
     this.menuWindowSeperator1           = new ToolStripSeparator();
     this.menuWindowTranslucent          = new PdnMenuItem();
     this.menuWindowSeperator2           = new ToolStripSeparator();
     this.menuWindowTools       = new PdnMenuItem();
     this.menuWindowLayers      = new PdnMenuItem();
     this.menuWindowColors      = new PdnMenuItem();
     this.menuWindowSeparator3  = new ToolStripSeparator();
     this.menuWindowOpenMdiList = new PdnMenuItem();
     this.menuWindowNextTab     = new PdnMenuItem();
     this.menuWindowPreviousTab = new PdnMenuItem();
     //
     // WindowMenu
     //
     this.DropDownItems.AddRange(
         new ToolStripItem[]
     {
         this.menuWindowResetWindowLocations,
         this.menuWindowSeperator1,
         this.menuWindowTranslucent,
         this.menuWindowSeperator2,
         this.menuWindowTools,
         this.menuWindowLayers,
         this.menuWindowColors,
         this.menuWindowSeparator3,
         this.menuWindowOpenMdiList,
         this.menuWindowNextTab,
         this.menuWindowPreviousTab
     });
     this.Name = "Menu.Window";
     this.Text = PdnResources.GetString("Menu.Window.Text");
     //
     // menuWindowResetWindowLocations
     //
     this.menuWindowResetWindowLocations.Name   = "ResetWindowLocations";
     this.menuWindowResetWindowLocations.Click += new System.EventHandler(this.MenuWindowResetWindowLocations_Click);
     //
     // menuWindowTranslucent
     //
     this.menuWindowTranslucent.Name   = "Translucent";
     this.menuWindowTranslucent.Click += new System.EventHandler(this.MenuWindowTranslucent_Click);
     //
     // menuWindowTools
     //
     this.menuWindowTools.Name         = "Tools";
     this.menuWindowTools.ShortcutKeys = Keys.F5;
     this.menuWindowTools.Click       += new System.EventHandler(this.MenuWindowTools_Click);
     //
     // menuWindowLayers
     //
     this.menuWindowLayers.Name         = "Layers";
     this.menuWindowLayers.ShortcutKeys = Keys.F7;
     this.menuWindowLayers.Click       += new System.EventHandler(this.MenuWindowLayers_Click);
     //
     // menuWindowColors
     //
     this.menuWindowColors.Name         = "Colors";
     this.menuWindowColors.ShortcutKeys = Keys.F8;
     this.menuWindowColors.Click       += new System.EventHandler(this.MenuWindowColors_Click);
     //
     // menuWindowOpenMdiList
     //
     this.menuWindowOpenMdiList.Name         = "OpenMdiList";
     this.menuWindowOpenMdiList.ShortcutKeys = Keys.Control | Keys.Q;
     this.menuWindowOpenMdiList.Click       += new EventHandler(MenuWindowOpenMdiList_Click);
     //
     // menuWindowNextTab
     //
     this.menuWindowNextTab.Name         = "NextTab";
     this.menuWindowNextTab.ShortcutKeys = Keys.Control | Keys.Tab;
     this.menuWindowNextTab.Click       += new EventHandler(MenuWindowNextTab_Click);
     //
     // menuWindowPreviousTab
     //
     this.menuWindowPreviousTab.Name         = "PreviousTab";
     this.menuWindowPreviousTab.ShortcutKeys = Keys.Control | Keys.Shift | Keys.Tab;
     this.menuWindowPreviousTab.Click       += new EventHandler(MenuWindowPreviousTab_Click);
 }
Beispiel #16
0
 private void InitializeComponent()
 {
     this.menuImageCrop = new PdnMenuItem();
     this.menuImageResize = new PdnMenuItem();
     this.menuImageCanvasSize = new PdnMenuItem();
     this.menuImageSeparator1 = new ToolStripSeparator();
     this.menuImageFlipHorizontal = new PdnMenuItem();
     this.menuImageFlipVertical = new PdnMenuItem();
     this.menuImageSeparator2 = new ToolStripSeparator();
     this.menuImageRotate90CW = new PdnMenuItem();
     this.menuImageRotate90CCW = new PdnMenuItem();
     this.menuImageRotate180 = new PdnMenuItem();
     this.menuImageSeparator3 = new ToolStripSeparator();
     this.menuImageFlatten = new PdnMenuItem();
     //
     // ImageMenu
     //
     this.DropDownItems.AddRange(
         new System.Windows.Forms.ToolStripItem[] 
         {
             this.menuImageCrop,
             this.menuImageResize,
             this.menuImageCanvasSize,
             this.menuImageSeparator1,
             this.menuImageFlipHorizontal,
             this.menuImageFlipVertical,
             this.menuImageSeparator2,
             this.menuImageRotate90CW,
             this.menuImageRotate90CCW,
             this.menuImageRotate180,
             this.menuImageSeparator3,
             this.menuImageFlatten 
         });
     this.Name = "Menu.Image";
     this.Text = PdnResources.GetString("Menu.Image.Text"); 
     // 
     // menuImageCrop
     // 
     this.menuImageCrop.Name = "Crop";
     this.menuImageCrop.Click += new System.EventHandler(this.MenuImageCrop_Click);
     this.menuImageCrop.ShortcutKeys = Keys.Control | Keys.Shift | Keys.X;
     // 
     // menuImageResize
     // 
     this.menuImageResize.Name = "Resize";
     this.menuImageResize.ShortcutKeys = Keys.Control | Keys.R;
     this.menuImageResize.Click += new System.EventHandler(this.MenuImageResize_Click);
     // 
     // menuImageCanvasSize
     // 
     this.menuImageCanvasSize.Name = "CanvasSize";
     this.menuImageCanvasSize.ShortcutKeys = Keys.Control | Keys.Shift | Keys.R;
     this.menuImageCanvasSize.Click += new System.EventHandler(this.MenuImageCanvasSize_Click);
     // 
     // menuImageFlipHorizontal
     // 
     this.menuImageFlipHorizontal.Name = "FlipHorizontal";
     this.menuImageFlipHorizontal.Click += new System.EventHandler(this.MenuImageFlipHorizontal_Click);
     // 
     // menuImageFlipVertical
     // 
     this.menuImageFlipVertical.Name = "FlipVertical";
     this.menuImageFlipVertical.Click += new System.EventHandler(this.MenuImageFlipVertical_Click);
     // 
     // menuImageRotate90CW
     // 
     this.menuImageRotate90CW.Name = "Rotate90CW";
     this.menuImageRotate90CW.ShortcutKeys = Keys.Control | Keys.H;
     this.menuImageRotate90CW.Click += new System.EventHandler(this.MenuImageRotate90CW_Click);
     // 
     // menuImageRotate90CCW
     // 
     this.menuImageRotate90CCW.Name = "Rotate90CCW";
     this.menuImageRotate90CCW.ShortcutKeys = Keys.Control | Keys.G;
     this.menuImageRotate90CCW.Click += new System.EventHandler(this.MenuImageRotate90CCW_Click);
     // 
     // menuImageRotate180
     // 
     this.menuImageRotate180.Name = "Rotate180";
     this.menuImageRotate180.Click += new System.EventHandler(this.MenuImageRotate180_Click);
     this.menuImageRotate180.ShortcutKeys = Keys.Control | Keys.J;
     // 
     // menuImageFlatten
     // 
     this.menuImageFlatten.Name = "Flatten";
     this.menuImageFlatten.ShortcutKeys = Keys.Control | Keys.Shift | Keys.F;
     this.menuImageFlatten.Click += new System.EventHandler(this.MenuImageFlatten_Click);
 }
Beispiel #17
0
 private void InitializeComponent()
 {
     this.menuViewZoomIn = new PdnMenuItem();
     this.menuViewZoomOut = new PdnMenuItem();
     this.menuViewZoomToWindow = new PdnMenuItem();
     this.menuViewZoomToSelection = new PdnMenuItem();
     this.menuViewActualSize = new PdnMenuItem();
     this.menuViewSeparator1 = new ToolStripSeparator();
     this.menuViewGrid = new PdnMenuItem();
     this.menuViewRulers = new PdnMenuItem();
     this.menuViewSeparator2 = new ToolStripSeparator();
     this.menuViewPixels = new PdnMenuItem();
     this.menuViewInches = new PdnMenuItem();
     this.menuViewCentimeters = new PdnMenuItem();
     // 
     // menuView
     // 
     this.DropDownItems.AddRange(
         new System.Windows.Forms.ToolStripItem[] 
         {
             this.menuViewZoomIn,
             this.menuViewZoomOut,
             this.menuViewZoomToWindow,
             this.menuViewZoomToSelection,
             this.menuViewActualSize,
             this.menuViewSeparator1,
             this.menuViewGrid,
             this.menuViewRulers,
             this.menuViewSeparator2,
             this.menuViewPixels,
             this.menuViewInches,
             this.menuViewCentimeters,
         });
     this.Name = "Menu.View";
     this.Text = PdnResources.GetString("Menu.View.Text"); 
     // 
     // menuViewZoomIn
     // 
     this.menuViewZoomIn.Name = "ZoomIn";
     this.menuViewZoomIn.ShortcutKeys = Keys.Control | Keys.Add;
     this.menuViewZoomIn.ShortcutKeyDisplayString = PdnResources.GetString("Menu.View.ZoomIn.ShortcutKeyDisplayString");
     this.menuViewZoomIn.Click += new System.EventHandler(this.MenuViewZoomIn_Click);
     // 
     // menuViewZoomOut
     // 
     this.menuViewZoomOut.Name = "ZoomOut";
     this.menuViewZoomOut.ShortcutKeys = Keys.Control | Keys.Subtract;
     this.menuViewZoomOut.ShortcutKeyDisplayString = PdnResources.GetString("Menu.View.ZoomOut.ShortcutKeyDisplayString");
     this.menuViewZoomOut.Click += new System.EventHandler(this.MenuViewZoomOut_Click);
     // 
     // menuViewZoomToWindow
     // 
     this.menuViewZoomToWindow.Name = "ZoomToWindow";
     this.menuViewZoomToWindow.ShortcutKeys = Keys.Control | Keys.B;
     this.menuViewZoomToWindow.Click += new System.EventHandler(this.MenuViewZoomToWindow_Click);
     // 
     // menuViewZoomToSelection
     // 
     this.menuViewZoomToSelection.Name = "ZoomToSelection";
     this.menuViewZoomToSelection.ShortcutKeys = Keys.Control | Keys.Shift | Keys.B;
     this.menuViewZoomToSelection.Click += new System.EventHandler(this.MenuViewZoomToSelection_Click);
     // 
     // menuViewActualSize
     // 
     this.menuViewActualSize.Name = "ActualSize";
     this.menuViewActualSize.ShortcutKeys = Keys.Control | Keys.Shift | Keys.A;
     this.menuViewActualSize.Click += new System.EventHandler(this.MenuViewActualSize_Click);
     // 
     // menuViewGrid
     // 
     this.menuViewGrid.Name = "Grid";
     this.menuViewGrid.Click += new System.EventHandler(this.MenuViewGrid_Click);
     // 
     // menuViewRulers
     // 
     this.menuViewRulers.Name = "Rulers";
     this.menuViewRulers.Click += new System.EventHandler(this.MenuViewRulers_Click);
     //
     // menuViewPixels
     //
     this.menuViewPixels.Name = "Pixels";
     this.menuViewPixels.Click += new EventHandler(MenuViewPixels_Click);
     this.menuViewPixels.Text = PdnResources.GetString("MeasurementUnit.Pixel.Plural");
     //
     // menuViewInches
     //
     this.menuViewInches.Name = "Inches";
     this.menuViewInches.Text = PdnResources.GetString("MeasurementUnit.Inch.Plural");
     this.menuViewInches.Click += new EventHandler(MenuViewInches_Click);
     //
     // menuViewCentimeters
     //
     this.menuViewCentimeters.Name = "Centimeters";
     this.menuViewCentimeters.Click += new EventHandler(MenuViewCentimeters_Click);
     this.menuViewCentimeters.Text = PdnResources.GetString("MeasurementUnit.Centimeter.Plural");
 }
Beispiel #18
0
        private void AddEffectToMenu(Effect effect, bool withShortcut)
        {
            if (!FilterEffects(effect))
            {
                return;
            }

            string name = effect.Name;

            if (effect.IsConfigurable)
            {
                string configurableFormat = PdnResources.GetString("Effects.Name.Format.Configurable");
                name = string.Format(configurableFormat, name);
            }

            PdnMenuItem mi = new PdnMenuItem(name, effect.Image, EffectMenuItem_Click);

            if (withShortcut)
            {
                mi.ShortcutKeys = GetEffectShortcutKeys(effect);
            }
            else
            {
                mi.ShortcutKeys = Keys.None;
            }

            mi.Tag = (object)effect.GetType();

            PdnMenuItem addEffectHere = this;

            if (effect.SubMenuName != null)
            {
                PdnMenuItem subMenu = null;

                // search for this subMenu
                foreach (ToolStripItem sub in this.DropDownItems)
                {
                    PdnMenuItem subpmi = sub as PdnMenuItem;

                    if (subpmi != null)
                    {
                        if (subpmi.Text == effect.SubMenuName)
                        {
                            subMenu = subpmi;
                            break;
                        }
                    }
                }

                if (subMenu == null)
                {
                    subMenu = new PdnMenuItem(effect.SubMenuName, null, null);
                    this.DropDownItems.Add(subMenu);
                }

                addEffectHere = subMenu;
            }

            addEffectHere.DropDownItems.Add(mi);
        }
Beispiel #19
0
 private void InitializeComponent()
 {
     this.menuViewZoomIn          = new PdnMenuItem();
     this.menuViewZoomOut         = new PdnMenuItem();
     this.menuViewZoomToWindow    = new PdnMenuItem();
     this.menuViewZoomToSelection = new PdnMenuItem();
     this.menuViewActualSize      = new PdnMenuItem();
     this.menuViewSeparator1      = new ToolStripSeparator();
     this.menuViewGrid            = new PdnMenuItem();
     this.menuViewSeparator2      = new ToolStripSeparator();
     //
     // menuView
     //
     this.DropDownItems.AddRange(
         new System.Windows.Forms.ToolStripItem[]
     {
         this.menuViewZoomIn,
         this.menuViewZoomOut,
         this.menuViewZoomToWindow,
         this.menuViewZoomToSelection,
         this.menuViewActualSize,
         this.menuViewSeparator1,
         this.menuViewGrid,
         this.menuViewSeparator2,
     });
     this.Name = "Menu.View";
     this.Text = PdnResources.GetString("Menu.View.Text");
     //
     // menuViewZoomIn
     //
     this.menuViewZoomIn.Name                     = "ZoomIn";
     this.menuViewZoomIn.ShortcutKeys             = Keys.Control | Keys.Add;
     this.menuViewZoomIn.ShortcutKeyDisplayString = PdnResources.GetString("Menu.View.ZoomIn.ShortcutKeyDisplayString");
     this.menuViewZoomIn.Click                   += new System.EventHandler(this.MenuViewZoomIn_Click);
     //
     // menuViewZoomOut
     //
     this.menuViewZoomOut.Name                     = "ZoomOut";
     this.menuViewZoomOut.ShortcutKeys             = Keys.Control | Keys.Subtract;
     this.menuViewZoomOut.ShortcutKeyDisplayString = PdnResources.GetString("Menu.View.ZoomOut.ShortcutKeyDisplayString");
     this.menuViewZoomOut.Click                   += new System.EventHandler(this.MenuViewZoomOut_Click);
     //
     // menuViewZoomToWindow
     //
     this.menuViewZoomToWindow.Name         = "ZoomToWindow";
     this.menuViewZoomToWindow.ShortcutKeys = Keys.Control | Keys.B;
     this.menuViewZoomToWindow.Click       += new System.EventHandler(this.MenuViewZoomToWindow_Click);
     //
     // menuViewZoomToSelection
     //
     this.menuViewZoomToSelection.Name         = "ZoomToSelection";
     this.menuViewZoomToSelection.ShortcutKeys = Keys.Control | Keys.Shift | Keys.B;
     this.menuViewZoomToSelection.Click       += new System.EventHandler(this.MenuViewZoomToSelection_Click);
     //
     // menuViewActualSize
     //
     this.menuViewActualSize.Name         = "ActualSize";
     this.menuViewActualSize.ShortcutKeys = Keys.Control | Keys.Shift | Keys.A;
     this.menuViewActualSize.Click       += new System.EventHandler(this.MenuViewActualSize_Click);
     //
     // menuViewGrid
     //
     this.menuViewGrid.Name   = "Grid";
     this.menuViewGrid.Click += new System.EventHandler(this.MenuViewGrid_Click);
 }
Beispiel #20
0
 private void InitializeComponent()
 {
     this.sentinel = new PdnMenuItem();
     //
     // sentinel
     //
     this.sentinel.Name = null;
     //
     // components
     //
     this.components = new System.ComponentModel.Container();
     //
     // invalidateTimer
     //
     this.invalidateTimer = new System.Windows.Forms.Timer(this.components);
     this.invalidateTimer.Enabled = false;
     this.invalidateTimer.Tick += InvalidateTimer_Tick;
     this.invalidateTimer.Interval = effectRefreshInterval;
     //
     // EffectMenuBase
     //
     this.DropDownItems.Add(sentinel);
 }
Beispiel #21
0
 private void InitializeComponent()
 {
     this.menuFileNew = new PdnMenuItem();
     this.menuFileOpen = new PdnMenuItem();
     this.menuFileOpenRecent = new PdnMenuItem();
     this.menuFileOpenRecentSentinel = new PdnMenuItem();
     this.menuFileAcquire = new PdnMenuItem();
     this.menuFileAcquireFromScannerOrCamera = new PdnMenuItem();
     this.menuFileClose = new PdnMenuItem();
     this.menuFileSeparator1 = new ToolStripSeparator();
     this.menuFileSave = new PdnMenuItem();
     this.menuFileSaveAs = new PdnMenuItem();
     this.menuFileSeparator2 = new ToolStripSeparator();
     this.menuFilePrint = new PdnMenuItem();
     this.menuFileSeparator3 = new ToolStripSeparator();
     this.menuFileViewPluginLoadErrors = new PdnMenuItem();
     this.menuFileSeparator4 = new ToolStripSeparator();
     this.menuFileExit = new PdnMenuItem();
     //
     // FileMenu
     //
     this.DropDownItems.AddRange(GetMenuItemsToAdd(true));
     this.Name = "Menu.File";
     this.Text = PdnResources.GetString("Menu.File.Text");
     // 
     // menuFileNew
     // 
     this.menuFileNew.Name = "New";
     this.menuFileNew.ShortcutKeys = Keys.Control | Keys.N;
     this.menuFileNew.Click += new System.EventHandler(this.MenuFileNew_Click);
     // 
     // menuFileOpen
     // 
     this.menuFileOpen.Name = "Open";
     this.menuFileOpen.ShortcutKeys = Keys.Control | Keys.O;
     this.menuFileOpen.Click += new System.EventHandler(this.MenuFileOpen_Click);
     // 
     // menuFileOpenRecent
     // 
     this.menuFileOpenRecent.Name = "OpenRecent";
     this.menuFileOpenRecent.DropDownItems.AddRange(
         new ToolStripItem[] 
         {
             this.menuFileOpenRecentSentinel
         });
     this.menuFileOpenRecent.DropDownOpening += new System.EventHandler(this.MenuFileOpenRecent_DropDownOpening);
     // 
     // menuFileOpenRecentSentinel
     // 
     this.menuFileOpenRecentSentinel.Text = "sentinel";
     // 
     // menuFileAcquire
     // 
     this.menuFileAcquire.Name = "Acquire";
     this.menuFileAcquire.DropDownItems.AddRange(
         new ToolStripItem[] 
         {
             this.menuFileAcquireFromScannerOrCamera
         });
     this.menuFileAcquire.DropDownOpening += new System.EventHandler(this.MenuFileAcquire_DropDownOpening);
     // 
     // menuFileAcquireFromScannerOrCamera
     // 
     this.menuFileAcquireFromScannerOrCamera.Name = "FromScannerOrCamera";
     this.menuFileAcquireFromScannerOrCamera.Click += new System.EventHandler(this.MenuFileAcquireFromScannerOrCamera_Click);
     //
     // menuFileClose
     //
     this.menuFileClose.Name = "Close";
     this.menuFileClose.Click += new EventHandler(MenuFileClose_Click);
     this.menuFileClose.ShortcutKeys = Keys.Control | Keys.W;
     // 
     // menuFileSave
     // 
     this.menuFileSave.Name = "Save";
     this.menuFileSave.ShortcutKeys = Keys.Control | Keys.S;
     this.menuFileSave.Click += new System.EventHandler(this.MenuFileSave_Click);
     // 
     // menuFileSaveAs
     // 
     this.menuFileSaveAs.Name = "SaveAs";
     this.menuFileSaveAs.ShortcutKeys = Keys.Control | Keys.Shift | Keys.S;
     this.menuFileSaveAs.Click += new System.EventHandler(this.MenuFileSaveAs_Click);
     // 
     // menuFilePrint
     // 
     this.menuFilePrint.Name = "Print";
     this.menuFilePrint.ShortcutKeys = Keys.Control | Keys.P;
     this.menuFilePrint.Click += new System.EventHandler(this.MenuFilePrint_Click);
     //
     // menuFileViewPluginLoadErrors
     //
     this.menuFileViewPluginLoadErrors.Name = "ViewPluginLoadErrors";
     this.menuFileViewPluginLoadErrors.Click += new EventHandler(MenuFileViewPluginLoadErrors_Click);
     // 
     // menuFileExit
     // 
     this.menuFileExit.Name = "Exit";
     this.menuFileExit.Click += new System.EventHandler(this.MenuFileExit_Click);
 }
Beispiel #22
0
        private void PopulateMenu()
        {
            this.DropDownItems.Clear();

            if (EnableRepeatEffectMenuItem && this.lastEffect != null)
            {
                string repeatFormat = PdnResources.GetString("Effects.RepeatMenuItem.Format");
                string menuName = string.Format(repeatFormat, lastEffect.Name);
                PdnMenuItem pmi = new PdnMenuItem(menuName, this.lastEffect.Image, RepeatEffectMenuItem_Click);
                pmi.ShortcutKeys = Keys.Control | Keys.F;
                this.DropDownItems.Add(pmi);

                ToolStripSeparator tss = new ToolStripSeparator();
                this.DropDownItems.Add(tss);
            }

            AddEffectsToMenu();
        }
Beispiel #23
0
 private void InitializeComponent()
 {
     this.menuLayersAddNewLayer = new PdnMenuItem();
     this.menuLayersDeleteLayer = new PdnMenuItem();
     this.menuLayersDuplicateLayer = new PdnMenuItem();
     this.menuLayersMergeLayerDown = new PdnMenuItem();
     this.menuLayersImportFromFile = new PdnMenuItem();
     this.menuLayersSeparator1 = new ToolStripSeparator();
     this.menuLayersFlip = new PdnMenuItem();
     this.menuLayersFlipHorizontal = new PdnMenuItem();
     this.menuLayersFlipVertical = new PdnMenuItem();
     this.menuLayersRotateZoom = new PdnMenuItem();
     this.menuLayersSeparator2 = new ToolStripSeparator();
     this.menuLayersLayerProperties = new PdnMenuItem();
     //
     // LayersMenu
     //
     this.DropDownItems.AddRange(
         new ToolStripItem[]
         {
             this.menuLayersAddNewLayer,
             this.menuLayersDeleteLayer,
             this.menuLayersDuplicateLayer,
             this.menuLayersMergeLayerDown,
             this.menuLayersImportFromFile,
             this.menuLayersSeparator1,
             this.menuLayersFlip,
             this.menuLayersRotateZoom,
             this.menuLayersSeparator2,
             this.menuLayersLayerProperties
         });
     this.Name = "Menu.Layers";
     this.Text = PdnResources.GetString("Menu.Layers.Text");
     //
     // menuLayersAddNewLayer
     //
     this.menuLayersAddNewLayer.Name = "AddNewLayer";
     this.menuLayersAddNewLayer.ShortcutKeys = Keys.Control | Keys.Shift | Keys.N;
     this.menuLayersAddNewLayer.Click += new System.EventHandler(this.MenuLayersAddNewLayer_Click);
     //
     // menuLayersDeleteLayer
     //
     this.menuLayersDeleteLayer.Name = "DeleteLayer";
     this.menuLayersDeleteLayer.ShortcutKeys = Keys.Shift | Keys.Delete;
     this.menuLayersDeleteLayer.Click += new System.EventHandler(this.MenuLayersDeleteLayer_Click);
     //
     // menuLayersDuplicateLayer
     //
     this.menuLayersDuplicateLayer.Name = "DuplicateLayer";
     this.menuLayersDuplicateLayer.ShortcutKeys = Keys.Control | Keys.Shift | Keys.D;
     this.menuLayersDuplicateLayer.Click += new System.EventHandler(this.MenuLayersDuplicateLayer_Click);
     //
     // menuLayersMergeDown
     //
     this.menuLayersMergeLayerDown.Name = "MergeLayerDown";
     this.menuLayersMergeLayerDown.ShortcutKeys = Keys.Control | Keys.M;
     this.menuLayersMergeLayerDown.Click += new EventHandler(MenuLayersMergeDown_Click);
     //
     // menuLayersImportFromFile
     //
     this.menuLayersImportFromFile.Name = "ImportFromFile";
     this.menuLayersImportFromFile.Click += new System.EventHandler(this.MenuLayersImportFromFile_Click);
     //
     // menuLayersFlip
     //
     this.menuLayersFlip.Name = "Flip";
     this.menuLayersFlip.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
                                                                                    this.menuLayersFlipHorizontal,
                                                                                    this.menuLayersFlipVertical});
     //
     // menuLayersFlipHorizontal
     //
     this.menuLayersFlipHorizontal.Name = "Horizontal";
     this.menuLayersFlipHorizontal.Click += new System.EventHandler(this.MenuLayersFlipHorizontal_Click);
     //
     // menuLayersFlipVertical
     //
     this.menuLayersFlipVertical.Name = "Vertical";
     this.menuLayersFlipVertical.Click += new System.EventHandler(this.MenuLayersFlipVertical_Click);
     //
     // menuLayersRotateZoom
     //
     this.menuLayersRotateZoom.Name = "RotateZoom";
     this.menuLayersRotateZoom.Click += new EventHandler(MenuLayersRotateZoom_Click);
     //
     // menuLayersLayerProperties
     //
     this.menuLayersLayerProperties.Name = "LayerProperties";
     this.menuLayersLayerProperties.ShortcutKeys = Keys.F4;
     this.menuLayersLayerProperties.Click += new System.EventHandler(this.MenuLayersLayerProperties_Click);
 }
Beispiel #24
0
 private void InitializeComponent()
 {
     this.menuEditUndo              = new PdnMenuItem();
     this.menuEditRedo              = new PdnMenuItem();
     this.menuEditSeparator1        = new ToolStripSeparator();
     this.menuEditCut               = new PdnMenuItem();
     this.menuEditCopy              = new PdnMenuItem();
     this.menuEditPaste             = new PdnMenuItem();
     this.menuEditPasteInToNewLayer = new PdnMenuItem();
     this.menuEditPasteInToNewImage = new PdnMenuItem();
     this.menuEditSeparator2        = new ToolStripSeparator();
     this.menuEditEraseSelection    = new PdnMenuItem();
     this.menuEditFillSelection     = new PdnMenuItem();
     this.menuEditInvertSelection   = new PdnMenuItem();
     this.menuEditSelectAll         = new PdnMenuItem();
     this.menuEditDeselect          = new PdnMenuItem();
     //
     // EditMenu
     //
     this.DropDownItems.AddRange(
         new ToolStripItem[]
     {
         this.menuEditUndo,
         this.menuEditRedo,
         this.menuEditSeparator1,
         this.menuEditCut,
         this.menuEditCopy,
         this.menuEditPaste,
         this.menuEditPasteInToNewLayer,
         this.menuEditPasteInToNewImage,
         this.menuEditSeparator2,
         this.menuEditEraseSelection,
         this.menuEditFillSelection,
         this.menuEditInvertSelection,
         this.menuEditSelectAll,
         this.menuEditDeselect
     });
     this.Name = "Menu.Edit";
     this.Text = PdnResources.GetString("Menu.Edit.Text");
     //
     // menuEditUndo
     //
     this.menuEditUndo.Name         = "Undo";
     this.menuEditUndo.ShortcutKeys = Keys.Control | Keys.Z;
     this.menuEditUndo.Click       += new System.EventHandler(this.MenuEditUndo_Click);
     //
     // menuEditRedo
     //
     this.menuEditRedo.Name         = "Redo";
     this.menuEditRedo.ShortcutKeys = Keys.Control | Keys.Y;
     this.menuEditRedo.Click       += new System.EventHandler(this.MenuEditRedo_Click);
     //
     // menuEditCut
     //
     this.menuEditCut.Name         = "Cut";
     this.menuEditCut.ShortcutKeys = Keys.Control | Keys.X;
     this.menuEditCut.Click       += new System.EventHandler(this.MenuEditCut_Click);
     //
     // menuEditCopy
     //
     this.menuEditCopy.Name         = "Copy";
     this.menuEditCopy.ShortcutKeys = Keys.Control | Keys.C;
     this.menuEditCopy.Click       += new System.EventHandler(this.MenuEditCopy_Click);
     //
     // menuEditPaste
     //
     this.menuEditPaste.Name         = "Paste";
     this.menuEditPaste.ShortcutKeys = Keys.Control | Keys.V;
     this.menuEditPaste.Click       += new System.EventHandler(this.MenuEditPaste_Click);
     //
     // menuEditPasteInToNewLayer
     //
     this.menuEditPasteInToNewLayer.Name         = "PasteInToNewLayer";
     this.menuEditPasteInToNewLayer.ShortcutKeys = Keys.Control | Keys.Shift | Keys.V;
     this.menuEditPasteInToNewLayer.Click       += new System.EventHandler(this.MenuEditPasteInToNewLayer_Click);
     //
     // menuEditPasteInToNewImage
     //
     this.menuEditPasteInToNewImage.Name         = "PasteInToNewImage";
     this.menuEditPasteInToNewImage.ShortcutKeys = Keys.Control | Keys.Alt | Keys.V;
     this.menuEditPasteInToNewImage.Click       += new EventHandler(MenuEditPasteInToNewImage_Click);
     //
     // menuEditEraseSelection
     //
     this.menuEditEraseSelection.Name         = "EraseSelection";
     this.menuEditEraseSelection.ShortcutKeys = Keys.Delete;
     this.menuEditEraseSelection.Click       += new System.EventHandler(this.MenuEditClearSelection_Click);
     //
     // menuEditFillSelection
     //
     this.menuEditFillSelection.Name = "FillSelection";
     this.menuEditFillSelection.ShortcutKeyDisplayString = PdnResources.GetString("Menu.Edit.FillSelection.ShortcutKeysDisplayString");
     this.menuEditFillSelection.Click += new EventHandler(MenuEditFillSelection_Click);
     //
     // menuEditInvertSelection
     //
     this.menuEditInvertSelection.Name         = "InvertSelection";
     this.menuEditInvertSelection.Click       += new System.EventHandler(this.MenuEditInvertSelection_Click);
     this.menuEditInvertSelection.ShortcutKeys = Keys.Control | Keys.I;
     //
     // menuEditSelectAll
     //
     this.menuEditSelectAll.Name         = "SelectAll";
     this.menuEditSelectAll.ShortcutKeys = Keys.Control | Keys.A;
     this.menuEditSelectAll.Click       += new System.EventHandler(this.MenuEditSelectAll_Click);
     //
     // menuEditDeselect
     //
     this.menuEditDeselect.Name         = "Deselect";
     this.menuEditDeselect.ShortcutKeys = Keys.Control | Keys.D;
     this.menuEditDeselect.Click       += new System.EventHandler(this.MenuEditDeselect_Click);
 }