Exemple #1
0
        private void ReloadImage(PartyProject partyProject, int tableCount)
        {
            Bitmap    image    = partyProject.DumpBitmap(tableCount, this.CurrentFont, this.CurrentPen, this.CurrentBrush, this.showRectangle);
            Rectangle destRect = new Rectangle(0, 0, image.Width, image.Height);

            this.pictureBox1.BackgroundImage = image;
        }
Exemple #2
0
        private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
        {
            PartyProject project = this.CurrentProject;

            if (project != null)
            {
                Bitmap    image    = project.DumpBitmap(this.TableCount, this.CurrentFont, this.CurrentPen, this.CurrentBrush, this.showRectangle);
                Rectangle destRect = new Rectangle(0, 0, image.Width, image.Height);
                e.Graphics.DrawImage(image, destRect, destRect, GraphicsUnit.Pixel);
            }
        }
Exemple #3
0
        private void btnSavePicture_Click(object sender, EventArgs e)
        {
            PartyProject project = this.CurrentProject;

            if (project != null)
            {
                if (this.saveFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    Bitmap image = project.DumpBitmap(this.TableCount, this.CurrentFont, this.CurrentPen, this.CurrentBrush, this.showRectangle);
                    image.Save(this.saveFileDialog1.FileName);
                    Process.Start("explorer", "/select," + this.saveFileDialog1.FileName);
                }
            }
            else
            {
                MessageBox.Show("没有指定方案,无法生成统计结果!");
            }
        }