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
        async void MainWindow_ContentRendered(object sender, EventArgs e)
        {
            var token = new CancellationToken();
            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(token);

            var shellSettingsManager  = new ShellSettingsManager(ServiceProvider.GlobalProvider);
            var writableSettingsStore = shellSettingsManager.GetWritableSettingsStore(SettingsScope.UserSettings);

            IClippyVSSettings settings  = new ClippyVSSettings(writableSettingsStore);
            SpriteContainer   container = new SpriteContainer(this);

            if (settings.ShowAtStartup)
            {
                container.Show();
            }
        }