Esempio n. 1
0
        private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
        {
            stageViewForm?.Dispose();
            stageViewForm = null;

            Properties.Settings.Default.Save();
        }
Esempio n. 2
0
        private void CloseStageView()
        {
            if (stageViewForm != null)
            {
                stageViewForm.NotifyClose();
                stageViewForm = null;

                //stageViewForm.Close();
                //stageViewForm.Dispose();
                //stageViewForm = null;
            }
        }
Esempio n. 3
0
        private void RefreshStageView()
        {
            CloseStageView();
            if (Application.SlideShowWindows.Count > 0 && Properties.Settings.Default.ShowStageView)
            {
                stageViewThread = new Thread(() =>
                {
                    stageViewForm = new StageViewForm(null);
                    stageViewForm.SlideShowWindow = Application.SlideShowWindows[1];
                    System.Windows.Forms.Application.Run(stageViewForm);
                    //var form = new Form1();
                    //System.Windows.Forms.Application.Run(form);
                });
                stageViewThread.Start();

                ////Showing a winform at this point causes Escape and Enter in the presenter view to have very strange behavior, so we delay the Show call.
                //Task.Run(async delegate
                //{
                //    await Task.Delay(200);
                //    stageViewForm.Show();
                //});
            }
        }