void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 1 "..\..\..\Controls\Keyboard.xaml" ((KeyboardChampion.Controls.Keyboard)(target)).Loaded += new System.Windows.RoutedEventHandler(this.UserControl_Loaded); #line default #line hidden return; case 2: this.Keyboards = ((System.Windows.Controls.Grid)(target)); #line 9 "..\..\..\Controls\Keyboard.xaml" this.Keyboards.KeyDown += new System.Windows.Input.KeyEventHandler(this.Grid_KeyDown); #line default #line hidden return; case 3: this.KeyQ = ((KeyboardChampion.Controls.KeyShape)(target)); return; } this._contentLoaded = true; }
private void playTrybe(string key) { if (lastType != null) { lastType.KeyboardKey.Background = Brushes.White; } if (nextKeyColor != null) { nextKeyColor.KeyboardKey.Background = Brushes.White; } KeyToBorder.TryGetValue(key, out object keyToMark); lastType = keyToMark as KeyShape; if (lastType != null) { if (App.AppDataContext.isCorrect(key)) { lastType.KeyboardKey.Background = Brushes.Blue; } else { lastType.KeyboardKey.Background = Brushes.Red; } } KeyToBorder.TryGetValue(App.AppDataContext.NextLetter, out object nextKey); if (nextKey != null) { nextKeyColor = nextKey as KeyShape; nextKeyColor.KeyboardKey.Background = Brushes.LightBlue; } }