private void WindowLoaded(object sender, RoutedEventArgs e) { GridLoad("m", ClassGridGroup.GridCurrencyPathGetPath(TypesPay)); foreach (var bs in ClassEtcFun.FindVisualChildren <Button>(this)) { bs.Click += ButtonClick; } var owner = Owner as MainWindow; if (owner != null) { var cc = RepositoryCurrencyRelations.Transform(FunctionsService.GetMoney((this.Owner as MainWindow).qty_label), this.TypesPay); foreach (var h in cc) { FunctionsService.AddCurrency(h.Currency, h.Count, this); } owner.qty_label.Text = "__"; } }