Ejemplo 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;
            }
        }
Ejemplo n.º 2
0
        void Button7Click(object sender, EventArgs e)
        {
            ItmEd itmed;

            if (listBox3.SelectedIndex != -1)
            {
                itmed = new ItmEd(storage.GetItm(listBox3.SelectedItem.ToString()), storage);
                itmed.ShowDialog();
            }
            storage.RefreshItms(listBox3);
        }
Ejemplo n.º 3
0
 void Button3Click(object sender, EventArgs e)
 {
     addsmth.ShowDialog();
     if (addsmth.Input != "")
     {
         storage.AddItm(addsmth.Input);
         ItmEd itmed = new ItmEd(storage.GetItm(addsmth.Input), storage);
         itmed.ShowDialog();
     }
     storage.RefreshItms(listBox3);
 }