Beispiel #1
0
        //Clone
        private void buttonCloneProfile_Click(object sender, EventArgs e)
        {
            using (var dForm = new FormProfileEditorRenameClone("clone"))
            {
                dForm.ParentForm  = ParentForm;
                dForm.InitialName = WorkingProfileName;
                dForm.InitialPath = WorkingProfilePath;

                DialogResult result = dForm.ShowDialog();

                if (result == DialogResult.OK)
                {
                    if (dForm.ReturnCloningSuccessful)
                    {
                        MessageBox.Show("Created new Profiles (" + dForm.ReturnClonedNames.Count.ToString() + "):\r\n\r\n" + string.Join("\r\n", dForm.ReturnClonedNames));
                    }
                    else
                    {
                        MessageBox.Show("No profiles created due to duplicating names.");
                    }
                }
            }
        }
Beispiel #2
0
        //Rename
        private void buttonRenameProfile_Click(object sender, EventArgs e)
        {
            using (var dForm = new FormProfileEditorRenameClone("rename"))
            {
                dForm.ParentForm  = ParentForm;
                dForm.InitialName = WorkingProfileName;
                dForm.InitialPath = WorkingProfilePath;

                DialogResult result = dForm.ShowDialog();

                if (result == DialogResult.OK)
                {
                    if (dForm.ReturnRenamedSuccessful)
                    {
                        WorkingProfileName = dForm.ReturnNewName;
                        WorkingProfilePath = WorkingProfilePath.Remove(WorkingProfilePath.LastIndexOf('\\') + 1) + Utilities.TextUtilities.FromStringToHex(WorkingProfileName);

                        labelProfileNameValue.Text = dForm.ReturnNewName;

                        MessageBox.Show("New Profile name - " + dForm.ReturnNewName);
                    }
                }
            }
        }