void replHelper_Completed(object sender, ErikEJ.SqlCeScripting.SqlCeReplicationHelper.SyncArgs ca)
        {
            if (!btnSync.Dispatcher.CheckAccess())
            {
                btnSync.Dispatcher.Invoke(
                  System.Windows.Threading.DispatcherPriority.Normal,
                  new Action(
                    delegate()
                    {
                        PrepareUI();
                        btnSync.IsEnabled = true;
                    }
                ));
            }
            else
            {
                PrepareUI();
                btnSync.IsEnabled = true;
            }

            if (ca.Exception() != null)
            {
                if (!txtStatus.Dispatcher.CheckAccess())
                {
                    txtStatus.Dispatcher.Invoke(
                        System.Windows.Threading.DispatcherPriority.Normal,
                        new Action(
                        delegate()
                        {
                            txtStatus.Text += Helpers.DataConnectionHelper.CreateEngineHelper(DatabaseType.SQLCE35).FormatError(ca.Exception()) + Environment.NewLine;
                        }
                    ));
                }
                else
                {
                    txtStatus.Text += Helpers.DataConnectionHelper.CreateEngineHelper(DatabaseType.SQLCE35).FormatError(ca.Exception()) + Environment.NewLine;
                }
            }
            else
            {
                this.IsNew = false;
            }
            if (!txtStatus.Dispatcher.CheckAccess())
            {
                txtStatus.Dispatcher.Invoke(
                    System.Windows.Threading.DispatcherPriority.Normal,
                    new Action(
                    delegate()
                    {
                        txtStatus.Text += ca.Message() + Environment.NewLine;
                    }
                ));
            }
            else
            {
                txtStatus.Text += ca.Message() + Environment.NewLine;
            }
            replHelper.Dispose();
        }
 void replHelper_Progress(object sender, ErikEJ.SqlCeScripting.SqlCeReplicationHelper.SyncArgs ca)
 {
     if (!txtStatus.Dispatcher.CheckAccess())
     {
         txtStatus.Dispatcher.Invoke(
           System.Windows.Threading.DispatcherPriority.Normal,
           new Action(
             delegate()
             {
                 txtStatus.Text += ca.Message() + Environment.NewLine;
             }
         ));
     }
     else
     {
         txtStatus.Text += ca.Message() + Environment.NewLine;
     }
 }