private void SaveAsOnClick(object objSrc, EventArgs args) { try { string tempFile = Path.GetTempFileName(); string dirName = Path.GetDirectoryName(tempFile); if (dirName == null) { return; } tempFile = Path.Combine(dirName, Path.GetFileNameWithoutExtension(tempFile) + ".html"); StreamWriter writer = File.CreateText(tempFile); writer.Write(WbBrowser.DocumentText); writer.Flush(); writer.Close(); WbBrowser.Navigate(tempFile); WbBrowser.ShowSaveAsDialog(); WbBrowser.DocumentText = webPage; File.Delete(tempFile); } catch (Exception exception) { MessageBox.Show(exception.Message); } }
private void PropertiesOnClick(object objSrc, EventArgs args) { WbBrowser.ShowPropertiesDialog(); }
private void PreviewOnClick(object objSrc, EventArgs args) { WbBrowser.ShowPrintPreviewDialog(); }
private void PageSetupOnClick(object objSrc, EventArgs args) { WbBrowser.ShowPageSetupDialog(); }