Exemple #1
0
 public CtrlToolMask()
 {
     InitializeComponent();
     Operation = new OperationMask();
     SetOperation(Operation);
     lbPrinterResolution.Text = $"Printer Resolution: {Program.FrmMain.ActualLayerImage.Size}";
 }
 private void ChildrenList_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     if (e.Action == NotifyCollectionChangedAction.Add)
     {
         int num = e.NewStartingIndex;
         foreach (object current in e.NewItems)
         {
             NodeObject nodeObject = current as NodeObject;
             this.GetCSVisual().InsertChild(num, nodeObject.GetCSVisual());
             num++;
             nodeObject.BindingRecorder(null);
             nodeObject.AncestorObjectChanged(nodeObject, NotifyCollectionChangedAction.Add);
             nodeObject.IsHitTestVisible = false;
             NodeObject    expr_6D  = nodeObject;
             OperationMask arg_73_0 = expr_6D.OperationFlag;
             expr_6D.OperationFlag = OperationMask.NoneFlag;
         }
     }
     else if (e.Action == NotifyCollectionChangedAction.Remove)
     {
         foreach (object current in e.OldItems)
         {
             NodeObject nodeObject = current as NodeObject;
             nodeObject.AncestorObjectChanged(nodeObject, NotifyCollectionChangedAction.Remove);
             this.GetCSVisual().RemoveChild(nodeObject.GetCSVisual());
         }
     }
 }
Exemple #3
0
 private void RefreshOperation()
 {
     this.OperationFlag &= ~OperationMask.MoveFlag;
     foreach (VisualObject current in this.selectedObjects)
     {
         if (current.OperationFlag == OperationMask.NoneFlag)
         {
             OperationMask arg_40_0 = this.OperationFlag;
             this.OperationFlag = OperationMask.NoneFlag;
             break;
         }
         if (current.IsTransformEnabled)
         {
             this.OperationFlag |= OperationMask.MoveFlag;
             break;
         }
     }
 }