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);

			if(dlg.ShowDialog() == DialogResult.OK)
			{
				byte[] pb = Encoding.UTF8.GetBytes(dlg.GeneratedHtml);
				sOutput.Write(pb, 0, pb.Length);
				sOutput.Close();

				return true;
			}

			return false;
		}
Exemple #3
0
		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;
		}
		private void PrintGroup(PwGroup pg)
		{
			Debug.Assert(pg != null); if(pg == null) return;
			if(!AppPolicy.Try(AppPolicyId.Print)) return;

			PwDatabase pd = m_docMgr.ActiveDatabase;
			if((pd == null) || !pd.IsOpen) return;
			if(!AppPolicy.Current.PrintNoKey)
			{
				if(!KeyUtil.ReAskKey(pd, true)) return;
			}

			PrintForm pf = new PrintForm();
			pf.InitEx(pg, true, m_pListSorter.Column);
			UIUtil.ShowDialogAndDestroy(pf);
		}
Exemple #5
0
        private void PrintGroup(PwGroup pg)
        {
            Debug.Assert(pg != null); if(pg == null) return;
            if(!AppPolicy.Try(AppPolicyId.Print)) return;

            PrintForm pf = new PrintForm();
            pf.InitEx(pg, true, m_pListSorter.Column);
            UIUtil.ShowDialogAndDestroy(pf);
        }
        private static void PrintGroup(PwGroup pg)
        {
            Debug.Assert(pg != null); if(pg == null) return;
            if(!AppPolicy.Try(AppPolicyId.Print)) return;

            PrintForm pf = new PrintForm();
            pf.InitEx(pg, true);
            pf.ShowDialog();
        }