コード例 #1
0
 public VoiceWord(string word, DateTime timeStamp, long wordId, long messageId, bool isProcessed = false, wordType wordType = wordType.Raw, int applicationIdCommand = -1)
 {
     Word                 = word;
     TimeStamp            = timeStamp;
     WordId               = wordId;
     MessageId            = messageId;
     IsProcessed          = isProcessed;
     WordType             = wordType;
     ApplicationIdCommand = applicationIdCommand;
 }
コード例 #2
0
        /// <summary>
        ///将office文件转化成对应的pdf文件
        /// </summary>
        /// <param name="soursefilepath">源文件地址</param>
        /// <param name="outpdfpath">目标文件地址</param>
        /// <param name="worktype">文件类型</param>
        /// <returns></returns>
        public static string GetPdfForApost(string soursefilepath, string outpdfpath, wordType worktype)
        {
            string resoutpdfpath = null;

            if (worktype == wordType.Word)
            {
                if (GetPdfFromWord(soursefilepath, outpdfpath))
                {
                    resoutpdfpath = outpdfpath;
                }
                else
                {
                    resoutpdfpath = null;
                }
            }

            if (worktype == wordType.ExeCel)
            {
                if (GetPdfFromExcel(soursefilepath, outpdfpath))
                {
                    resoutpdfpath = outpdfpath;
                }
                else
                {
                    resoutpdfpath = null;
                }
            }

            if (worktype == wordType.Ppt)
            {
                if (GetPdfFromPPt(soursefilepath, outpdfpath))
                {
                    resoutpdfpath = outpdfpath;
                }
                else
                {
                    resoutpdfpath = null;
                }
            }
            return(resoutpdfpath);
        }