Exemplo n.º 1
0
        private void Application_Exit(object sender, ExitEventArgs e)
        {
            worker.Stop();

            SpotifyWorker.ClearScreen();
            appSettings.Save();
        }
Exemplo n.º 2
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            appSettings   = new AppSettings();
            worker        = new SpotifyWorker();
            paletteHelper = new PaletteHelper();

            var startArg = Environment.GetCommandLineArgs();

            if (startArg != null)
            {
                foreach (var arg in startArg)
                {
                    if (arg.Contains("autostart"))
                    {
                        autoStarted = true;

                        break;
                    }
                }
            }

            worker.Start();

            MainWindow window = new MainWindow(worker, appSettings);
            TrayIcon   icon   = new TrayIcon(window);

            SetLightDarkMode();

            if (!autoStarted)
            {
                window.Show();
            }
        }
Exemplo n.º 3
0
        public MainWindow(SpotifyWorker _work, AppSettings appSettings)
        {
            InitializeComponent();

            work           = _work;
            listProperties = new ObservableCollection <string>();

            foreach (var item in appSettings.PropertiesOrder)
            {
                listProperties.Add(item);
            }

            gridSongProperties.ItemsSource = listProperties;
            textPreview.DataContext        = work;
        }