Represents a preview control for an XGraphics page. Can be used as an alternative to System.Windows.Forms.PrintPreviewControl.
Inheritance: System.Windows.Forms.UserControl
コード例 #1
0
 public PagePreviewCanvas(PagePreview preview)
 {
   this.preview = preview;
   SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true);
 }
コード例 #2
0
 public PagePreviewCanvas(PagePreview preview)
 {
     _preview = preview;
     SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true);
 }
コード例 #3
0
ファイル: PreviewForm.cs プロジェクト: DavidS/MigraDoc
 public void SetRenderEvent(PagePreview.RenderEvent renderEvent)
 {
   this.pagePreview.SetRenderEvent(renderEvent);
   this.renderEvent = renderEvent;
   UpdateStatusBar();
 }
コード例 #4
0
ファイル: PreviewForm.cs プロジェクト: DavidS/MigraDoc
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
      this.components = new System.ComponentModel.Container();
      System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(PreviewForm));
      this.toolBar = new System.Windows.Forms.ToolBar();
      this.tbbSeparator1 = new System.Windows.Forms.ToolBarButton();
      this.tbbFirstPage = new System.Windows.Forms.ToolBarButton();
      this.tbbPrevPage = new System.Windows.Forms.ToolBarButton();
      this.tbbNextPage = new System.Windows.Forms.ToolBarButton();
      this.tbbLastPage = new System.Windows.Forms.ToolBarButton();
      this.tbbSeparator2 = new System.Windows.Forms.ToolBarButton();
      this.tbbOriginalSize = new System.Windows.Forms.ToolBarButton();
      this.menuZoom = new System.Windows.Forms.ContextMenu();
      this.miPercent800 = new System.Windows.Forms.MenuItem();
      this.miPercent600 = new System.Windows.Forms.MenuItem();
      this.miPercent400 = new System.Windows.Forms.MenuItem();
      this.miPercent200 = new System.Windows.Forms.MenuItem();
      this.miPercent150 = new System.Windows.Forms.MenuItem();
      this.miPercent100 = new System.Windows.Forms.MenuItem();
      this.miPercent75 = new System.Windows.Forms.MenuItem();
      this.miPercent50 = new System.Windows.Forms.MenuItem();
      this.miPercent25 = new System.Windows.Forms.MenuItem();
      this.miPercent10 = new System.Windows.Forms.MenuItem();
      this.menuItem10 = new System.Windows.Forms.MenuItem();
      this.miOriginalSize = new System.Windows.Forms.MenuItem();
      this.miBestFit = new System.Windows.Forms.MenuItem();
      this.miFullPage = new System.Windows.Forms.MenuItem();
      this.tbbFullPage = new System.Windows.Forms.ToolBarButton();
      this.tbbBestFit = new System.Windows.Forms.ToolBarButton();
      this.tbbSmaller = new System.Windows.Forms.ToolBarButton();
      this.tbbLarger = new System.Windows.Forms.ToolBarButton();
      this.tbbSeparator3 = new System.Windows.Forms.ToolBarButton();
      this.tbbMakePdf = new System.Windows.Forms.ToolBarButton();
      this.ilToolbar = new System.Windows.Forms.ImageList(this.components);
      this.statusBar = new System.Windows.Forms.StatusBar();
      this.pagePreview = new PdfSharp.Forms.PagePreview();
      this.SuspendLayout();
      // 
      // toolBar
      // 
      this.toolBar.Appearance = System.Windows.Forms.ToolBarAppearance.Flat;
      this.toolBar.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
                                                                               this.tbbSeparator1,
                                                                               this.tbbFirstPage,
                                                                               this.tbbPrevPage,
                                                                               this.tbbNextPage,
                                                                               this.tbbLastPage,
                                                                               this.tbbSeparator2,
                                                                               this.tbbOriginalSize,
                                                                               this.tbbFullPage,
                                                                               this.tbbBestFit,
                                                                               this.tbbSmaller,
                                                                               this.tbbLarger,
                                                                               this.tbbSeparator3,
                                                                               this.tbbMakePdf});
      this.toolBar.DropDownArrows = true;
      this.toolBar.ImageList = this.ilToolbar;
      this.toolBar.Location = new System.Drawing.Point(0, 0);
      this.toolBar.Name = "toolBar";
      this.toolBar.ShowToolTips = true;
      this.toolBar.Size = new System.Drawing.Size(638, 42);
      this.toolBar.TabIndex = 1;
      this.toolBar.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar_ButtonClick);
      // 
      // tbbSeparator1
      // 
      this.tbbSeparator1.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
      this.tbbSeparator1.Visible = false;
      // 
      // tbbFirstPage
      // 
      this.tbbFirstPage.ImageIndex = 0;
      this.tbbFirstPage.Tag = "FirstPage";
      this.tbbFirstPage.Visible = false;
      // 
      // tbbPrevPage
      // 
      this.tbbPrevPage.Enabled = false;
      this.tbbPrevPage.ImageIndex = 1;
      this.tbbPrevPage.Tag = "PrevPage";
      this.tbbPrevPage.Visible = false;
      // 
      // tbbNextPage
      // 
      this.tbbNextPage.Enabled = false;
      this.tbbNextPage.ImageIndex = 2;
      this.tbbNextPage.Tag = "NextPage";
      this.tbbNextPage.Visible = false;
      // 
      // tbbLastPage
      // 
      this.tbbLastPage.Enabled = false;
      this.tbbLastPage.ImageIndex = 3;
      this.tbbLastPage.Tag = "LastPage";
      this.tbbLastPage.Visible = false;
      // 
      // tbbSeparator2
      // 
      this.tbbSeparator2.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
      this.tbbSeparator2.Visible = false;
      // 
      // tbbOriginalSize
      // 
      this.tbbOriginalSize.DropDownMenu = this.menuZoom;
      this.tbbOriginalSize.ImageIndex = 4;
      this.tbbOriginalSize.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton;
      this.tbbOriginalSize.Tag = "OriginalSize";
      this.tbbOriginalSize.Text = "Original Size";
      // 
      // menuZoom
      // 
      this.menuZoom.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
                                                                             this.miPercent800,
                                                                             this.miPercent600,
                                                                             this.miPercent400,
                                                                             this.miPercent200,
                                                                             this.miPercent150,
                                                                             this.miPercent100,
                                                                             this.miPercent75,
                                                                             this.miPercent50,
                                                                             this.miPercent25,
                                                                             this.miPercent10,
                                                                             this.menuItem10,
                                                                             this.miOriginalSize,
                                                                             this.miBestFit,
                                                                             this.miFullPage});
      // 
      // miPercent800
      // 
      this.miPercent800.Index = 0;
      this.miPercent800.Text = "800%";
      this.miPercent800.Click += new System.EventHandler(this.miPercent800_Click);
      // 
      // miPercent600
      // 
      this.miPercent600.Index = 1;
      this.miPercent600.Text = "600%";
      this.miPercent600.Click += new System.EventHandler(this.miPercent600_Click);
      // 
      // miPercent400
      // 
      this.miPercent400.Index = 2;
      this.miPercent400.Text = "400%";
      this.miPercent400.Click += new System.EventHandler(this.miPercent400_Click);
      // 
      // miPercent200
      // 
      this.miPercent200.Index = 3;
      this.miPercent200.Text = "200%";
      this.miPercent200.Click += new System.EventHandler(this.miPercent200_Click);
      // 
      // miPercent150
      // 
      this.miPercent150.Index = 4;
      this.miPercent150.Text = "150%";
      this.miPercent150.Click += new System.EventHandler(this.miPercent150_Click);
      // 
      // miPercent100
      // 
      this.miPercent100.Index = 5;
      this.miPercent100.Text = "100%";
      this.miPercent100.Click += new System.EventHandler(this.miPercent100_Click);
      // 
      // miPercent75
      // 
      this.miPercent75.Index = 6;
      this.miPercent75.Text = "75%";
      this.miPercent75.Click += new System.EventHandler(this.miPercent75_Click);
      // 
      // miPercent50
      // 
      this.miPercent50.Index = 7;
      this.miPercent50.Text = "50%";
      this.miPercent50.Click += new System.EventHandler(this.miPercent50_Click);
      // 
      // miPercent25
      // 
      this.miPercent25.Index = 8;
      this.miPercent25.Text = "25%";
      this.miPercent25.Click += new System.EventHandler(this.miPercent25_Click);
      // 
      // miPercent10
      // 
      this.miPercent10.Index = 9;
      this.miPercent10.Text = "10%";
      this.miPercent10.Click += new System.EventHandler(this.miPercent10_Click);
      // 
      // menuItem10
      // 
      this.menuItem10.Index = 10;
      this.menuItem10.Text = "-";
      // 
      // miOriginalSize
      // 
      this.miOriginalSize.Index = 11;
      this.miOriginalSize.Text = "Original Size";
      this.miOriginalSize.Click += new System.EventHandler(this.miOriginalSize_Click);
      // 
      // miBestFit
      // 
      this.miBestFit.Index = 12;
      this.miBestFit.Text = "Best fit";
      this.miBestFit.Click += new System.EventHandler(this.miBestFit_Click);
      // 
      // miFullPage
      // 
      this.miFullPage.Index = 13;
      this.miFullPage.Text = "Full Page";
      this.miFullPage.Click += new System.EventHandler(this.miFullPage_Click);
      // 
      // tbbFullPage
      // 
      this.tbbFullPage.ImageIndex = 5;
      this.tbbFullPage.Tag = "FullPage";
      this.tbbFullPage.Text = "Full Page";
      // 
      // tbbBestFit
      // 
      this.tbbBestFit.ImageIndex = 6;
      this.tbbBestFit.Tag = "BestFit";
      this.tbbBestFit.Text = "Best Fit";
      // 
      // tbbSmaller
      // 
      this.tbbSmaller.ImageIndex = 7;
      this.tbbSmaller.Tag = "Smaller";
      this.tbbSmaller.Text = "Smaller";
      // 
      // tbbLarger
      // 
      this.tbbLarger.ImageIndex = 8;
      this.tbbLarger.Tag = "Larger";
      this.tbbLarger.Text = "Larger";
      // 
      // tbbSeparator3
      // 
      this.tbbSeparator3.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
      // 
      // tbbMakePdf
      // 
      this.tbbMakePdf.ImageIndex = 9;
      this.tbbMakePdf.Tag = "MakePdf";
      this.tbbMakePdf.Text = "Create PDF";
      // 
      // ilToolbar
      // 
      this.ilToolbar.ImageSize = new System.Drawing.Size(16, 16);
      this.ilToolbar.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ilToolbar.ImageStream")));
      this.ilToolbar.TransparentColor = System.Drawing.Color.Lime;
      // 
      // statusBar
      // 
      this.statusBar.Location = new System.Drawing.Point(0, 454);
      this.statusBar.Name = "statusBar";
      this.statusBar.Size = new System.Drawing.Size(638, 22);
      this.statusBar.SizingGrip = false;
      this.statusBar.TabIndex = 2;
      // 
      // pagePreview
      // 
      this.pagePreview.BackColor = System.Drawing.SystemColors.Control;
      this.pagePreview.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
      this.pagePreview.DesktopColor = System.Drawing.SystemColors.ControlDark;
      this.pagePreview.Dock = System.Windows.Forms.DockStyle.Fill;
      this.pagePreview.Location = new System.Drawing.Point(0, 42);
      this.pagePreview.Name = "pagePreview";
      this.pagePreview.PageColor = System.Drawing.Color.GhostWhite;
      this.pagePreview.PageSize = new System.Drawing.Size(595, 842);
      this.pagePreview.Size = new System.Drawing.Size(638, 412);
      this.pagePreview.TabIndex = 4;
      this.pagePreview.Zoom = PdfSharp.Forms.Zoom.FullPage;
      this.pagePreview.ZoomPercent = 34;
      // 
      // PreviewForm
      // 
      this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
      this.ClientSize = new System.Drawing.Size(638, 476);
      this.Controls.Add(this.pagePreview);
      this.Controls.Add(this.statusBar);
      this.Controls.Add(this.toolBar);
      this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
      this.MaximizeBox = false;
      this.MinimizeBox = false;
      this.Name = "PreviewForm";
      this.ShowInTaskbar = false;
      this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
      this.Text = "Preview";
      this.ResumeLayout(false);

    }
コード例 #5
0
ファイル: MainForm.cs プロジェクト: AnthonyNystrom/Pikling
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
      System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MainForm));
      this.pnlMain = new System.Windows.Forms.Panel();
      this.pnlRight = new System.Windows.Forms.Panel();
      this.pnlPreview = new System.Windows.Forms.Panel();
      this.pagePreview = new PdfSharp.Forms.PagePreview();
      this.splitter = new System.Windows.Forms.Splitter();
      this.pnlLeft = new System.Windows.Forms.Panel();
      this.tvNavigation = new System.Windows.Forms.TreeView();
      this.btnPdf = new System.Windows.Forms.Button();
      this.btnOriginalSize = new System.Windows.Forms.Button();
      this.btnFullPage = new System.Windows.Forms.Button();
      this.btnBestFit = new System.Windows.Forms.Button();
      this.btnMinus = new System.Windows.Forms.Button();
      this.btnPlus = new System.Windows.Forms.Button();
      this.pnlMain.SuspendLayout();
      this.pnlRight.SuspendLayout();
      this.pnlPreview.SuspendLayout();
      this.pnlLeft.SuspendLayout();
      this.SuspendLayout();
      // 
      // pnlMain
      // 
      this.pnlMain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
        | System.Windows.Forms.AnchorStyles.Left) 
        | System.Windows.Forms.AnchorStyles.Right)));
      this.pnlMain.BackColor = System.Drawing.SystemColors.Control;
      this.pnlMain.Controls.Add(this.pnlRight);
      this.pnlMain.Controls.Add(this.splitter);
      this.pnlMain.Controls.Add(this.pnlLeft);
      this.pnlMain.Location = new System.Drawing.Point(0, 80);
      this.pnlMain.Name = "pnlMain";
      this.pnlMain.Size = new System.Drawing.Size(792, 486);
      this.pnlMain.TabIndex = 0;
      // 
      // pnlRight
      // 
      this.pnlRight.BackColor = System.Drawing.SystemColors.Control;
      this.pnlRight.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
      this.pnlRight.Controls.Add(this.pnlPreview);
      this.pnlRight.Dock = System.Windows.Forms.DockStyle.Fill;
      this.pnlRight.Location = new System.Drawing.Point(205, 0);
      this.pnlRight.Name = "pnlRight";
      this.pnlRight.Size = new System.Drawing.Size(587, 486);
      this.pnlRight.TabIndex = 2;
      // 
      // pnlPreview
      // 
      this.pnlPreview.Controls.Add(this.pagePreview);
      this.pnlPreview.Dock = System.Windows.Forms.DockStyle.Fill;
      this.pnlPreview.Location = new System.Drawing.Point(0, 0);
      this.pnlPreview.Name = "pnlPreview";
      this.pnlPreview.Size = new System.Drawing.Size(583, 482);
      this.pnlPreview.TabIndex = 0;
      // 
      // pagePreview
      // 
      this.pagePreview.BackColor = System.Drawing.SystemColors.Control;
      this.pagePreview.BorderStyle = System.Windows.Forms.BorderStyle.None;
      this.pagePreview.DesktopColor = System.Drawing.SystemColors.ControlDark;
      this.pagePreview.Dock = System.Windows.Forms.DockStyle.Fill;
      this.pagePreview.Location = new System.Drawing.Point(0, 0);
      this.pagePreview.Name = "pagePreview";
      this.pagePreview.PageColor = System.Drawing.Color.GhostWhite;
      this.pagePreview.PageSize = new System.Drawing.Size(595, 842);
      this.pagePreview.Size = new System.Drawing.Size(583, 482);
      this.pagePreview.TabIndex = 4;
      this.pagePreview.Zoom = PdfSharp.Forms.Zoom.BestFit;
      this.pagePreview.ZoomPercent = 70;
      // 
      // splitter
      // 
      this.splitter.BackColor = System.Drawing.SystemColors.Control;
      this.splitter.Location = new System.Drawing.Point(200, 0);
      this.splitter.Name = "splitter";
      this.splitter.Size = new System.Drawing.Size(5, 486);
      this.splitter.TabIndex = 1;
      this.splitter.TabStop = false;
      // 
      // pnlLeft
      // 
      this.pnlLeft.BackColor = System.Drawing.SystemColors.Control;
      this.pnlLeft.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
      this.pnlLeft.Controls.Add(this.tvNavigation);
      this.pnlLeft.Dock = System.Windows.Forms.DockStyle.Left;
      this.pnlLeft.Location = new System.Drawing.Point(0, 0);
      this.pnlLeft.Name = "pnlLeft";
      this.pnlLeft.Size = new System.Drawing.Size(200, 486);
      this.pnlLeft.TabIndex = 0;
      // 
      // tvNavigation
      // 
      this.tvNavigation.BorderStyle = System.Windows.Forms.BorderStyle.None;
      this.tvNavigation.Dock = System.Windows.Forms.DockStyle.Fill;
      this.tvNavigation.ImageIndex = -1;
      this.tvNavigation.Location = new System.Drawing.Point(0, 0);
      this.tvNavigation.Name = "tvNavigation";
      this.tvNavigation.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
                                                                             new System.Windows.Forms.TreeNode("Line Chart"),
                                                                             new System.Windows.Forms.TreeNode("Column Chart"),
                                                                             new System.Windows.Forms.TreeNode("Stacked Column Chart"),
                                                                             new System.Windows.Forms.TreeNode("Bar Chart"),
                                                                             new System.Windows.Forms.TreeNode("Stacked Bar Chart"),
                                                                             new System.Windows.Forms.TreeNode("Area Chart"),
                                                                             new System.Windows.Forms.TreeNode("Pie Chart"),
                                                                             new System.Windows.Forms.TreeNode("Pie Exploded Chart"),
                                                                             new System.Windows.Forms.TreeNode("Combination Chart")});
      this.tvNavigation.SelectedImageIndex = -1;
      this.tvNavigation.Size = new System.Drawing.Size(196, 482);
      this.tvNavigation.TabIndex = 0;
      this.tvNavigation.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvNavigation_AfterSelect);
      // 
      // btnPdf
      // 
      this.btnPdf.BackColor = System.Drawing.Color.Transparent;
      this.btnPdf.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
      this.btnPdf.Image = ((System.Drawing.Image)(resources.GetObject("btnPdf.Image")));
      this.btnPdf.Location = new System.Drawing.Point(464, 16);
      this.btnPdf.Name = "btnPdf";
      this.btnPdf.Size = new System.Drawing.Size(44, 44);
      this.btnPdf.TabIndex = 1;
      this.btnPdf.Click += new System.EventHandler(this.btnPdf_Click);
      // 
      // btnOriginalSize
      // 
      this.btnOriginalSize.BackColor = System.Drawing.Color.Transparent;
      this.btnOriginalSize.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
      this.btnOriginalSize.Image = ((System.Drawing.Image)(resources.GetObject("btnOriginalSize.Image")));
      this.btnOriginalSize.Location = new System.Drawing.Point(204, 16);
      this.btnOriginalSize.Name = "btnOriginalSize";
      this.btnOriginalSize.Size = new System.Drawing.Size(44, 44);
      this.btnOriginalSize.TabIndex = 2;
      this.btnOriginalSize.Click += new System.EventHandler(this.btnOriginalSize_Click);
      // 
      // btnFullPage
      // 
      this.btnFullPage.BackColor = System.Drawing.Color.Transparent;
      this.btnFullPage.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
      this.btnFullPage.Image = ((System.Drawing.Image)(resources.GetObject("btnFullPage.Image")));
      this.btnFullPage.Location = new System.Drawing.Point(256, 16);
      this.btnFullPage.Name = "btnFullPage";
      this.btnFullPage.Size = new System.Drawing.Size(44, 44);
      this.btnFullPage.TabIndex = 2;
      this.btnFullPage.Click += new System.EventHandler(this.btnFullPage_Click);
      // 
      // btnBestFit
      // 
      this.btnBestFit.BackColor = System.Drawing.Color.Transparent;
      this.btnBestFit.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
      this.btnBestFit.Image = ((System.Drawing.Image)(resources.GetObject("btnBestFit.Image")));
      this.btnBestFit.Location = new System.Drawing.Point(308, 16);
      this.btnBestFit.Name = "btnBestFit";
      this.btnBestFit.Size = new System.Drawing.Size(44, 44);
      this.btnBestFit.TabIndex = 2;
      this.btnBestFit.Click += new System.EventHandler(this.btnBestFit_Click);
      // 
      // btnMinus
      // 
      this.btnMinus.BackColor = System.Drawing.Color.Transparent;
      this.btnMinus.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
      this.btnMinus.Image = ((System.Drawing.Image)(resources.GetObject("btnMinus.Image")));
      this.btnMinus.Location = new System.Drawing.Point(360, 16);
      this.btnMinus.Name = "btnMinus";
      this.btnMinus.Size = new System.Drawing.Size(44, 44);
      this.btnMinus.TabIndex = 2;
      this.btnMinus.Click += new System.EventHandler(this.btnMinus_Click);
      // 
      // btnPlus
      // 
      this.btnPlus.BackColor = System.Drawing.Color.Transparent;
      this.btnPlus.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
      this.btnPlus.Image = ((System.Drawing.Image)(resources.GetObject("btnPlus.Image")));
      this.btnPlus.Location = new System.Drawing.Point(412, 16);
      this.btnPlus.Name = "btnPlus";
      this.btnPlus.Size = new System.Drawing.Size(44, 44);
      this.btnPlus.TabIndex = 2;
      this.btnPlus.Click += new System.EventHandler(this.btnPlus_Click);
      // 
      // MainForm
      // 
      this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
      this.BackColor = System.Drawing.Color.WhiteSmoke;
      this.ClientSize = new System.Drawing.Size(792, 566);
      this.Controls.Add(this.btnOriginalSize);
      this.Controls.Add(this.btnPdf);
      this.Controls.Add(this.pnlMain);
      this.Controls.Add(this.btnFullPage);
      this.Controls.Add(this.btnBestFit);
      this.Controls.Add(this.btnMinus);
      this.Controls.Add(this.btnPlus);
      this.DockPadding.Bottom = -2;
      this.Name = "MainForm";
      this.Text = "PDFsharp Charting Demo";
      this.pnlMain.ResumeLayout(false);
      this.pnlRight.ResumeLayout(false);
      this.pnlPreview.ResumeLayout(false);
      this.pnlLeft.ResumeLayout(false);
      this.ResumeLayout(false);

    }
コード例 #6
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MainForm));
     this.pnlMain         = new System.Windows.Forms.Panel();
     this.pnlRight        = new System.Windows.Forms.Panel();
     this.pnlPreview      = new System.Windows.Forms.Panel();
     this.pagePreview     = new PdfSharp.Forms.PagePreview();
     this.splitter        = new System.Windows.Forms.Splitter();
     this.pnlLeft         = new System.Windows.Forms.Panel();
     this.tvNavigation    = new System.Windows.Forms.TreeView();
     this.btnPdf          = new System.Windows.Forms.Button();
     this.btnOriginalSize = new System.Windows.Forms.Button();
     this.btnFullPage     = new System.Windows.Forms.Button();
     this.btnBestFit      = new System.Windows.Forms.Button();
     this.btnMinus        = new System.Windows.Forms.Button();
     this.btnPlus         = new System.Windows.Forms.Button();
     this.pnlMain.SuspendLayout();
     this.pnlRight.SuspendLayout();
     this.pnlPreview.SuspendLayout();
     this.pnlLeft.SuspendLayout();
     this.SuspendLayout();
     //
     // pnlMain
     //
     this.pnlMain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                  | System.Windows.Forms.AnchorStyles.Left)
                                                                 | System.Windows.Forms.AnchorStyles.Right)));
     this.pnlMain.BackColor = System.Drawing.SystemColors.Control;
     this.pnlMain.Controls.Add(this.pnlRight);
     this.pnlMain.Controls.Add(this.splitter);
     this.pnlMain.Controls.Add(this.pnlLeft);
     this.pnlMain.Location = new System.Drawing.Point(0, 80);
     this.pnlMain.Name     = "pnlMain";
     this.pnlMain.Size     = new System.Drawing.Size(792, 486);
     this.pnlMain.TabIndex = 0;
     //
     // pnlRight
     //
     this.pnlRight.BackColor   = System.Drawing.SystemColors.Control;
     this.pnlRight.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pnlRight.Controls.Add(this.pnlPreview);
     this.pnlRight.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.pnlRight.Location = new System.Drawing.Point(205, 0);
     this.pnlRight.Name     = "pnlRight";
     this.pnlRight.Size     = new System.Drawing.Size(587, 486);
     this.pnlRight.TabIndex = 2;
     //
     // pnlPreview
     //
     this.pnlPreview.Controls.Add(this.pagePreview);
     this.pnlPreview.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.pnlPreview.Location = new System.Drawing.Point(0, 0);
     this.pnlPreview.Name     = "pnlPreview";
     this.pnlPreview.Size     = new System.Drawing.Size(583, 482);
     this.pnlPreview.TabIndex = 0;
     //
     // pagePreview
     //
     this.pagePreview.BackColor    = System.Drawing.SystemColors.Control;
     this.pagePreview.BorderStyle  = System.Windows.Forms.BorderStyle.None;
     this.pagePreview.DesktopColor = System.Drawing.SystemColors.ControlDark;
     this.pagePreview.Dock         = System.Windows.Forms.DockStyle.Fill;
     this.pagePreview.Location     = new System.Drawing.Point(0, 0);
     this.pagePreview.Name         = "pagePreview";
     this.pagePreview.PageColor    = System.Drawing.Color.GhostWhite;
     this.pagePreview.PageSize     = new System.Drawing.Size(595, 842);
     this.pagePreview.Size         = new System.Drawing.Size(583, 482);
     this.pagePreview.TabIndex     = 4;
     this.pagePreview.Zoom         = PdfSharp.Forms.Zoom.BestFit;
     this.pagePreview.ZoomPercent  = 70;
     //
     // splitter
     //
     this.splitter.BackColor = System.Drawing.SystemColors.Control;
     this.splitter.Location  = new System.Drawing.Point(200, 0);
     this.splitter.Name      = "splitter";
     this.splitter.Size      = new System.Drawing.Size(5, 486);
     this.splitter.TabIndex  = 1;
     this.splitter.TabStop   = false;
     //
     // pnlLeft
     //
     this.pnlLeft.BackColor   = System.Drawing.SystemColors.Control;
     this.pnlLeft.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pnlLeft.Controls.Add(this.tvNavigation);
     this.pnlLeft.Dock     = System.Windows.Forms.DockStyle.Left;
     this.pnlLeft.Location = new System.Drawing.Point(0, 0);
     this.pnlLeft.Name     = "pnlLeft";
     this.pnlLeft.Size     = new System.Drawing.Size(200, 486);
     this.pnlLeft.TabIndex = 0;
     //
     // tvNavigation
     //
     this.tvNavigation.BorderStyle = System.Windows.Forms.BorderStyle.None;
     this.tvNavigation.Dock        = System.Windows.Forms.DockStyle.Fill;
     this.tvNavigation.ImageIndex  = -1;
     this.tvNavigation.Location    = new System.Drawing.Point(0, 0);
     this.tvNavigation.Name        = "tvNavigation";
     this.tvNavigation.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
         new System.Windows.Forms.TreeNode("Line Chart"),
         new System.Windows.Forms.TreeNode("Column Chart"),
         new System.Windows.Forms.TreeNode("Stacked Column Chart"),
         new System.Windows.Forms.TreeNode("Bar Chart"),
         new System.Windows.Forms.TreeNode("Stacked Bar Chart"),
         new System.Windows.Forms.TreeNode("Area Chart"),
         new System.Windows.Forms.TreeNode("Pie Chart"),
         new System.Windows.Forms.TreeNode("Pie Exploded Chart"),
         new System.Windows.Forms.TreeNode("Combination Chart")
     });
     this.tvNavigation.SelectedImageIndex = -1;
     this.tvNavigation.Size         = new System.Drawing.Size(196, 482);
     this.tvNavigation.TabIndex     = 0;
     this.tvNavigation.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvNavigation_AfterSelect);
     //
     // btnPdf
     //
     this.btnPdf.BackColor = System.Drawing.Color.Transparent;
     this.btnPdf.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
     this.btnPdf.Image     = ((System.Drawing.Image)(resources.GetObject("btnPdf.Image")));
     this.btnPdf.Location  = new System.Drawing.Point(464, 16);
     this.btnPdf.Name      = "btnPdf";
     this.btnPdf.Size      = new System.Drawing.Size(44, 44);
     this.btnPdf.TabIndex  = 1;
     this.btnPdf.Click    += new System.EventHandler(this.btnPdf_Click);
     //
     // btnOriginalSize
     //
     this.btnOriginalSize.BackColor = System.Drawing.Color.Transparent;
     this.btnOriginalSize.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
     this.btnOriginalSize.Image     = ((System.Drawing.Image)(resources.GetObject("btnOriginalSize.Image")));
     this.btnOriginalSize.Location  = new System.Drawing.Point(204, 16);
     this.btnOriginalSize.Name      = "btnOriginalSize";
     this.btnOriginalSize.Size      = new System.Drawing.Size(44, 44);
     this.btnOriginalSize.TabIndex  = 2;
     this.btnOriginalSize.Click    += new System.EventHandler(this.btnOriginalSize_Click);
     //
     // btnFullPage
     //
     this.btnFullPage.BackColor = System.Drawing.Color.Transparent;
     this.btnFullPage.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
     this.btnFullPage.Image     = ((System.Drawing.Image)(resources.GetObject("btnFullPage.Image")));
     this.btnFullPage.Location  = new System.Drawing.Point(256, 16);
     this.btnFullPage.Name      = "btnFullPage";
     this.btnFullPage.Size      = new System.Drawing.Size(44, 44);
     this.btnFullPage.TabIndex  = 2;
     this.btnFullPage.Click    += new System.EventHandler(this.btnFullPage_Click);
     //
     // btnBestFit
     //
     this.btnBestFit.BackColor = System.Drawing.Color.Transparent;
     this.btnBestFit.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
     this.btnBestFit.Image     = ((System.Drawing.Image)(resources.GetObject("btnBestFit.Image")));
     this.btnBestFit.Location  = new System.Drawing.Point(308, 16);
     this.btnBestFit.Name      = "btnBestFit";
     this.btnBestFit.Size      = new System.Drawing.Size(44, 44);
     this.btnBestFit.TabIndex  = 2;
     this.btnBestFit.Click    += new System.EventHandler(this.btnBestFit_Click);
     //
     // btnMinus
     //
     this.btnMinus.BackColor = System.Drawing.Color.Transparent;
     this.btnMinus.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
     this.btnMinus.Image     = ((System.Drawing.Image)(resources.GetObject("btnMinus.Image")));
     this.btnMinus.Location  = new System.Drawing.Point(360, 16);
     this.btnMinus.Name      = "btnMinus";
     this.btnMinus.Size      = new System.Drawing.Size(44, 44);
     this.btnMinus.TabIndex  = 2;
     this.btnMinus.Click    += new System.EventHandler(this.btnMinus_Click);
     //
     // btnPlus
     //
     this.btnPlus.BackColor = System.Drawing.Color.Transparent;
     this.btnPlus.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
     this.btnPlus.Image     = ((System.Drawing.Image)(resources.GetObject("btnPlus.Image")));
     this.btnPlus.Location  = new System.Drawing.Point(412, 16);
     this.btnPlus.Name      = "btnPlus";
     this.btnPlus.Size      = new System.Drawing.Size(44, 44);
     this.btnPlus.TabIndex  = 2;
     this.btnPlus.Click    += new System.EventHandler(this.btnPlus_Click);
     //
     // MainForm
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.BackColor         = System.Drawing.Color.WhiteSmoke;
     this.ClientSize        = new System.Drawing.Size(792, 566);
     this.Controls.Add(this.btnOriginalSize);
     this.Controls.Add(this.btnPdf);
     this.Controls.Add(this.pnlMain);
     this.Controls.Add(this.btnFullPage);
     this.Controls.Add(this.btnBestFit);
     this.Controls.Add(this.btnMinus);
     this.Controls.Add(this.btnPlus);
     this.DockPadding.Bottom = -2;
     this.Name = "MainForm";
     this.Text = "PDFsharp Charting Demo";
     this.pnlMain.ResumeLayout(false);
     this.pnlRight.ResumeLayout(false);
     this.pnlPreview.ResumeLayout(false);
     this.pnlLeft.ResumeLayout(false);
     this.ResumeLayout(false);
 }
コード例 #7
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(PreviewForm));
     this.toolBar         = new System.Windows.Forms.ToolBar();
     this.tbbSeparator1   = new System.Windows.Forms.ToolBarButton();
     this.tbbFirstPage    = new System.Windows.Forms.ToolBarButton();
     this.tbbPrevPage     = new System.Windows.Forms.ToolBarButton();
     this.tbbNextPage     = new System.Windows.Forms.ToolBarButton();
     this.tbbLastPage     = new System.Windows.Forms.ToolBarButton();
     this.tbbSeparator2   = new System.Windows.Forms.ToolBarButton();
     this.tbbOriginalSize = new System.Windows.Forms.ToolBarButton();
     this.menuZoom        = new System.Windows.Forms.ContextMenu();
     this.miPercent800    = new System.Windows.Forms.MenuItem();
     this.miPercent600    = new System.Windows.Forms.MenuItem();
     this.miPercent400    = new System.Windows.Forms.MenuItem();
     this.miPercent200    = new System.Windows.Forms.MenuItem();
     this.miPercent150    = new System.Windows.Forms.MenuItem();
     this.miPercent100    = new System.Windows.Forms.MenuItem();
     this.miPercent75     = new System.Windows.Forms.MenuItem();
     this.miPercent50     = new System.Windows.Forms.MenuItem();
     this.miPercent25     = new System.Windows.Forms.MenuItem();
     this.miPercent10     = new System.Windows.Forms.MenuItem();
     this.menuItem10      = new System.Windows.Forms.MenuItem();
     this.miBestFit       = new System.Windows.Forms.MenuItem();
     this.miFullPage      = new System.Windows.Forms.MenuItem();
     this.tbbFullPage     = new System.Windows.Forms.ToolBarButton();
     this.tbbBestFit      = new System.Windows.Forms.ToolBarButton();
     this.tbbSmaller      = new System.Windows.Forms.ToolBarButton();
     this.tbbLarger       = new System.Windows.Forms.ToolBarButton();
     this.tbbSeparator3   = new System.Windows.Forms.ToolBarButton();
     this.tbbPrint        = new System.Windows.Forms.ToolBarButton();
     this.tbbMakePdf      = new System.Windows.Forms.ToolBarButton();
     this.ilToolbar       = new System.Windows.Forms.ImageList(this.components);
     this.statusBar       = new System.Windows.Forms.StatusBar();
     this.pagePreview     = new PdfSharp.Forms.PagePreview();
     this.SuspendLayout();
     //
     // toolBar
     //
     this.toolBar.Appearance = System.Windows.Forms.ToolBarAppearance.Flat;
     this.toolBar.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
         this.tbbSeparator1,
         this.tbbFirstPage,
         this.tbbPrevPage,
         this.tbbNextPage,
         this.tbbLastPage,
         this.tbbSeparator2,
         this.tbbOriginalSize,
         this.tbbFullPage,
         this.tbbBestFit,
         this.tbbSmaller,
         this.tbbLarger,
         this.tbbSeparator3,
         this.tbbPrint,
         this.tbbMakePdf
     });
     this.toolBar.DropDownArrows = true;
     this.toolBar.ImageList      = this.ilToolbar;
     this.toolBar.Location       = new System.Drawing.Point(0, 0);
     this.toolBar.Name           = "toolBar";
     this.toolBar.ShowToolTips   = true;
     this.toolBar.Size           = new System.Drawing.Size(638, 42);
     this.toolBar.TabIndex       = 1;
     this.toolBar.ButtonClick   += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar_ButtonClick);
     //
     // tbbSeparator1
     //
     this.tbbSeparator1.Style   = System.Windows.Forms.ToolBarButtonStyle.Separator;
     this.tbbSeparator1.Visible = false;
     //
     // tbbFirstPage
     //
     this.tbbFirstPage.ImageIndex = 0;
     this.tbbFirstPage.Tag        = "FirstPage";
     this.tbbFirstPage.Visible    = false;
     //
     // tbbPrevPage
     //
     this.tbbPrevPage.Enabled    = false;
     this.tbbPrevPage.ImageIndex = 1;
     this.tbbPrevPage.Tag        = "PrevPage";
     this.tbbPrevPage.Visible    = false;
     //
     // tbbNextPage
     //
     this.tbbNextPage.Enabled    = false;
     this.tbbNextPage.ImageIndex = 2;
     this.tbbNextPage.Tag        = "NextPage";
     this.tbbNextPage.Visible    = false;
     //
     // tbbLastPage
     //
     this.tbbLastPage.Enabled    = false;
     this.tbbLastPage.ImageIndex = 3;
     this.tbbLastPage.Tag        = "LastPage";
     this.tbbLastPage.Visible    = false;
     //
     // tbbSeparator2
     //
     this.tbbSeparator2.Style   = System.Windows.Forms.ToolBarButtonStyle.Separator;
     this.tbbSeparator2.Visible = false;
     //
     // tbbOriginalSize
     //
     this.tbbOriginalSize.DropDownMenu = this.menuZoom;
     this.tbbOriginalSize.ImageIndex   = 4;
     this.tbbOriginalSize.Style        = System.Windows.Forms.ToolBarButtonStyle.DropDownButton;
     this.tbbOriginalSize.Tag          = "OriginalSize";
     this.tbbOriginalSize.Text         = "Original Size";
     //
     // menuZoom
     //
     this.menuZoom.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.miPercent800,
         this.miPercent600,
         this.miPercent400,
         this.miPercent200,
         this.miPercent150,
         this.miPercent100,
         this.miPercent75,
         this.miPercent50,
         this.miPercent25,
         this.miPercent10,
         this.menuItem10,
         this.miBestFit,
         this.miFullPage
     });
     //
     // miPercent800
     //
     this.miPercent800.Index  = 0;
     this.miPercent800.Text   = "800%";
     this.miPercent800.Click += new System.EventHandler(this.miPercent800_Click);
     //
     // miPercent600
     //
     this.miPercent600.Index  = 1;
     this.miPercent600.Text   = "600%";
     this.miPercent600.Click += new System.EventHandler(this.miPercent600_Click);
     //
     // miPercent400
     //
     this.miPercent400.Index  = 2;
     this.miPercent400.Text   = "400%";
     this.miPercent400.Click += new System.EventHandler(this.miPercent400_Click);
     //
     // miPercent200
     //
     this.miPercent200.Index  = 3;
     this.miPercent200.Text   = "200%";
     this.miPercent200.Click += new System.EventHandler(this.miPercent200_Click);
     //
     // miPercent150
     //
     this.miPercent150.Index  = 4;
     this.miPercent150.Text   = "150%";
     this.miPercent150.Click += new System.EventHandler(this.miPercent150_Click);
     //
     // miPercent100
     //
     this.miPercent100.Index  = 5;
     this.miPercent100.Text   = "100%";
     this.miPercent100.Click += new System.EventHandler(this.miPercent100_Click);
     //
     // miPercent75
     //
     this.miPercent75.Index  = 6;
     this.miPercent75.Text   = "75%";
     this.miPercent75.Click += new System.EventHandler(this.miPercent75_Click);
     //
     // miPercent50
     //
     this.miPercent50.Index  = 7;
     this.miPercent50.Text   = "50%";
     this.miPercent50.Click += new System.EventHandler(this.miPercent50_Click);
     //
     // miPercent25
     //
     this.miPercent25.Index  = 8;
     this.miPercent25.Text   = "25%";
     this.miPercent25.Click += new System.EventHandler(this.miPercent25_Click);
     //
     // miPercent10
     //
     this.miPercent10.Index  = 9;
     this.miPercent10.Text   = "10%";
     this.miPercent10.Click += new System.EventHandler(this.miPercent10_Click);
     //
     // menuItem10
     //
     this.menuItem10.Index = 10;
     this.menuItem10.Text  = "-";
     //
     // miBestFit
     //
     this.miBestFit.Index  = 11;
     this.miBestFit.Text   = "Best fit";
     this.miBestFit.Click += new System.EventHandler(this.miBestFit_Click);
     //
     // miFullPage
     //
     this.miFullPage.Index  = 12;
     this.miFullPage.Text   = "Full Page";
     this.miFullPage.Click += new System.EventHandler(this.miFullPage_Click);
     //
     // tbbFullPage
     //
     this.tbbFullPage.ImageIndex = 5;
     this.tbbFullPage.Tag        = "FullPage";
     this.tbbFullPage.Text       = "Full Page";
     //
     // tbbBestFit
     //
     this.tbbBestFit.ImageIndex = 6;
     this.tbbBestFit.Tag        = "BestFit";
     this.tbbBestFit.Text       = "Best Fit";
     //
     // tbbSmaller
     //
     this.tbbSmaller.ImageIndex = 7;
     this.tbbSmaller.Tag        = "Smaller";
     this.tbbSmaller.Text       = "Smaller";
     //
     // tbbLarger
     //
     this.tbbLarger.ImageIndex = 8;
     this.tbbLarger.Tag        = "Larger";
     this.tbbLarger.Text       = "Larger";
     //
     // tbbSeparator3
     //
     this.tbbSeparator3.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // tbbPrint
     //
     this.tbbPrint.ImageIndex = 10;
     this.tbbPrint.Tag        = "Print";
     this.tbbPrint.Text       = "Print";
     //
     // tbbMakePdf
     //
     this.tbbMakePdf.ImageIndex = 9;
     this.tbbMakePdf.Tag        = "MakePdf";
     this.tbbMakePdf.Text       = "Create PDF";
     //
     // ilToolbar
     //
     this.ilToolbar.ImageSize        = new System.Drawing.Size(16, 16);
     this.ilToolbar.ImageStream      = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ilToolbar.ImageStream")));
     this.ilToolbar.TransparentColor = System.Drawing.Color.Lime;
     //
     // statusBar
     //
     this.statusBar.Location = new System.Drawing.Point(0, 624);
     this.statusBar.Name     = "statusBar";
     this.statusBar.Size     = new System.Drawing.Size(638, 22);
     this.statusBar.TabIndex = 2;
     //
     // pagePreview
     //
     this.pagePreview.BackColor    = System.Drawing.SystemColors.Control;
     this.pagePreview.BorderStyle  = System.Windows.Forms.BorderStyle.Fixed3D;
     this.pagePreview.DesktopColor = System.Drawing.SystemColors.ControlDark;
     this.pagePreview.Dock         = System.Windows.Forms.DockStyle.Fill;
     this.pagePreview.Location     = new System.Drawing.Point(0, 42);
     this.pagePreview.Name         = "pagePreview";
     this.pagePreview.PageColor    = System.Drawing.Color.GhostWhite;
     this.pagePreview.PageSizeF    = new System.Drawing.Size(595, 842);
     this.pagePreview.Size         = new System.Drawing.Size(638, 582);
     this.pagePreview.TabIndex     = 4;
     this.pagePreview.Zoom         = PdfSharp.Forms.Zoom.BestFit;
     this.pagePreview.ZoomPercent  = 77;
     //
     // PreviewForm
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(638, 646);
     this.Controls.Add(this.pagePreview);
     this.Controls.Add(this.statusBar);
     this.Controls.Add(this.toolBar);
     this.Name          = "PreviewForm";
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text          = "Preview Sample";
     this.ResumeLayout(false);
 }