private void 更新并初始化数据UToolStripMenuItem_Click(object sender, EventArgs e) { try { Synchronize syncSub = new Synchronize(); // Disable the current form this.Enabled = false; syncSub.Show(this); syncSub.ReinitializeSubscriptionWithUpload(); } catch (Exception ex) { ExceptionMessageBox emb = new ExceptionMessageBox(ex, ExceptionMessageBoxButtons.OK); emb.Show(this); } finally { loadLastAgentSessionSummary(); // Enable the current form this.Enabled = true; } }
private void 只上传数据ToolStripMenuItem_Click(object sender, EventArgs e) { try { Synchronize syncSub = new Synchronize(); // Disable the current form this.Enabled = false; syncSub.Show(this); syncSub.SynchronizeSubscriptionUploadOnly(); syncWhenConnectedStatus.Visible = false; } catch (Exception ex) { ExceptionMessageBox emb = new ExceptionMessageBox(ex, ExceptionMessageBoxButtons.OK); emb.Show(this); } finally { // Enable the current form this.Enabled = true; } }
private void 重新初始化数据RToolStripMenuItem_Click(object sender, EventArgs e) { try { Synchronize syncSub = new Synchronize(); // Disable the current form this.Enabled = false; syncSub.Show(this); syncSub.ReinitializeSubscription(); } catch (Exception ex) { ExceptionMessageBox emb = new ExceptionMessageBox(ex, ExceptionMessageBoxButtons.OK); emb.Show(this); } finally { loadLastAgentSessionSummary(); // Enable the current form this.Enabled = true; } }
private void 只上传数据ToolStripMenuItem_Click(object sender, EventArgs e) { try { Synchronize syncSub = new Synchronize(); // Disable the current form this.Enabled = false; syncSub.Show(this); syncSub.SynchronizeSubscriptionUploadOnly(); syncWhenConnectedStatus.Visible = false; } catch (Exception ex) { ExceptionMessageBox emb = new ExceptionMessageBox(ex, ExceptionMessageBoxButtons.OK); emb.Show(this); } finally { // Enable the current form this.Enabled = true; } }
private void showSyncDialog() { try { Synchronize syncSub = new Synchronize(); // Disable the current form this.Enabled = false; syncSub.Show(this); // Check that the subscription exists. syncSub.CheckSubscription(); // Disable upload only if Web synchronization is enabled. if (syncSub.UseWebSynchronization) { mnuSynchronizeOnlyUploadData.Enabled = false; } } catch (SqlException ex) { ExceptionMessageBox emb = new ExceptionMessageBox( Properties.Resources.ExceptionVerifySqlServerRunning, Properties.Resources.ExceptionSqlServerError, ExceptionMessageBoxButtons.OK); emb.InnerException = ex; emb.Show(this); // Shutdown the application because we can't continue. Application.Exit(); } catch (ApplicationException ex) { ExceptionMessageBox emb = new ExceptionMessageBox(ex, ExceptionMessageBoxButtons.OK); emb.Show(this); // Shutdown the application because we can't continue. Application.Exit(); } catch (Exception ex) { ExceptionMessageBox emb = new ExceptionMessageBox(ex, ExceptionMessageBoxButtons.OK); emb.Show(this); // Shutdown the application because we can't continue. Application.Exit(); } catch { ExceptionMessageBox emb = new ExceptionMessageBox(@"CATASTROPHIC FAILURE!", @"CLOSING APPLICATION"); emb.Show(this); // Shutdown the application because we can't continue. Application.Exit(); } finally { // Enable the current form this.Enabled = true; } }
private void showSyncDialog() { try { Synchronize syncSub = new Synchronize(); // Disable the current form this.Enabled = false; syncSub.Show(this); // Check that the subscription exists. syncSub.CheckSubscription(); // Disable upload only if Web synchronization is enabled. if (syncSub.UseWebSynchronization) { mnuSynchronizeOnlyUploadData.Enabled = false; } } catch (SqlException ex) { ExceptionMessageBox emb = new ExceptionMessageBox( Properties.Resources.ExceptionVerifySqlServerRunning, Properties.Resources.ExceptionSqlServerError, ExceptionMessageBoxButtons.OK); emb.InnerException = ex; emb.Show(this); // Shutdown the application because we can't continue. Application.Exit(); } catch (ApplicationException ex) { ExceptionMessageBox emb = new ExceptionMessageBox(ex, ExceptionMessageBoxButtons.OK); emb.Show(this); // Shutdown the application because we can't continue. Application.Exit(); } catch (Exception ex) { ExceptionMessageBox emb = new ExceptionMessageBox(ex, ExceptionMessageBoxButtons.OK); emb.Show(this); // Shutdown the application because we can't continue. Application.Exit(); } catch { ExceptionMessageBox emb = new ExceptionMessageBox(@"CATASTROPHIC FAILURE!", @"CLOSING APPLICATION"); emb.Show(this); // Shutdown the application because we can't continue. Application.Exit(); } finally { // Enable the current form this.Enabled = true; } }