Ejemplo 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);
     });
 }
Ejemplo 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());
        }
Ejemplo n.º 3
0
        public static void OnTestCompleted(SilverlightControlTest testClass)
        {
            testClass.EnqueueTestComplete();

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

           
        }