示例#1
0
        public void GenerateHelp()
        {
            try
            {

                using (FileStream fs = new FileStream(LqtUtil.GetFolderPath(AppSettings.ExportPath) + "\\ForLAB.chm", FileMode.Create))
                {
                    Stream xstream = Assembly.GetExecutingAssembly().GetManifestResourceStream("LQT.GUI.Resources.ForLAB.chm");

                    byte[] b = new byte[xstream.Length + 1];
                    xstream.Read(b, 0, Convert.ToInt32(xstream.Length));

                    fs.Write(b, 0, Convert.ToInt32(b.Length - 1));
                    fs.Flush();
                    fs.Close();


                }

            }
            catch
            {
                MessageBox.Show("Access Denied. ", "Generate Help File", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#2
0
        //public void ExcelHeaderFormatt(Excel.Range unicell)
        //{
        //    unicell.Font.Color = System.Drawing.ColorTranslator.ToOle(Color.White);
        //    unicell.Interior.Color = System.Drawing.ColorTranslator.ToOle(Color.Gray);
        //    unicell.Font.Bold = true;
        //    unicell.BorderAround(Excel.XlLineStyle.xlContinuous, Excel.XlBorderWeight.xlThin, Excel.XlColorIndex.xlColorIndexAutomatic, 1);
        //}

        private void showHelp()
        {
            string path = LqtUtil.GetFolderPath(AppSettings.ExportPath);
            if (!File.Exists(path + "\\ForLAB.chm"))
            {
                GenerateHelp();
            }
            path = "file://" + Path.Combine(path, "ForLAB.chm");

            Help.ShowHelp(this, path);
        }