private void OnDumpCreated() { if (LeftDump.Dump == null) { return; } if (RightDump.Dump == null) { return; } DBDiff diff = new DBDiff(LeftDump.DumpOptimized, RightDump.DumpOptimized); Dispatcher.InvokeAsync(() => { LeftDump.FillLeftDump(diff); RightDump.FillRightDump(diff); Color foreColor = diff.LeftVersion <= diff.RightVersion ? Colors.Black : Colors.White; Color backColor = diff.LeftVersion <= diff.RightVersion ? Colors.Transparent : Colors.Red; LeftDump.VersionLabel.Foreground = new SolidColorBrush(foreColor); LeftDump.VersionLabel.Background = new SolidColorBrush(backColor); RightDump.VersionLabel.Foreground = new SolidColorBrush(foreColor); RightDump.VersionLabel.Background = new SolidColorBrush(backColor); }); }
private void ProcessArguments(string[] args) { if (args.Length < 2) { return; } string leftFile = args[1]; if (!File.Exists(leftFile)) { MessageBox.Show($"File '{leftFile}' doesn't exists"); return; } LeftDump.ProcessDumpFile(leftFile); if (args.Length == 2) { return; } string rightFile = args[2]; if (!File.Exists(rightFile)) { MessageBox.Show($"File '{rightFile}' doesn't exists"); return; } RightDump.ProcessDumpFile(rightFile); }
private void OnDragLeave(object sender, DragEventArgs e) { if (sender == this) { LeftDump.HideDragAndDrop(); RightDump.HideDragAndDrop(); } }
// ================================= // Form events // ================================= private void OnDragEnter(object sender, DragEventArgs e) { if (sender == this) { LeftDump.ShowDragAndDrop(); RightDump.ShowDragAndDrop(); } }
// ================================= // Custom events // ================================= private void OnDumpDropped() { m_treeSortPropery = null; LeftDump.HideDragAndDrop(); RightDump.HideDragAndDrop(); LeftDump.ShowDumpView(); RightDump.ShowDumpView(); }
private void OnTypeTreeBackClicked() { LeftDump.ShowDumpView(); RightDump.ShowDumpView(); ListViewItem listItem = (ListViewItem)RightDump.DumpListView.ItemContainerGenerator.ContainerFromIndex(RightDump.DumpListView.SelectedIndex); if (listItem != null) { listItem.Focus(); } }
private void OnDumpSortOrderChanged(string property) { if (property != m_treeSortPropery) { m_treeSortPropery = property; m_treeSortDirection = ListSortDirection.Ascending; } else { m_treeSortDirection = m_treeSortDirection == ListSortDirection.Ascending ? ListSortDirection.Descending : ListSortDirection.Ascending; } LeftDump.SortDumpItems(m_treeSortPropery, m_treeSortDirection); RightDump.SortDumpItems(m_treeSortPropery, m_treeSortDirection); }
private void OnDumpTypeTreeSelected(int classID) { LeftDump.ShowTypeTreeView(classID); RightDump.ShowTypeTreeView(classID); RightDump.TypeTreeListBox.Focus(); }