Click here to Skip to main content
15,892,005 members
Articles / Database Development / SQL Server

Take Data Offline Using Microsoft Synchronization Services for ADO.NET

Rate me:
Please Sign up or sign in to vote.
4.88/5 (64 votes)
11 Jan 2008CPOL17 min read 385.6K   6.6K   252  
Build occasionally connected applications using Microsoft Synchronization Services for ADO.NET
namespace SyncApplication
{
    partial class SyncForm
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.buttonSynchornize = new System.Windows.Forms.Button();
            this.buttonExit = new System.Windows.Forms.Button();
            this.tabControl1 = new System.Windows.Forms.TabControl();
            this.tabOrders = new System.Windows.Forms.TabPage();
            this.radioPubOrders = new System.Windows.Forms.RadioButton();
            this.radioSubOrders = new System.Windows.Forms.RadioButton();
            this.buttonRefreshOrders = new System.Windows.Forms.Button();
            this.buttonApplyOrdersInserts = new System.Windows.Forms.Button();
            this.dataGridOrders = new System.Windows.Forms.DataGridView();
            this.tabOrderDetails = new System.Windows.Forms.TabPage();
            this.buttonApplyOrderDetailsDeletes = new System.Windows.Forms.Button();
            this.buttonApplyOrderDetailsUpdates = new System.Windows.Forms.Button();
            this.radioPubOrderDetails = new System.Windows.Forms.RadioButton();
            this.radioSubOrderDetails = new System.Windows.Forms.RadioButton();
            this.buttonApplyOrderDetailsInserts = new System.Windows.Forms.Button();
            this.buttonRefreshOrderDetails = new System.Windows.Forms.Button();
            this.dataGridOrderDetails = new System.Windows.Forms.DataGridView();
            this.textClientMachine = new System.Windows.Forms.TextBox();
            this.textServerMachine = new System.Windows.Forms.TextBox();
            this.label1 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.ordersBindingSource = new System.Windows.Forms.BindingSource(this.components);
            this.label3 = new System.Windows.Forms.Label();
            this.dbPathTextBox = new System.Windows.Forms.TextBox();
            this.buttonApplyOrdersUpdates = new System.Windows.Forms.Button();
            this.buttonApplyOrdersDeletes = new System.Windows.Forms.Button();
            this.tabControl1.SuspendLayout();
            this.tabOrders.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridOrders)).BeginInit();
            this.tabOrderDetails.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridOrderDetails)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.ordersBindingSource)).BeginInit();
            this.SuspendLayout();
            // 
            // buttonSynchornize
            // 
            this.buttonSynchornize.Location = new System.Drawing.Point(503, 536);
            this.buttonSynchornize.Name = "buttonSynchornize";
            this.buttonSynchornize.Size = new System.Drawing.Size(188, 23);
            this.buttonSynchornize.TabIndex = 0;
            this.buttonSynchornize.Text = "&Synchronize";
            this.buttonSynchornize.UseVisualStyleBackColor = true;
            this.buttonSynchornize.Click += new System.EventHandler(this.buttonSynchronize_Click);
            // 
            // buttonExit
            // 
            this.buttonExit.Location = new System.Drawing.Point(503, 565);
            this.buttonExit.Name = "buttonExit";
            this.buttonExit.Size = new System.Drawing.Size(188, 23);
            this.buttonExit.TabIndex = 2;
            this.buttonExit.Text = "E&xit";
            this.buttonExit.UseVisualStyleBackColor = true;
            this.buttonExit.Click += new System.EventHandler(this.buttonExit_Click);
            // 
            // tabControl1
            // 
            this.tabControl1.Controls.Add(this.tabOrders);
            this.tabControl1.Controls.Add(this.tabOrderDetails);
            this.tabControl1.Location = new System.Drawing.Point(12, 85);
            this.tabControl1.Name = "tabControl1";
            this.tabControl1.SelectedIndex = 0;
            this.tabControl1.Size = new System.Drawing.Size(679, 431);
            this.tabControl1.TabIndex = 3;
            // 
            // tabOrders
            // 
            this.tabOrders.Controls.Add(this.buttonApplyOrdersDeletes);
            this.tabOrders.Controls.Add(this.buttonApplyOrdersUpdates);
            this.tabOrders.Controls.Add(this.radioPubOrders);
            this.tabOrders.Controls.Add(this.radioSubOrders);
            this.tabOrders.Controls.Add(this.buttonRefreshOrders);
            this.tabOrders.Controls.Add(this.buttonApplyOrdersInserts);
            this.tabOrders.Controls.Add(this.dataGridOrders);
            this.tabOrders.Location = new System.Drawing.Point(4, 22);
            this.tabOrders.Name = "tabOrders";
            this.tabOrders.Padding = new System.Windows.Forms.Padding(3);
            this.tabOrders.Size = new System.Drawing.Size(671, 405);
            this.tabOrders.TabIndex = 0;
            this.tabOrders.Text = "Orders";
            this.tabOrders.UseVisualStyleBackColor = true;
            // 
            // radioPubOrders
            // 
            this.radioPubOrders.AutoSize = true;
            this.radioPubOrders.Location = new System.Drawing.Point(15, 341);
            this.radioPubOrders.Name = "radioPubOrders";
            this.radioPubOrders.Size = new System.Drawing.Size(105, 17);
            this.radioPubOrders.TabIndex = 4;
            this.radioPubOrders.TabStop = true;
            this.radioPubOrders.Text = "Server Database";
            this.radioPubOrders.UseVisualStyleBackColor = true;
            this.radioPubOrders.CheckedChanged += new System.EventHandler(this.radioPubOrders_CheckedChanged);
            // 
            // radioSubOrders
            // 
            this.radioSubOrders.AutoSize = true;
            this.radioSubOrders.Checked = true;
            this.radioSubOrders.Location = new System.Drawing.Point(15, 316);
            this.radioSubOrders.Name = "radioSubOrders";
            this.radioSubOrders.Size = new System.Drawing.Size(100, 17);
            this.radioSubOrders.TabIndex = 3;
            this.radioSubOrders.TabStop = true;
            this.radioSubOrders.Text = "Client Database";
            this.radioSubOrders.UseVisualStyleBackColor = true;
            this.radioSubOrders.CheckedChanged += new System.EventHandler(this.radioSubOrders_CheckedChanged);
            // 
            // buttonRefreshOrders
            // 
            this.buttonRefreshOrders.Location = new System.Drawing.Point(274, 372);
            this.buttonRefreshOrders.Name = "buttonRefreshOrders";
            this.buttonRefreshOrders.Size = new System.Drawing.Size(177, 23);
            this.buttonRefreshOrders.TabIndex = 2;
            this.buttonRefreshOrders.Text = "&Refresh";
            this.buttonRefreshOrders.UseVisualStyleBackColor = true;
            this.buttonRefreshOrders.Click += new System.EventHandler(this.buttonRefreshOrders_Click);
            // 
            // buttonApplyOrdersInserts
            // 
            this.buttonApplyOrdersInserts.Enabled = false;
            this.buttonApplyOrdersInserts.Location = new System.Drawing.Point(474, 311);
            this.buttonApplyOrdersInserts.Name = "buttonApplyOrdersInserts";
            this.buttonApplyOrdersInserts.Size = new System.Drawing.Size(177, 23);
            this.buttonApplyOrdersInserts.TabIndex = 1;
            this.buttonApplyOrdersInserts.Text = "Make Random &Inserts";
            this.buttonApplyOrdersInserts.UseVisualStyleBackColor = true;
            this.buttonApplyOrdersInserts.Click += new System.EventHandler(this.buttonApplyOrdersInserts_Click);
            // 
            // dataGridOrders
            // 
            this.dataGridOrders.AllowUserToAddRows = false;
            this.dataGridOrders.AllowUserToDeleteRows = false;
            this.dataGridOrders.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
            this.dataGridOrders.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
            this.dataGridOrders.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.dataGridOrders.GridColor = System.Drawing.SystemColors.ControlDarkDark;
            this.dataGridOrders.Location = new System.Drawing.Point(15, 19);
            this.dataGridOrders.Name = "dataGridOrders";
            this.dataGridOrders.Size = new System.Drawing.Size(636, 286);
            this.dataGridOrders.TabIndex = 0;
            // 
            // tabOrderDetails
            // 
            this.tabOrderDetails.Controls.Add(this.buttonApplyOrderDetailsDeletes);
            this.tabOrderDetails.Controls.Add(this.buttonApplyOrderDetailsUpdates);
            this.tabOrderDetails.Controls.Add(this.radioPubOrderDetails);
            this.tabOrderDetails.Controls.Add(this.radioSubOrderDetails);
            this.tabOrderDetails.Controls.Add(this.buttonApplyOrderDetailsInserts);
            this.tabOrderDetails.Controls.Add(this.buttonRefreshOrderDetails);
            this.tabOrderDetails.Controls.Add(this.dataGridOrderDetails);
            this.tabOrderDetails.Location = new System.Drawing.Point(4, 22);
            this.tabOrderDetails.Name = "tabOrderDetails";
            this.tabOrderDetails.Padding = new System.Windows.Forms.Padding(3);
            this.tabOrderDetails.Size = new System.Drawing.Size(671, 405);
            this.tabOrderDetails.TabIndex = 1;
            this.tabOrderDetails.Text = "Order Details";
            this.tabOrderDetails.UseVisualStyleBackColor = true;
            // 
            // buttonApplyOrderDetailsDeletes
            // 
            this.buttonApplyOrderDetailsDeletes.Enabled = false;
            this.buttonApplyOrderDetailsDeletes.Location = new System.Drawing.Point(474, 372);
            this.buttonApplyOrderDetailsDeletes.Name = "buttonApplyOrderDetailsDeletes";
            this.buttonApplyOrderDetailsDeletes.Size = new System.Drawing.Size(177, 23);
            this.buttonApplyOrderDetailsDeletes.TabIndex = 8;
            this.buttonApplyOrderDetailsDeletes.Text = "Make Random &Deletes";
            this.buttonApplyOrderDetailsDeletes.UseVisualStyleBackColor = true;
            this.buttonApplyOrderDetailsDeletes.Click += new System.EventHandler(this.buttonApplyOrderDetailsDeletes_Click);
            // 
            // buttonApplyOrderDetailsUpdates
            // 
            this.buttonApplyOrderDetailsUpdates.Enabled = false;
            this.buttonApplyOrderDetailsUpdates.Location = new System.Drawing.Point(474, 341);
            this.buttonApplyOrderDetailsUpdates.Name = "buttonApplyOrderDetailsUpdates";
            this.buttonApplyOrderDetailsUpdates.Size = new System.Drawing.Size(177, 23);
            this.buttonApplyOrderDetailsUpdates.TabIndex = 7;
            this.buttonApplyOrderDetailsUpdates.Text = "Make Random &Updates";
            this.buttonApplyOrderDetailsUpdates.UseVisualStyleBackColor = true;
            this.buttonApplyOrderDetailsUpdates.Click += new System.EventHandler(this.buttonApplyOrderDetailsUpdates_Click);
            // 
            // radioPubOrderDetails
            // 
            this.radioPubOrderDetails.AutoSize = true;
            this.radioPubOrderDetails.Location = new System.Drawing.Point(15, 341);
            this.radioPubOrderDetails.Name = "radioPubOrderDetails";
            this.radioPubOrderDetails.Size = new System.Drawing.Size(105, 17);
            this.radioPubOrderDetails.TabIndex = 6;
            this.radioPubOrderDetails.TabStop = true;
            this.radioPubOrderDetails.Text = "Server Database";
            this.radioPubOrderDetails.UseVisualStyleBackColor = true;
            this.radioPubOrderDetails.CheckedChanged += new System.EventHandler(this.radioPubOrderDetails_CheckedChanged);
            // 
            // radioSubOrderDetails
            // 
            this.radioSubOrderDetails.AutoSize = true;
            this.radioSubOrderDetails.Checked = true;
            this.radioSubOrderDetails.Location = new System.Drawing.Point(15, 316);
            this.radioSubOrderDetails.Name = "radioSubOrderDetails";
            this.radioSubOrderDetails.Size = new System.Drawing.Size(100, 17);
            this.radioSubOrderDetails.TabIndex = 5;
            this.radioSubOrderDetails.TabStop = true;
            this.radioSubOrderDetails.Text = "Client Database";
            this.radioSubOrderDetails.UseVisualStyleBackColor = true;
            this.radioSubOrderDetails.CheckedChanged += new System.EventHandler(this.radioSubOrderDetails_CheckedChanged);
            // 
            // buttonApplyOrderDetailsInserts
            // 
            this.buttonApplyOrderDetailsInserts.Enabled = false;
            this.buttonApplyOrderDetailsInserts.Location = new System.Drawing.Point(474, 311);
            this.buttonApplyOrderDetailsInserts.Name = "buttonApplyOrderDetailsInserts";
            this.buttonApplyOrderDetailsInserts.Size = new System.Drawing.Size(177, 23);
            this.buttonApplyOrderDetailsInserts.TabIndex = 4;
            this.buttonApplyOrderDetailsInserts.Text = "Make Random &Inserts";
            this.buttonApplyOrderDetailsInserts.UseVisualStyleBackColor = true;
            this.buttonApplyOrderDetailsInserts.Click += new System.EventHandler(this.buttonApplyOrderDetailsInserts_Click);
            // 
            // buttonRefreshOrderDetails
            // 
            this.buttonRefreshOrderDetails.Location = new System.Drawing.Point(274, 372);
            this.buttonRefreshOrderDetails.Name = "buttonRefreshOrderDetails";
            this.buttonRefreshOrderDetails.Size = new System.Drawing.Size(177, 23);
            this.buttonRefreshOrderDetails.TabIndex = 3;
            this.buttonRefreshOrderDetails.Text = "&Refresh";
            this.buttonRefreshOrderDetails.UseVisualStyleBackColor = true;
            this.buttonRefreshOrderDetails.Click += new System.EventHandler(this.buttonRefreshOrderDetails_Click);
            // 
            // dataGridOrderDetails
            // 
            this.dataGridOrderDetails.AllowUserToAddRows = false;
            this.dataGridOrderDetails.AllowUserToDeleteRows = false;
            this.dataGridOrderDetails.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
            this.dataGridOrderDetails.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
            this.dataGridOrderDetails.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.dataGridOrderDetails.Location = new System.Drawing.Point(15, 19);
            this.dataGridOrderDetails.Name = "dataGridOrderDetails";
            this.dataGridOrderDetails.Size = new System.Drawing.Size(636, 286);
            this.dataGridOrderDetails.TabIndex = 0;
            // 
            // textClientMachine
            // 
            this.textClientMachine.Location = new System.Drawing.Point(101, 12);
            this.textClientMachine.Name = "textClientMachine";
            this.textClientMachine.Size = new System.Drawing.Size(148, 20);
            this.textClientMachine.TabIndex = 4;
            // 
            // textServerMachine
            // 
            this.textServerMachine.Location = new System.Drawing.Point(543, 12);
            this.textServerMachine.Name = "textServerMachine";
            this.textServerMachine.Size = new System.Drawing.Size(148, 20);
            this.textServerMachine.TabIndex = 5;
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(10, 15);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(77, 13);
            this.label1.TabIndex = 6;
            this.label1.Text = "Client Machine";
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(448, 15);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(82, 13);
            this.label2.TabIndex = 7;
            this.label2.Text = "Server Machine";
            // 
            // label3
            // 
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(13, 48);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(82, 13);
            this.label3.TabIndex = 8;
            this.label3.Text = "Client Database";
            // 
            // dbPathTextBox
            // 
            this.dbPathTextBox.Location = new System.Drawing.Point(101, 45);
            this.dbPathTextBox.Name = "dbPathTextBox";
            this.dbPathTextBox.Size = new System.Drawing.Size(590, 20);
            this.dbPathTextBox.TabIndex = 9;
            // 
            // buttonApplyOrdersUpdates
            // 
            this.buttonApplyOrdersUpdates.Enabled = false;
            this.buttonApplyOrdersUpdates.Location = new System.Drawing.Point(474, 341);
            this.buttonApplyOrdersUpdates.Name = "buttonApplyOrdersUpdates";
            this.buttonApplyOrdersUpdates.Size = new System.Drawing.Size(177, 23);
            this.buttonApplyOrdersUpdates.TabIndex = 5;
            this.buttonApplyOrdersUpdates.Text = "Make Random &Updates";
            this.buttonApplyOrdersUpdates.UseVisualStyleBackColor = true;
            this.buttonApplyOrdersUpdates.Click += new System.EventHandler(this.buttonApplyOrdersUpdates_Click);
            // 
            // buttonApplyOrdersDeletes
            // 
            this.buttonApplyOrdersDeletes.Enabled = false;
            this.buttonApplyOrdersDeletes.Location = new System.Drawing.Point(474, 372);
            this.buttonApplyOrdersDeletes.Name = "buttonApplyOrdersDeletes";
            this.buttonApplyOrdersDeletes.Size = new System.Drawing.Size(177, 23);
            this.buttonApplyOrdersDeletes.TabIndex = 6;
            this.buttonApplyOrdersDeletes.Text = "Make Random &Deletes";
            this.buttonApplyOrdersDeletes.UseVisualStyleBackColor = true;
            this.buttonApplyOrdersDeletes.Click += new System.EventHandler(this.buttonApplyOrdersDeletes_Click);
            // 
            // SyncForm
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(703, 600);
            this.Controls.Add(this.dbPathTextBox);
            this.Controls.Add(this.label3);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.textServerMachine);
            this.Controls.Add(this.textClientMachine);
            this.Controls.Add(this.tabControl1);
            this.Controls.Add(this.buttonExit);
            this.Controls.Add(this.buttonSynchornize);
            this.Name = "SyncForm";
            this.Text = "!nSync - Data Synchronization Demo Application";
            this.tabControl1.ResumeLayout(false);
            this.tabOrders.ResumeLayout(false);
            this.tabOrders.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridOrders)).EndInit();
            this.tabOrderDetails.ResumeLayout(false);
            this.tabOrderDetails.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridOrderDetails)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.ordersBindingSource)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Button buttonSynchornize;
        private System.Windows.Forms.Button buttonExit;
        private System.Windows.Forms.TabControl tabControl1;
        private System.Windows.Forms.TabPage tabOrders;
        private System.Windows.Forms.TabPage tabOrderDetails;
        private System.Windows.Forms.DataGridView dataGridOrders;
        private System.Windows.Forms.DataGridView dataGridOrderDetails;
        private System.Windows.Forms.Button buttonApplyOrdersInserts;
        private System.Windows.Forms.Button buttonRefreshOrders;
        private System.Windows.Forms.RadioButton radioPubOrders;
        private System.Windows.Forms.RadioButton radioSubOrders;
        private System.Windows.Forms.RadioButton radioPubOrderDetails;
        private System.Windows.Forms.RadioButton radioSubOrderDetails;
        private System.Windows.Forms.Button buttonApplyOrderDetailsInserts;
        private System.Windows.Forms.Button buttonRefreshOrderDetails;
        private System.Windows.Forms.TextBox textClientMachine;
        private System.Windows.Forms.TextBox textServerMachine;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.BindingSource ordersBindingSource;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.TextBox dbPathTextBox;
        private System.Windows.Forms.Button buttonApplyOrderDetailsDeletes;
        private System.Windows.Forms.Button buttonApplyOrderDetailsUpdates;
        private System.Windows.Forms.Button buttonApplyOrdersDeletes;
        private System.Windows.Forms.Button buttonApplyOrdersUpdates;

    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Chief Technology Officer Raveable.com
United States United States
Entrepreneur, developer and then some. I started Raveable Hotel Reviews in 2008 to help travelers find the best hotel for their vacation with no history of bed bug reports (hint: don't go new york without checking bed bugs in NYC hotels page), cases of personal property theft, or food poisoning incidents.

Prior to Raveable.com, I was a development lead at Microsoft Corporation. I led the team developing the next generation social networking for Windows Mobile. Before that I played leading role in the design and development of Microsoft Sync Framework, Sync Services for ADO.NET, SQL Server Replication and Windows File Replication.

My Company: Raveable Hotel Reviews
My Sync Blog: The Synchronizer
My Sync WebSite: www.syncguru.com

Comments and Discussions