Example #1
0
 public override void Request()
 {
     //If the client token exists, use it, otherwise wait for client token before making request
     if (ApplicationSettings.Instance.get("ClientToken") == null)
     {
         RequestClientToken request = new RequestClientToken();
         request.RequestSucceeded += new EventHandler(onRequestSucceeded);
         request.Request();
     }
     else
     {
         onClientTokenReady();
     }
 }
 public override void Request()
 {
     //If the client token exists, use it, otherwise wait for client token before making request
     if (ApplicationSettings.Instance.get("ClientToken") == null)
     {
         RequestClientToken request = new RequestClientToken();
         request.RequestSucceeded += new EventHandler(onRequestSucceeded);
         request.Request();
     }
     else
     {
         onClientTokenReady();
     }
     
 }
        void DoSubmitContactForm(object state)
        {
            if (ValidateContactForm())
            {
                if (notifySendTextCheckbox.Checked)
                {
                    UserSettings.Instance.set("AfterPrintFinishedSendTextMessage", "true");
                    UserSettings.Instance.set("NotificationPhoneNumber", phoneNumberInput.Text);
                }
                else
                {
                    UserSettings.Instance.set("AfterPrintFinishedSendTextMessage", "false");
                }

                if (notifySendEmailCheckbox.Checked)
                {
                    UserSettings.Instance.set("AfterPrintFinishedSendEmail", "true");
                    UserSettings.Instance.set("NotificationEmailAddress", emailAddressInput.Text);
                }
                else
                {
                    UserSettings.Instance.set("AfterPrintFinishedSendEmail", "false");
                }

                if (notifyPlaySoundCheckbox.Checked)
                {
                    UserSettings.Instance.set("AfterPrintFinishedPlaySound", "true");
                }
                else
                {
                    UserSettings.Instance.set("AfterPrintFinishedPlaySound", "false");
                }

                if (ApplicationSettings.Instance.get("ClientToken") == null)
                {
                    RequestClientToken request = new RequestClientToken();
                    //request.RequestSucceeded += new EventHandler(onClientTokenRequestSucceeded);
                    request.Request();
                }

                Close();              
            }
        }