An event argument object passed when a connection is about to be renamed
상속: CancelEventArgs
예제 #1
0
 void OnBeforeTaskRemoved(object sender, TaskBeforeRemoveEventArgs e)
 {
     if (e.TaskName == _taskName && _taskMgr.GetTask(e.TaskName) != null)
     {
         MessageService.ShowMessage("This editor for this task is still open. Close that editor first");
         e.Cancel = true;
     }
 }
예제 #2
0
        public void RemoveTask(string name)
        {
            if (_taskDict.ContainsKey(name))
            {
                var e = new TaskBeforeRemoveEventArgs(name);
                this.BeforeTaskRemoved(this, e);
                if (e.Cancel)
                {
                    return;
                }

                EtlProcess proc = _taskDict[name];
                _taskDict.Remove(name);
                proc.Dispose();
                TaskRemoved(this, new EventArgs <string>(name));
            }
        }
예제 #3
0
        public void RemoveTask(string name)
        {
            if (_taskDict.ContainsKey(name))
            {
                var e = new TaskBeforeRemoveEventArgs(name);
                this.BeforeTaskRemoved(this, e);
                if (e.Cancel)
                    return;

                EtlProcess proc = _taskDict[name];
                _taskDict.Remove(name);
                proc.Dispose();
                TaskRemoved(this, new EventArgs<string>(name));
            }
        }