public void UseIndependentWindow_Test07() {
     ISplashScreenService service = new DXSplashScreenService() {
         ViewTemplate = SplashScreenTestsHelper.CreateDefaultTemplate(),
         UseIndependentWindow = true
     };
     service.ShowSplashScreen();
     SplashScreenTestUserControl.DoEvents();
     Assert.AreEqual(0, SplashScreenTestUserControl.ViewModel.Progress);
     Assert.AreEqual(100, SplashScreenTestUserControl.ViewModel.MaxProgress);
     Assert.AreEqual("Loading...", SplashScreenTestUserControl.ViewModel.State);
     Assert.AreEqual(true, SplashScreenTestUserControl.ViewModel.IsIndeterminate);
     DXSplashScreen.Progress(50);
     DXSplashScreen.SetState("Test");
     SplashScreenTestUserControl.DoEvents();
     Assert.AreEqual(0, SplashScreenTestUserControl.ViewModel.Progress);
     Assert.AreEqual(100, SplashScreenTestUserControl.ViewModel.MaxProgress);
     Assert.AreEqual("Loading...", SplashScreenTestUserControl.ViewModel.State);
     Assert.AreEqual(true, SplashScreenTestUserControl.ViewModel.IsIndeterminate);
     service.SetSplashScreenProgress(50, 100);
     service.SetSplashScreenState("Test");
     SplashScreenTestUserControl.DoEvents();
     Assert.AreEqual(50, SplashScreenTestUserControl.ViewModel.Progress);
     Assert.AreEqual(100, SplashScreenTestUserControl.ViewModel.MaxProgress);
     Assert.AreEqual("Test", SplashScreenTestUserControl.ViewModel.State);
     Assert.AreEqual(false, SplashScreenTestUserControl.ViewModel.IsIndeterminate);
 }
        public void ShowWindowISplashScreen() {
            ISplashScreenService service = new DXSplashScreenService() {
                SplashScreenType = typeof(SplashScreenTestWindow),
            };

            service.ShowSplashScreen();
            SplashScreenTestWindow.DoEvents();
            Assert.IsTrue(SplashScreenTestWindow.Instance.IsIndeterminate);
            Assert.AreEqual(double.NaN, SplashScreenTestWindow.Instance.Progress);
            service.SetSplashScreenProgress(100, 100);
            SplashScreenTestWindow.DoEvents();
            Assert.IsFalse(SplashScreenTestWindow.Instance.IsIndeterminate);
            Assert.AreEqual(100, SplashScreenTestWindow.Instance.Progress);
            service.SetSplashScreenProgress(100, 200);
            SplashScreenTestWindow.DoEvents();
            Assert.IsFalse(SplashScreenTestWindow.Instance.IsIndeterminate);
            Assert.AreEqual(100, SplashScreenTestWindow.Instance.Progress);
            DXSplashScreen.CallSplashScreenMethod<SplashScreenTestWindow>(x => x.Text("test"));
            SplashScreenTestWindow.DoEvents();
            Assert.IsFalse(SplashScreenTestWindow.Instance.IsIndeterminate);
            Assert.AreEqual(100, SplashScreenTestWindow.Instance.Progress);
            Assert.AreEqual("test", ((SplashScreenTestWindow)SplashScreenTestWindow.Instance).TextProp);
            DXSplashScreen.SetState("test");
            service.SetSplashScreenState("test");
            SplashScreenTestWindow.DoEvents();
            service.HideSplashScreen();
        }
        public void UseIndependentWindow_Test06() {
            ISplashScreenService service = new DXSplashScreenService() {
                SplashScreenType = typeof(SplashScreenTestWindow),
                UseIndependentWindow = true
            };

            service.ShowSplashScreen();
            SplashScreenTestWindow.DoEvents();
            Assert.IsTrue(SplashScreenTestWindow.Instance.IsIndeterminate);
            Assert.AreEqual(double.NaN, SplashScreenTestWindow.Instance.Progress);
            service.SetSplashScreenProgress(100, 100);
            SplashScreenTestWindow.DoEvents();
            Assert.IsFalse(SplashScreenTestWindow.Instance.IsIndeterminate);
            Assert.AreEqual(100, SplashScreenTestWindow.Instance.Progress);
            service.SetSplashScreenProgress(100, 200);
            SplashScreenTestWindow.DoEvents();
            Assert.IsFalse(SplashScreenTestWindow.Instance.IsIndeterminate);
            Assert.AreEqual(100, SplashScreenTestWindow.Instance.Progress);
            AssertHelper.AssertThrows<InvalidOperationException>(() => DXSplashScreen.Progress(10, 20));
            SplashScreenTestWindow.DoEvents();
            Assert.AreEqual(100, SplashScreenTestWindow.Instance.Progress);
            SplashScreenTestsHelper.CloseSplashScreenService(service);
        }