Advertisement
Guest User

Aardvark Silverlight app under test - C#

a guest
Apr 18th, 2015
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.97 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Net;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Documents;
  8. using System.Windows.Input;
  9. using System.Windows.Media;
  10. using System.Windows.Media.Animation;
  11. using System.Windows.Shapes;
  12. using Microsoft.VisualStudio.TestTools.UITest.Extension.SilverlightUIAutomationHelper;
  13.  
  14. namespace SmallSL01
  15. {
  16.     public partial class MainPage : UserControl
  17.     {
  18.         public MainPage()
  19.         {
  20.             InitializeComponent();
  21.         }
  22.  
  23.         private void Button_Click(object sender, RoutedEventArgs e)
  24.         {
  25.             DoAddition(Calc1, Calc2);
  26.  
  27.         }
  28.  
  29.         private void DoAddition(TextBox tb1, TextBox tb2)
  30.         {
  31.             int temp1, temp2;
  32.             System.Int32.TryParse(tb1.Text, out temp1);
  33.             System.Int32.TryParse(tb2.Text, out temp2);
  34.  
  35.             TheAnswer.Text = (temp1 + temp2).ToString();
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement