Exemple #1
0
        void IView.SetViewModel(IViewModel viewModel)
        {
            var updateDialog = Updaters.Create(
                () => viewModel.DialogData,
                dd => {
                if ((dd != null) != (dialog != null))
                {
                    if (dialog != null)
                    {
                        dialog.Close();
                        dialog = null;
                    }
                    else
                    {
                        synchronizationContext.Post(() => {
                            if (viewModel.DialogData != null)
                            {
                                FilesSelectionDialogController.Execute(viewModel, reactive, out dialog);
                            }
                        });
                    }
                }
                else if (dialog != null && dd != null)
                {
                    dialog.Update(dd);
                }
            }
                );

            viewModel.ChangeNotification.CreateSubscription(updateDialog);
        }
Exemple #2
0
 public static void Execute(IViewModel viewModel, Mac.IReactive reactive, out FilesSelectionDialogController dialog)
 {
     dialog = new FilesSelectionDialogController(viewModel, reactive);
     dialog.Update(viewModel.DialogData);
     NSApplication.SharedApplication.RunModalForWindow(dialog.Window);
 }
		public static bool[] Execute(string prompt, string[] choises)
		{
			var dialog = new FilesSelectionDialogController (prompt);
			return dialog.ExecuteInternal(choises);
		}
 bool[] Preprocessing.IPreprocessingUserRequests.SelectItems(string prompt, string[] items)
 {
     return(FilesSelectionDialogController.Execute(prompt, items));
 }