Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 16th, 2012  |  syntax: None  |  size: 0.86 KB  |  views: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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.     }