Ejemplo n.º 1
0
        public ResultsOptions(ResultsOptions options)
        {
            columnOptionsVertical = new ColumnOptions[(int)ResultsListView.ColumnsTypeVertical.Size];
            for (int i = 0; i < columnOptionsVertical.Length; i++)
            {
                columnOptionsVertical[i] = options.columnOptionsVertical[i];
            }
            columnOptionsHorizontal = new ColumnOptions[(int)ResultsListView.ColumnsTypeHorizontal.Size];
            for (int i = 0; i < columnOptionsHorizontal.Length; i++)
            {
                columnOptionsHorizontal[i] = options.columnOptionsHorizontal[i];
            }
            sortTypeDefault   = options.sortTypeDefault;
            increasingDefault = options.increasingDefault;
            splitterDistanceVerticalMaximized   = options.splitterDistanceVerticalMaximized;
            splitterDistanceVerticalNormal      = options.splitterDistanceVerticalNormal;
            splitterDistanceHorizontalMaximized = options.splitterDistanceHorizontalMaximized;
            splitterDistanceHorizontalNormal    = options.splitterDistanceHorizontalNormal;
            thumbnailSizeMax = options.thumbnailSizeMax;

            m_highlightDifference             = options.HighlightDifference;
            m_differenceThreshold             = options.DifferenceThreshold;
            m_notHighlightIfFragmentsMoreThan = options.NotHighlightIfFragmentsMoreThan;
            m_notHighlightMaxFragments        = options.NotHighlightMaxFragments;
            m_highlightAllDifferences         = options.HighlightAllDifferences;
            m_maxFragmentsForHighlight        = options.MaxFragmentsForHighlight;
            m_amountOfFragmentsOnX            = options.AmountOfFragmentsOnX;
            m_amountOfFragmentsOnY            = options.AmountOfFragmentsOnY;
            m_normalizedSizeOfImage           = options.NormalizedSizeOfImage;
            m_penThickness = options.PenThickness;
        }
Ejemplo n.º 2
0
 public void Check()
 {
     if (columnOptionsVertical.Length < (int)ResultsListView.ColumnsTypeVertical.Size ||
         columnOptionsHorizontal.Length < (int)ResultsListView.ColumnsTypeHorizontal.Size)
     {
         ResultsOptions options = new ResultsOptions();
         if (columnOptionsVertical.Length < options.columnOptionsVertical.Length)
         {
             for (int i = 0; i < columnOptionsVertical.Length; ++i)
             {
                 options.columnOptionsVertical[i].visible = columnOptionsVertical[i].visible;
                 options.columnOptionsVertical[i].width   = columnOptionsVertical[i].width;
                 options.columnOptionsVertical[i].order   = columnOptionsVertical[i].order;
             }
             columnOptionsVertical = options.columnOptionsVertical;
         }
         if (columnOptionsHorizontal.Length < options.columnOptionsHorizontal.Length)
         {
             for (int i = 0; i < columnOptionsHorizontal.Length; ++i)
             {
                 options.columnOptionsHorizontal[i].visible = columnOptionsHorizontal[i].visible;
                 options.columnOptionsHorizontal[i].width   = columnOptionsHorizontal[i].width;
                 options.columnOptionsHorizontal[i].order   = columnOptionsHorizontal[i].order;
             }
             columnOptionsHorizontal = options.columnOptionsHorizontal;
         }
     }
 }
Ejemplo n.º 3
0
        private void GetSplitterDistance()
        {
            ResultsOptions options = m_options.resultsOptions;

            if (options.viewMode == ResultsOptions.ViewMode.VerticalPairTable || options.viewMode == ResultsOptions.ViewMode.GroupedThumbnails)
            {
                if (m_mainForm.WindowState == FormWindowState.Maximized)
                {
                    options.splitterDistanceVerticalMaximized = SplitterDistance;
                }
                if (m_mainForm.WindowState == FormWindowState.Normal)
                {
                    options.splitterDistanceVerticalNormal = SplitterDistance;
                }
            }
            if (options.viewMode == ResultsOptions.ViewMode.HorizontalPairTable)
            {
                if (m_mainForm.WindowState == FormWindowState.Maximized)
                {
                    options.splitterDistanceHorizontalMaximized = SplitterDistance;
                }
                if (m_mainForm.WindowState == FormWindowState.Normal)
                {
                    options.splitterDistanceHorizontalNormal = SplitterDistance;
                }
            }
        }
Ejemplo n.º 4
0
        private void SetSplitterDistance()
        {
            ResultsOptions options = m_options.resultsOptions;

            if (options.viewMode == ResultsOptions.ViewMode.VerticalPairTable || options.viewMode == ResultsOptions.ViewMode.GroupedThumbnails)
            {
                if (m_mainForm.WindowState == FormWindowState.Maximized)
                {
                    SplitterDistance = Math.Min(Math.Max(options.splitterDistanceVerticalMaximized, VIEW_MIN_WIDTH), Width - LIST_MIN_WIDTH - SplitterWidth);
                }
                if (m_mainForm.WindowState == FormWindowState.Normal)
                {
                    SplitterDistance = Math.Min(Math.Max(options.splitterDistanceVerticalNormal, VIEW_MIN_WIDTH), Width - LIST_MIN_WIDTH - SplitterWidth);
                }
            }
            if (options.viewMode == ResultsOptions.ViewMode.HorizontalPairTable)
            {
                if (m_mainForm.WindowState == FormWindowState.Maximized)
                {
                    SplitterDistance = Math.Min(Math.Max(options.splitterDistanceHorizontalMaximized, VIEW_MIN_HEIGHT), Height - LIST_MIN_HEIGHT - SplitterWidth);
                }
                if (m_mainForm.WindowState == FormWindowState.Normal)
                {
                    SplitterDistance = Math.Min(Math.Max(options.splitterDistanceHorizontalNormal, VIEW_MIN_HEIGHT), Height - LIST_MIN_HEIGHT - SplitterWidth);
                }
            }
        }
Ejemplo n.º 5
0
        public Options(Options options)
        {
            resultsOptions      = new ResultsOptions(options.resultsOptions);
            mainFormOptions     = new MainFormOptions(options.mainFormOptions);
            hotKeyOptions       = new HotKeyOptions(options.hotKeyOptions);
            coreOptionsFileName = (string)options.coreOptionsFileName.Clone();

            Language               = options.Language;
            onePath                = options.onePath;
            checkingForUpdates     = options.checkingForUpdates;
            useImageDataBase       = options.useImageDataBase;
            checkResultsAtLoading  = options.checkResultsAtLoading;
            checkMistakesAtLoading = options.checkMistakesAtLoading;
            loadProfileOnLoading   = options.loadProfileOnLoading;
            saveProfileOnClosing   = options.saveProfileOnClosing;
        }
Ejemplo n.º 6
0
        public SelectVerticalColumnsForm(ResultsListView resultsListView, Options options)
        {
            if (options.resultsOptions.viewMode != ResultsOptions.ViewMode.VerticalPairTable)
            {
                throw new Exception("Bad view mode!");
            }

            m_resultsListView  = resultsListView;
            m_options          = options;
            m_newResultOptions = new ResultsOptions(m_options.resultsOptions);
            InitializeComponents();
            UpdateStrings();
            UpdateItemsEnabling();
            GetOptions();
            m_inited = true;
        }
Ejemplo n.º 7
0
        public bool Equals(ResultsOptions options)
        {
            for (int i = 0; i < columnOptionsVertical.Length; i++)
            {
                if (!Equals(columnOptionsVertical[i], options.columnOptionsVertical[i]))
                {
                    return(false);
                }
            }
            for (int i = 0; i < columnOptionsHorizontal.Length; i++)
            {
                if (!Equals(columnOptionsHorizontal[i], options.columnOptionsHorizontal[i]))
                {
                    return(false);
                }
            }
            if (sortTypeDefault != options.sortTypeDefault)
            {
                return(false);
            }
            if (increasingDefault != options.increasingDefault)
            {
                return(false);
            }
            if (splitterDistanceVerticalMaximized != options.splitterDistanceVerticalMaximized)
            {
                return(false);
            }
            if (splitterDistanceVerticalNormal != options.splitterDistanceVerticalNormal)
            {
                return(false);
            }
            if (splitterDistanceHorizontalMaximized != options.splitterDistanceHorizontalMaximized)
            {
                return(false);
            }
            if (splitterDistanceHorizontalNormal != options.splitterDistanceHorizontalNormal)
            {
                return(false);
            }
            if (thumbnailSizeMax != options.thumbnailSizeMax)
            {
                return(false);
            }

            return(true);
        }
Ejemplo n.º 8
0
 public void CopyTo(ref ResultsOptions options)
 {
     for (int i = 0; i < columnOptionsVertical.Length; i++)
     {
         options.columnOptionsVertical[i] = columnOptionsVertical[i];
     }
     for (int i = 0; i < columnOptionsHorizontal.Length; i++)
     {
         options.columnOptionsHorizontal[i] = columnOptionsHorizontal[i];
     }
     options.sortTypeDefault   = sortTypeDefault;
     options.increasingDefault = increasingDefault;
     options.splitterDistanceVerticalMaximized   = splitterDistanceVerticalMaximized;
     options.splitterDistanceVerticalNormal      = splitterDistanceVerticalNormal;
     options.splitterDistanceHorizontalMaximized = splitterDistanceHorizontalMaximized;
     options.splitterDistanceHorizontalNormal    = splitterDistanceHorizontalNormal;
     options.thumbnailSizeMax = thumbnailSizeMax;
 }
Ejemplo n.º 9
0
 public ClipboardContentBuilder(ResultsOptions options)
 {
     m_options = options;
     m_builder = new StringBuilder();
 }