private void combo_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (ViewUpdated != null) { ViewUpdated.Invoke(this, null); } }
private void checks_Click(object sender, RoutedEventArgs e) { if (ViewUpdated != null) { ViewUpdated.Invoke(this, null); } }
private void _editW_LostFocus(object sender, RoutedEventArgs e) { double var; int n; var s = ((TextBox)sender).Name.Replace("TextBox_W", ""); int.TryParse(s, out n); n--; if (!Double.TryParse(((TextBox)sender).Text, NumberStyles.Any, CultureInfo.CreateSpecificCulture("en-GB"), out var)) { MessageBox.Show(this, "Значение веса ввдено неверно!", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error); } else { if (var > 1.0) { ((TextBox)sender).Text = "1"; var = 1; } w_koefs[n] = var; if (ViewUpdated != null) { ViewUpdated.Invoke(this, null); } } }
private void LiveKeyloggerCommandOnStringDown(object sender, string s) { if (_currentKeyItem != null && !string.IsNullOrEmpty(s)) { Application.Current.Dispatcher.BeginInvoke(new Action(() => { _currentKeyItem.InlineCollection.Add(s); ViewUpdated?.Invoke(this, EventArgs.Empty); })); } }
/// <inheritdoc/> public void UpdateTextView(ITextView textView, string text) { textView = textView ?? throw new ArgumentNullException(nameof(textView)); TextBufferViewTrackingInformation trackingInformation; if (!this.bufferToViewsDictionary.TryGetValue(textView.TextBuffer, out trackingInformation)) { return; } ViewUpdated?.Invoke(this, new ViewUpdatedEventArgs(trackingInformation.Path, text, trackingInformation.CancellationTokenSource.Token)); }
private void OnViewUpdated() { if (_puzzleState.IsTutorial) { var move = _puzzleState.TutorialMove; var pos = (Vector2)move.Point * _puzzleScale.Scaling; _cursorSwipe.Show(pos, move.Direction); } else { _cursorSwipe.Hide(); } ViewUpdated?.Invoke(); }
private void LiveKeyloggerCommandOnWindowChanged(object sender, string s) { Application.Current.Dispatcher.BeginInvoke(new Action(() => { if (_currentKeyItem != null && _currentKeyItem.InlineCollection.Count == 0) { _currentKeyItem.InlineCollection.Add( new Italic(new Run("(" + Application.Current.Resources["NoKeyInputs"] + ")") { Foreground = (Brush)Application.Current.Resources["BlackBrush"] })); } _currentKeyItem = new KeyItem { ApplicationName = s, Timestamp = DateTime.Now }; KeyItems.Add(_currentKeyItem); ViewUpdated?.Invoke(this, EventArgs.Empty); })); }
private void combo_RxFilterType_SelectionChanged(object sender, SelectionChangedEventArgs e) { if ((combo_RxFilterType == null) || (group_FilterWs == null)) { return; } if (combo_RxFilterType.SelectedIndex == 1) { group_FilterWs.Visibility = Visibility.Visible; } else { group_FilterWs.Visibility = Visibility.Hidden; } if (ViewUpdated != null) { ViewUpdated.Invoke(this, null); } }
private void LiveKeyloggerCommandOnKeyUpDown(object sender, KeyLogEntry keyLogEntry) { if (_currentKeyItem != null) { Application.Current.Dispatcher.BeginInvoke(new Action(() => { var specialKey = keyLogEntry as SpecialKey; if (specialKey != null) { AddSpecialKey(specialKey); Debug.Print(specialKey.KeyType + " " + specialKey.IsDown); return; } var standardKey = keyLogEntry as StandardKey; if (standardKey != null) { AddStandardKey(standardKey); } ViewUpdated?.Invoke(this, EventArgs.Empty); })); } }