public Add(MainWindow mainWindow) { _mainWindow = mainWindow; InitializeComponent(); }
internal static void UpdateCounter(Medicine medicine, MainWindow mainWindow) { var textBlockCounter = (TextBlock)mainWindow.DrugsGrid.FindName($"count_{medicine.Code}"); int count; if (textBlockCounter == null || !int.TryParse(textBlockCounter.Text, out count)) { return; } count += 1; textBlockCounter.Text = count.ToString(); }