Example #1
0
 public void Start()
 {
     try
     {
         var th = new Task(StartDownload);
         th.Start();
     }
     catch (Exception e)
     {
         PowerPointLabsGlobals.LogException(e, "Failed to start thread of Downloader.StartDownload");
     }
 }
Example #2
0
 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;
     }
 }
Example #3
0
        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
                : "");
        }
Example #4
0
        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");
            }
        }