Ejemplo n.º 1
0
        private void DrawPerron(Perron p, Canvas g, bool withTrain)
        {
            PerronControl control = new PerronControl(p);

            control.SetValue(Canvas.LeftProperty, p.BasePoint.get_X());
            control.SetValue(Canvas.TopProperty, p.BasePoint.get_Y());
            control.Boarding = withTrain;
            g.get_Children().Add(control);
        }
Ejemplo n.º 2
0
 public override void InitAfterLoad(Layout l)
 {
     string[] strArray = this.m_strPerronIDs.Split(new char[] { ';' });
     this.m_Station = l.Stations.GetStationByID(this.m_strStation);
     Debug.Assert(this.m_Station != null);
     if (this.m_Station != null)
     {
         foreach (string str in strArray)
         {
             Perron perronByID = this.m_Station.GetPerronByID(str);
             Debug.Assert(perronByID != null);
             if (perronByID != null)
             {
                 this.Perrons.Add(perronByID);
                 this.m_PerronNumbers.Add(perronByID.Number);
                 perronByID.Displays.Add(this);
             }
         }
         if (this.m_PerronNumbers.Count != this.m_Station.m_Perrons.Count)
         {
             ArrayList list = new ArrayList();
             foreach (int num in this.m_PerronNumbers)
             {
                 if (!list.Contains(num))
                 {
                     if (this.TrackFilter.Length > 0)
                     {
                         this.TrackFilter = this.TrackFilter + " OR ";
                     }
                     this.TrackFilter = this.TrackFilter + string.Format("TrackNo={0}", num);
                     list.Add(num);
                 }
             }
         }
     }
     base.InitAfterLoad(l);
 }
Ejemplo n.º 3
0
 public PerronControl(Perron p)
 {
     this.m_p = p;
     this.InitializeComponent();
     this.Draw();
 }
Ejemplo n.º 4
0
 public PerronControl(Perron p)
 {
     this.m_p = p;
     this.InitializeComponent();
     this.Draw();
 }