⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 enduserdesignermainform.cs

📁 AV 的自定义 ENDUSERDESIGN
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

using DataDynamics.ActiveReports;
using DataDynamics.ActiveReports.Design;
using DataDynamics.ActiveReports.Design.Toolbox;

namespace DataDynamics.ActiveReports.Samples.ProfessionalEdition
{
	/// <summary>
	/// Main form for the End User Designer application
	/// </summary>
	public class EndUserDesignerMainForm : System.Windows.Forms.Form
	{
		private Designer arDesigner;
		private System.Windows.Forms.PropertyGrid arPropertyGrid;
		private ReportExplorer arReportExplorer;
		private Toolbox arToolbox;
		private CommandBarManager commandBarManager;
		private Panel pnlToolbox;
		private Splitter splitterToolboxDesigner;
		private Splitter splitterDesignerProperties;
		private Panel pnlProperties;
		private Splitter splitterReportExplorerPropertyGrid;
		private StatusBar arStatus;

		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public EndUserDesignerMainForm()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();



			//Create new report instance and assign to Report Explorer
			//Note:  Assigning the ToolBox to the designer before calling NewReport
			// will automaticly add the default controls to the toolbox in a group called
			// "ActiveReports 3.0"
			this.arDesigner.Toolbox = this.arToolbox;
			this.arReportExplorer.Report = arDesigner.Report;

			//Add Menu and CommandBar to Form
			this.commandBarManager = this.arDesigner.CommandBarManager;
			this.Controls.Add(this.commandBarManager);

			// Add a exit command to the File menu
			CommandBarMenu menu = this.commandBarManager.CommandBars[0].Items[0] as CommandBarMenu;
			menu.Items.AddSeparator();
			menu.Items.AddButton("Exit", new CommandEventHandler(OnExit), 0);


            menu.Items.Remove(menu.Items[2]);
            CommandBarButton newSave = new
                  CommandBarButton(
                  DataDynamics.ActiveReports.Design.Images.Save,
                  "Save",
                  new DataDynamics.ActiveReports.Design.CommandEventHandler(CommandBarButton_Click), 5);

            menu.Items.Insert(menu.Items.Count - 2, newSave);





			//Fill Toolbox
			LoadTools(this.arToolbox);
			// Activate default group on the toolbox
			this.arToolbox.SelectedCategory = "ActiveReports 3.0";

			//Setup Status Bar
			this.arStatus.Panels.Add(new StatusBarPanel());
			this.arStatus.Panels.Add(new StatusBarPanel());
			this.arStatus.Panels[0].AutoSize = StatusBarPanelAutoSize.Spring;
			this.arStatus.Panels[1].AutoSize = StatusBarPanelAutoSize.Spring;
			this.arStatus.ShowPanels = true;
           // this.arDesigner.EnablePreview =false;
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
				if(this.arDesigner != null)
				{
					this.arDesigner.Dispose();
					this.arDesigner = null;
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            this.arToolbox = new DataDynamics.ActiveReports.Design.Toolbox.Toolbox();
            this.pnlToolbox = new System.Windows.Forms.Panel();
            this.splitterToolboxDesigner = new System.Windows.Forms.Splitter();
            this.arDesigner = new DataDynamics.ActiveReports.Design.Designer();
            this.arPropertyGrid = new System.Windows.Forms.PropertyGrid();
            this.splitterDesignerProperties = new System.Windows.Forms.Splitter();
            this.pnlProperties = new System.Windows.Forms.Panel();
            this.splitterReportExplorerPropertyGrid = new System.Windows.Forms.Splitter();
            this.arReportExplorer = new DataDynamics.ActiveReports.Design.ReportExplorer();
            this.arStatus = new System.Windows.Forms.StatusBar();
            this.commandBarManager = new DataDynamics.ActiveReports.Design.CommandBarManager();
            ((System.ComponentModel.ISupportInitialize)(this.arToolbox)).BeginInit();
            this.pnlToolbox.SuspendLayout();
            this.pnlProperties.SuspendLayout();
            this.SuspendLayout();
            // 
            // arToolbox
            // 
            this.arToolbox.Dock = System.Windows.Forms.DockStyle.Fill;
            this.arToolbox.LargeImages = null;
            this.arToolbox.Location = new System.Drawing.Point(0, 0);
            this.arToolbox.Name = "arToolbox";
            this.arToolbox.Selected = null;
            this.arToolbox.Size = new System.Drawing.Size(240, 576);
            this.arToolbox.SmallImages = null;
            this.arToolbox.TabIndex = 0;
            // 
            // pnlToolbox
            // 
            this.pnlToolbox.Controls.Add(this.arToolbox);
            this.pnlToolbox.Dock = System.Windows.Forms.DockStyle.Left;
            this.pnlToolbox.Location = new System.Drawing.Point(0, 0);
            this.pnlToolbox.Name = "pnlToolbox";
            this.pnlToolbox.Size = new System.Drawing.Size(240, 576);
            this.pnlToolbox.TabIndex = 0;
            // 
            // splitterToolboxDesigner
            // 
            this.splitterToolboxDesigner.BackColor = System.Drawing.SystemColors.Control;
            this.splitterToolboxDesigner.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.splitterToolboxDesigner.Location = new System.Drawing.Point(240, 0);
            this.splitterToolboxDesigner.Name = "splitterToolboxDesigner";
            this.splitterToolboxDesigner.Size = new System.Drawing.Size(4, 576);
            this.splitterToolboxDesigner.TabIndex = 1;
            this.splitterToolboxDesigner.TabStop = false;
            // 
            // arDesigner
            // 
            this.arDesigner.Dock = System.Windows.Forms.DockStyle.Fill;
            this.arDesigner.IsDirty = false;
            this.arDesigner.Location = new System.Drawing.Point(244, 0);
            this.arDesigner.LockControls = false;
            this.arDesigner.Name = "arDesigner";
            this.arDesigner.PropertyGrid = this.arPropertyGrid;
            this.arDesigner.ReportTabsVisible = true;
            this.arDesigner.ShowDataSourceIcon = true;
            this.arDesigner.Size = new System.Drawing.Size(316, 576);
            this.arDesigner.TabIndex = 2;
            this.arDesigner.Toolbox = null;
            this.arDesigner.ToolBoxItem = null;
            this.arDesigner.SelectionChanged += new DataDynamics.ActiveReports.Design.SelectionChangedEventHandler(this.arDesigner_SelectionChanged);
            this.arDesigner.LayoutChanged += new DataDynamics.ActiveReports.Design.LayoutChangedEventHandler(this.arDesigner_LayoutChanged);
            // 
            // arPropertyGrid
            // 
            this.arPropertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;
            this.arPropertyGrid.LineColor = System.Drawing.SystemColors.ScrollBar;
            this.arPropertyGrid.Location = new System.Drawing.Point(0, 249);
            this.arPropertyGrid.Name = "arPropertyGrid";
            this.arPropertyGrid.Size = new System.Drawing.Size(240, 327);
            this.arPropertyGrid.TabIndex = 2;
            // 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -