예제 #1
0
        public void InitializeComponent(object pExtensionHost, IComponent pComponent, componentInitializeType initType)
        {
            try
            {
                var snagitHost = pExtensionHost as ISnagIt;
                if (snagitHost == null)
                {
                    throw new InvalidOperationException("Unable to communicate with Snagit");
                }

                var imgurService = new ImgurService();
                var temporaryImageProvider = new TemporaryImageProvider(snagitHost);
                snagitFacade = new SnagitFacade(snagitHost, temporaryImageProvider, imgurService);
            }
            catch (Exception e)
            {
                // todo temp code, replace with proper reporting!
                MessageBox.Show("An unandled exception occured:\n" + e);
            }
        }
예제 #2
0
        public void InitializeComponent(object pExtensionHost, IComponent pComponent, componentInitializeType initType)
        {
            try
            {
                var snagitHost = pExtensionHost as ISnagIt;
                if (snagitHost == null)
                {
                    throw new InvalidOperationException("Unable to communicate with Snagit");
                }

                var imgurService           = new ImgurService();
                var temporaryImageProvider = new TemporaryImageProvider(snagitHost);
                snagitFacade = new SnagitFacade(snagitHost, temporaryImageProvider, imgurService);
            }
            catch (Exception e)
            {
                // todo temp code, replace with proper reporting!
                MessageBox.Show("An unandled exception occured:\n" + e);
            }
        }