Пример #1
0
 void PackageSourcesTreeViewRowActivated(object o, RowActivatedArgs args)
 {
     viewModel.IsEditingSelectedPackageSource = true;
     using (var dialog = new AddPackageSourceDialog(viewModel)) {
         dialog.ShowWithParent();
         UpdateEnabledButtons();
     }
 }
Пример #2
0
        Xwt.Command ShowDialogWithParent(AddPackageSourceDialog dialog)
        {
            Xwt.WindowFrame parent = Xwt.Toolkit.CurrentEngine.WrapWindow(Toplevel);
            Xwt.Command     result = dialog.Run(parent);

            // Ensure dialog has focus after browsing for a folder.
            IdeServices.DesktopService.FocusWindow(parent);

            return(result);
        }
Пример #3
0
 void AddButtonClicked(object sender, EventArgs e)
 {
     viewModel.IsEditingSelectedPackageSource = false;
     using (var dialog = new AddPackageSourceDialog(viewModel)) {
         if (dialog.ShowWithParent() == Xwt.Command.Ok)
         {
             UpdateSelectedPackageSource();
         }
         UpdateEnabledButtons();
     }
 }
		void PackageSourcesTreeViewRowActivated (object o, RowActivatedArgs args)
		{
			viewModel.IsEditingSelectedPackageSource = true;
			using (var dialog = new AddPackageSourceDialog (viewModel)) {
				ShowDialogWithParent (dialog);
				UpdateEnabledButtons ();
			}
		}
		Xwt.Command ShowDialogWithParent (AddPackageSourceDialog dialog)
		{
			Xwt.WindowFrame parent = Xwt.Toolkit.CurrentEngine.WrapWindow (Toplevel);
			return dialog.Run (parent);
		}
		void AddButtonClicked (object sender, EventArgs e)
		{
			viewModel.IsEditingSelectedPackageSource = false;
			using (var dialog = new AddPackageSourceDialog (viewModel)) {
				if (ShowDialogWithParent (dialog) == Xwt.Command.Ok) {
					UpdateSelectedPackageSource ();
				}
				UpdateEnabledButtons ();
			}
		}
 Xwt.Command ShowDialogWithParent(AddPackageSourceDialog dialog)
 {
     Xwt.WindowFrame parent = Xwt.Toolkit.CurrentEngine.WrapWindow(Toplevel);
     return(dialog.Run(parent));
 }