Example #1
0
 public void OpenCompositeActivityFor(CompositeActivity activity) {
     if (!_compositeActivityTabs.ContainsKey(activity)) {
         _compositeActivityTabs.Add(activity, new TabPage(activity.Name));
         _tabControl.TabPages.Add(_compositeActivityTabs[activity]);
     }
     _tabControl.SelectedTab = _compositeActivityTabs[activity];
     var designFieldControl = new DesignFieldControl();
     _compositeActivityTabs[activity].Controls.Add(designFieldControl);
     designFieldControl.Dock = DockStyle.Fill;
 }
 private void Form_Closing(object sender, CancelEventArgs e) {
     if (DialogResult == DialogResult.Cancel)
         return;
     txtName.Text = txtName.Text.Trim();
     string name = txtName.Text;
     if (!CheckNameIsValid(name)) {
         e.Cancel = true;
         return;
     }
     NewActivity = new CompositeActivity();
     NewActivity.Name = name;
     _compositeActivityFactory.ServiceProvider.Variables.Add(NewActivity);
 }