Ejemplo n.º 1
0
        private void Okボタン_Click(object sender, EventArgs e)
        {
            // check
            {
                string dir = this.ffmpegのパス.Text;

                dir = Path.GetFullPath(dir);

                string SYSTEM_DRV_ROOT = Environment.GetEnvironmentVariable("SystemDrive")[0] + @":\";

                if (StringTools.IsSame(dir, SYSTEM_DRV_ROOT, true))
                {
                    if (MessageBox.Show(
                            "システムドライブのルートディレクトリが指定されました。\n" +
                            "間違いありませんか?",
                            "確認",
                            MessageBoxButtons.YesNo,
                            MessageBoxIcon.Warning
                            )
                        != System.Windows.Forms.DialogResult.Yes
                        )
                    {
                        return;
                    }
                }
            }

            Gnd.ffmpegDir = this.ffmpegのパス.Text;
            Gnd.SaveData();
            this.Close();
        }
Ejemplo n.º 2
0
        private void _開始ボタン_Click(object sender, EventArgs e)
        {
            this.SaveData();
            Gnd.SaveData();

            try
            {
                Gnd.Conv = new Conv();
                Gnd.Conv.Prep();
            }
            catch (Exception ex)
            {
                Gnd.ConvLog.Writeln(ex);

                MessageBox.Show(
                    ex.Message,
                    "開始できません",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Warning
                    );

                return;
            }
            this.Visible = false;

            using (BusyDlg f = new BusyDlg())
            {
                f.Th = new Thread((ThreadStart) delegate
                {
                    try
                    {
                        Gnd.Conv.Main();
                    }
                    catch (Exception ex)
                    {
                        Gnd.ConvLog.Writeln(ex);

                        Gnd.Conv.Errored = true;
                        Gnd.Conv.Error   = ex;
                    }
                    finally
                    {
                        Gnd.Conv.MainCleanup();
                    }
                });

                Gnd.BusyDlg = f;
                f.ShowDialog();
                Gnd.BusyDlg = null;
            }
            Gnd.ConvLog.Close();

            using (ResultDlg f = new ResultDlg())
            {
                f.ShowDialog();
            }
            this.Close();
        }
Ejemplo n.º 3
0
        private void ffmpegFToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.SaveData();
            Gnd.SaveData();

            using (ffmpegSettingDlg f = new ffmpegSettingDlg())
            {
                f.ShowDialog();
            }
        }
Ejemplo n.º 4
0
		static void Main()
		{
			BootTools.OnBoot();

			Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
			AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
			SystemEvents.SessionEnding += new SessionEndingEventHandler(SessionEnding);

			Mutex procMutex = new Mutex(false, APP_IDENT);

			if (procMutex.WaitOne(0) && GlobalProcMtx.Create(APP_IDENT, APP_TITLE))
			{
				CheckSelfDir();
				CheckCopiedExe();

				Gnd.NormLog = new Logger(StringTools.Combine(
					BootTools.SelfDir,
					Path.GetFileNameWithoutExtension(BootTools.SelfFile) + "_normal.log"
					));

				Utils.AntiWindowsDefenderSmartScreen();

				Gnd.ConvLog = new Logger(StringTools.Combine(
					BootTools.SelfDir,
					Path.GetFileNameWithoutExtension(BootTools.SelfFile) + "_conversion.log"
					));

				Gnd.LoadData();

				// orig >

				Application.EnableVisualStyles();
				Application.SetCompatibleTextRenderingDefault(false);
				Application.Run(new MainWin());

				// < orig

				Gnd.SaveData();

				Gnd.NormLog.Close();
				Gnd.ConvLog.Close();

				GlobalProcMtx.Release();
				procMutex.ReleaseMutex();
			}
			procMutex.Close();
		}