Beispiel #1
0
 private void Settings_Load(object sender, EventArgs e)
 {
     saveData = (SaveData)StructMethods.LoadData();
     SqlMethods.writeToPointsLog("has opened the Settings.");
     textBox_SessionLimit.Text     = saveData.sessionLimit.ToString();
     textBox_numCoins.Text         = CoinMethods.getCoins(Environment.UserName).ToString();
     textBox_requiredCoins.Text    = saveData.numCoinsRequired.ToString();
     textBox_tempSessionLimit.Text = ProgramData.tempSessionLimit.ToString();
     loadExesFromSQL();
 }
Beispiel #2
0
 private void button_Apply_Click(object sender, EventArgs e)
 {
     Int32.TryParse(textBox_SessionLimit.Text, out saveData.sessionLimit);
     Int32.TryParse(textBox_numCoins.Text, out int temp);
     Int32.TryParse(textBox_requiredCoins.Text, out saveData.numCoinsRequired);
     CoinMethods.setCoins(Environment.UserName, temp);
     StructMethods.SaveData(saveData);
     Int32.TryParse(textBox_tempSessionLimit.Text, out ProgramData.tempSessionLimit);
     saveExesToSQL();
     Close();
 }
Beispiel #3
0
 private void button_newPIN_Save_Click(object sender, EventArgs e)
 {
     if (maskedTextBox_newPIN.Text == maskedTextBox_newPIN_Confirmation.Text)
     {
         saveData.passCode = maskedTextBox_newPIN.Text;
         StructMethods.SaveData(saveData);
         MessageBox.Show("New passcode has been saved!");
         maskedTextBox_newPIN.Text = "";
         maskedTextBox_newPIN_Confirmation.Text = "";
     }
     else
     {
         MessageBox.Show("Passcodes did not match, unable to save new passcode.");
     }
 }