コード例 #1
0
ファイル: ShapeTool.cs プロジェクト: nkaligin/paint-mono
 public ShapeTool(DocumentWorkspace documentWorkspace,
                  ImageResource toolBarImage,
                  string name,
                  string helpText,
                  ToolBarConfigItems toolBarConfigItemsInclude,
                  ToolBarConfigItems toolBarConfigItemsExclude)
     : this(documentWorkspace,
            toolBarImage,
            name,
            helpText,
            defaultShortcut,
            toolBarConfigItemsInclude,
            toolBarConfigItemsExclude)
 {
 }
コード例 #2
0
ファイル: SelectionTool.cs プロジェクト: nkaligin/paint-mono
 public SelectionTool(
     DocumentWorkspace documentWorkspace,
     ImageResource toolBarImage,
     string name,
     string helpText,
     char hotKey,
     ToolBarConfigItems toolBarConfigItems)
     : base(documentWorkspace,
            toolBarImage,
            name,
            helpText,
            hotKey,
            false,
            toolBarConfigItems)
 {
     this.tracking = false;
 }
コード例 #3
0
ファイル: ToolInfo.cs プロジェクト: nkaligin/paint-mono
 public ToolInfo(
     string name, 
     string helpText, 
     ImageResource image, 
     char hotKey, 
     bool skipIfActiveOnHotKey, 
     ToolBarConfigItems toolBarConfigItems, 
     Type toolType)
 {
     this.name = name;
     this.helpText = helpText;
     this.image = image;
     this.hotKey = hotKey;
     this.skipIfActiveOnHotKey = skipIfActiveOnHotKey;
     this.toolBarConfigItems = toolBarConfigItems;
     this.toolType = toolType;
 }
コード例 #4
0
            public ToolConfigRow(ToolBarConfigItems toolBarConfigItems)
            {
                this.toolBarConfigItems = toolBarConfigItems;

                this.headerLabel = new HeaderLabel();
                this.headerLabel.Name = "headerLabel:" + toolBarConfigItems.ToString();
                this.headerLabel.Text = PdnResources.GetString(GetHeaderResourceName());
                this.headerLabel.RightMargin = 0;

                this.toolConfigStrip = new ToolConfigStrip();
                this.toolConfigStrip.Name = "toolConfigStrip:" + toolBarConfigItems.ToString();
                this.toolConfigStrip.AutoSize = true;
                this.toolConfigStrip.Dock = DockStyle.None;
                this.toolConfigStrip.GripStyle = ToolStripGripStyle.Hidden;
                this.toolConfigStrip.LayoutStyle = ToolStripLayoutStyle.HorizontalStackWithOverflow;
                this.toolConfigStrip.ToolBarConfigItems = this.toolBarConfigItems;
            }
コード例 #5
0
ファイル: Tool.cs プロジェクト: nkaligin/paint-mono
        // NOTE: Your constructor must be able to run successfully with a documentWorkspace
        //       of null. This is sent in while the DocumentControl static constructor
        //       class is building a list of ToolInfo instances, so that it may construct
        //       the list without having to also construct a DocumentControl.
        public Tool(DocumentWorkspace documentWorkspace,
                    ImageResource toolBarImage,
                    string name,
                    string helpText,
                    char hotKey,
                    bool skipIfActiveOnHotKey,
                    ToolBarConfigItems toolBarConfigItems)
        {
            this.documentWorkspace = documentWorkspace;
            this.toolBarImage = toolBarImage;
            this.toolInfo = new ToolInfo(name, helpText, toolBarImage, hotKey, skipIfActiveOnHotKey, toolBarConfigItems, this.GetType());

            if (this.documentWorkspace != null)
            {
                this.documentWorkspace.UpdateStatusBarToToolHelpText(this);
            }
        }
コード例 #6
0
 public FloodToolBase(DocumentWorkspace documentWorkspace, ImageResource toolBarImage, string name, 
     string helpText, char hotKey, bool skipIfActiveOnHotKey, ToolBarConfigItems toolBarConfigItems)
     : base(documentWorkspace, toolBarImage, name, helpText, hotKey, skipIfActiveOnHotKey, 
       ToolBarConfigItems.Tolerance | toolBarConfigItems)
 {
 }
コード例 #7
0
ファイル: ShapeTool.cs プロジェクト: herbqiao/paint.net
 public ShapeTool(DocumentWorkspace documentWorkspace,
                  ImageResource toolBarImage,
                  string name,
                  string helpText,
                  char hotKey,
                  ToolBarConfigItems toolBarConfigItemsInclude,
                  ToolBarConfigItems toolBarConfigItemsExclude)
     : base(documentWorkspace,
            toolBarImage,
            name,
            helpText,
            hotKey,
            false,
            (toolBarConfigItemsInclude |
                (ToolBarConfigItems.Brush | 
                 ToolBarConfigItems.Pen | 
                 ToolBarConfigItems.ShapeType | 
                 ToolBarConfigItems.Antialiasing | 
                 ToolBarConfigItems.AlphaBlending)) &
                ~(toolBarConfigItemsExclude))
 {
     this.mouseDown = false;
     this.points = null;
     this.cursorMouseUp = new Cursor(PdnResources.GetResourceStream("Cursors.ShapeToolCursor.cur"));
     this.cursorMouseDown = new Cursor(PdnResources.GetResourceStream("Cursors.ShapeToolCursorMouseDown.cur"));
 }