private void ChmInit() { _reader = new HtmlHelpSystem(); HtmlHelpSystem.UrlPrefix = "mk:@MSITStore:"; // use temporary folder for data dumping string sTemp = System.Environment.GetEnvironmentVariable("TEMP"); if (sTemp.Length <= 0) { sTemp = System.Environment.GetEnvironmentVariable("TMP"); } _prefDumpOutput = sTemp; // create a dump info instance used for dumping data _dmpInfo = new DumpingInfo(DumpingFlags.DumpBinaryTOC | DumpingFlags.DumpTextTOC | DumpingFlags.DumpTextIndex | DumpingFlags.DumpBinaryIndex | DumpingFlags.DumpUrlStr | DumpingFlags.DumpStrings, sTemp, DumpCompression.Medium); LoadRegistryPreferences(); HtmlHelpSystem.UrlPrefix = _prefURLPrefix; HtmlHelpSystem.UseHH2TreePics = _prefUseHH2TreePics; }
/// <summary> /// Constructor of the class /// </summary> public Viewer() { Viewer._current = this; // create a new instance of the classlibrary's main class _reader = new HtmlHelpSystem(); HtmlHelpSystem.UrlPrefix = "mk:@MSITStore:"; // use temporary folder for data dumping string sTemp = System.Environment.GetEnvironmentVariable("TEMP"); if (sTemp.Length <= 0) { sTemp = System.Environment.GetEnvironmentVariable("TMP"); } _prefDumpOutput = sTemp; // create a dump info instance used for dumping data _dmpInfo = new DumpingInfo(DumpingFlags.DumpBinaryTOC | DumpingFlags.DumpTextTOC | DumpingFlags.DumpTextIndex | DumpingFlags.DumpBinaryIndex | DumpingFlags.DumpUrlStr | DumpingFlags.DumpStrings, sTemp, DumpCompression.Medium); LoadRegistryPreferences(); HtmlHelpSystem.UrlPrefix = _prefURLPrefix; HtmlHelpSystem.UseHH2TreePics = _prefUseHH2TreePics; InitializeComponent(); }
/// <summary> /// Constructor of the class /// </summary> /// <param name="system">set the instance of the help system which holds a file list</param> public FileInfo(HtmlHelpSystem system) { _system = system; // // Required for Windows Form Designer support // InitializeComponent(); this._propGrid = new PropertyGrid(); this._propGrid.SuspendLayout(); // // _propGrid // _propGrid.CommandsVisibleIfAvailable = true; _propGrid.LargeButtons = false; _propGrid.LineColor = SystemColors.Control; _propGrid.Location = new System.Drawing.Point(7, 50); _propGrid.Size = new System.Drawing.Size(454, 240); _propGrid.TabIndex = 2; _propGrid.PropertySort = PropertySort.Alphabetical; _propGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.Controls.Add(this._propGrid); }
public void AddHelp(string title, HtmlHelpSystem helpFile) { helpSystems.Add(helpFile); Node node = new Node(title); node.Image = hhImages.Images[3]; node.Object = helpFile; _model.Nodes.Add(node); }
private void LoadPHPHelp() { if (phpHelp == null) { string phpHelpFile = "help/" + Thread.CurrentThread.CurrentUICulture.Name + "/php_manual.chm"; if (File.Exists(phpHelpFile)) { phpHelp = new HtmlHelpSystem(); phpHelp.OpenFile(phpHelpFile); } } }
private void _tree_Expanding(object sender, TreeViewAdvEventArgs e) { if (e.Node != null) { if ((e.Node.Children.Count > 0) && (e.Node.Parent != null) && (e.Node.Parent.Parent != null)) { if (e.Node.Tag is Node) { (e.Node.Tag as Node).Image = hhImages.Images[1]; } } if (e.Node.Tag != null) { if ((e.Node.Tag as Node).Object != null) { if ((e.Node.Tag as Node).Nodes.Count == 0) { bool createCache = false; foreach (var item in helpSystems) { HtmlHelpSystem help = (item as HtmlHelpSystem); if ((e.Node.Tag as Node).Object == help) { createCache = true; } } if (createCache) { _tree.LoadOnDemand = false; currentHelpSystem = ((e.Node.Tag as Node).Object as HtmlHelpSystem); chmNode = (e.Node.Tag as Node).Nodes; backgroundWorker.RunWorkerAsync(); pleaseWait = new PleaseWait(); pleaseWait.ShowDialog(); } } } } } }
public void AddHelp(string title, string fileName) { HtmlHelpSystem helpFile = new HtmlHelpSystem(); helpFile.OpenFile(fileName); helpSystems.Add(helpFile); /* * phpHelpFile = * mysqlHelpFile = new HtmlHelpSystem(); * phpHelpFile.OpenFile(); * mysqlHelpFile.OpenFile("help/mysql_5.0_en.chm"); */ Node node = new Node(title); node.Image = hhImages.Images[3]; node.Object = helpFile; _model.Nodes.Add(node); }
/// <summary> /// Constructor of the class /// </summary> public AboutDlg(HtmlHelpSystem system) { _hlpSystem = system; InitializeComponent(); if (_hlpSystem != null) { if (_hlpSystem.FileList.Length > 0) { btnLoadedFiles.Enabled = true; } else { btnLoadedFiles.Enabled = false; } } else { btnLoadedFiles.Enabled = false; } }
private void LoadCHM() { string CHMFilename = Path.Combine(Settings.Default.ChmPath, Settings.Default.MainChm); chm = new HtmlHelpSystem(); chm.OpenFile(CHMFilename, null); Console.WriteLine(String.Format("Loaded main CHM: {0}", Path.GetFileName(CHMFilename))); foreach (string filename in Directory.GetFiles(Settings.Default.ChmPath)) { if (!Path.GetExtension(filename).ToLower().Equals(".chm")) { continue; } if (Path.GetFileName(filename).ToLower().Equals(Settings.Default.MainChm)) { continue; } Console.WriteLine(String.Format("Loading CHM: {0}", Path.GetFileName(filename))); try { chm.MergeFile(filename); } catch (Exception ex) { Console.WriteLine(String.Format("Could not load CHM: {0}. Exception {1}", Path.GetFileName(filename), ex)); } } Console.WriteLine(String.Format("Loaded {0} CHMs", chm.FileList.Length)); }
internal void AddHelp(string title, HtmlHelpSystem helpFile) { helpBrowser.AddHelp(title, helpFile); }