public void checkin(PowerPoint.Presentation presentationDocument) { try { if (MessageBox.Show(resources.GetString("sure_check_in"), resources.GetString("checkin"), MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) == DialogResult.OK) { String localFileName = presentationDocument.FullName; presentationDocument.Save(); // save document presentationDocument.Close(); // close document docXML.refresh(); // Refresh document list if (docXML.isOpenKMDocument(localFileName)) { OKMDocument oKMDocument = docXML.getOpenKMDocument(localFileName); docXML.remove(oKMDocument); DocumentLogic.checkin(oKMDocument, configXML.getHost(), configXML.getUser(), configXML.getPassword()); if (File.Exists(localFileName)) { File.Delete(localFileName); } } } } catch (Exception e) { String errorMsg = "OpenKMPowerPointAddIn - (checkinButton_Click)\n" + e.Message + "\n\n" + e.StackTrace; MessageBox.Show(errorMsg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
// Show tree form public void showTreeForm(PowerPoint.Presentation presentation) { try { presentation.Save(); // Saves the document if (treeForm == null) { treeForm = new TreeForm(presentation.FullName, configXML); } else { treeForm.setApplication(presentation.FullName); } treeForm.Show(); treeForm.startUp(); } catch (Exception e) { throw e; } }