示例#1
0
        /// <summary>
        /// Save options and close form
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnOk_Click(object sender, EventArgs e)
        {
            //Update credentials with form control values and save to file
            _apiCredentials.Username = txtSparkUsername.Text.Trim();
            _apiCredentials.Password = txtSparkPassword.Text.Trim();
            _apiCredentials.SaveToFile();

            //Close form
            Close();
        }