예제 #1
0
 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);
     }
 }
예제 #2
0
 private void PropertiesOnClick(object objSrc, EventArgs args)
 {
     WbBrowser.ShowPropertiesDialog();
 }
예제 #3
0
 private void PreviewOnClick(object objSrc, EventArgs args)
 {
     WbBrowser.ShowPrintPreviewDialog();
 }
예제 #4
0
 private void PageSetupOnClick(object objSrc, EventArgs args)
 {
     WbBrowser.ShowPageSetupDialog();
 }