コード例 #1
0
 public Add(MainWindow mainWindow)
 {
     _mainWindow = mainWindow;
     InitializeComponent();
 }
コード例 #2
0
        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();
        }