public override bool Export(PwExportInfo pwExportInfo, Stream sOutput, IStatusLogger slLogger) { ImageList il = null; MainForm mf = Program.MainForm; if ((mf != null) && (mf.ActiveDatabase == pwExportInfo.ContextDatabase)) { il = mf.ClientIcons; } PrintForm dlg = new PrintForm(); dlg.InitEx(pwExportInfo.DataGroup, pwExportInfo.ContextDatabase, il, false, -1); bool bResult = false; try { if (dlg.ShowDialog() == DialogResult.OK) { byte[] pb = StrUtil.Utf8.GetBytes(dlg.GeneratedHtml); sOutput.Write(pb, 0, pb.Length); sOutput.Close(); bResult = true; } } finally { UIUtil.DestroyForm(dlg); } return(bResult); }
public override bool Export(PwExportInfo pwExportInfo, Stream sOutput, IStatusLogger slLogger) { PrintForm dlg = new PrintForm(); dlg.InitEx(pwExportInfo.DataGroup, false, -1); if (dlg.ShowDialog() == DialogResult.OK) { byte[] pb = Encoding.UTF8.GetBytes(dlg.GeneratedHtml); sOutput.Write(pb, 0, pb.Length); sOutput.Close(); return(true); } return(false); }
public override bool Export(PwExportInfo pwExportInfo, Stream sOutput, IStatusLogger slLogger) { PrintForm dlg = new PrintForm(); dlg.InitEx(pwExportInfo.DataGroup, false); if (dlg.ShowDialog() == DialogResult.OK) { StreamWriter sw = new StreamWriter(sOutput, Encoding.UTF8); sw.Write(dlg.GeneratedHtml); sw.Close(); return(true); } return(false); }
public override bool Export(PwExportInfo pwExportInfo, Stream sOutput, IStatusLogger slLogger) { PrintForm dlg = new PrintForm(); dlg.InitEx(pwExportInfo.DataGroup, false, -1); bool bResult = false; if (dlg.ShowDialog() == DialogResult.OK) { byte[] pb = StrUtil.Utf8.GetBytes(dlg.GeneratedHtml); sOutput.Write(pb, 0, pb.Length); sOutput.Close(); bResult = true; } UIUtil.DestroyForm(dlg); return(bResult); }