void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.button = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 2: this.canvas = ((System.Windows.Controls.Canvas)(target)); return; case 3: this.outerCan = ((System.Windows.Controls.Grid)(target)); return; case 4: this.innerRect = ((System.Windows.Shapes.Rectangle)(target)); return; case 5: this.txtUpper = ((System.Windows.Controls.TextBlock)(target)); return; case 6: this.txtLower = ((System.Windows.Controls.TextBlock)(target)); return; case 7: this.txtMiddle = ((System.Windows.Controls.TextBlock)(target)); return; case 8: this.bump = ((System.Windows.Shapes.Rectangle)(target)); return; case 9: this.rectBackHighlight = ((System.Windows.Shapes.Rectangle)(target)); return; case 10: this.rectHighlight = ((System.Windows.Shapes.Rectangle)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.mainGrid = ((System.Windows.Controls.Grid)(target)); return; case 2: this.esc = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 3: this.f1 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 4: this.f2 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 5: this.f3 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 6: this.f4 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 7: this.f5 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 8: this.f6 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 9: this.f7 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 10: this.f8 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 11: this.f9 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 12: this.f10 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 13: this.f11 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 14: this.f12 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 15: this.dx = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 16: this.d1 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 17: this.d2 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 18: this.d3 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 19: this.d4 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 20: this.d5 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 21: this.d6 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 22: this.d7 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 23: this.d8 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 24: this.d9 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 25: this.d0 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 26: this.minus = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 27: this.plus = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 28: this.back = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 29: this.tab = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 30: this.q = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 31: this.w = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 32: this.e = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 33: this.r = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 34: this.t = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 35: this.y = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 36: this.u = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 37: this.i = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 38: this.o = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 39: this.p = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 40: this.oBrac = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 41: this.cBrac = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 42: this.bSlash = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 43: this.capsLock = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 44: this.a = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 45: this.s = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 46: this.d = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 47: this.f = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 48: this.g = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 49: this.h = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 50: this.j = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 51: this.k = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 52: this.l = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 53: this.colen = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 54: this.quot = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 55: this.enter = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 56: this.lShift = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 57: this.z = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 58: this.x = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 59: this.c = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 60: this.v = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 61: this.b = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 62: this.n = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 63: this.m = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 64: this.lt = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 65: this.gt = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 66: this.quest = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 67: this.rShift = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 68: this.lCtrl = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 69: this.lWin = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 70: this.lAlt = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 71: this.space = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 72: this.rAlt = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 73: this.rWin = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 74: this.rCtrl = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 75: this.insert = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 76: this.home = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 77: this.pageUp = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 78: this.delete = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 79: this.end = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 80: this.pageDown = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 81: this.up = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 82: this.left = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 83: this.down = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 84: this.right = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 85: this.numLock = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 86: this.padDiv = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 87: this.padMult = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 88: this.padMinus = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 89: this.pad7 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 90: this.pad8 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 91: this.pad9 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 92: this.padPlus = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 93: this.pad4 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 94: this.pad5 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 95: this.pad6 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 96: this.pad1 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 97: this.pad2 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 98: this.pad3 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 99: this.padEnter = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 100: this.pad0 = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; case 101: this.padDot = ((TachTypingTutor_v1._06._18.KeyboardButton)(target)); return; } this._contentLoaded = true; }
public void Highlight(string s) { highlightedButt = buttons.Where(b => b.Name == s.ToLower()).FirstOrDefault(); if (highlightedButt == null) { if (s.IsInt() && int.Parse(s) < 10 && int.Parse(s) >= 0) { highlightedButt = buttons.Where(b => b.Name == $"d{s}").FirstOrDefault(); } else { switch (s) { case " ": case "SPACE": highlightedButt = space; break; case "\n": case "\n\r": case "ENTER": case "\r": highlightedButt = enter; break; case ",": case "<": highlightedButt = lt; break; case ">": case ".": highlightedButt = gt; break; case "/": case "?": highlightedButt = quest; break; case ":": case ";": highlightedButt = colen; break; case "\"": case "'": highlightedButt = quot; break; case "\\": case "|": highlightedButt = bSlash; break; case "{": case "[": highlightedButt = oBrac; break; case "}": case "]": highlightedButt = cBrac; break; case "\b": case "BACKSPACE": highlightedButt = back; break; } } } if (highlightedButt != null) { highlightedButt.Highlighted = true; } }