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

📄 mainform.cs

📁 一个C#加上flowchart控件的例程
💻 CS
📖 第 1 页 / 共 4 页
字号:
			// Set-up the flow chart
			_flowChart.Selection.AllowMultiSel = false;
			_flowChart.PrpArrowStartOrnt = EOrientation.soAuto;
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			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()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MainForm));
			this._mainMenu = new System.Windows.Forms.MainMenu();
			this._menuItemFile = new System.Windows.Forms.MenuItem();
			this._menuItemNew = new System.Windows.Forms.MenuItem();
			this._menuItemOpen = new System.Windows.Forms.MenuItem();
			this._menuItemSave = new System.Windows.Forms.MenuItem();
			this._menuItemSep1 = new System.Windows.Forms.MenuItem();
			this._menuItemPreview = new System.Windows.Forms.MenuItem();
			this._menuItemPrint = new System.Windows.Forms.MenuItem();
			this._menuItemSep2 = new System.Windows.Forms.MenuItem();
			this._menuItemExit = new System.Windows.Forms.MenuItem();
			this._menuEdit = new System.Windows.Forms.MenuItem();
			this._menuUndo = new System.Windows.Forms.MenuItem();
			this._menuRedo = new System.Windows.Forms.MenuItem();
			this._menuItemTools = new System.Windows.Forms.MenuItem();
			this._menuItemOptions = new System.Windows.Forms.MenuItem();
			this._menuItemHelp = new System.Windows.Forms.MenuItem();
			this._menuItemAbout = new System.Windows.Forms.MenuItem();
			this._borderPanel = new System.Windows.Forms.Panel();
			this._hidden = new MindFusion.FlowChartX.FlowChart();
			this._flowChart = new MindFusion.FlowChartX.FlowChart();
			this._rightPanel = new System.Windows.Forms.Panel();
			this._propertyGrid = new System.Windows.Forms.PropertyGrid();
			this._splitter2 = new System.Windows.Forms.Splitter();
			this._tab = new System.Windows.Forms.TabControl();
			this._tabNodes = new System.Windows.Forms.TabPage();
			this._nodeList = new System.Windows.Forms.ListBox();
			this._tabConnectors = new System.Windows.Forms.TabPage();
			this._connectorList = new System.Windows.Forms.ListBox();
			this._connectorTypeCombo = new System.Windows.Forms.ComboBox();
			this._openFileDialog = new System.Windows.Forms.OpenFileDialog();
			this._saveFileDialog = new System.Windows.Forms.SaveFileDialog();
			this._contextMenu = new System.Windows.Forms.ContextMenu();
			this._menuItemDelete = new System.Windows.Forms.MenuItem();
			this.panel1 = new System.Windows.Forms.Panel();
			this._borderPanel.SuspendLayout();
			this._rightPanel.SuspendLayout();
			this._tab.SuspendLayout();
			this._tabNodes.SuspendLayout();
			this._tabConnectors.SuspendLayout();
			this.panel1.SuspendLayout();
			this.SuspendLayout();
			// 
			// _mainMenu
			// 
			this._mainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this._menuItemFile,
																					  this._menuEdit,
																					  this._menuItemTools,
																					  this._menuItemHelp});
			// 
			// _menuItemFile
			// 
			this._menuItemFile.Index = 0;
			this._menuItemFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																						  this._menuItemNew,
																						  this._menuItemOpen,
																						  this._menuItemSave,
																						  this._menuItemSep1,
																						  this._menuItemPreview,
																						  this._menuItemPrint,
																						  this._menuItemSep2,
																						  this._menuItemExit});
			this._menuItemFile.Text = "&File";
			// 
			// _menuItemNew
			// 
			this._menuItemNew.Index = 0;
			this._menuItemNew.Shortcut = System.Windows.Forms.Shortcut.CtrlN;
			this._menuItemNew.Text = "&New";
			this._menuItemNew.Click += new System.EventHandler(this.OnFileNew);
			// 
			// _menuItemOpen
			// 
			this._menuItemOpen.Index = 1;
			this._menuItemOpen.Shortcut = System.Windows.Forms.Shortcut.CtrlO;
			this._menuItemOpen.Text = "&Open...";
			this._menuItemOpen.Click += new System.EventHandler(this.OnFileOpen);
			// 
			// _menuItemSave
			// 
			this._menuItemSave.Index = 2;
			this._menuItemSave.Shortcut = System.Windows.Forms.Shortcut.CtrlS;
			this._menuItemSave.Text = "&Save...";
			this._menuItemSave.Click += new System.EventHandler(this.OnFileSave);
			// 
			// _menuItemSep1
			// 
			this._menuItemSep1.Index = 3;
			this._menuItemSep1.Text = "-";
			// 
			// _menuItemPreview
			// 
			this._menuItemPreview.Index = 4;
			this._menuItemPreview.Text = "Print pre&view...";
			this._menuItemPreview.Click += new System.EventHandler(this.OnPrintPreview);
			// 
			// _menuItemPrint
			// 
			this._menuItemPrint.Index = 5;
			this._menuItemPrint.Shortcut = System.Windows.Forms.Shortcut.CtrlP;
			this._menuItemPrint.Text = "&Print...";
			this._menuItemPrint.Click += new System.EventHandler(this.OnPrint);
			// 
			// _menuItemSep2
			// 
			this._menuItemSep2.Index = 6;
			this._menuItemSep2.Text = "-";
			// 
			// _menuItemExit
			// 
			this._menuItemExit.Index = 7;
			this._menuItemExit.Text = "E&xit";
			this._menuItemExit.Click += new System.EventHandler(this.OnExit);
			// 
			// _menuEdit
			// 
			this._menuEdit.Index = 1;
			this._menuEdit.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this._menuUndo,
																					  this._menuRedo});
			this._menuEdit.Text = "&Edit";
			this._menuEdit.Popup += new System.EventHandler(this.OnEditPopup);
			// 
			// _menuUndo
			// 
			this._menuUndo.Index = 0;
			this._menuUndo.Shortcut = System.Windows.Forms.Shortcut.CtrlZ;
			this._menuUndo.Text = "&Undo";
			this._menuUndo.Click += new System.EventHandler(this.OnUndo);
			// 
			// _menuRedo
			// 
			this._menuRedo.Index = 1;
			this._menuRedo.Shortcut = System.Windows.Forms.Shortcut.CtrlY;
			this._menuRedo.Text = "&Redo";
			this._menuRedo.Click += new System.EventHandler(this.OnRedo);
			// 
			// _menuItemTools
			// 
			this._menuItemTools.Index = 2;
			this._menuItemTools.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																						   this._menuItemOptions});
			this._menuItemTools.Text = "&Tools";
			// 
			// _menuItemOptions
			// 
			this._menuItemOptions.Index = 0;
			this._menuItemOptions.Text = "&Options...";
			this._menuItemOptions.Click += new System.EventHandler(this.OnOptions);
			// 
			// _menuItemHelp
			// 
			this._menuItemHelp.Index = 3;
			this._menuItemHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																						  this._menuItemAbout});
			this._menuItemHelp.Text = "&Help";
			// 
			// _menuItemAbout
			// 
			this._menuItemAbout.Index = 0;
			this._menuItemAbout.Text = "&About...";
			this._menuItemAbout.Click += new System.EventHandler(this.OnAbout);
			// 
			// _borderPanel
			// 
			this._borderPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this._borderPanel.Controls.Add(this.panel1);
			this._borderPanel.Location = new System.Drawing.Point(0, -16);
			this._borderPanel.Name = "_borderPanel";
			this._borderPanel.Size = new System.Drawing.Size(488, 248);
			this._borderPanel.TabIndex = 6;
			// 
			// _hidden
			// 
			this._hidden.ActiveMnpColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(255)));
			this._hidden.ActiveObject = null;
			this._hidden.AlignToGrid = true;
			this._hidden.AllowInplaceEdit = false;
			this._hidden.AllowLinksRepeat = true;
			this._hidden.AllowRefLinks = true;
			this._hidden.AllowUnanchoredArrows = true;
			this._hidden.AllowUnconnectedArrows = false;
			this._hidden.AntiAlias = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
			this._hidden.ArrowBase = MindFusion.FlowChartX.EArrowHead.ahNone;
			this._hidden.ArrowBaseSize = 12F;
			this._hidden.ArrowColor = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(0)), ((System.Byte)(0)));
			this._hidden.ArrowEndsMovable = true;
			this._hidden.ArrowFillColor = System.Drawing.Color.FromArgb(((System.Byte)(120)), ((System.Byte)(220)), ((System.Byte)(255)));
			this._hidden.ArrowHead = MindFusion.FlowChartX.EArrowHead.ahArrow;
			this._hidden.ArrowHeadSize = 12F;
			this._hidden.ArrowIntermSize = 12F;
			this._hidden.ArrowRouteEnd = MindFusion.FlowChartX.EOrientation.soAuto;
			this._hidden.ArrowRouteStart = MindFusion.FlowChartX.EOrientation.soAuto;
			this._hidden.ArrowSegments = ((short)(1));
			this._hidden.ArrowsRetainForm = false;
			this._hidden.ArrowsSplittable = false;
			this._hidden.ArrowStyle = MindFusion.FlowChartX.EArrowStyle.asPolyline;
			this._hidden.ArrowTextStyle = MindFusion.FlowChartX.EArrowTextStyle.atsCenter;
			this._hidden.AutoScroll = true;
			this._hidden.AutoSizeDoc = false;
			this._hidden.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(255)));
			this._hidden.Behavior = MindFusion.FlowChartX.EBehavior.bhFlowChart;
			this._hidden.BkgrImagePos = MindFusion.FlowChartX.EImagePos.imgCenter;
			this._hidden.BoxCustomDraw = MindFusion.FlowChartX.ECustomDraw.cdNone;
			this._hidden.BoxesExpandable = false;
			this._hidden.BoxFillColor = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(191)), ((System.Byte)(255)));
			this._hidden.BoxFrameColor = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(0)), ((System.Byte)(0)));
			this._hidden.BoxIncmAnchor = MindFusion.FlowChartX.EArrowAnchor.aaNoAnchor;
			this._hidden.BoxOutgAnchor = MindFusion.FlowChartX.EArrowAnchor.aaNoAnchor;
			this._hidden.BoxSelStyle = MindFusion.FlowChartX.ESelStyle.sstSquareHandles;
			this._hidden.BoxStyle = MindFusion.FlowChartX.EBoxStyle.bsRoundRect;
			this._hidden.ControlHostsExpandable = false;
			this._hidden.CurArrowCannotCreate = System.Windows.Forms.Cursors.No;
			this._hidden.CurArrowEnd = System.Windows.Forms.Cursors.Hand;
			this._hidden.CurArrowStart = System.Windows.Forms.Cursors.Hand;
			this._hidden.CurCannotCreate = System.Windows.Forms.Cursors.No;
			this._hidden.CurHorzResize = System.Windows.Forms.Cursors.SizeWE;
			this._hidden.CurMainDgnlResize = System.Windows.Forms.Cursors.SizeNWSE;
			this._hidden.CurModify = System.Windows.Forms.Cursors.SizeAll;
			this._hidden.CurPointer = System.Windows.Forms.Cursors.Arrow;
			this._hidden.CurSecDgnlResize = System.Windows.Forms.Cursors.SizeNESW;
			this._hidden.CurVertResize = System.Windows.Forms.Cursors.SizeNS;
			this._hidden.DefaultControlType = typeof(System.Windows.Forms.Button);
			this._hidden.Dirty = true;
			this._hidden.DisabledMnpColor = System.Drawing.Color.FromArgb(((System.Byte)(200)), ((System.Byte)(0)), ((System.Byte)(0)));
			this._hidden.DocExtents = ((System.Drawing.RectangleF)(resources.GetObject("_hidden.DocExtents")));
			this._hidden.DoubleBuffer = false;
			this._hidden.DynamicArrows = false;
			this._hidden.EnableStyledText = false;
			this._hidden.ExpandBtnPos = MindFusion.FlowChartX.EExpandBtnPos.ebpOuterRight;
			this._hidden.ExpandOnIncoming = false;
			this._hidden.GridColor = System.Drawing.Color.FromArgb(((System.Byte)(140)), ((System.Byte)(140)), ((System.Byte)(150)));
			this._hidden.GridSize = 4F;
			this._hidden.HighSpeedRouting = false;
			this._hidden.HitTestPriority = MindFusion.FlowChartX.EHitTestPriority.htpNodesBeforeArrows;
			this._hidden.HostedCtrlMouseAction = MindFusion.FlowChartX.EHostMouseAction.hmaPassToControl;
			this._hidden.InplaceEditAcceptOnEnter = false;
			this._hidden.InplaceEditCancelOnEsc = true;
			this._hidden.InplaceEditFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204)));
			this._hidden.IntermArrowHead = MindFusion.FlowChartX.EArrowHead.ahNone;
			this._hidden.Location = new System.Drawing.Point(56, 112);
			this._hidden.MeasureUnit = System.Drawing.GraphicsUnit.Pixel;
			this._hidden.ModificationStart = MindFusion.FlowChartX.EModificationStyle.mdSelectedOnly;
			this._hidden.Name = "_hidden";
			this._hidden.PenDashStyle = System.Drawing.Drawing2D.DashStyle.Solid;
			this._hidden.PenWidth = 0F;
			this._hidden.PolyTextLayout = false;
			this._hidden.PrpArrowStartOrnt = MindFusion.FlowChartX.EOrientation.soAuto;
			this._hidden.RecursiveExpand = false;
			this._hidden.RestrObjsToDoc = MindFusion.FlowChartX.ERestrictToDoc.rdIntersection;
			this._hidden.RouteArrows = false;
			this._hidden.ScrollX = 0F;
			this._hidden.ScrollY = 0F;
			this._hidden.SelectAfterCreate = false;
			this._hidden.SelHandleSize = 2F;
			this._hidden.SelMnpColor = System.Drawing.Color.FromArgb(((System.Byte)(170)), ((System.Byte)(170)), ((System.Byte)(170)));
			this._hidden.ShadowColor = System.Drawing.Color.FromArgb(((System.Byte)(110)), ((System.Byte)(110)), ((System.Byte)(140)));
			this._hidden.ShadowOffsetX = 1F;
			this._hidden.ShadowOffsetY = 1F;
			this._hidden.ShadowsStyle = MindFusion.FlowChartX.EShadowsStyle.shdOneLevel;
			this._hidden.ShapeRotation = 0F;
			this._hidden.ShowAnchors = MindFusion.FlowChartX.EShowAnchors.saAuto;
			this._hidden.ShowDisabledHandles = true;
			this._hidden.ShowGrid = false;
			this._hidden.ShowScrollbars = true;
			this._hidden.ShowToolTips = false;
			this._hidden.Size = new System.Drawing.Size(96, 78);
			this._hidden.SnapToAnchor = MindFusion.FlowChartX.ESnapToAnchor.saOnCreate;
			this._hidden.TabIndex = 8;
			this._hidden.TableCaption = "Table";
			this._hidden.TableCaptionHeight = 5F;
			this._hidden.TableCellBorders = MindFusion.FlowChartX.ECellBorders.cbSystem3D;
			this._hidden.TableColumnsCount = 2;
			this._hidden.TableColWidth = 18F;
			this._hidden.TableFillColor = System.Drawing.Color.FromArgb(((System.Byte)(180)), ((System.Byte)(160)), ((System.Byte)(160)));
			this._hidden.TableFrameColor = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(0)), ((System.Byte)(0)));
			this._hidden.TableLinkStyle = MindFusion.FlowChartX.ETableLinkStyle.tlsRows;
			this._hidden.TableRowHeight = 6F;
			this._hidden.TableRowsCount = 4;
			this._hidden.TableSelStyle = MindFusion.FlowChartX.ESelStyle.sstDashFrame;
			this._hidden.TablesExpandable = false;
			this._hidden.TablesScrollable = false;
			this._hidden.TableStyle = MindFusion.FlowChartX.ETableStyle.tsRect;
			this._hidden.TextColor = System.Drawing.Color.Black;
			this._hidden.ToolTip = "";
			this._hidden.Visible = false;
			this._hidden.ZoomFactor = ((short)(100));
			this._hidden.BackBrush = MindFusion.FlowChartX.Brush.Deserialize("solid;#FFFFFFFF");
			this._hidden.BoxBrush = MindFusion.FlowChartX.Brush.Deserialize("solid;#FF00BFFF");
			this._hidden.TableBrush = MindFusion.FlowChartX.Brush.Deserialize("solid;#FFB4A0A0");
			this._hidden.ArrowBrush = MindFusion.FlowChartX.Brush.Deserialize("solid;#FF78DCFF");
			this._hidden.BoxPen = MindFusion.FlowChartX.Pen.Deserialize("pen;0;#FF000000;0;0;0;");
			this._hidden.TablePen = MindFusion.FlowChartX.Pen.Deserialize("pen;0;#FF000000;0;0;0;");
			this._hidden.ArrowPen = MindFusion.FlowChartX.Pen.Deserialize("pen;0;#FF000000;0;0;0;");
			this._hidden.TextFormat = new System.Drawing.StringFormat();
			this._hidden.TextFormat.Alignment = System.Drawing.StringAlignment.Center;
			this._hidden.TextFormat.LineAlignment = System.Drawing.StringAlignment.Center;
			// 
			// _flowChart
			// 
			this._flowChart.ActiveMnpColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(255)));
			this._flowChart.ActiveObject = null;
			this._flowChart.AlignToGrid = true;
			this._flowChart.AllowDrop = true;
			this._flowChart.AllowInplaceEdit = false;
			this._flowChart.AllowLinksRepeat = true;
			this._flowChart.AllowRefLinks = true;
			this._flowChart.AllowUnanchoredArrows = true;
			this._flowChart.AllowUnconnectedArrows = false;
			this._flowChart.AntiAlias = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
			this._flowChart.ArrowBase = MindFusion.FlowChartX.EArrowHead.ahNone;
			this._flowChart.ArrowBaseSize = 3F;
			this._flowChart.ArrowColor = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(0)), ((System.Byte)(0)));
			this._flowChart.ArrowEndsMovable = true;
			this._flowChart.ArrowFillColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(255)));
			this._flowChart.ArrowHead = MindFusion.FlowChartX.EArrowHead.ahArrow;
			this._flowChart.ArrowHeadSize = 3F;
			this._flowChart.ArrowIntermSize = 3F;
			this._flowChart.ArrowRouteEnd = MindFusion.FlowChartX.EOrientation.soAuto;
			this._flowChart.ArrowRouteStart = MindFusion.FlowChartX.EOrientation.soAuto;
			this._flowChart.ArrowSegments = ((short)(1));
			this._flowChart.ArrowsRetainForm = false;
			this._flowChart.ArrowsSplittable = false;
			this._flowChart.ArrowStyle = MindFusion.FlowChartX.EArrowStyle.asPolyline;
			this._flowChart.ArrowTextStyle = MindFusion.FlowChartX.EArrowTextStyle.atsCenter;

⌨️ 快捷键说明

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