示例#1
0
        public void AddGBlock(string nm)
        {
            CmBlock temp = new CmBlock(this);

            temp.name = nm;
            dt.gblocks.Add(temp);
        }
示例#2
0
        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 = "";
            }
        }
示例#3
0
 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;
         }
     }
 }
示例#4
0
        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.
            //
        }
示例#5
0
 public void AddCmBlock(CmBlock act)
 {
     actions.Add(act);
 }