Exemplo n.º 1
0
        private void MenuItem_Click_1(object sender, RoutedEventArgs e)
        {
            AboutView     view   = new AboutView();
            ContentWindow window = ContentWindow.Create(view);

            window.Title = "About Judge Sharp";
            window.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            window.ShowDialog();
        }
Exemplo n.º 2
0
        public static void Show(TestCaseViewModel tc)
        {
            EditTestCaseView tce    = new EditTestCaseView(tc);
            ContentWindow    window = ContentWindow.Create(tce, 700, 500);

            window.Title            = "Edit Test Case";
            tce.CancelButton.Click += delegate { window.Close(); };
            tce.OKButton.Click     += delegate { tce.OKButton_Click(); window.Close(); };
            window.ShowDialog();
        }
Exemplo n.º 3
0
        public static string Show(string lable, string title)
        {
            InputBoxView  view   = new InputBoxView();
            ContentWindow window = ContentWindow.Create(view, 400, 150, false, false, false);

            window.Title             = title;
            view.HeaderText.Text     = lable;
            view.OKButton.Click     += delegate { window.DialogResult = true; window.Close(); };
            view.CancelButton.Click += delegate { window.DialogResult = false; };
            window.ShowDialog();
            if (window.DialogResult.HasValue && window.DialogResult.Value)
            {
                return(view.ContentTextBox.Text);
            }
            else
            {
                return(null);
            }
        }