Exemplo n.º 1
0
        private void btnEditProfile_Click(object sender, EventArgs e)
        {
            if (this.manager.Profiles.Count == 0)
            {
                MessageBox.Show("There are no profiles found");
                return;
            }
            Profile editProfile = this.manager.OpenedProfile;
            string oldProfileName = editProfile.Name;
            ProfileEditor frm = new ProfileEditor(editProfile, this.manager.Profiles, this.manager.ActiveDesktopGroups);
            frm.loadProfile();
            frm.ShowDialog();

            if (frm.FormApplied)
            {
                this.onProfileEdited(editProfile);
                this.xmlManager.editXmlProfile(oldProfileName, editProfile);
            }
        }
Exemplo n.º 2
0
 private void btnNewProfile_Click(object sender, EventArgs e)
 {
     Profile createdProfile = new Profile();
     ProfileEditor frm = new ProfileEditor(createdProfile, this.manager.Profiles, this.manager.ActiveDesktopGroups);
     frm.ShowDialog();
     if (frm.FormApplied)
     {
         manager.addProfile(createdProfile);
         xmlManager.writeProfileToXml(createdProfile);
     }
 }