Пример #1
0
 private void CheckWordBtn_Click(object sender, RibbonControlEventArgs e)
 {
     if (CheckWordBtn.Checked)
     {
         CheckWordBtn.Checked = true;
         EventAggregatorRepository.EventAggregator.GetEvent <SetMyControlVisibleEvent>().Publish(true);
     }
     else
     {
         CheckWordBtn.Checked = false;
         EventAggregatorRepository.EventAggregator.GetEvent <SetMyControlVisibleEvent>().Publish(false);
     }
     try
     {
         AddInStateInfo addInStateInfo = new AddInStateInfo();
         addInStateInfo.IsOpen = CheckWordBtn.Checked;
         //保存用户操作信息到本地
         string addInStateInfos = string.Format(@"{0}\ExcelAddInStateInfo.xml", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\WordAndImgOCR\\LoginInOutInfo\\");
         CheckWordUtil.DataParse.WriteToXmlPath(JsonConvert.SerializeObject(addInStateInfo), addInStateInfos);
     }
     catch (Exception ex)
     { }
 }