public void AddGBlock(string nm) { CmBlock temp = new CmBlock(this); temp.name = nm; dt.gblocks.Add(temp); }
void Button3Click(object sender, EventArgs e) { CmBlock tmp = new CmBlock(); AddSmth addsmth = new AddSmth(); addsmth.ShowDialog(); tmp.name = addsmth.Input; if (addsmth.Input != "") { loca.AddCmBlock(tmp); CmbEd cmbed = new CmbEd(loca.GetCmBlock(addsmth.Input), null, store); cmbed.Show(); loca.RefreshActions(comboBox2); comboBox2.Text = ""; } }
void ComboBox1SelectedIndexChanged(object sender, EventArgs e) { if (comboBox1.Text == "New block...") { AddSmth addsmth = new AddSmth(); addsmth.ShowDialog(); if (addsmth.Input != "") { store.AddGBlock(addsmth.Input); CmBlock cmb = store.GetGBlock(addsmth.Input); CmbEd cmbed = new CmbEd(cmb, null, store); cmbed.ShowDialog(); comboBox1.Items.Add(addsmth.Input); comboBox1.Text = cmb.name; } } }
public CmbEd(CmBlock cmb, MainForm mf, Storage st) { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); this.mf = mf; this.st = st; this.cmb = cmb; try { textBox1.Text = cmb.name; } catch { } // // TODO: Add constructor code after the InitializeComponent() call. // }
public void AddCmBlock(CmBlock act) { actions.Add(act); }