Esempio n. 1
0
        private void Apply()
        {
            int a = Objects.SelectedIndex;

            if (a >= 0)
            {
                try
                {
                    grMc              = (uint)rmorfgrouplist[a].objNames.Count;
                    grToa             = uint.Parse(textBox2.Text);
                    grFrq             = uint.Parse(textBox3.Text);
                    grU3              = uint.Parse(textBox4.Text);
                    grU4              = uint.Parse(textBox5.Text);
                    grU5              = uint.Parse(textBox6.Text);
                    nameslist         = rmorfgrouplist[a].objNames;
                    rmorfgrouplist[a] = new RmorfGroup(grMc, grToa, grFrq, grU3, grU4, grU5, nameslist);
                    FilesaveString(false);
                    VisualComboBox();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Esempio n. 2
0
        private void DeleteObjToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            int a = Objects.SelectedIndex;
            int i = Objects1.SelectedIndex;

            if (rmorfgrouplist != null && i >= 0 && a >= 0)
            {
                nameslist = rmorfgrouplist[a].objNames;
                nameslist.RemoveAt(i);
                GetValues(a);
                rmorfgrouplist[a] = new RmorfGroup(grMc, grToa, grFrq, grU3, grU4, grU5, nameslist);
                VisualObject(a);
                FilesaveString(false);
            }
        }
Esempio n. 3
0
        private void InsertObjectToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int a = Objects.SelectedIndex;

            if (rmorfgrouplist != null && a >= 0)
            {
                string newname = Interaction.InputBox("Type a new object name:", "Adding", "NewObject");
                if (newname == "")
                {
                    MessageBox.Show("You didn't write new name", "Adding", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    nameslist = rmorfgrouplist[a].objNames;
                    nameslist.Add(newname);
                    GetValues(a);
                    rmorfgrouplist[a] = new RmorfGroup(grMc, grToa, grFrq, grU3, grU4, grU5, nameslist);
                    VisualObject(a);
                    FilesaveString(false);
                }
            }
        }