Esempio n. 1
0
        public OperationTextBox(Operation operation, IControlsOperations classController)
        {
            this.operation       = operation;
            this.classController = classController;

            #region Operation context menu

            this.ContextMenu = new ContextMenu();
            ContextMenuItem remove = new ContextMenuItem("Remove operation");
            remove.Icon   = ContextMenuIcon.GetContextIcon("delete2");
            remove.Click += delegate { classController.RemoveOperation(operation); };
            this.ContextMenu.Items.Add(remove);

            #endregion

            operation.PropertyChanged += delegate { RefreshTextContent(); };
            RefreshTextContent();
        }
Esempio n. 2
0
 /// <summary>
 /// Removes visualization of <paramref name="operation"/>/
 /// </summary>
 /// <param name="operation">removed operation</param>
 public void RemoveOperation(Operation operation)
 {
     classController.RemoveOperation(operation);
 }