Created
January 4, 2016 04:04
-
-
Save battleguard/98a629d9a35b6629a6e5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (radHiragana.IsChecked == true) { | |
| strExpression = "/kana/hirg/aiueo/*"; | |
| strExpression = XPaths.aiueo.hirg[randomKana.Next( XPaths.aiueo.hirg .Length)]; | |
| GetKana(nav, strExpression); | |
| } | |
| else if (radKatakana.IsChecked == true) { | |
| strExpression = "/kana/kata/aiueo/*"; | |
| strExpression = XPaths.aiueo.kata[randomKana.Next( XPaths.aiueo.kata.Length )]; | |
| GetKana(nav, strExpression); | |
| } | |
| else if (radMixed.IsChecked == true) { | |
| strExpression = "//aiueo/*"; //Selects All aiueo elements no matter where they are. | |
| strExpression = XPaths.aiueo.mixed[randomKana.Next( XPaths.aiueo.mixed.Length )]; | |
| GetKana(nav, strExpression); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (radHiragana.IsChecked == true) { | |
| strExpression = "/kana/hirg/aiueo/*"; | |
| result = randomKana.Next(0, 5); | |
| switch (result) { | |
| case 0: | |
| strExpression = XPaths.aiueo.hirg[0]; | |
| break; | |
| case 1: | |
| strExpression = XPaths.aiueo.hirg[1]; | |
| break; | |
| case 2: | |
| strExpression = XPaths.aiueo.hirg[2]; | |
| break; | |
| case 3: | |
| strExpression = XPaths.aiueo.hirg[3]; | |
| break; | |
| case 4: | |
| strExpression = XPaths.aiueo.hirg[4]; | |
| break; | |
| } //End Switch | |
| GetKana(nav, strExpression); | |
| } | |
| else if (radKatakana.IsChecked == true) { | |
| strExpression = "/kana/kata/aiueo/*"; | |
| result = randomKana.Next(0, 5); | |
| switch (result) { | |
| case 0: | |
| strExpression = XPaths.aiueo.kata[0]; | |
| break; | |
| case 1: | |
| strExpression = XPaths.aiueo.kata[1]; | |
| break; | |
| case 2: | |
| strExpression = XPaths.aiueo.kata[2]; | |
| break; | |
| case 3: | |
| strExpression = XPaths.aiueo.kata[3]; | |
| break; | |
| case 4: | |
| strExpression = XPaths.aiueo.kata[4]; | |
| break; | |
| }//End Switch | |
| GetKana(nav, strExpression); | |
| } | |
| else if (radMixed.IsChecked == true) { | |
| strExpression = "//aiueo/*"; //Selects All aiueo elements no matter where they are. | |
| result = randomKana.Next(0, 10); | |
| switch (result) { | |
| case 0: | |
| strExpression = XPaths.aiueo.mixed[0]; | |
| break; | |
| case 1: | |
| strExpression = XPaths.aiueo.mixed[1]; | |
| break; | |
| case 2: | |
| strExpression = XPaths.aiueo.mixed[2]; | |
| break; | |
| case 3: | |
| strExpression = XPaths.aiueo.mixed[3]; | |
| break; | |
| case 4: | |
| strExpression = XPaths.aiueo.mixed[4]; | |
| break; | |
| case 5: | |
| strExpression = XPaths.aiueo.mixed[5]; | |
| break; | |
| case 6: | |
| strExpression = XPaths.aiueo.mixed[6]; | |
| break; | |
| case 7: | |
| strExpression = XPaths.aiueo.mixed[7]; | |
| break; | |
| case 8: | |
| strExpression = XPaths.aiueo.mixed[8]; | |
| break; | |
| case 9: | |
| strExpression = XPaths.aiueo.mixed[9]; | |
| break; | |
| }//end Switch | |
| GetKana(nav, strExpression); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment