Beispiel #1
0
        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);
            });
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 private void OnDragLeave(object sender, DragEventArgs e)
 {
     if (sender == this)
     {
         LeftDump.HideDragAndDrop();
         RightDump.HideDragAndDrop();
     }
 }
Beispiel #4
0
        // =================================
        // Form events
        // =================================

        private void OnDragEnter(object sender, DragEventArgs e)
        {
            if (sender == this)
            {
                LeftDump.ShowDragAndDrop();
                RightDump.ShowDragAndDrop();
            }
        }
Beispiel #5
0
        // =================================
        // Custom events
        // =================================

        private void OnDumpDropped()
        {
            m_treeSortPropery = null;

            LeftDump.HideDragAndDrop();
            RightDump.HideDragAndDrop();
            LeftDump.ShowDumpView();
            RightDump.ShowDumpView();
        }
Beispiel #6
0
        private void OnTypeTreeBackClicked()
        {
            LeftDump.ShowDumpView();
            RightDump.ShowDumpView();
            ListViewItem listItem = (ListViewItem)RightDump.DumpListView.ItemContainerGenerator.ContainerFromIndex(RightDump.DumpListView.SelectedIndex);

            if (listItem != null)
            {
                listItem.Focus();
            }
        }
Beispiel #7
0
 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);
 }
Beispiel #8
0
 private void OnDumpTypeTreeSelected(int classID)
 {
     LeftDump.ShowTypeTreeView(classID);
     RightDump.ShowTypeTreeView(classID);
     RightDump.TypeTreeListBox.Focus();
 }