private void CopyGamparseClick(object sender, RoutedEventArgs e) { try { var export = DataGridUtils.BuildExportData(dataGrid); string result = TextFormatUtils.BuildGamparseList(export.Item1, export.Item2, titleLabel.Content as string); Clipboard.SetDataObject(result); } catch (ArgumentNullException ane) { Clipboard.SetDataObject("EQ Log Parser Error: Failed to create BBCode\r\n"); LOG.Error(ane); } catch (ExternalException ex) { LOG.Error(ex); } }
private void CreateImageClick(object sender, RoutedEventArgs e) { // lame workaround to toggle scrollbar to fix UI dataGrid.IsEnabled = false; dataGrid.SelectedItems.Clear(); dataGrid.VerticalScrollBarVisibility = ScrollBarVisibility.Visible; dataGrid.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible; Task.Delay(50).ContinueWith((bleh) => { Dispatcher.InvokeAsync(() => { dataGrid.VerticalScrollBarVisibility = ScrollBarVisibility.Auto; dataGrid.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden; SpellRowsView.ToList().ForEach(spr => spr["IconColor"] = EMPTYICON); dataGrid.Items.Refresh(); Task.Delay(50).ContinueWith((bleh2) => Dispatcher.InvokeAsync(() => { DataGridUtils.CreateImage(dataGrid, titleLabel); SpellRowsView.ToList().ForEach(spr => spr["IconColor"] = ACTIVEICON); }), TaskScheduler.Default); }); }, TaskScheduler.Default); }
private void CreateImageClick(object sender, RoutedEventArgs e) { // lame workaround to toggle scrollbar to fix UI dataGrid.IsEnabled = false; dataGrid.SelectedItem = null; dataGrid.VerticalScrollBarVisibility = ScrollBarVisibility.Visible; dataGrid.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible; Task.Delay(50).ContinueWith((bleh) => { Dispatcher.InvokeAsync(() => { dataGrid.VerticalScrollBarVisibility = ScrollBarVisibility.Auto; dataGrid.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden; dataGrid.Items.Refresh(); Task.Delay(50).ContinueWith((bleh2) => Dispatcher.InvokeAsync(() => DataGridUtils.CreateImage(dataGrid, titleLabel)), TaskScheduler.Default); }); }, TaskScheduler.Default); }
private void CopyCsvClick(object sender, RoutedEventArgs e) { DataGridUtils.CopyCsvFromTable(dataGrid, titleLabel.Content.ToString()); }
private void UnselectAllClick(object sender, RoutedEventArgs e) => DataGridUtils.UnselectAll(sender as FrameworkElement);
internal void DataGridSelectAllClick(object sender, RoutedEventArgs e) => DataGridUtils.SelectAll(sender as FrameworkElement);
internal void CopyCsvClick(object sender, RoutedEventArgs e) => DataGridUtils.CopyCsvFromTable(TheDataGrid, TheTitle.Content.ToString());