Exemplo n.º 1
0
        private void setInfo(SmsSettings setting)
        {
            if (setting == null)
            {
                Methods.ShowStandardMsgBox(FormMessageType.Error,"خطا", "برنامه قادر به برقراری ارتباط با سرور پیامک نمی باشد.");

            }
            else if (setting.SmsErrorType == SmsErrorType.NoError)
            {
                btnSend.Enabled = true;
                lblAccount.Text = string.Format("{0:0,0}", setting.Credit);
                farsiMaxChar = setting.PersianMaxLength;
                englishMaxChar = setting.EnglishMaxLength;
            }
            else if (setting.SmsErrorType == SmsErrorType.AuthenticationFailed)
            {
                Methods.ShowStandardMsgBox(FormMessageType.Error, "خطا", "اطلاعات وارد شده در تنظیمات پیامک صحیح نمی باشد");
            }else if(setting.SmsErrorType == SmsErrorType.Others){
                Methods.ShowStandardMsgBox(FormMessageType.Error, "خطا", "خطای نامشخص هنگام دریافت اطلاعات کاربر از سرور پیامک");
            }
        }
Exemplo n.º 2
0
 private void OnGetSettingsComplete(System.Exception error, SmsSettings result)
 {
     _getSettingsCompeleted = true;
     if (GetSettingsCompleted != null)
     {
         GetSettingsCompletedEventArgs e = new GetSettingsCompletedEventArgs(error) { Result = result };
         GetSettingsCompleted(this, e);
     }
 }