예제 #1
0
 private void LoadShareRuleSummary(ShareRuleSummary shareRuleSummary)
 {
     if (shareRuleSummary == null)
     {
         _ = RemoteLogService.ReportLogAsync("LoadShareRuleSummary fial with null data", RemoteLogService.RemoteLogOperation.RemoteRule, RemoteLogService.RemoteLogType.Error);
         return;
     }
     if (shareRuleSummary.ShareRuleList?.Count > 0)
     {
         var autoCompleteStringCollection = new AutoCompleteStringCollection();
         foreach (var tempShareToken in shareRuleSummary.ShareRuleList)
         {
             autoCompleteStringCollection.Add(tempShareToken.ShowWholeTag);
             this.Invoke(new Action(() => watermakTextBox_ruleToken.AutoCompleteCustomSource.Add(tempShareToken.ShowWholeTag)));
         }
     }
     if (shareRuleSummary.PrivateRuleList?.Count > 0)
     {
         lv_shareRuleList.Items.Clear();
         this.Invoke(new Action(() => FreeHttpControl.MyControlHelper.SetControlFreeze(lv_shareRuleList)));
         foreach (var tempShareToken in shareRuleSummary.PrivateRuleList)
         {
             lv_shareRuleList.Items.Add(new ListViewItem(new string[] { tempShareToken.Token, tempShareToken.Remark }));
         }
         this.Invoke(new Action(() => FreeHttpControl.MyControlHelper.SetControlUnfreeze(lv_shareRuleList)));
     }
 }
예제 #2
0
 public ShareRuleService(string personalUserInfoStr)
 {
     NowShareRuleSummary = new ShareRuleSummary();
     _userInfoStr        = personalUserInfoStr;
 }