예제 #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);
     });
 }
예제 #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());
        }
예제 #3
0
        public static void OnTestCompleted(SilverlightControlTest testClass)
        {
            testClass.EnqueueTestComplete();

            RemoveMessageButton(TestHtmlButton);
        }
예제 #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);
     });
 }
예제 #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());
        }
예제 #6
0
        public static void OnTestCompleted(SilverlightControlTest testClass)
        {
           
            testClass.EnqueueTestComplete();
          
            RemoveMessageButton(TestHtmlButton);

           
        }