예제 #1
0
 private Location CreateLocation(byte index, Image p)
 {
     var v = new Location(index, p);
     allLocation[index] = v;
     return v;
 }
예제 #2
0
 private void CreateQueen(Location v)
 {
     switch (v.IndexLocation)
     {
         case 0: if (v.user == User.Left && selectedChecker.status == Status.Common) { selectedChecker.status = Status.Queen; selectedChecker.ThisChecker.Source = new BitmapImage(new Uri("pack://application:,,,/Figure/LeftQueen.png", UriKind.RelativeOrAbsolute)); } break;
         case 2: if (v.user == User.Left && selectedChecker.status == Status.Common) { selectedChecker.status = Status.Queen; selectedChecker.ThisChecker.Source = new BitmapImage(new Uri("pack://application:,,,/Figure/LeftQueen.png", UriKind.RelativeOrAbsolute)); } break;
         case 4: if (v.user == User.Left && selectedChecker.status == Status.Common) { selectedChecker.status = Status.Queen; selectedChecker.ThisChecker.Source = new BitmapImage(new Uri("pack://application:,,,/Figure/LeftQueen.png", UriKind.RelativeOrAbsolute)); } break;
         case 6: if (v.user == User.Left && selectedChecker.status == Status.Common) { selectedChecker.status = Status.Queen; selectedChecker.ThisChecker.Source = new BitmapImage(new Uri("pack://application:,,,/Figure/LeftQueen.png", UriKind.RelativeOrAbsolute)); } break;
         case 8: if (v.user == User.Left && selectedChecker.status == Status.Common) { selectedChecker.status = Status.Queen; selectedChecker.ThisChecker.Source = new BitmapImage(new Uri("pack://application:,,,/Figure/LeftQueen.png", UriKind.RelativeOrAbsolute)); } break;
         case 91: if (v.user == User.Right && selectedChecker.status == Status.Common) { selectedChecker.status = Status.Queen; selectedChecker.ThisChecker.Source = new BitmapImage(new Uri("pack://application:,,,/Figure/RightQueen.png", UriKind.RelativeOrAbsolute)); } break;
         case 93: if (v.user == User.Right && selectedChecker.status == Status.Common) { selectedChecker.status = Status.Queen; selectedChecker.ThisChecker.Source = new BitmapImage(new Uri("pack://application:,,,/Figure/RightQueen.png", UriKind.RelativeOrAbsolute)); } break;
         case 95: if (v.user == User.Right && selectedChecker.status == Status.Common) { selectedChecker.status = Status.Queen; selectedChecker.ThisChecker.Source = new BitmapImage(new Uri("pack://application:,,,/Figure/RightQueen.png", UriKind.RelativeOrAbsolute)); } break;
         case 97: if (v.user == User.Right && selectedChecker.status == Status.Common) { selectedChecker.status = Status.Queen; selectedChecker.ThisChecker.Source = new BitmapImage(new Uri("pack://application:,,,/Figure/RightQueen.png", UriKind.RelativeOrAbsolute)); } break;
         case 99: if (v.user == User.Right && selectedChecker.status == Status.Common) { selectedChecker.status = Status.Queen; selectedChecker.ThisChecker.Source = new BitmapImage(new Uri("pack://application:,,,/Figure/RightQueen.png", UriKind.RelativeOrAbsolute)); } break;
         default: break;
     }
 }