Exemplo n.º 1
0
        void CB5SelectedIndexChanged(object sender, EventArgs e)
        {
            AddSmth addsmth = new AddSmth();

            if ((sender as ComboBox).Text == "New variable...")
            {
                addsmth.ShowDialog();
                if (addsmth.Input == "")
                {
                    return;
                }
                store.AddVar(addsmth.Input);
                VarEd vared = new VarEd(store.GetVar(addsmth.Input));
                vared.ShowDialog();
                (sender as ComboBox).Items.Add(addsmth.Input);
                (sender as ComboBox).Text = addsmth.Input;
            }
            if ((sender as ComboBox).Text == "New block...")
            {
                addsmth.ShowDialog();
                if (addsmth.Input == "")
                {
                    return;
                }
                store.AddGBlock(addsmth.Input);
                CmbEd cmbed = new CmbEd(store.GetGBlock(addsmth.Input), null, store);

                cmbed.ShowDialog();
                (sender as ComboBox).Items.Add(addsmth.Input);
                (sender as ComboBox).Text = addsmth.Input;
            }
            if ((sender as ComboBox).Text == "New location...")
            {
                addsmth.ShowDialog();
                if (addsmth.Input == "")
                {
                    return;
                }
                store.AddLoc(addsmth.Input);
                LocEd loced = new LocEd(store.GetLoc(addsmth.Input), store);

                loced.ShowDialog();
                (sender as ComboBox).Items.Add(addsmth.Input);
                (sender as ComboBox).Text = addsmth.Input;
            }
            if ((sender as ComboBox).Text == "New item...")
            {
                addsmth.ShowDialog();
                if (addsmth.Input == "")
                {
                    return;
                }
                store.AddItm(addsmth.Input);
                ItmEd itmed = new ItmEd(store.GetItm(addsmth.Input), store);

                itmed.ShowDialog();
                (sender as ComboBox).Items.Add(addsmth.Input);
                (sender as ComboBox).Text = addsmth.Input;
            }
        }
Exemplo n.º 2
0
        void Button3Click(object sender, EventArgs e)
        {
            CmbEd  cmbed  = new CmbEd(null, null, store);
            NewCom newcom = new NewCom(store, cmbed);

            newcom.ShowDialog();
            textBox2.Text = cmbed.Lstcom;
        }
Exemplo n.º 3
0
        void Button8Click(object sender, EventArgs e)
        {
            CmbEd cmbed;

            if (listBox4.SelectedIndex != -1)
            {
                cmbed = new CmbEd(storage.GetGBlock(listBox4.SelectedItem.ToString()), this, storage);
                cmbed.ShowDialog();
            }
            storage.RefreshGBlocks(listBox4);
            RefreshAll();
        }
Exemplo n.º 4
0
 void Button4Click(object sender, EventArgs e)
 {
     addsmth.ShowDialog();
     if (addsmth.Input != "")
     {
         storage.AddGBlock(addsmth.Input);
         CmbEd cmbed = new CmbEd(storage.GetGBlock(addsmth.Input), this, storage);
         cmbed.ShowDialog();
     }
     storage.RefreshGBlocks(listBox4);
     RefreshAll();
 }
Exemplo n.º 5
0
        public NewCom(Storage store, CmbEd ce)
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
            this.store = store;
            this.ce    = ce;
        }
Exemplo n.º 6
0
 void Button5Click(object sender, EventArgs e)
 {
     if (loca.GetCmBlock(comboBox2.Text) != null)
     {
         CmbEd cmbed = new CmbEd(loca.GetCmBlock(comboBox2.Text), null, store);
         cmbed.ShowDialog();
         loca.RefreshActions(comboBox2);
         if (cmbed.GetLastName() != "")
         {
             comboBox2.Text = cmbed.GetLastName();
         }
     }
 }
Exemplo n.º 7
0
        void Button7Click(object sender, EventArgs e)
        {
            CmBlock cb;

            cb = store.GetGBlock(comboBox1.Text);
            if (cb == null)
            {
                return;
            }
            CmbEd cmbed = new CmbEd(cb, null, store);

            cmbed.ShowDialog();
            store.RefreshGBlocks(comboBox1);
        }
Exemplo n.º 8
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 = "";
            }
        }
Exemplo n.º 9
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;
         }
     }
 }