Example #1
0
 public static string GetPosByBlocks(GENERIC_SYSTEM_PARAMETERS.BLOCKS.BLOCK pre, GENERIC_SYSTEM_PARAMETERS.BLOCKS.BLOCK next)
 {
     if (pre.Next_Down_Reverse_Block_ID == next.ID ||
         pre.Next_Up_Reverse_Block_ID == next.ID ||
         next.Next_Down_Reverse_Block_ID == pre.ID ||
         next.Next_Up_Reverse_Block_ID == pre.ID)
     {
         return(Sys.Reverse);
     }
     if ((pre.Next_Down_Normal_Block_ID == next.ID && next.Next_Up_Normal_Block_ID == pre.ID) ||
         (pre.Next_Up_Normal_Block_ID == next.ID && next.Next_Down_Normal_Block_ID == pre.ID)
         )
     {
         return(Sys.Normal);
     }
     throw new Exception(string.Format("Error call GetPosByBlocks, there exist no point between block[{0}] and block[{1}]", pre.ID, next.ID));
 }