Exemplo n.º 1
0
        private void CirclePlayer_Startup(object sender, StartupEventArgs e)
        {
            CirclePlayerUtils Utils     = new CirclePlayerUtils();
            String            NaiveArgs = null;

            for (int i = 0; i < e.Args.Length; i++)
            {
                NaiveArgs += e.Args[i];
            }
            String[] args = (NaiveArgs == null) ? null : Utils.PlayerArgBuilder(NaiveArgs);
            if (args != null)
            {
                switch (args[0])
                {
                case "listmusic":
                    ListmusicWindow listmusicWindow = new ListmusicWindow(args[0], args[1], args[2], args[3], args[4], true);
                    Application.Current.MainWindow = listmusicWindow;
                    listmusicWindow.Show();
                    break;
                }
                return;
            }
            HomeWindow homeWindow = new HomeWindow();

            Application.Current.MainWindow = homeWindow;
            homeWindow.Show();
        }
 public void CloseWindow(object sender, RoutedEventArgs args)
 {
     if (isStartWithArg)
     {
         isStartWithArg = false;
         HomeWindow homeWindow = new HomeWindow();
         Application.Current.MainWindow = homeWindow;
         homeWindow.Show();
     }
     this.Close();
 }