private async void btnChangeIPAirplane_Click(object sender, EventArgs e) { try { await RequestController.AppExecution(comboBoxSelectHostname.Text, APIController.APMode, ""); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Exception Error", MessageBoxButtons.OK, MessageBoxIcon.Question); } }
private async void btnHelperBackup_Click(object sender, EventArgs e) { try { await RequestController.AppExecution(comboBoxSelectHostname.Text, APIController.BackupApp, comboBoxHelperAppList.Text); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Exception Error", MessageBoxButtons.OK, MessageBoxIcon.Question); } }
private async void btnApplyProxy_Click(object sender, EventArgs e) { try { if (toggleSwitch1.IsOn) { string[] proxy = comboBoxEditProxyPort.Text.Split(':'); if (proxy.Count() == 0) { throw new Exception("Please select Proxy"); } await RequestController.AppExecution(comboBoxSelectHostname.Text, "", proxy[0], proxy[1], "1"); } else { await RequestController.AppExecution(comboBoxSelectHostname.Text, "", "192.168.1.1", "42345", "0"); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }