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

📄 intersection_edit.cs

📁 game implemented java
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace WindowsApplication2
{
	/// <summary>
	/// A helper form that facilitates the definition of intersection types.
	/// </summary>
	public class Intersection_Edit : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Button acceptor;

		private ArrayList myInters,undoSeg,undoStreet, undoData;
		private CityMap myMap;
		private System.Windows.Forms.Label infoDisplay;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Button remover;
		private System.Windows.Forms.Button canceler;
		private System.Windows.Forms.Panel ToDo;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.RadioButton LightRadio;
		private System.Windows.Forms.NumericUpDown modMenu;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.NumericUpDown offsetMenu;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.NumericUpDown greenMenu;
		private System.Windows.Forms.RadioButton StopRadio;
		private System.Windows.Forms.ListBox InterListBox;
		private System.Windows.Forms.ListBox ThruListBox;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.RadioButton UncontrolledRadio;
		private System.Windows.Forms.Label label7;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public Intersection_Edit(ArrayList InterIds, CityMap currMap)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			myInters = InterIds;
			myMap = currMap;
			undoSeg = new ArrayList();
			undoStreet = new ArrayList();
			undoData = new ArrayList();
			for (int i=0; i<myInters.Count;i++)
			{
				InterListBox.Items.Add(myInters[i]);
			}
			InterListBox.SelectedIndex = 0;
		}

		/// <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()
		{
			this.acceptor = new System.Windows.Forms.Button();
			this.infoDisplay = new System.Windows.Forms.Label();
			this.InterListBox = new System.Windows.Forms.ListBox();
			this.label1 = new System.Windows.Forms.Label();
			this.remover = new System.Windows.Forms.Button();
			this.canceler = new System.Windows.Forms.Button();
			this.ToDo = new System.Windows.Forms.Panel();
			this.label7 = new System.Windows.Forms.Label();
			this.UncontrolledRadio = new System.Windows.Forms.RadioButton();
			this.label5 = new System.Windows.Forms.Label();
			this.greenMenu = new System.Windows.Forms.NumericUpDown();
			this.label4 = new System.Windows.Forms.Label();
			this.offsetMenu = new System.Windows.Forms.NumericUpDown();
			this.modMenu = new System.Windows.Forms.NumericUpDown();
			this.LightRadio = new System.Windows.Forms.RadioButton();
			this.StopRadio = new System.Windows.Forms.RadioButton();
			this.label2 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.ThruListBox = new System.Windows.Forms.ListBox();
			this.label6 = new System.Windows.Forms.Label();
			this.ToDo.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.greenMenu)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.offsetMenu)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.modMenu)).BeginInit();
			this.SuspendLayout();
			// 
			// acceptor
			// 
			this.acceptor.Location = new System.Drawing.Point(24, 384);
			this.acceptor.Name = "acceptor";
			this.acceptor.Size = new System.Drawing.Size(96, 32);
			this.acceptor.TabIndex = 1;
			this.acceptor.Text = "Ok";
			this.acceptor.Click += new System.EventHandler(this.acceptor_Click);
			// 
			// infoDisplay
			// 
			this.infoDisplay.BackColor = System.Drawing.Color.Black;
			this.infoDisplay.Location = new System.Drawing.Point(232, 40);
			this.infoDisplay.Name = "infoDisplay";
			this.infoDisplay.Size = new System.Drawing.Size(216, 120);
			this.infoDisplay.TabIndex = 4;
			this.infoDisplay.Paint += new System.Windows.Forms.PaintEventHandler(this.infoDisplay_Paint);
			// 
			// InterListBox
			// 
			this.InterListBox.Location = new System.Drawing.Point(24, 80);
			this.InterListBox.Name = "InterListBox";
			this.InterListBox.Size = new System.Drawing.Size(200, 95);
			this.InterListBox.TabIndex = 5;
			this.InterListBox.SelectedValueChanged += new System.EventHandler(this.InterListBox_SelectedValueChanged);
			// 
			// label1
			// 
			this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.label1.Location = new System.Drawing.Point(24, 8);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(400, 24);
			this.label1.TabIndex = 6;
			this.label1.Text = "Change Intersection Properties";
			this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// remover
			// 
			this.remover.Location = new System.Drawing.Point(24, 192);
			this.remover.Name = "remover";
			this.remover.Size = new System.Drawing.Size(200, 32);
			this.remover.TabIndex = 7;
			this.remover.Text = "Remove selected intersection";
			this.remover.Click += new System.EventHandler(this.remover_Click);
			// 
			// canceler
			// 
			this.canceler.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.canceler.Location = new System.Drawing.Point(136, 384);
			this.canceler.Name = "canceler";
			this.canceler.Size = new System.Drawing.Size(80, 32);
			this.canceler.TabIndex = 8;
			this.canceler.Text = "Cancel";
			this.canceler.Click += new System.EventHandler(this.canceler_Click);
			// 
			// ToDo
			// 
			this.ToDo.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.ToDo.Controls.Add(this.label7);
			this.ToDo.Controls.Add(this.UncontrolledRadio);
			this.ToDo.Controls.Add(this.label5);
			this.ToDo.Controls.Add(this.greenMenu);
			this.ToDo.Controls.Add(this.label4);
			this.ToDo.Controls.Add(this.offsetMenu);
			this.ToDo.Controls.Add(this.modMenu);
			this.ToDo.Controls.Add(this.LightRadio);
			this.ToDo.Controls.Add(this.StopRadio);
			this.ToDo.Controls.Add(this.label2);
			this.ToDo.Location = new System.Drawing.Point(232, 168);
			this.ToDo.Name = "ToDo";
			this.ToDo.Size = new System.Drawing.Size(216, 248);
			this.ToDo.TabIndex = 10;
			// 
			// label7
			// 
			this.label7.Location = new System.Drawing.Point(8, 128);
			this.label7.Name = "label7";
			this.label7.Size = new System.Drawing.Size(88, 24);
			this.label7.TabIndex = 22;
			this.label7.Text = "Cycle Length";
			this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// UncontrolledRadio
			// 
			this.UncontrolledRadio.Location = new System.Drawing.Point(8, 64);
			this.UncontrolledRadio.Name = "UncontrolledRadio";
			this.UncontrolledRadio.Size = new System.Drawing.Size(200, 16);
			this.UncontrolledRadio.TabIndex = 21;
			this.UncontrolledRadio.Text = "Make Selected Street Uncontrolled";
			this.UncontrolledRadio.Click += new System.EventHandler(this.Radio_Click);
			this.UncontrolledRadio.Enter += new System.EventHandler(this.LightRadio_Leave);
			// 
			// label5
			// 
			this.label5.Location = new System.Drawing.Point(8, 208);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(88, 24);
			this.label5.TabIndex = 20;
			this.label5.Text = "Time Green";
			this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// greenMenu
			// 
			this.greenMenu.Enabled = false;
			this.greenMenu.Location = new System.Drawing.Point(104, 208);
			this.greenMenu.Maximum = new System.Decimal(new int[] {
																	  99,
																	  0,
																	  0,
																	  0});
			this.greenMenu.Minimum = new System.Decimal(new int[] {
																	  1,
																	  0,
																	  0,
																	  0});
			this.greenMenu.Name = "greenMenu";
			this.greenMenu.Size = new System.Drawing.Size(88, 20);
			this.greenMenu.TabIndex = 19;
			this.greenMenu.Value = new System.Decimal(new int[] {
																	50,
																	0,
																	0,
																	0});
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(8, 168);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(88, 24);
			this.label4.TabIndex = 18;
			this.label4.Text = "Offset";

⌨️ 快捷键说明

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