Пример #1
0
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     this.crossing   = new TrafficComponentsLibrary.Crossing();
     this.messenger  = new TrafficComponentsLibrary.Messenger(this.components);
     base.SuspendLayout();
     this.crossing.AutoStretch         = false;
     this.crossing.BackColor           = Color.Black;
     this.crossing.Dock                = DockStyle.Fill;
     this.crossing.Id                  = 0;
     this.crossing.Location            = new Point(0, 0);
     this.crossing.Name                = "crossing";
     this.crossing.RoadDown_Crosswalk  = false;
     this.crossing.RoadDown_RoadType   = RoadType.TwoLane;
     this.crossing.RoadLeft_Crosswalk  = false;
     this.crossing.RoadLeft_RoadType   = RoadType.TwoLane;
     this.crossing.RoadRight_Crosswalk = false;
     this.crossing.RoadRight_RoadType  = RoadType.TwoLane;
     this.crossing.RoadUp_Crosswalk    = false;
     this.crossing.RoadUp_RoadType     = RoadType.TwoLane;
     this.crossing.Size                = new System.Drawing.Size(292, 266);
     this.crossing.TabIndex            = 0;
     this.AutoScaleBaseSize            = new System.Drawing.Size(5, 13);
     base.ClientSize = new System.Drawing.Size(292, 266);
     base.Controls.Add(this.crossing);
     base.Name          = "CrossingForm";
     base.StartPosition = FormStartPosition.Manual;
     this.Text          = "FormCrossing";
     base.ResumeLayout(false);
 }
 private void Receive(TrafficComponentsLibrary.Messenger sender, int crossingId)
 {
     if (crossingId < 0 || crossingId > 19)
     {
         throw new Exception("This position in the array is not possible");
     }
     if (this.crossings[crossingId] != null)
     {
         this.crossings[crossingId].Messenger.Receive(sender);
     }
 }
 private void InitializeComponent()
 {
     this.components        = new System.ComponentModel.Container();
     this.messenger         = new TrafficComponentsLibrary.Messenger(this.components);
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     base.ClientSize        = new System.Drawing.Size(472, 266);
     base.IsMdiContainer    = true;
     base.Name          = "TrafficControlForm";
     base.StartPosition = FormStartPosition.CenterScreen;
     this.Text          = "TFormRegeling";
 }