async private void Window_Loaded(object sender, RoutedEventArgs e) { //mainGrid.UpdateLayout(); //RenderTargetBitmap image = new RenderTargetBitmap((int)mainGrid.ActualWidth + 4, (int)mainGrid.ActualHeight + 4, 120, 96, PixelFormats.Pbgra32); //image.Render(mainGrid); //Clipboard.SetImage(image); try { mainUser = user1; await mainUser.GetSessioncounter(); if (mainUser.SessionCounter == "update") { statusTB.Foreground = Brushes.Red; statusTB.Text = "There is an update\nPlease Restart"; int ver = int.Parse(ItelVer); ver += 10; File.WriteAllLines(verPath, new string[] { ver.ToString(), ExtraPrice.ToString() }); return; } else if (mainUser.SessionCounter == null) { statusTB.Foreground = Brushes.Red; statusTB.Text = "**Error**\nApp in maintenance"; return; } else if (mainUser.SessionCounter == "error") { statusTB.Foreground = Brushes.Red; statusTB.Text = "Can't open program"; return; } await GetBalance(); BTNdetail.IsEnabled = true; buttonOldCards.IsEnabled = true; } catch (WebException ex) { statusTB.Foreground = Brushes.Red; statusTB.Text = "No Internet"; } catch (Exception ex) { statusTB.Foreground = Brushes.Red; statusTB.Text = ex.Message; } }
//CardDetail cardDetailFull; //DateTime extractDate; public WindowTransactions(ItelUser u1, ItelUser u2) { InitializeComponent(); detail1 = new BalanceDetail(u1); detail2 = new BalanceDetail(u2); }
public BalanceDetail(ItelUser u) { User = u; }