コード例 #1
0
ファイル: TrackPassive.cs プロジェクト: belsoft/traingraph
 public TrackPassive()
 {
     this.m_State = PathElementPassive.PathState.Undefined;
     this.m_PointMinus = new Point(0.0, 0.0);
     this.m_PointPlus = new Point(0.0, 0.0);
     this.Init();
 }
コード例 #2
0
ファイル: TrackPassive.cs プロジェクト: belsoft/traingraph
 public TrackPassive(string sID)
     : base(sID)
 {
     this.m_State = PathElementPassive.PathState.Undefined;
     this.m_PointMinus = new Point(0.0, 0.0);
     this.m_PointPlus = new Point(0.0, 0.0);
     base.Segment = sID;
     this.Init();
 }
コード例 #3
0
ファイル: PointSimple.cs プロジェクト: belsoft/traingraph
 public PointSimple()
 {
     this.m_bStraightPlus = false;
     this.m_bStraightMinus = true;
     this.m_State = PathElementPassive.PathState.Undefined;
     this.White = 0;
     this.Red = 0;
     this.Init();
 }
コード例 #4
0
ファイル: Track.cs プロジェクト: belsoft/traingraph
 public Track()
 {
     this.White = 0;
     this.Red = 0;
     this.m_State = PathElementPassive.PathState.Undefined;
     this.m_PointMinus = new Point(0.0, 0.0);
     this.m_PointPlus = new Point(0.0, 0.0);
     this.m_alTrainsPlusToMinus = new ArrayList();
     this.Init();
 }
コード例 #5
0
ファイル: Track.cs プロジェクト: belsoft/traingraph
 public Track(string sID)
     : base(sID)
 {
     this.White = 0;
     this.Red = 0;
     this.m_State = PathElementPassive.PathState.Undefined;
     this.m_PointMinus = new Point(0.0, 0.0);
     this.m_PointPlus = new Point(0.0, 0.0);
     this.m_alTrainsPlusToMinus = new ArrayList();
     base.Segment = sID;
     this.Init();
 }
コード例 #6
0
ファイル: PointSwitch.cs プロジェクト: belsoft/traingraph
 public PointSwitch()
 {
     this.Plus = PathElementPassive.PathState.Undefined;
     this.PrePlus = PathElementPassive.PathState.Undefined;
     this.Minus = PathElementPassive.PathState.Undefined;
     this.PreMinus = PathElementPassive.PathState.Undefined;
     this.Peak = PathElementPassive.PathState.Undefined;
     this.PrePeak = PathElementPassive.PathState.Undefined;
     this.LockedDefined = false;
     this.m_StateLocked = false;
     this.NotControlledDefined = false;
     this.m_StateNotControlled = false;
     this.m_bLimitedSignalSet = false;
     this.m_StatePlus = new byte[2];
     this.m_StatePrePlus = new byte[2];
     this.m_StateMinus = new byte[2];
     this.m_StatePreMinus = new byte[2];
     this.m_StatePeak = new byte[2];
     this.m_StatePrePeak = new byte[2];
     this.Init();
 }
コード例 #7
0
ファイル: TrackPassive.cs プロジェクト: belsoft/traingraph
 public override bool SetSegmentState(PathElementPassive.PathState st)
 {
     this.m_State = st;
     return true;
 }
コード例 #8
0
ファイル: TrackPassive.cs プロジェクト: belsoft/traingraph
 public override void Invalidate()
 {
     this.m_State = PathElementPassive.PathState.Undefined;
     base.Invalidate();
 }
コード例 #9
0
ファイル: PointSimple.cs プロジェクト: belsoft/traingraph
 public override bool SetState(string strData, bool bState)
 {
     byte num2;
     string[] strArray = strData.Split(new char[] { ' ' });
     if (strArray.Length >= 3)
     {
         Debug.Assert(strArray[1] == base.Address);
         string str = strArray[2];
         byte num = bState ? ((byte) 1) : ((byte) 0);
         if (str.IndexOf("ws") == 0)
         {
             this.White = num;
             goto Label_009D;
         }
         if (str.IndexOf("rt") == 0)
         {
             this.Red = num;
             goto Label_009D;
         }
     }
     return false;
     Label_009D:
     num2 = (byte) (this.White + this.Red);
     if (num2 == 0)
     {
         this.m_State = PathElementPassive.PathState.Black;
         base.Valid = true;
     }
     else if (num2 == 1)
     {
         this.m_State = (this.White == 1) ? PathElementPassive.PathState.White : PathElementPassive.PathState.Red;
         base.Valid = true;
     }
     else
     {
         this.m_State = PathElementPassive.PathState.Invalid;
         base.Valid = false;
     }
     base.Defined = true;
     if (base.Valid && (this.m_State != PathElementPassive.PathState.Red))
     {
         base.Defect = false;
     }
     ArrayList list = (ArrayList) base.m_Layout.m_htSegment2PathElementPassive[base.Segment];
     Debug.Assert(list != null);
     if (list != null)
     {
         foreach (PathElementPassive passive in list)
         {
             if (passive.ID != base.ID)
             {
                 passive.SetSegmentState(this.m_State);
             }
         }
     }
     return base.SetState(strData, bState);
 }
コード例 #10
0
ファイル: PointSimple.cs プロジェクト: belsoft/traingraph
 public override void Invalidate()
 {
     this.White = (byte) (this.Red = 0);
     this.m_State = PathElementPassive.PathState.Undefined;
     base.Invalidate();
 }
コード例 #11
0
ファイル: PointSwitch.cs プロジェクト: belsoft/traingraph
 private void SetSmartStatePeak()
 {
     this.PrePeak = this.Peak = PathElementPassive.PathState.Black;
     if ((this.IsPathSelected(this.Plus) || this.IsPathOccupied(this.Plus)) && this.IsPathBlack(this.Minus))
     {
         this.PrePeak = this.Peak = this.Plus;
     }
     else if ((this.IsPathSelected(this.Minus) || this.IsPathOccupied(this.Minus)) && this.IsPathBlack(this.Plus))
     {
         this.PrePeak = this.Peak = this.Minus;
     }
     ArrayList list = (ArrayList) base.m_Layout.m_htSegment2PathElementPassive[base.Segment];
     Debug.Assert(list != null);
     if (list != null)
     {
         foreach (PathElementPassive passive in list)
         {
             if (!(!(passive.ID != base.ID) || (passive is PointSwitch)))
             {
                 passive.SetSegmentState(this.Peak);
             }
         }
     }
     this.m_StateLocked = !this.IsPathBlack(this.Peak);
     this.LockedDefined = true;
 }
コード例 #12
0
ファイル: PointSwitch.cs プロジェクト: belsoft/traingraph
 public override void Invalidate()
 {
     this.Plus = this.PrePlus = this.Minus = this.PreMinus = this.Peak = this.PrePeak = PathElementPassive.PathState.Undefined;
     base.Invalidate();
 }
コード例 #13
0
 public override bool SetSegmentState(PathElementPassive.PathState st)
 {
     this.Peak = this.PrePeak = st;
     return(true);
 }
コード例 #14
0
 public override void Invalidate()
 {
     this.Plus = this.PrePlus = this.Minus = this.PreMinus = this.Peak = this.PrePeak = PathElementPassive.PathState.Undefined;
     base.Invalidate();
 }
コード例 #15
0
 public override void Invalidate()
 {
     this.White   = (byte)(this.Red = 0);
     this.m_State = PathElementPassive.PathState.Undefined;
     base.Invalidate();
 }