private void newWorkerSubmit_Click(object sender, EventArgs e)
        {
            string newUserBannerId    = BannerTextBox.Text;
            string newUserFirstName   = FirstNameTextBox.Text;
            string newUserLastName    = LastNameTextBox.Text;
            string newUserPhoneNumber = PhoneNumberTextBox.Text;
            string newUserEmail       = EmailTextBox.Text;
            string newUserUserType    = UserTypeTextBox.Text;
            string newUserNotes       = NotesTextBox.Text;
            string newUserStatus      = StatusTextBox.Text;

            User newUser = new User(newUserBannerId, newUserFirstName, newUserLastName, newUserPhoneNumber, newUserEmail, newUserUserType, newUserNotes, newUserStatus);

            newUser.insert();

            BannerTextBox.Clear();
            FirstNameTextBox.Clear();
            LastNameTextBox.Clear();
            PhoneNumberTextBox.Clear();
            EmailTextBox.Clear();
            UserTypeTextBox.Clear();
            NotesTextBox.Clear();
            StatusTextBox.Clear();

            NewWorkerNotificationLabel.Text = "User added to database";
        }
Esempio n. 2
0
        private void StartButton_Click(object sender, EventArgs e)
        {
            StartButton.Enabled = false;

            StatusTextBox.Clear();
            BackgroundWorker.RunWorkerAsync();
        }
Esempio n. 3
0
        /// <summary>
        /// Occurs when the user clicks the Dial button.
        /// </summary>
        /// <param name="sender">The object that raised the event.</param>
        /// <param name="e">An <see cref="System.EventArgs"/> containing event data.</param>
        private void DialButton_Click(object sender, EventArgs e)
        {
            StatusTextBox.Clear();

            // This button will be used to dial the connection.
            Dialer.EntryName     = EntryName;
            Dialer.PhoneBookPath = PHONE_BOOK_PATH;

            try
            {
                // Set the credentials the dialer should use.
                Dialer.Credentials = new NetworkCredential("Test", "User");

                // NOTE: The entry MUST be in the phone book before the connection can be dialed.
                // Begin dialing the connection; this will raise events from the dialer instance.
                handle = Dialer.DialAsync();

                // Enable the disconnect button for use later.
                DisconnectButton.Enabled = true;
            }
            catch (Exception ex)
            {
                StatusTextBox.AppendText(ex.ToString());
            }
        }
Esempio n. 4
0
        private void StartFillInLegislativeDistricts()
        {
            StartButton.Enabled       = false;
            OperationGroupBox.Enabled = false;
            ServerGroupBox.Enabled    = false;
            FillInLegislativeDistrictsPanel.Enabled = false;

            StatusTextBox.Clear();
            FillInLegislativeDistrictsBackgroundWorker.RunWorkerAsync();
        }
Esempio n. 5
0
        private void StartButton_Click(object sender, EventArgs e)
        {
            StartButton.Enabled         = false;
            BrowseCsvPathButton.Enabled = false;
            CsvPathTextBox.Enabled      = false;
            ServerGroupBox.Enabled      = false;

            StatusTextBox.Clear();
            BackgroundWorker.RunWorkerAsync();
        }
Esempio n. 6
0
 private void StartButton_Click(object sender, EventArgs e)
 {
     ServerGroupBox.Enabled          = false;
     SpreadsheetTextBox.Enabled      = false;
     OptionsFileBrowseButton.Enabled = false;
     StartButton.Enabled             = false;
     UpdateDatabaseCheckBox.Enabled  = false;
     StatusTextBox.Clear();
     BackgroundWorker.RunWorkerAsync();
 }
        private void StartButton_Click(object sender, EventArgs e)
        {
            StartButton.Enabled            = false;
            StartAtLabel.Enabled           = false;
            StartAtTextBox.Enabled         = false;
            SuppressUpdate                 = SuppressUpdateCheckBox.Checked;
            SuppressUpdateCheckBox.Enabled = false;

            StatusTextBox.Clear();
            BackgroundWorker.RunWorkerAsync();
        }
Esempio n. 8
0
        private void StartButton_Click(object sender, EventArgs e)
        {
            StartButton.Enabled    = false;
            ServerGroupBox.Enabled = false;
            StatusTextBox.Clear();

            var tableInfoList = GetTableInfo();

            SelectTables(tableInfoList);
            BackgroundWorker.RunWorkerAsync(tableInfoList);
        }
Esempio n. 9
0
        private void StartButton_Click(object sender, EventArgs e)
        {
            StartButton.Enabled = false;
            BrowseZipPlus4PathButton.Enabled = false;
            ZipPlus4PathTextBox.Enabled      = false;
            BrowseOutputFileButton.Enabled   = false;
            OutputFileTextBox.Enabled        = false;

            StatusTextBox.Clear();
            BackgroundWorker.RunWorkerAsync();
        }
Esempio n. 10
0
        private void Report()
        {
            this.Invoke(() => StatusTextBox.Clear());
            AppendStatusText("Patterns");

            foreach (string pattern in Patterns.Keys.OrderBy(pattern => pattern))
            {
                AppendStatusText(pattern);
            }

            AppendStatusText("{0} rows processed", RowsProcessed);
        }
Esempio n. 11
0
        private void StartConnectDotNet()
        {
            if (ConnectDotNetColumnDefinitionsAreValid())
            {
                StartButton.Enabled        = false;
                OperationGroupBox.Enabled  = false;
                ServerGroupBox.Enabled     = false;
                ConnectDotNetPanel.Enabled = false;

                StatusTextBox.Clear();
                ConnectDotNetBackgroundWorker.RunWorkerAsync();
            }
        }
Esempio n. 12
0
        private void postStatusButton_Click(object i_Sender, EventArgs i_EventArgs)
        {
            if (m_LoggedInUser != null)
            {
                Status postedStatus = m_LoggedInUser.PostStatus(StatusTextBox.Text);

                StatusTextBox.Clear();
                MessageBox.Show("Status Posted! " + postedStatus.Id);
            }
            else
            {
                MessageBox.Show("Your not logged in", "Error");
            }
        }
Esempio n. 13
0
        private void StartButton_Click(object sender, EventArgs e)
        {
            StartButton.Enabled            = false;
            ServerGroupBox.Enabled         = false;
            SuppressUpdate                 = SuppressUpdateCheckBox.Checked;
            SuppressUpdateCheckBox.Enabled = false;
            SkipTextBox.Enabled            = false;
            StreetCount           = 0;
            SingleZipCodesAdded   = 0;
            SingleZipCodesRemoved = 0;

            StatusTextBox.Clear();
            BackgroundWorker.RunWorkerAsync();
        }
Esempio n. 14
0
        private void postStatusButton_Click(object i_Sender, EventArgs i_EventArgs)
        {
            if (checkIfUserLoggedIn())
            {
                if (!string.IsNullOrEmpty(StatusTextBox.Text))
                {
                    Status postedStatus = m_LoggedInUser.PostStatus(StatusTextBox.Text);

                    StatusTextBox.Clear();
                    MessageBox.Show("Status Posted! " + postedStatus.Id);
                }
                else
                {
                    MessageBox.Show("Please write something in the textbox");
                }
            }
        }
Esempio n. 15
0
        private void StartButton_Click(object sender, EventArgs e)
        {
            StartButton.Enabled = false;
            BrowseZipPlus4PathButton.Enabled    = false;
            ZipPlus4PathTextBox.Enabled         = false;
            StartWithCheckBox.Enabled           = false;
            StateComboBox.Enabled               = false;
            DeleteStartingStateCheckBox.Enabled = false;
            SkipRowsLabel.Enabled               = false;
            SkipRowsTextBox.Enabled             = false;
            ServerGroupBox.Enabled              = false;
            CountRowsButton.Enabled             = false;
            CountRowsComboBox.Enabled           = false;

            StatusTextBox.Clear();
            BackgroundWorker.RunWorkerAsync();
        }
Esempio n. 16
0
        private void StartButton_Click(object sender, EventArgs e)
        {
            RepairLineBreaks      = RepairLineBreaksCheckBox.Checked;
            RepairRedundantSpaces = RepairRedundantSpacesCheckBox.Checked;
            DoUpdate = UpdateCheckBox.Checked;

            StartButton.Enabled                   = false;
            ServerGroupBox.Enabled                = false;
            RepairLineBreaksCheckBox.Enabled      = false;
            RepairRedundantSpacesCheckBox.Enabled = false;
            UpdateCheckBox.Enabled                = false;
            StatusTextBox.Clear();

            var tableInfoList = GetTableInfo();

            SelectTables(tableInfoList);
            BackgroundWorker.RunWorkerAsync(tableInfoList);
        }
Esempio n. 17
0
        private void StartButton_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(StateComboBoxText))
            {
                MessageBox.Show("Please select a state");
                return;
            }
            StartButton.Enabled            = false;
            StateComboBox.Enabled          = false;
            StartDateTimePicker.Enabled    = false;
            EndDateTimePicker.Enabled      = false;
            EditDuplicatesCheckBox.Enabled = false;
            OutputFileTextBox.Enabled      = false;
            BrowseOutputFileButton.Enabled = false;

            StatusTextBox.Clear();
            BackgroundWorker.RunWorkerAsync();
        }
Esempio n. 18
0
 private void StartButton_Click(object sender, EventArgs e)
 {
     if (Running)
     {
         StopPending = true;
     }
     else
     {
         StartButton.Text               = "Stop";
         ServerGroupBox.Enabled         = false;
         StartAtLabel.Enabled           = false;
         StartAtTextBox.Enabled         = false;
         SuppressUpdateCheckBox.Enabled = false;
         Running               = true;
         StopPending           = false;
         SuppressUpdate        = SuppressUpdateCheckBox.Checked;
         Common.SuppressUpdate = SuppressUpdate;
         StatusTextBox.Clear();
         ErrorsTextBox.Clear();
         BackgroundWorker.RunWorkerAsync();
     }
 }
        private void SubmitButton_Click(object sender, EventArgs e)
        {
            myUserToModify.SetFirstName(FirstNameTextBox.Text);
            myUserToModify.SetLastName(LastNameTextBox.Text);
            myUserToModify.SetPhoneNumber(PhoneNumberTextBox.Text);
            myUserToModify.SetEmailAddress(EmailTextBox.Text);
            myUserToModify.SetUserType(UserTypeTextBox.Text);
            myUserToModify.SetNotes(NotesTextBox.Text);
            myUserToModify.SetStatus(StatusTextBox.Text);

            myUserToModify.update();

            FirstNameTextBox.Clear();
            LastNameTextBox.Clear();
            PhoneNumberTextBox.Clear();
            EmailTextBox.Clear();
            UserTypeTextBox.Clear();
            NotesTextBox.Clear();
            StatusTextBox.Clear();

            NewWorkerNotificationLabel.Text = "User updated";
        }
Esempio n. 20
0
 public void Clear()
 {
     StatusTextBox.Clear();
 }
Esempio n. 21
0
        private void UpdateInfo()
        {
            StatusTextBox.Clear();
            StatusTextBox.Text += "Online Players : " + ResourcesManager.GetOnlinePlayers().Count;
            StatusTextBox.Text += Environment.NewLine;
            StatusTextBox.Text += "In Memory Alliances : " + ObjectManager.GetInMemoryAlliances().Count;
            StatusTextBox.Text += Environment.NewLine;
            StatusTextBox.Text += "In Memory Levels : " + ResourcesManager.GetInMemoryLevels().Count;
            StatusTextBox.Text += Environment.NewLine;
            StatusTextBox.Text += "Established Connections : " + ResourcesManager.GetConnectedClients().Count;
            PlayerListDataGrid.Rows.Clear();
            foreach (var account in ResourcesManager.GetOnlinePlayers())
            {
                //PlayersListTextBox.Text += "Player Name : " + account.GetPlayerAvatar().GetAvatarName() + ", Player ID : " + account.GetPlayerAvatar().GetId() + System.Environment.NewLine;
                int    PlayerNumAccess = account.GetAccountPrivileges();
                string PlayerAccess;
                if (PlayerNumAccess == 0)
                {
                    PlayerAccess = "Standard";
                }
                else if (PlayerNumAccess == 1)
                {
                    PlayerAccess = "Moderator";
                }
                else if (PlayerNumAccess == 2)
                {
                    PlayerAccess = "High Moderator";
                }
                else if (PlayerNumAccess == 3)
                {
                    PlayerAccess = "unused";
                }
                else if (PlayerNumAccess == 4)
                {
                    PlayerAccess = "Administrator";
                }
                else if (PlayerNumAccess == 5)
                {
                    PlayerAccess = "Server Owner";
                }
                else
                {
                    PlayerAccess = "ERROR";
                }
                ;
                var    PlayerHaveClanNum = account.GetPlayerAvatar().GetAllianceId();
                string PlayerHaveClan;
                if (PlayerHaveClanNum == 0)
                {
                    PlayerHaveClan = "Clans #0";
                }
                else
                {
                    PlayerHaveClan = "Clans #" + PlayerHaveClanNum;
                }
                ;
                string kPlayerAccStatus;
                int    PlayerAccStatusNum = account.GetAccountStatus();
                if (PlayerAccStatusNum == 0)
                {
                    kPlayerAccStatus = "Normal";
                }
                else if (PlayerAccStatusNum == 99)
                {
                    kPlayerAccStatus = "Banned";
                }
                else
                {
                    kPlayerAccStatus = "ERR0R";
                }

                PlayerListDataGrid.Rows.Add(account.GetPlayerAvatar().GetAvatarName(), account.GetPlayerAvatar().GetId(),
                                            kPlayerAccStatus, PlayerAccess, PlayerHaveClan,
                                            account.GetPlayerAvatar().GetTownHallLevel() + 1);
            }
            ;
        }
Esempio n. 22
0
 private void Button_Click_4(object sender, RoutedEventArgs e)
 {
     StatusTextBox.Clear();
 }