Advertisement
Guest User

Untitled

a guest
Dec 16th, 2012
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. // TODO: Create methods containing your application logic.
  2. [EnableClientAccess()]
  3. public class DomainService1 : DomainService
  4. {
  5.  
  6. LicensedClass validation = new LicensedClass();
  7.  
  8. [Invoke]
  9. public string licenseValidation()
  10. {
  11.  
  12.  
  13. return validation.Validation();
  14.  
  15. }
  16.  
  17.  
  18. [Invoke]
  19. public string licenseInformation()
  20. {
  21.  
  22. return validation.LicFile();
  23.  
  24.  
  25. }
  26.  
  27. }
  28.  
  29. public partial class MainPage : UserControl
  30. {
  31. DomainService1 domain = new DomainService1();
  32. public MainPage()
  33. {
  34. InitializeComponent();
  35. }
  36. public void CheckText() {
  37. InvokeOperation<string> operation3 = domain.licenseInformation();
  38. operation3.Completed += (x, y) =>
  39. {
  40. if (!operation3.HasError)
  41. { textBox2.Text = operation3.Value; }
  42. else { textBox1.Text = "error"; }
  43.  
  44.  
  45. };
  46.  
  47.  
  48.  
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement