Esempio n. 1
0
 public static void AddMessageButton(SilverlightControlTest testClass, String content)
 {
     testClass.EnqueueCallback(() =>
     {
         TestHtmlButton = Common.GetDisplayMessageButton(TestHtmlButton);
         TestHtmlButton.SetStyleAttribute("width", "900px");
         TestHtmlButton.SetProperty("value", content);
         TestHtmlButton.AttachEvent("onclick", delegate(object obj, HtmlEventArgs args) { OnTestCompleted(testClass); });
         System.Windows.Browser.HtmlPage.Document.Body.AppendChild(TestHtmlButton);
     });
 }
Esempio n. 2
0
        public static void EnableAutoTimerCallBack(SilverlightControlTest testClass, TimeSpan interval, TimeSpan duration, params Action[] actions)
        {
            TestingTimer.Interval = interval;
            TestingTimer.Duration = duration;

            TestingTimer.Tick += delegate
            {
                testClass.EnqueueCallback(actions);
            };

            TestingTimer.OnStop += delegate
            {
                OnTestCompleted(testClass);
            };

            testClass.EnqueueCallback(() => TestingTimer.Start());
        }
Esempio n. 3
0
        public static void OnTestCompleted(SilverlightControlTest testClass)
        {
            testClass.EnqueueTestComplete();

            RemoveMessageButton(TestHtmlButton);
        }
Esempio n. 4
0
 public static void AddMessageButton(SilverlightControlTest testClass, String content)
 {
     testClass.EnqueueCallback(() =>
     {   
         TestHtmlButton = Common.GetDisplayMessageButton(TestHtmlButton);
         TestHtmlButton.SetStyleAttribute("width", "900px");
         TestHtmlButton.SetProperty("value", content);
         TestHtmlButton.AttachEvent("onclick", delegate(object obj, HtmlEventArgs args) { OnTestCompleted(testClass); });
         System.Windows.Browser.HtmlPage.Document.Body.AppendChild(TestHtmlButton);
     });
 }
Esempio n. 5
0
        public static void EnableAutoTimerCallBack(SilverlightControlTest testClass, TimeSpan interval, TimeSpan duration, params Action[] actions)
        {
            TestingTimer.Interval = interval;
            TestingTimer.Duration = duration;

            TestingTimer.Tick += delegate
            {
                testClass.EnqueueCallback(actions);
            };

            TestingTimer.OnStop += delegate
            {   
                OnTestCompleted(testClass);
            };

            testClass.EnqueueCallback(() => TestingTimer.Start());
        }
Esempio n. 6
0
        public static void OnTestCompleted(SilverlightControlTest testClass)
        {
           
            testClass.EnqueueTestComplete();
          
            RemoveMessageButton(TestHtmlButton);

           
        }