示例#1
0
        private void tabMain_SelectedIndexChanged(object sender, EventArgs e)
        {
            int lastIndex = tabMain.TabPages.Count - 1;

            if (tabMain.SelectedIndex == lastIndex)
            {
                var merge = new MergeDefinition();
                _solution.Merges.Add(merge);

                var tab = new TabPage($"merge {tabMain.TabPages.Count}");
                var ui  = new SyncUI()
                {
                    Dock = DockStyle.Fill, Document = merge
                };
                tab.Controls.Add(ui);
                tabMain.TabPages.Insert(lastIndex, tab);
                tabMain.SelectedIndex = lastIndex;
            }
        }
示例#2
0
        public void TestBuildsMerge([Values(true, false)] bool useJson, [Values(true, false)] bool includeInsert, [Values(true, false)] bool includeUpdate, [Values(true, false)] bool includeDelete)
        {
            //--Arrange
            var mergeDefinition = new MergeDefinition <Client>();

            if (includeInsert)
            {
                mergeDefinition.Insert();
            }
            if (includeUpdate)
            {
                mergeDefinition.Update();
            }
            if (includeDelete)
            {
                mergeDefinition.Delete();
            }

            //--Act/Assert
            switch ((mergeDefinition.IncludeInsert, mergeDefinition.IncludeUpdate, mergeDefinition.IncludeDelete))
            {