Пример #1
0
        private void BtnDeleteUserProfileClick(object sender, RoutedEventArgs e)
        {
            var userProfileSelected = (UserProfile)dgUserProfiles.SelectedItem;

            if (userProfileSelected != null) {
                var prompt = new Prompt(this,
                    "Delete User Profile", "Are you sure you want to delete User Profile \"" + userProfileSelected.UserProfileName + "\"?", false, null, false);
                var promptResult = prompt.ShowDialog();
                if (promptResult != null)
                {
                    if ((bool)promptResult)
                    {
                        DeleteUserProfileShortcuts(userProfileSelected);
                        UserProfileFunctions.DeleteUserProfile(userProfileSelected.UserProfileName, SystemDetails.ChromeUserDataDir);
                        UpdateUserProfileList();
                    }
                }
            }
        }
Пример #2
0
        private void BtnRenameUserProfileClick(object sender, RoutedEventArgs e)
        {
            var userProfileSelected = (UserProfile)dgUserProfiles.SelectedItem;

            if (userProfileSelected != null)
            {
                var prompt = new Prompt(this,
                    "Rename User Profile", "Please enter the User Profile Name you want to rename \"" + userProfileSelected.UserProfileName + "\" to:", true, 100, false);
                var promptResult = prompt.ShowDialog();
                if (promptResult != null)
                {
                    if ((bool)promptResult)
                    {
                        DeleteUserProfileShortcuts(userProfileSelected);
                        UserProfileFunctions.RenameUserProfile(userProfileSelected.UserProfileName, SystemDetails.ChromeUserDataDir, prompt.tbTextInput.Text);
                        UpdateUserProfileList();
                    }
                }
            }
        }
Пример #3
0
 private void BtnCreateUserProfileClick(object sender, RoutedEventArgs e)
 {
     var prompt = new Prompt(this,
         "Create User Profile", "Please enter the User Profile Name:", true, 100, false);
     var promptResult = prompt.ShowDialog();
     if (promptResult != null)
     {
         if ((bool) promptResult)
         {
             UserProfileFunctions.CreateUserProfile(prompt.tbTextInput.Text, SystemDetails.ChromeUserDataDir);
         }
     }
 }