예제 #1
0
        private void MMenuPrintSet_Click(object sender, EventArgs e)
        {
            PageSetupDialog pd = new PageSetupDialog();

            pd.Document = VcPrintDocument.GetInstance();
            pd.ShowDialog();
        }
예제 #2
0
        private void MMenuPrint_Click(object sender, EventArgs e)
        {
            IList <BaseEntity> etis   = new List <BaseEntity>();
            BaseEntity         entity = (this.ActiveMdiChild as IScheduleFm).Entity;

            VcPrintDocument.GetInstance().DocumentName = entity.ToString();
            etis.Add(entity);
            VcPrintDocument.GetInstance().Entitis = etis;
            VcPrintDocument.GetInstance().Print();
        }
예제 #3
0
        private void PrintSome(Type type)
        {
            MbrSelectFmMulti Fm = new MbrSelectFmMulti();

            if (type == typeof(EnSquad))
            {
                Fm.MbrSelect = VC2WinFmApp.Engine.GetSqdMbrSelect();
            }
            else if (type == typeof(EnTeacher))
            {
                Fm.MbrSelect = VC2WinFmApp.Engine.GetTchMbrSelect();
            }
            else
            {
                throw new Exception("未知的类型");
            }

            if (Fm.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            IList <BaseEntity> Eties = Fm.GetSelectEties();

            if (Eties == null || Eties.Count == 0)
            {
                return;
            }

            VcPrintDocument Doc = VcPrintDocument.GetInstance();
            PrintDialog     pd  = new PrintDialog();

            pd.Document = Doc;
            if (pd.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            if (type == typeof(EnTeacher))
            {
                Doc.DocumentName = "教师课表";
            }
            else if (type == typeof(EnSquad))
            {
                Doc.DocumentName = "班级课表";
            }
            else if (type == typeof(EnSubject))
            {
                Doc.DocumentName = "课程课表";
            }

            Doc.Entitis = Eties;
            Doc.Print();
        }
예제 #4
0
        private void MMenuPrintPreview_Click(object sender, EventArgs e)
        {
            IList <BaseEntity> etis = new List <BaseEntity>();

            etis.Add((this.ActiveMdiChild as IScheduleFm).Entity);
            VcPrintDocument.GetInstance().Entitis = etis;

            PrintPreviewDialog dlg = new PrintPreviewDialog();

            dlg.Document = VcPrintDocument.GetInstance();
            dlg.ShowDialog();
        }