Exemple #1
0
 // Token: 0x060000FC RID: 252 RVA: 0x00007038 File Offset: 0x00005238
 private void layer_LayerChanged(ScrapPaintLayerItem layerCtrl)
 {
     if (LayerRefresh != null)
     {
         LayerRefresh(null);
     }
 }
Exemple #2
0
        // Token: 0x060000F6 RID: 246 RVA: 0x00006CB8 File Offset: 0x00004EB8
        private void layer_Rename(ScrapPaintLayerItem layerCtrl, string newLayerName)
        {
            var renameLayerCommand = new RenameLayerCommand(layerCtrl.LayerID, newLayerName);

            renameLayerCommand.RenameLayer += renameCmd_RenameLayer;
            _parent.RenameLayerCommand(renameLayerCommand);
        }
Exemple #3
0
        private void layer_Rename(ScrapPaintLayerItem layerCtrl, string newLayerName)
        {
            RenameLayerCommand renameCmd = new RenameLayerCommand(layerCtrl.LayerID, newLayerName);

            renameCmd.RenameLayer += new RenameLayerCommand.RenameLayerCommandDelegate(this.renameCmd_RenameLayer);
            this._parent.RenameLayerCommand(renameCmd);
        }
Exemple #4
0
 public ScrapPaintLayer(ScrapPaintWindow parent)
 {
     this.InitializeComponent();
     this._select         = null;
     this._parent         = parent;
     this.LayerCommands   = new List <LayerCommand>();
     this.HistoryCommands = new List <ToolCommand>();
     this._layers         = new List <ScrapPaintLayerItem>();
 }
Exemple #5
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;
 }
Exemple #6
0
 protected override void Dispose(bool disposing)
 {
     if (disposing && (this.components != null))
     {
         this.components.Dispose();
     }
     this._parent = null;
     this._select = null;
     if (this.LayerCommands != null)
     {
         foreach (ToolCommand command in this.LayerCommands)
         {
             command.Dispose();
         }
         this.LayerCommands.Clear();
         this.LayerCommands = null;
     }
     base.Dispose(disposing);
 }
Exemple #7
0
        public void addCmd_AddLayer(AddLayerCommand sender)
        {
            foreach (ScrapPaintLayerItem item in this._layers)
            {
                if (item.LayerID == sender.LayerID)
                {
                    item.Visible   = true;
                    item.LayerName = sender.LayerName;
                    item.IsAlive   = true;
                    return;
                }
            }
            ScrapPaintLayerItem item2 = sender.CreateLayer(this._parent.Width, this._parent.Height);

            item2.LayerName     = sender.LayerName;
            item2.IsAlive       = true;
            item2.SelectLayer  += new ScrapPaintLayerItem.LayerDelegate(this.layer_SelectLayer);
            item2.LayerChanged += new ScrapPaintLayerItem.LayerDelegate(this.layer_LayerChanged);
            item2.Rename       += new ScrapPaintLayerItem.LayerRenameDelegate(this.layer_Rename);
            this._layers.Insert(sender.InsertIndex, item2);
            this.SelectionIndex = sender.InsertIndex;
        }
Exemple #8
0
 private void layer_SelectLayer(ScrapPaintLayerItem layerCtrl)
 {
     if (!layerCtrl.Equals(this._select))
     {
         this._select = layerCtrl;
         foreach (ScrapPaintLayerItem item in this._layers)
         {
             if (item.Equals(layerCtrl))
             {
                 item.BackColor = Color.SkyBlue;
             }
             else
             {
                 item.BackColor = SystemColors.Control;
             }
         }
         if (this.SelectLayer != null)
         {
             this.SelectLayer(layerCtrl);
         }
     }
 }
Exemple #9
0
 // Token: 0x060000FB RID: 251 RVA: 0x00006FA0 File Offset: 0x000051A0
 private void layer_SelectLayer(ScrapPaintLayerItem layerCtrl)
 {
     if (layerCtrl.Equals(_select))
     {
         return;
     }
     _select = layerCtrl;
     foreach (var scrapPaintLayerItem in _layers)
     {
         if (scrapPaintLayerItem.Equals(layerCtrl))
         {
             scrapPaintLayerItem.BackColor = Color.SkyBlue;
         }
         else
         {
             scrapPaintLayerItem.BackColor = SystemColors.Control;
         }
     }
     if (SelectLayer != null)
     {
         SelectLayer(layerCtrl);
     }
 }
Exemple #10
0
 private void layerForm_SelectLayer(ScrapPaintLayerItem layerCtrl)
 {
     this.activeLayer = layerCtrl;
     this.ToolEditCheck();
 }
Exemple #11
0
 private void layerForm_LayerRefresh(ScrapPaintLayerItem layerCtrl)
 {
     this.Refresh();
 }