Exemplo n.º 1
0
        private void AddNewTaskBtn_Click(object sender, RoutedEventArgs e)
        {
            CardEditWindow cardEditWindow = new CardEditWindow();

            cardEditWindow.Owner = this;
            cardEditWindow.ShowDialog();
        }
Exemplo n.º 2
0
        private void DrugBtn_Click(object sender, RoutedEventArgs e)
        {
            UIElement _element = this;

            while (!(_element is MainWindow))
            {
                _element = (UIElement)VisualTreeHelper.GetParent(_element);
            }
            //MessageBox.Show(_element.ToString());
            //(_element as MainWindow).ReadFromDb();
            CardEditWindow cardEditWindow = new CardEditWindow((int)(sender as Button).Tag);

            cardEditWindow.Owner = (_element as MainWindow);
            cardEditWindow.Show();
            // cardEditWindow.ShowDialog();
        }