Exemplo n.º 1
0
 /// <summary>
 ///     Cancels the Editor Changes and goes back to main portion of the form
 /// </summary>
 /// <param name="sender">Object classed Sender</param>
 /// <param name="e">Button's Event Arguments</param>
 private void BTN_ECompilePackageRootEditorCancel_Click(object sender, EventArgs e)
 {
     GB_PackageRootEditor.Visible = false;
     GB_PackageRootEditor.SendToBack();
     BTN_ECompile.Enabled = true;
     BTN_ECompile.Visible = true;
     DGV_PackageRoot.Rows.Clear();
 }
Exemplo n.º 2
0
        private void BTN_ECompilePackageRootEditorFinished_Click(object sender, EventArgs e)
        {
            GB_PackageRootEditor.Visible = false;
            GB_PackageRootEditor.SendToBack();
            BTN_ECompile.Enabled = true;
            BTN_ECompile.Visible = true;

            // Now let's store all this useless, I mean useful, information in the
            // PackageRoot Storage.
            ECompileCFG.RemoveAllPackageRootItems();
            foreach (DataGridViewRow CurrentRow in DGV_PackageRoot.Rows)
            {
                if (CurrentRow.Cells["PackageRootPath"].Value != null)
                {
                    ECompileCFG.AddPackageRootItem(CurrentRow.Cells["PackageRootPath"].Value.ToString());
                }
            }

            // After all is said and done, let's erase the Data, since no longer needed.
            // This will help ensure variables are loaded correctly after loading a new cfg
            // without a lot of kludging around.
            DGV_PackageRoot.Rows.Clear();
        }
Exemplo n.º 3
0
        private void BTN_ECompilePackageRoots_Click(object sender, EventArgs e)
        {
            if (ECompileCFG == null)
            {
                DialogResult result = MessageBox.Show(this, "We need to load ECompile.Cfg for this option. Proceed?", "Load ECompile.Cfg", MessageBoxButtons.YesNo);
                if (result == DialogResult.No)
                {
                    return;
                }
                ECompileCFG.LoadConfig(Settings.Global.Properties["ECompileCfgPath"]);
            }
            GB_PackageRootEditor.Visible = true;
            GB_PackageRootEditor.BringToFront();
            BTN_ECompile.Enabled = false;
            BTN_ECompile.Visible = false;

            List <string> MyPackageRoots = ECompileCFG.GetPackageRoots();

            foreach (string PathName in MyPackageRoots)
            {
                object[] PathObject = new object[] { PathName.ToString() };
                int      RowIndex   = DGV_PackageRoot.Rows.Add(PathObject);
            }
        }