Esempio n. 1
0
 private void btSave_Click(object sender, EventArgs e)
 {
     if (cbSelectLocation.Text.Length < 5)
     {
         MessageBox.Show("Please select location");
     }
     else
     {
         foreach (Location mL in locations)
         {
             if (cbSelectLocation.Text == mL.loc_name)
             {
                 statUser.id_loc          = mL.id;
                 statUser                 = apiStatWrapper.UpdateUser(statUser);
                 statUser.autohide_enable = settingAutoHideED.SelectedIndex;
                 int tempInt = 0;
                 if (int.TryParse(settingAutoHideTimeout.Text, out tempInt))
                 {
                     statUser.autohide_timeout = tempInt;
                 }
                 else
                 {
                     statUser.autohide_timeout = 120;
                 }
                 location     = mL.loc_name;
                 statUser     = apiStatWrapper.UpdateUser(statUser);
                 DialogResult = DialogResult.OK;
                 this.Close();
             }
         }
     }
 }
Esempio n. 2
0
 public StatUser ApiUpdateUser(StatUser statUser) => apiStatsWrapper.UpdateUser(statUser);