コード例 #1
0
        private ComparatorSettings readSettings()
        {
            //nacitam nastavenia
            ComparatorSettings set = new ComparatorSettings();

            if (rbDb1.Checked)
            {
                set.IsDbAPriority = true;
            }
            else
            {
                set.IsDbAPriority = false;
            }

            if (rbLeftToRight.Checked)
            {
                set.ComparisonMethod = ComparatorSettings.LeftRight;
            }
            if (rbLeftToRightDel.Checked)
            {
                set.ComparisonMethod = ComparatorSettings.LeftRightDel;
            }
            if (rbRightToLeft.Checked)
            {
                set.ComparisonMethod = ComparatorSettings.RightLeft;
            }
            if (rbRightToLeftDel.Checked)
            {
                set.ComparisonMethod = ComparatorSettings.RightLeftDel;
            }
            if (rbCompleteSync.Checked)
            {
                set.ComparisonMethod = ComparatorSettings.TwoWay;
            }

            if (cbAll.Checked)
            {
                set.SyncFunctions  = true;
                set.SyncProcedures = true;
                set.SyncTables     = true;
                set.SyncTypes      = true;
                set.SyncUsers      = true;
            }
            else
            {
                set.SyncFunctions  = cbFunctions.Checked;
                set.SyncProcedures = cbProcedures.Checked;
                set.SyncTables     = cbTables.Checked;
                set.SyncTypes      = cbTypes.Checked;
                set.SyncUsers      = cbUsers.Checked;
            }
            return(set);
        }
コード例 #2
0
        private ComparatorSettings readSettings()
        {
            //nacitam nastavenia
            ComparatorSettings set = new ComparatorSettings();

            if (rbDb1.Checked) set.IsDbAPriority = true;
            else set.IsDbAPriority = false;

            if (rbLeftToRight.Checked) set.ComparisonMethod = ComparatorSettings.LeftRight;
            if (rbLeftToRightDel.Checked) set.ComparisonMethod = ComparatorSettings.LeftRightDel;
            if (rbRightToLeft.Checked) set.ComparisonMethod = ComparatorSettings.RightLeft;
            if (rbRightToLeftDel.Checked) set.ComparisonMethod = ComparatorSettings.RightLeftDel;
            if (rbCompleteSync.Checked) set.ComparisonMethod = ComparatorSettings.TwoWay;

            if (cbAll.Checked)
            {
                set.SyncFunctions = true;
                set.SyncProcedures = true;
                set.SyncTables = true;
                set.SyncTypes = true;
                set.SyncUsers = true;
            }
            else
            {
                set.SyncFunctions = cbFunctions.Checked;
                set.SyncProcedures = cbProcedures.Checked;
                set.SyncTables = cbTables.Checked;
                set.SyncTypes = cbTypes.Checked;
                set.SyncUsers = cbUsers.Checked;
            }
            return set;
        }