示例#1
0
 public override bool IsEditableTool(PaintTool tool)
 {
     if (tool.GetToolType == ScrapPaintToolBar.ToolKind.文字工具)
     {
         ((TextTool)tool).SetFont(this.GetCommandFont());
         return(true);
     }
     return(false);
 }
示例#2
0
 public ScrapPaintToolBar(ScrapPaintWindow parent)
 {
     this._parent = parent;
     this.InitializeComponent();
     this.activeTool = null;
     this.tools      = new List <CheckBox>();
     this.tools.Add(this.chkPen);
     this.tools.Add(this.chkErase);
     this.tools.Add(this.chkText);
 }
        // Token: 0x0600058E RID: 1422 RVA: 0x00026400 File Offset: 0x00024600
        public override bool IsEditableTool(PaintTool tool)
        {
            var getToolType = tool.GetToolType;

            if (getToolType == ScrapPaintToolBar.ToolKind.文字工具)
            {
                var textTool = (TextTool)tool;
                textTool.SetFont(GetCommandFont());
                return(true);
            }
            return(false);
        }
示例#4
0
 private void OnSelectTool(PaintTool tool)
 {
     this.activeTool = tool;
     if (this.activeTool != null)
     {
         this.activeTool.ShowToolBar(this._parent);
         this._parent.Activate();
     }
     if (this.SelectTool != null)
     {
         this.SelectTool(tool);
     }
 }
示例#5
0
 private void toolFrm_SelectTool(PaintTool tool)
 {
     if (this.activeTool != null)
     {
         this.activeTool.Dispose();
         this.activeTool = null;
     }
     this.activeTool = tool;
     if (this.activeTool != null)
     {
         this.activeTool.Started  += new PaintTool.PaintToolDelegate(this.activeTool_Started);
         this.activeTool.Finished += new PaintTool.PaintToolDelegate(this.activeTool_Finished);
     }
     this.ToolEditCheck();
 }
示例#6
0
 // Token: 0x06000109 RID: 265 RVA: 0x00007770 File Offset: 0x00005970
 private void toolFrm_SelectTool(PaintTool tool)
 {
     if (activeTool != null)
     {
         activeTool.Dispose();
         activeTool = null;
     }
     activeTool = tool;
     if (activeTool != null)
     {
         activeTool.Started  += activeTool_Started;
         activeTool.Finished += activeTool_Finished;
     }
     ToolEditCheck();
 }
示例#7
0
 public ScrapPaintWindow(ScrapBase scrap) : base(scrap)
 {
     base.SetStyle(ControlStyles.UserPaint, true);
     base.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
     this.isToolUse           = false;
     this.activeTool          = null;
     this.historyCommand      = new List <ToolCommand>();
     this.toolFrm             = new ScrapPaintToolBar(this);
     this.toolFrm.KeyUp      += new KeyEventHandler(this.layerForm_KeyUp);
     this.toolFrm.SelectTool += new ScrapPaintToolBar.SelectToolDelegate(this.toolFrm_SelectTool);
     base.AddOwnedForm(this.toolFrm);
     this.layerForm               = new ScrapPaintLayer(this);
     this.layerForm.KeyUp        += new KeyEventHandler(this.layerForm_KeyUp);
     this.layerForm.SelectLayer  += new ScrapPaintLayerItem.LayerDelegate(this.layerForm_SelectLayer);
     this.layerForm.LayerRefresh += new ScrapPaintLayerItem.LayerDelegate(this.layerForm_LayerRefresh);
     base.AddOwnedForm(this.layerForm);
     this.activeLayer = this.layerForm.SelectionLayer;
 }
示例#8
0
 public virtual bool IsEditableTool(PaintTool tool) =>
 true;