Пример #1
0
        private void Workbook_SheetBeforeDoubleClick(object Sh, Excel.Range Target, ref bool Cancel)
        {
            Cancel = true;
            string pickValue = YDDicHelper.Create().TransText(Target.Value);

            Target.Next.Value = pickValue;
            //Excel.Range dcolumn = Target.Range["D1"];
            //dcolumn.Value2 = "中文解释";
            //Target.EntireColumn.Insert(Excel.XlInsertShiftDirection.xlShiftToRight,
            //        Excel.XlInsertFormatOrigin.xlFormatFromRightOrBelow);
            // this.Invoke((EventHandler)delegate { System.IO.File.AppendAllText(wcName, pickValue + Environment.NewLine); });
        }
Пример #2
0
 public static YDDicHelper Create()
 {
     if (yDDicHelper == null)
     {
         lock (oc)
         {
             if (yDDicHelper == null)
             {
                 yDDicHelper = new YDDicHelper();
             }
         }
     }
     return(yDDicHelper);
 }