private void Application_Startup(object sender, StartupEventArgs e) { bool isSuccess; CurrentMutex = new Mutex(true, mutexId, out isSuccess); if (!isSuccess) { MessageBox.Show("Youtube Music Player 가 이미 실행중입니다."); Environment.Exit(0); } log.Info("Start YMP " + YMPInfo.Version); if (!e.Args.Contains("noDependencyCheck")) { if (!VCChecker.CheckVCRuntimeInstall()) { MessageBox.Show("Visual Studio 2015용 Visual C++ 재배포 가능 패키지가 설치되어 있지 않습니다.\n확인버튼을 누르면 설치패이지로 이동됩니다."); Utils.StartProcess(YMPInfo.VC2015Url); Environment.Exit(0); } } Application.Current.ShutdownMode = ShutdownMode.OnExplicitShutdown; YMPCore.Initialize(); }
private void Exit_Click(object sender, EventArgs e) { var result = MessageBox.Show("정말로 프로그램을 종료할까요?", "YMP", MessageBoxButtons.YesNo, MessageBoxIcon.None); if (result == DialogResult.Yes) { YMPCore.Stop(); } }