示例#1
0
        static void Main(string[] args)
        {
            // Load settings
            _configReader = new ConfigReader(SettingsPath);
            BaseConfig.Sources = _configReader.GetAllInstancesOf("ConnectionString");

            // Register sync events
            _sync = new SyncManager();
            _sync.OnSyncComplete += Sync_OnSyncComplete;
            _sync.OnSyncFailure += Sync_OnSyncFailure;
            _sync.OnUpdateStatus += Sync_OnUpdateStatus;
            _sync.OnSyncStart += Sync_OnSyncStart;
            _sync.OnCleanUp += Sync_OnCleanUp;

            if (WasLastRun_Local())
            {
                BaseConfig.IsLocal = false;
                Sync();
            }

            var main = new MainView();
            main.Show();

            SaveRun_Status();
            if (BaseConfig.IsLocal)
            {
                BaseConfig.IsLocal = false;
                Sync();
            }

            //Console.ReadKey();
        }
示例#2
0
        static void Main(string[] args)
        {
            var configReader = new ConfigReader(@"C:\repoSettings.xml");
            BaseConfig.Sources = configReader.GetAllInstancesOf("ConnectionString");

            SyncManager sync = new SyncManager();

            // Bind to all sync events
            sync.OnSyncComplete += Sync_OnSyncComplete;
            sync.OnSyncFailure += Sync_OnSyncFailure;
            sync.OnUpdateStatus += Sync_OnUpdateStatus;
            sync.OnSyncStart += Sync_OnSyncStart;
            sync.OnCleanUp += Sync_OnCleanUp;

            // SYNC!
            sync.SyncAllTables();
        }