private void btnSyncFromExcel_Click(object sender, RibbonControlEventArgs e) { var inspector = _app.ActiveInspector(); var caption = inspector.Caption; var mail = inspector.CurrentItem as MailItem; //var session = inspector.Session; //var a = inspector.AttachmentSelection; if (mail == null) { return; } try { var contracts = ContractHelper.GetContracts(ContractHelper.GetContractFile()); var helper = new ContractHelper(this._app); helper.SyncContract(contracts); } finally { GC.Collect(); } MessageBox.Show(Resources.Messagebox_Info_SyncFinished); }
private void btnSyncFromExcel_Click(object sender, RibbonControlEventArgs e) { var inspector = _app.ActiveInspector(); var caption = inspector.Caption; var mail = inspector.CurrentItem as MailItem; //var session = inspector.Session; //var a = inspector.AttachmentSelection; if (mail == null) { return; } try { var contracts = ContractHelper.GetContracts(ContractHelper.GetContractFile()); var helper = new ContractHelper(this._app); helper.SyncContract(contracts); } finally { GC.Collect(); } MessageBox.Show(Resources.Messagebox_Info_SyncFinished); }