public void RefreshText() { StringBuilder sb = new StringBuilder(); FormaterHtml.WriteTodayInfoHTML(myDate, myLocation, sb, scales[scaleIndex], null); webBrowser1.DocumentText = sb.ToString(); }
private void saveAsToolStripMenuItem_Click(object sender, EventArgs e) { SaveFileDialog sdlg = new SaveFileDialog(); sdlg.Filter = GPAppHelper.MakeFilterString(FileFormatType.PlainText, FileFormatType.RichText, FileFormatType.HtmlText); if (sdlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { StringBuilder sb = new StringBuilder(); if (sdlg.FilterIndex == 1) { FormaterPlain.AvcGetTodayInfo(myDate, myLocation, sb); } else if (sdlg.FilterIndex == 2) { FormaterRtf.FormatTodayInfoRtf(myDate, myLocation, sb); } else if (sdlg.FilterIndex == 3) { FormaterHtml.WriteTodayInfoHTML(myDate, myLocation, sb, 11, null); } File.WriteAllText(sdlg.FileName, sb.ToString()); } }