Esempio n. 1
0
 /// <summary>
 /// 检查代理是否存在
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void SoaChannel_IsExistAgentCompleted(object sender, IsExistAgentCompletedEventArgs e)
 {
     try
     {
         if (e.Error != null && !string.IsNullOrEmpty(e.Error.Message))
         {
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr(e.Error.Message), Utility.GetResourceStr("CONFIRM"), MessageIcon.Information);
         }
         int i = e.Result.ToInt32();
         if (i > 0)
         {
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), "已经设置了代理,请不要重复设置!", Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
             ckEnabled.IsChecked = false;
             return;
         }
     }
     catch (Exception ex)
     {
         Logger.Current.Log(ex.Message, Category.Debug, Priority.Low);
         ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 检查代理是否存在
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void SoaChannel_IsExistAgentCompleted(object sender, IsExistAgentCompletedEventArgs e)
 {
     try
     {
         if (e.Error != null && !string.IsNullOrEmpty(e.Error.Message))
         {
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr(e.Error.Message), Utility.GetResourceStr("CONFIRM"), MessageIcon.Information);
         }
         int i = e.Result.ToInt32();
         if (i > 0)
         {
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), "已经设置了代理,请不要重复设置!", Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
             ckEnabled.IsChecked = false;
             return;
         }
     }
     catch (Exception ex)
     {
         Logger.Current.Log(ex.Message, Category.Debug, Priority.Low);
         ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
     }
 }