Пример #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);
 }