Exemplo n.º 1
0
        //Load application, read files, and fill lists. Open a child form
        private void frmStartUp_Load(object sender, EventArgs e)
        {
            conversions = ConversionsDB.GetConversions();
            ConversionsDB.SaveConversions(conversions);

            options = OptionsDB.GetOptions();

            int count = options.Count;

            if (options[count - 1].ShowToolbar == "true")
            {
                toolStrip1.Visible = true;
            }
            else
            {
                toolStrip1.Visible = false;
            }

            frmConversion newConversionForm = new frmConversion();

            newConversionForm.MdiParent = this;
            newConversionForm.Text      = "Conversion " + childFormNum;
            newConversionForm.Show();
            childFormNum++;
        }
Exemplo n.º 2
0
        //Confirm changes. If yes, save tempChanges into main conversions list and save into conversions.txt
        //Create options object for use in parent form. Close this form
        private void btnOK_Click(object sender, EventArgs e)
        {
            string       message = "Are you sure you want to commit all changes?";
            DialogResult button  =
                MessageBox.Show(message, "Confirm Changes",
                                MessageBoxButtons.YesNo);

            if (button == DialogResult.Yes)
            {
                conversions = tempChanges;
                ConversionsDB.SaveConversions(conversions);

                newOp = new Options(cbxShowToolbar.Checked.ToString(),
                                    cmbDefaultConversion.GetItemText(cmbDefaultConversion.SelectedItem));


                this.Close();
            }
        }