Example #1
0
        void MainWindow_ContentRendered(object sender, EventArgs e)
        {
            var componentModel  = (IComponentModel)(GetService(typeof(SComponentModel)));
            IClippyVSSettings s = componentModel.DefaultExportProvider.GetExportedValue <IClippyVSSettings>();

            SpriteContainer container = new SpriteContainer(this);

            if (s.ShowAtStartup)
            {
                container.Show();
            }
        }
Example #2
0
        /// <summary>
        /// Handles "apply" messages from the Visual Studio environment.
        /// </summary>
        /// <devdoc>
        /// This method is called when VS wants to save the user's
        /// changes (for example, when the user clicks OK in the dialog).
        /// </devdoc>
        protected override void OnApply(PageApplyEventArgs e)
        {
            IClippyVSSettings storedValues = settings;

            IClippyVSSettings currentValues = new ClippyVSSettings()
            {
                ShowAtStartup = ShowAtStartup
            };

            settings.ShowAtStartup = currentValues.ShowAtStartup;

            settings.Store();

            base.OnApply(e);
        }