public void NotifyAll(DataTransferEventArgs e) { if (m_dataTransferEvent != null) { m_dataTransferEvent(this, e); } }
private void StandardStream_TargetUpdated(object sender, DataTransferEventArgs e) { TextBox textBox = sender as TextBox; if (textBox == null) { return; } textBox.ScrollToEnd(); }
private void ItemsControl_TargetUpdated_1(object sender, DataTransferEventArgs e) { var sw = DataContext as MenuItemSelectorViewModel; if (sw == null) { return; } NumeratorRow.Height = sw.IsNumeratorVisible ? _auto45 : _thin; //AlphaButtonsColumn.Width = sw.AlphaButtonValues != null && sw.AlphaButtonValues.Length > 0 ? _auto15 : _thin; }
private async void SourcePathTextBox_SourceUpdated(object sender, DataTransferEventArgs e) { Debug.Assert(DataContext is ImportSettings); var settings = (ImportSettings)DataContext; SourcePathDoesNotExist.Visibility = (string.IsNullOrEmpty(settings.SourcePath) || Directory.Exists(settings.SourcePath)) ? System.Windows.Visibility.Collapsed : System.Windows.Visibility.Visible; await settings.UpdateSourcePathAsync().HandleAllExceptions(SR.ProductName); }
//If the user updates a record, then go to the Update mode automatically private void TrainingGrid_SourceUpdated(object sender, DataTransferEventArgs e) { if (Training.TrainingGrid.DataContext == TrainingInformation) { Training.BtnSave.Visibility = Visibility.Visible; Training.BtnCancelUpdate.Visibility = Visibility.Visible; Training.TrainingSearchControl.IsEnabled = false; Training.BtnAdd.Visibility = Visibility.Collapsed; Training.btnDelete.Visibility = Visibility.Collapsed; } }
//******************************************************************* /// <summary>JobId変更時イベント</summary> /// <param name="sender">源</param> /// <param name="e">イベント</param> //******************************************************************* private void textBlockJobId_TargetUpdated(object sender, DataTransferEventArgs e) { bool IsTextTrimmed = false; var textBlock = sender as TextBlock; if (textBlock != null && textBlock.Tag != null && CheckUtil.IsLenOver(textBlock.Tag.ToString(), GetJobIdTrimLimitLength())) { IsTextTrimmed = true; } TextBlockService.SetIsTextTrimmed(textBlock, IsTextTrimmed); }
/// <summary> /// Event handler to scroll to the end of a text box /// </summary> /// <param name="sender">UI element this event occurred on</param> /// <param name="e">Data transfer event args</param> private void ScrollToEndOfLineHandler(object sender, DataTransferEventArgs e) { var textBox = sender as TextBox; if (textBox != null) { textBox.CaretIndex = textBox.Text.Length; var rect = textBox.GetRectFromCharacterIndex(textBox.CaretIndex); textBox.ScrollToHorizontalOffset(rect.Right); } }
//If the user updates a record, then go to the Update mode automatically private void EmergencyContactGrid_SourceUpdated(object sender, DataTransferEventArgs e) { if (EmergencyContact.EmergencyContactGrid.DataContext == EmergencyContactInformation) { EmergencyContact.BtnSave.Visibility = Visibility.Visible; EmergencyContact.BtnCancelUpdate.Visibility = Visibility.Visible; EmergencyContact.EmergencyContactSearchControl.IsEnabled = false; EmergencyContact.BtnAdd.Visibility = Visibility.Collapsed; EmergencyContact.btnDelete.Visibility = Visibility.Collapsed; } }
private void FrameworkElementOnSourceUpdated(object sender, DataTransferEventArgs e) { // set the property to be serialized if (!Wrapper.IsSerialized) { Wrapper.IsSerialized = true; } // set the DocumentViewModel to dirty Wrapper.Cr2wFile.IsDirty = true; }
private void dataGridComponentes_SourceUpdated(object sender, DataTransferEventArgs e) { //llenar datagrid con componentes Aeronave aeronave = new Aeronave(); aeronave.Matricula = Sesion.GetValue <Aeronave>("aeronave").Matricula; //Aeronave aeronave = Sesion.GetValue<Aeronave>("aeronave"); neComponente = new NeComponente(); ds = neComponente.getComponentes(aeronave); dataGridComponentes.ItemsSource = null; dataGridComponentes.ItemsSource = new DataView(ds.Tables["listaComponentes"]); }
private void lstMails_TargetUpdated(object sender, DataTransferEventArgs e) { /* * ServerSchema mySchema = (ServerSchema) this.DataContext; * lstMails.DataContext = this.DataContext; * Binding binding = new Binding("MailDir"); * binding.Converter = new StringConverter(); * binding.Source = mySchema; * lstMails.SetBinding(ItemsControl.ItemsSourceProperty, binding); * e.Handled = true; */ }
private void tbJobDescription_SourceUpdated(object sender, DataTransferEventArgs e) { //при изменении текст бокса // MessageBox.Show(" tbJobDescription_SourceUpdated"); /* * Debug.WriteLine("job_sourceUpdated" + user.JobDescription); * Debug.WriteLine("--"+e.OriginalSource); * Debug.WriteLine("--" + e.Source); * Debug.WriteLine("--" + e.TargetObject); */ }
private void TextBox_TargetUpdated(object sender, DataTransferEventArgs e) { if (sender is TextBox tb) { tb.CaretIndex = tb.Text.Length; tb.ScrollToEnd(); } else if (sender is ScrollViewer sv) { sv.ScrollToEnd(); } }
private void PreloadImage_SourceUpdated(object sender, DataTransferEventArgs e) { //vidTimer. var im = (Image)sender; im.Visibility = Visibility.Visible; vidTimer.Stop(); vidTimer.Start(); Console.WriteLine(vidTimer.Enabled); }
private void Info_TargetUpdated(object sender, DataTransferEventArgs e) { textBlock9.Text = textBlock8.Text; textBlock8.Text = textBlock7.Text; textBlock7.Text = textBlock6.Text; textBlock6.Text = textBlock5.Text; textBlock5.Text = textBlock4.Text; textBlock4.Text = textBlock3.Text; textBlock3.Text = textBlock2.Text; textBlock2.Text = textBlock1.Text; LastState = Info.Text; }
private void PageImageContent_SourceUpdated(object sender, DataTransferEventArgs e) { PageImageContentScrollViewer.ScrollToHome(); ChapterOverviewList.ScrollToCenterOfView(ChapterOverviewList.SelectedItem); if (DataContext is ChapterReaderViewModel) { if (Equals((DataContext as ChapterReaderViewModel).MangaObject.MangaType, myMangaSiteExtension.Enums.MangaObjectType.Manga)) { PageImageContentScrollViewer.ScrollToRightEnd(); } } }
private void web1_TargetUpdated(object sender, DataTransferEventArgs e) { HTMLDocument document = (HTMLDocument)web1.Document; foreach (IHTMLElement div in document.getElementsByTagName("div")) { if (div.className == "_5pcp _5vsi") { div.innerHTML = "something" + div.innerHTML; } } }
public void DataTransferHandler(object sender, DataTransferEventArgs e) { // Only show information message at log Smo.Transfer transfer = sender as Smo.Transfer; int percentage = 100; this.Progress += percentage / transfer.Database.Tables.Count; if (e.DataTransferEventType == DataTransferEventType.Information) { this.Log += (e.DataTransferEventType.ToString() + " : " + e.Message + Environment.NewLine); } }
private void shipsUpdated(object sender, DataTransferEventArgs e) { // Update the ship monitor's 'PhoneticName' information if (e.OriginalSource is TextBlock) { var dg = (DataGrid)e.Source; if (dg.SelectedItem is Ship) { shipMonitor()?.Save(); } } }
private void TextBlockFontSizeControl_TargetUpdated(object sender, DataTransferEventArgs e) { var textBlock = sender as TextBlock; if (textBlock.Text.Length > 5) { (e.TargetObject as TextBlock).FontSize = 150; } else { (e.TargetObject as TextBlock).FontSize = 200; } }
private void line_TargetUpdated(object sender, DataTransferEventArgs e) { tb1.GetBindingExpression(TextBlock.HorizontalAlignmentProperty).UpdateTarget(); tb1.GetBindingExpression(TextBlock.MarginProperty).UpdateTarget(); tb2.GetBindingExpression(TextBlock.HorizontalAlignmentProperty).UpdateTarget(); tb2.GetBindingExpression(TextBlock.MarginProperty).UpdateTarget(); line.GetBindingExpression(Line.VisibilityProperty).UpdateTarget(); line2.GetBindingExpression(Line.VisibilityProperty).UpdateTarget(); line3.GetBindingExpression(Line.VisibilityProperty).UpdateTarget(); selectionRectangle1.GetBindingExpression(Rectangle.MarginProperty).UpdateTarget(); selectionRectangle2.GetBindingExpression(Rectangle.MarginProperty).UpdateTarget(); }
/// <summary> /// Oberstes Item soll sich nicht ändern - aber den Code gibt es in MainWindow.cs nochmal nahezu identisch. /// Daher hier mal aus der XAML rausgenommen, der folgende Code wird aktuell also nicht angesprungen! /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void listView_Tweets_SourceUpdated(object sender, DataTransferEventArgs e) { return; if (AppController.Current.mainWindow.TopMostShownItem != null && listView_Tweets != null) { if (Properties.Settings.Default.DontScrollTopItemOutOfWindow) { AppController.Current.mainWindow.ScrollToItemInListbox(AppController.Current.mainWindow.TopMostShownItem); } } }
private void Updated(object sender, DataTransferEventArgs e) { string value = AssociatedObject.GetValue(TextBlock.TextProperty) as string; AssociatedObject.BeginAnimation(TextBlock.OpacityProperty, AnimationOut); NewValue = value; if (OldValue == null) { OldValue = value; } AssociatedObject.SetCurrentValue(TextBlock.TextProperty, OldValue); }
private void TextBox_SourceUpdated(object sender, DataTransferEventArgs e) { try { double newValue; TextBox textBox = sender as TextBox; if (!Double.TryParse(textBox.Text, out newValue)) { textBox.SetCurrentValue(TextBox.TextProperty, Convert.ToString(SoSSlider.Value)); } } catch { } }
private void ToolTip_SourceUpdated(object sender, DataTransferEventArgs e) { //var TB = (TextBlock)sender; //Cast sender as textbox (which it is) try { var wb = (WebBrowser)sender; //exc wb.Refresh(true); } catch (Exception) { } //var scrollViewer = (ScrollViewer)TB.Parent; //get parent of the texbox and cast it to scrollviewer(which it is) //scrollViewer.ScrollToBottom(); //call the ScrollToBottomEvent }
private void DataGrid_TargetUpdated(object sender, DataTransferEventArgs e) { if (this.showOnlyCheckedButton.IsChecked != null && this.showOnlyCheckedButton.IsChecked == true) { ICollectionView view = CollectionViewSource.GetDefaultView(this.itemsDataGrig.ItemsSource); if (view == null) { return; } view.Refresh(); } }
/// <summary> /// TextBlockのTargetUpdatedイベント /// </summary> private static void TextBlock_TargetUpdated(object sender, DataTransferEventArgs e) { var block = sender as TextBlock; // 行の高さが設定されている場合はその値、未設定であればFormattedTextの高さを行の高さとする var line = double.IsInfinity(block.LineHeight) || double.IsNaN(block.LineHeight) ? GetFormattedTextHeight(block) : block.LineHeight; // 最大高さ設定 block.MaxHeight = line * GetMaxLines(block); block.Height = block.MaxHeight; }
private async void TextBlock_TargetUpdated(object sender, DataTransferEventArgs e) { TextBlock textBlock = (TextBlock)sender; if (string.IsNullOrWhiteSpace(textBlock.Text)) { return; } await Task.Delay(10000); Application.Current.Shutdown(); }
private void HandleGuageUpdated(object sender, DataTransferEventArgs e) { LiveCharts.Wpf.Gauge current_guage = (LiveCharts.Wpf.Gauge)sender; if (current_guage.Value >= current_guage.To) { current_guage.ToColor = Color.FromRgb(0x5b, 0xc6, 0x43); } else { current_guage.ToColor = Color.FromRgb(0x1F, 0x86, 0xE0); } }
private void Selector_SourceUpdated(object sender, DataTransferEventArgs e) { ChooseShowTableViewModel model = this.DataContext as ChooseShowTableViewModel; if (model.Selector == 1) { ViewTabControl.SelectedIndex = 0; } else { ViewTabControl.SelectedIndex = 1; } }
private void Binding_TargetUpdated(object sender, DataTransferEventArgs e) { string txt = TestTextBox.Text; mbindingExpression = BindingOperations.GetMultiBindingExpression(e.TargetObject, e.Property); mbindingExpression.UpdateSource(); foreach (var bind in mbindingExpression.BindingExpressions) { bind.UpdateSource(); } }
public void DataTransferHandler(object sender, DataTransferEventArgs e) { // Only show information message at log Smo.Transfer transfer = sender as Smo.Transfer; int percentage = 100; this.Progress += percentage / transfer.Database.Tables.Count; if (e.DataTransferEventType == DataTransferEventType.Information) { this.Log += (e.DataTransferEventType.ToString() + " : " + e.Message + Environment.NewLine); } }
private void web1_TargetUpdated(object sender, DataTransferEventArgs e) { HTMLDocument document = (HTMLDocument)web1.Document; foreach (IHTMLElement div in document.getElementsByTagName("div")) { if (div.className == "_5pcp _5vsi") { div.innerHTML = "something" + div.innerHTML; } } }