示例#1
0
        private void medEditor1_PrintButtonClick(object sender, EventArgs e)
        {
            bool bReadonly = this.medEditor1.Readonly;

            if (!this.medEditor1.Readonly)
            {
                this.medEditor1.Readonly = true;
            }
            MedDocSys.DataLayer.PrintSettings printSettings = new MedDocSys.DataLayer.PrintSettings();
            this.medEditor1.PrintDocument(printSettings);
            this.medEditor1.Readonly = bReadonly;
        }
示例#2
0
        private void medEditor1_PrintButtonClick(object sender, EventArgs e)
        {
            bool bReadonly = this.medEditor1.Readonly;

            //底层编辑器生成文档内容
            byte[] byteSmdfData = null;
            short  shRet        = this.medEditor1.SaveDocument(false, false, ref byteSmdfData);

            if (shRet != SystemData.ReturnValue.OK)
            {
                MessageBoxEx.Show("文档保存失败!");
                return;
            }
            this.medEditor1.IsModified = false;
            MedDocSys.DataLayer.PrintSettings printSettings = new MedDocSys.DataLayer.PrintSettings();
            this.medEditor1.PrintDocument(printSettings);
            if (!bReadonly)
            {
                this.medEditor1.SetReadonlyState(false);
            }
        }