コード例 #1
0
        public ViewModel_MainWindow()
        {
            if (!DesignerProperties.GetIsInDesignMode(Application.Current.MainWindow))
            {
                this.TrackDetails.Title = "Initializing Spotify ...";
                if (Wrapper_Spotify.Init())
                {
                    Wrapper_Skype.Init();

                    Updater.I.Start();
                    StatusEffects.I.Start();

                    NameEffect.I.Start();
                    NameEffect.I.UpdateEffect(2);
                    NameEffect.I.UpdateTrackDetails("Jayson Ragasa ");

                    Wrapper_Spotify.TrackChanged += Wrapper_Spotify_TrackChanged;

                    Command_Update = new RelayCommand(Commnad_Update_Click);

                    this.Pattern        = Properties.Settings.Default.Pattern;
                    this.SelectedEffect = Properties.Settings.Default.SelectedEffect;
                }
                else
                {
                    this.TrackDetails.Title = "Make sure you're running Spotify. Please restart this app";
                    Process.GetCurrentProcess().Kill();
                }
            }
        }
コード例 #2
0
 public void Dispose()
 {
     Updater.I.Stahp();
     Wrapper_Spotify.Dispose();
     Wrapper_Skype.Dispose();
 }