Esempio n. 1
0
        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();
        }
Esempio n. 2
0
 public void Simple_Test()
 {
     DXSplashScreen.Show <SplashScreenTestWindow>();
     Assert.IsNotNull(DXSplashScreen.SplashContainer.InternalThread);
     Assert.IsNotNull(DXSplashScreen.SplashContainer.SplashScreen);
     SplashScreenTestWindow.DoEvents();
     Assert.IsNotNull(SplashScreenTestWindow.Instance, "SplashScreenTestWindow.Instance == null");
     Assert.IsNotNull(SplashScreenTestWindow.Instance.WindowContent, "SplashScreenTestWindow.Instance == null");
     Assert.IsTrue(SplashScreenTestWindow.Instance.WindowContent.IsVisible);
     Assert.AreEqual(double.NaN, SplashScreenTestWindow.Instance.Progress);
     Assert.IsTrue(SplashScreenTestWindow.Instance.IsIndeterminate);
     CloseDXSplashScreen();
     Assert.IsNull(DXSplashScreen.SplashContainer.InternalThread);
     Assert.IsNull(DXSplashScreen.SplashContainer.SplashScreen);
 }
Esempio n. 3
0
 public void TestQ338517_1()
 {
     DXSplashScreen.Show <SplashScreenTestWindow>();
     Assert.IsNotNull(DXSplashScreen.SplashContainer.InternalThread);
     Assert.IsNotNull(DXSplashScreen.SplashContainer.SplashScreen);
     SplashScreenTestWindow.DoEvents();
     Assert.IsTrue(SplashScreenTestWindow.Instance.WindowContent.IsVisible);
     Assert.AreEqual(double.NaN, SplashScreenTestWindow.Instance.Progress);
     Assert.IsTrue(SplashScreenTestWindow.Instance.IsIndeterminate);
     DXSplashScreen.CallSplashScreenMethod <SplashScreenTestWindow>(x => x.Text("Test"));
     SplashScreenTestWindow.DoEvents();
     Assert.AreEqual("Test", ((SplashScreenTestWindow)SplashScreenTestWindow.Instance).TextProp);
     CloseDXSplashScreen();
     Assert.IsNull(DXSplashScreen.SplashContainer.InternalThread);
     Assert.IsNull(DXSplashScreen.SplashContainer.SplashScreen);
 }
Esempio n. 4
0
 public void Complex_Test()
 {
     DXSplashScreen.Show <SplashScreenTestWindow>();
     Assert.IsNotNull(DXSplashScreen.SplashContainer.InternalThread);
     Assert.IsNotNull(DXSplashScreen.SplashContainer.SplashScreen);
     Assert.IsTrue(SplashScreenTestWindow.Instance.IsIndeterminate);
     DXSplashScreen.Progress(0);
     SplashScreenTestWindow.DoEvents();
     Assert.IsFalse(SplashScreenTestWindow.Instance.IsIndeterminate);
     for (int i = 1; i < 10; i++)
     {
         DXSplashScreen.Progress(i);
         SplashScreenTestWindow.DoEvents();
         Assert.AreEqual(i, SplashScreenTestWindow.Instance.Progress);
     }
     CloseDXSplashScreen();
     Assert.IsNull(DXSplashScreen.SplashContainer.InternalThread);
     Assert.IsNull(DXSplashScreen.SplashContainer.SplashScreen);
 }
Esempio n. 5
0
 public void ShowWindowISplashScreen_Test()
 {
     DXSplashScreen.Show <SplashScreenTestWindow>();
     SplashScreenTestWindow.DoEvents();
     Assert.IsTrue(SplashScreenTestWindow.Instance.IsIndeterminate);
     Assert.AreEqual(double.NaN, SplashScreenTestWindow.Instance.Progress);
     DXSplashScreen.Progress(100);
     SplashScreenTestWindow.DoEvents();
     Assert.IsFalse(SplashScreenTestWindow.Instance.IsIndeterminate);
     Assert.AreEqual(100, SplashScreenTestWindow.Instance.Progress);
     DXSplashScreen.Progress(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");
     SplashScreenTestWindow.DoEvents();
 }