public void Start() { try { var th = new Task(StartDownload); th.Start(); } catch (Exception e) { PowerPointLabsGlobals.LogException(e, "Failed to start thread of Downloader.StartDownload"); } }
public void AddSpotlightEffect(List <PowerPoint.Shape> spotlightShapes) { try { PowerPoint.Shape indicatorShape = AddPowerPointLabsIndicator(); AddRectangleShape(); PowerPoint.Shape spotlightPicture = ConvertToSpotlightPicture(spotlightShapes); FormatSpotlightPicture(spotlightPicture); RenderSpotlightPicture(spotlightPicture); indicatorShape.ZOrder(Office.MsoZOrderCmd.msoBringToFront); } catch (Exception e) { PowerPointLabsGlobals.LogException(e, "AddSpotlightEffect"); throw; } }
private string GetVstoVersion(String vstoDirectory) { var currentVsto = new XmlDocument(); try { currentVsto.Load(vstoDirectory); } catch (Exception e) { PowerPointLabsGlobals.LogException(e, "GetVstoVersion"); } var vstoNode = currentVsto.GetElementsByTagName("assemblyIdentity")[0]; return(vstoNode.Attributes != null ? vstoNode.Attributes["version"].Value : ""); }
private void StartDownload() { if (_downloadAddress == "" || _destAddress == "") { return; } try { _client.DownloadFile(_downloadAddress, _destAddress); CallAfterDownloadDelegate(); } catch (Exception e) { CallWhenErrorDelegate(e); PowerPointLabsGlobals.LogException(e, "Failed to execute Downloader.StartDownload"); } }