async Task sendTech() { Analytics.TrackEvent("Запрос кода для тех.поддержки"); TechSupportAppealArguments arguments = new TechSupportAppealArguments(); arguments.OS = Device.RuntimePlatform; arguments.Phone = Settings.Person.Phone; arguments.Text = "Заявка из МП для мессенджеров"; arguments.Mail = "*****@*****.**"; arguments.AppVersion = Xamarin.Essentials.AppInfo.VersionString; arguments.Info = GetIdent(); arguments.Address = GetAdres(); arguments.Login = Settings.Person.Login; TechId result = await server.TechSupportAppeal(arguments); if (result.Error == null) { number = result.requestId.ToString(); Analytics.TrackEvent("Получили код: " + number); BindingContext = this; } number = "-1"; launched = true; }
public override int GetHashCode() { unchecked { var hashCode = EnergyCost; hashCode = (hashCode * 397) ^ PlayerIndex; hashCode = (hashCode * 397) ^ ProvidedByScenario.GetHashCode(); hashCode = (hashCode * 397) ^ ResearcherInstanceId; hashCode = (hashCode * 397) ^ SupplyCost; hashCode = (hashCode * 397) ^ (TechId?.GetHashCode() ?? 0); return(hashCode); } }
private void btnDodaj_Click(object sender, EventArgs e) { if (!valid()) { return; } TechId tehId = (TechId)cbTehno.SelectedItem; Preduvjet pred = new Preduvjet(tehId.kod, Formula.IzStringa(txtNivo.Text), false); preduvjeti.Add(pred); ListViewItem item = new ListViewItem(tehId.naziv); item.SubItems.Add(pred.nivo.ToString()); lstvPreduvjeti.Items.Add(item); }
private void lstvPreduvjeti_ItemActivate(object sender, EventArgs e) { if (lstvPreduvjeti.SelectedItems.Count == 0) { return; } int predI = lstvPreduvjeti.SelectedIndices[0]; string kod = preduvjeti[predI].kod; for (int i = 0; i < cbTehno.Items.Count; i++) { TechId techId = (TechId)cbTehno.Items[i]; if (techId.kod == kod) { cbTehno.SelectedIndex = i; break; } } txtNivo.Text = preduvjeti[predI].nivo.ToString(); }
async Task SendTech() { string phone = EntryPhone.Text .Replace("+", "") .Replace(" ", "") .Replace("(", "") .Replace(")", "") .Replace("-", ""); ; string email = EntryEmail.Text; string text = EntryText.Text; TechSupportAppealArguments arguments = new TechSupportAppealArguments(); arguments.OS = Device.RuntimePlatform; arguments.Phone = phone; arguments.Text = text; arguments.Mail = email; arguments.AppVersion = Xamarin.Essentials.AppInfo.VersionString; arguments.Info = GetIdent(); arguments.Address = GetAdres(); arguments.Login = Settings.Person.Login; TechId result = await server.TechSupportAppeal(arguments); if (result.Error == null) { await DisplayAlert(AppResources.AlertSuccess, AppResources.TechSendSuccess, "OK"); ClosePage(); } else { await DisplayAlert(AppResources.ErrorTitle, result.Error, "OK"); } }