Esempio n. 1
0
        private void UnfollowThatNotFollow()
        {
            if (Convert.ToInt32(tbNumberOfunFollower.Text) > Convert.ToInt32(tbMaxNumber.Text))
            {
                Notinfer.Show("The Number of Unfollow should be less than Max Number.", 2000);
                btnProcess.Content             = "Process";
                tbNumberOfunFollower.IsEnabled = true;
                cbMethoud.IsEnabled            = true;
                btnProcess.IsEnabled           = true;
                return;
            }

            UnFollower un = new UnFollower();

            un.NotFollowingMe(Convert.ToInt32(tbNumberOfunFollower.Text));
        }
Esempio n. 2
0
        private async void btnLogOut_Click(object sender, RoutedEventArgs e)
        {
            var Logout = await UserWorkation.InstaApi.LogoutAsync();

            if (Logout.Succeeded)
            {
                // Delete file.
                Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
                Windows.Storage.StorageFile   File          = await storageFolder.GetFileAsync(UserWorkation.User + ".txt");

                await File.DeleteAsync();

                localSettings.Values["ihaveaaccount"] = "no";
                localSettings.Values["LastUser"]      = "";


                AppShell.framer.Navigate(typeof(LoginPage));
            }
            else
            {
                Notinfer.Show("Error: " + Logout.Info.Message, 2000);
            }
        }
Esempio n. 3
0
        private void btnProcess_Click(object sender, RoutedEventArgs e)
        {
            if (tbNumberOfunFollower.Text.Length == 0 && cbMethoud.SelectedIndex != 3)
            {
                Notinfer.Show("You should set the Maximum number of unfollow!", 2000);
                return;
            }
            int parsedValue;

            if (!int.TryParse(tbNumberOfunFollower.Text, out parsedValue) && cbMethoud.SelectedIndex != 3)
            {
                Notinfer.Show("Please insert iniger in max number field.", 2000);
                return;
            }

            if (HistoryModel.IsStopUn)
            {
                HistoryModel.UnFirst           = true;
                HistoryModel.Max               = tbNumberOfunFollower.Text;
                HistoryModel.IsStopUn          = !HistoryModel.IsStopUn;
                btnProcess.Content             = "Stop";
                tbNumberOfunFollower.IsEnabled = false;
                cbMethoud.IsEnabled            = false;
                switch (cbMethoud.SelectedIndex)
                {
                case 0:
                {
                    HistoryModel.Method = 0;
                    UnfollowThatNotFollow();
                }
                break;

                case 1:
                {
                    HistoryModel.Method = 1;
                    UnfollowThatFollow();
                }
                break;

                case 2:
                {
                    HistoryModel.Method = 2;
                    UnfollowAll();
                }
                break;

                case 3:
                {
                    HistoryModel.Method = 3;
                    UnFollowSelected();
                }
                break;
                }
                HomePage.par.IsActive = true;
            }
            else
            {
                HistoryModel.IsStopUn = true;
                btnProcess.Content    = "Waiting...";
                btnProcess.IsEnabled  = false;
            }
        }