Пример #1
0
 public void MouseRightDown()
 {
     switch(meshState)
     {
         case MeshStates.COVER:
             meshState = MeshStates.SIGN;
             break;
         case MeshStates.HIGHLIGHT:
             meshState = MeshStates.SIGN;
             break;
         case MeshStates.SIGN:
             meshState = MeshStates.DOUBT;
             break;
         case MeshStates.DOUBT:
             meshState = MeshStates.HIGHLIGHT;
             break;
     }
 }
Пример #2
0
        private void SetStateFromPoint(Point pt, MeshStates state)
        {
            int row;
            int column;

            row = (pt.Y - gridPoint.Y) / meshSize.Height;
            column = (pt.X - gridPoint.X) / meshSize.Width;

            try
            {
                MeshGrid[column, row].MeshState = state;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }