private void InvokeRadioButtonClicked(ITaskDialog sender, ButtonClickedArgs e)
 {
     if (RadioButtonClicked != null)
     {
         RadioButtonClicked(sender, e);
     }
 }
예제 #2
0
 public static void ShowDialog(this ITaskDialog taskDialog, string text, string caption = null)
 {
     taskDialog.ShowDialog(
         new TaskDialogPage
     {
         Caption = caption,
         Text    = text
     });
 }
예제 #3
0
        private static void InvokeExpandoButtonClicked(ITaskDialog sender, ExpandoButtonClickedArgs e)
        {
            TaskDialogEventHandler <ExpandoButtonClickedArgs> handler = ExpandoButtonClicked;

            if (handler != null)
            {
                handler(sender, e);
            }
        }
예제 #4
0
        private static void InvokeHelp(ITaskDialog sender, EventArgs e)
        {
            TaskDialogEventHandler handler = Help;

            if (handler != null)
            {
                handler(sender, e);
            }
        }
예제 #5
0
 void TaskDialog_Timer(ITaskDialog sender, TimerArgs args)
 {
     Console.WriteLine("Timer invoked. Current count: {0}ms", args.TickCount);
     if (ResetCallbackTimer)
     {
         ResetCallbackTimer = false;
         args.Reset         = true;
     }
 }
예제 #6
0
        private static void InvokeVerificationClicked(ITaskDialog sender, EventArgs e)
        {
            TaskDialogEventHandler handler = VerificationClicked;

            if (handler != null)
            {
                handler(sender, e);
            }
        }
 public RemoteDesktopConnectionService(IServiceProvider serviceProvider)
 {
     this.jobService           = serviceProvider.GetService <IJobService>();
     this.remoteDesktopService = serviceProvider.GetService <IRemoteDesktopService>();
     this.tunnelBrokerService  = serviceProvider.GetService <ITunnelBrokerService>();
     this.settingsEditor       = serviceProvider.GetService <ISettingsEditor>();
     this.credentialsService   = serviceProvider.GetService <ICredentialsService>();
     this.taskDialog           = serviceProvider.GetService <ITaskDialog>();
 }
예제 #8
0
        private static void InvokeNavigated(ITaskDialog sender, EventArgs e)
        {
            TaskDialogEventHandler handler = Navigated;

            if (handler != null)
            {
                handler(sender, e);
            }
        }
예제 #9
0
        private static void InvokeTimer(ITaskDialog sender, TimerArgs e)
        {
            TaskDialogEventHandler <TimerArgs> handler = Timer;

            if (handler != null)
            {
                handler(sender, e);
            }
        }
예제 #10
0
        private static void InvokeDialogConstructed(ITaskDialog sender, EventArgs e)
        {
            TaskDialogEventHandler handler = DialogConstructed;

            if (handler != null)
            {
                handler(sender, e);
            }
        }
예제 #11
0
        private static void InvokeHyperlinkClicked(ITaskDialog sender, HyperlinkClickedArgs e)
        {
            TaskDialogEventHandler <HyperlinkClickedArgs> handler = HyperlinkClicked;

            if (handler != null)
            {
                handler(sender, e);
            }
        }
예제 #12
0
 public static void ShowDialog(this ITaskDialog taskDialog, IntPtr ownerWindowHandle, string text,
                               string caption = null)
 {
     taskDialog.ShowDialog(ownerWindowHandle,
                           new TaskDialogPage
     {
         Caption = caption,
         Text    = text
     });
 }
예제 #13
0
 public static void ShowDialog(this ITaskDialog taskDialog, IWin32Window owner, string text,
                               string caption = null)
 {
     taskDialog.ShowDialog(owner,
                           new TaskDialogPage
     {
         Caption = caption,
         Text    = text
     });
 }
예제 #14
0
 public static void ShowDialog(this ITaskDialog taskDialog, TaskDialogIcon taskDialogIcon, IntPtr hwndOwner,
                               string text, string caption = null)
 {
     taskDialog.ShowDialog(hwndOwner,
                           new TaskDialogPage
     {
         Icon    = taskDialogIcon,
         Caption = caption,
         Text    = text
     });
 }
        private bool InvokeButtonClicked(ITaskDialog sender, ButtonClickedArgs e)
        {
            if (ButtonClicked != null)
            {
                ButtonClicked(sender, e);
            }
            if (e.PreventClosing)
            {
                return(true);
            }

            return(false);
        }
예제 #16
0
파일: Main.cs 프로젝트: Jorch72/CS-MultiMC3
        private void StartModalTask(Task task, IWindow parentWindow = null)
        {
            task.ErrorMessage += TaskErrorMessage;
            ITaskDialog taskDlg = GUIManager.Main.TaskDialog(task);

            if (!DirectLaunch)
            {
                taskDlg.Parent        = parentWindow != null ? parentWindow : MainWindow;
                taskDlg.ShowInTaskbar = false;
            }
            taskDlg.DefaultPosition = DefWindowPosition.CenterScreen;
            task.Start();
            taskDlg.Run();
        }
예제 #17
0
        public static void ConnectTask(this ITaskDialog dlg, Task task)
        {
            task.ProgressChange += (o, args) =>
                                   dlg.Invoke((o2, args2) =>
                                              dlg.TaskProgress = args.Progress);

            task.StatusChange += (o, args) =>
                                 dlg.Invoke((o2, args2) =>
                                            dlg.TaskStatus = args.Status);

            task.Completed += (o, args) =>
                              dlg.Invoke((o2, args2) =>
                                         dlg.Close());

            dlg.TaskStatus   = task.Status;
            dlg.TaskProgress = task.Progress;
        }
예제 #18
0
        void TaskDialog_ButtonClicked(ITaskDialog sender, ButtonClickedArgs args)
        {
            Console.WriteLine("Button clicked: {0}", args.Id);
            switch (args.Id)
            {
            case 2000: {
                args.PreventClosing = true;
                TaskDialogConfig config = new TaskDialogConfig();
                config.CommonButtons   = CommonButtons.Ok;
                config.WindowTitle     = "Another page";
                config.MainInstruction = "You just navigated to another page.";
                sender.NavigatePage(config);
            }
            break;

            case 2001:
                args.PreventClosing = true;
                ResetCallbackTimer  = true;
                break;
            }
        }
예제 #19
0
 private static void TaskDialogTimer(ITaskDialog sender, TimerArgs e)
 {
     InvokeTimer(sender, e);
 }
 public void Initialize(ITaskDialog view)
 {
     View = view;
 }
예제 #21
0
 public static void ShowDialog(this ITaskDialog taskDialog, TaskDialogIcon taskDialogIcon, Window owner,
                               string text, string caption = null)
 {
     taskDialog.ShowDialog(taskDialogIcon, new WindowInteropHelper(owner).Handle, text, caption);
 }
예제 #22
0
 private static void TaskDialogHyperlinkClicked(ITaskDialog sender, EventArgs e)
 {
     InvokeHyperlinkClicked(sender, e as HyperlinkClickedArgs);
 }
예제 #23
0
 static void TaskDialogCreated(ITaskDialog sender, EventArgs e)
 {
     InvokeCreated(sender, e);
 }
예제 #24
0
 private static void TaskDialogRadioButtonClicked(ITaskDialog sender, EventArgs e)
 {
     InvokeRadioButtonClicked(sender, e as ButtonClickedArgs);
 }
예제 #25
0
 private static void TaskDialogDestroyed(ITaskDialog sender, EventArgs e)
 {
     InvokeDestroyed(sender, e);
 }
예제 #26
0
 private static void TaskDialogNavigated(ITaskDialog sender, EventArgs args)
 {
     InvokeNavigated(sender, args);
 }
예제 #27
0
 private static void TaskDialogExpandoButtonClicked(ITaskDialog sender, ExpandoButtonClickedArgs e)
 {
     InvokeExpandoButtonClicked(sender, e);
 }
예제 #28
0
 private static void TaskDialogHelp(ITaskDialog sender, EventArgs e)
 {
     InvokeHelp(sender, e);
 }
예제 #29
0
 private static void TaskDialogVerificationClicked(ITaskDialog sender, EventArgs e)
 {
     InvokeVerificationClicked(sender, e);
 }
예제 #30
0
 static void TaskDialogDialogConstructed(ITaskDialog sender, EventArgs e)
 {
     InvokeDialogConstructed(sender, e);
 }