Example #1
0
        private void removeLink_Click(object sender, EventArgs e)
        {
            DialogResult result = MetroMessageBox.Show(this, string.Empty, GlobalMessages.DeleteHost
                                                       , MessageBoxButtons.YesNo, MessageBoxIcon.Information, 80);

            if (result == DialogResult.Yes)
            {
                int indexToDelete = this.dataGrid.CurrentCell.RowIndex;
                this.user.Data.RemoveAt(indexToDelete);
                DataTranslator.Compose(this.user.Data, this.user.Username, user.Key);
            }
        }
Example #2
0
        private void addButton_Click(object sender, EventArgs e)
        {
            UserDataInfo dataInfo = new UserDataInfo(this.hostTextBox.Text
                                                     , this.emailTextBox.Text, this.usernameTextBox.Text, this.passwordTextBox.Text);

            this.User.AddData(dataInfo);
            DataTranslator.Compose(this.User.Data, this.User.Username, this.User.Key);

            this.hostTextBox.Clear();
            this.emailTextBox.Clear();
            this.usernameTextBox.Clear();
            this.passwordTextBox.Clear();
        }
Example #3
0
        private void doneButton_Click(object sender, EventArgs e)
        {
            this.User.RemoveData(selectedRowIndex);
            UserDataInfo dataInfo = new UserDataInfo(this.hostNameTextBox.Text
                                                     , this.emailTextBox.Text, this.usernameTextBox.Text, this.passwordTextBox.Text);

            this.User.InsertData(selectedRowIndex, dataInfo);

            DataTranslator.Compose(this.User.Data, this.User.Username, this.User.Key);

            this.dataGrid.Enabled = true;
            this.Swipe(false);
        }
Example #4
0
 private void zaSort_Click(object sender, EventArgs e)
 {
     this.user.SortData(1);
     this.dataGrid.Refresh();
     DataTranslator.Compose(this.user.Data, this.user.Username, this.user.Key);
 }