예제 #1
0
 private void create_log_dir()
 {
     if (!my.is_dir(F1.LOG_PATH))
     {
         my.mkdir(F1.LOG_PATH);
     }
 }
예제 #2
0
파일: Form1.cs 프로젝트: shadowjohn/my_cam
        /* private void run_f2()
         * {
         *   f2 = new Form2();
         *   f2.InitializeComponent();
         *   f2.Show();
         *   f2.TopMost=true;
         *   f2.Load += new System.EventHandler();
         *
         *
         * }
         */

        private void Form1_Load(object sender, EventArgs e)
        {
            //AviManager aviManager = new AviManager(@"E:\5.program\C#\my_cam_old\my_cam\bin\Debug\video\2019-06-23_20_08_40.avi", true);

            //添加音频
            //String fileName = @"E:\5.program\C#\my_cam_old\my_cam\bin\Debug\video\aaa.wav";
            //aviManager.AddAudioStream(fileName, 0);
            //aviManager.Close();

            //AviManager aviManager = new AviManager(@"E:\5.program\C#\my_cam_old\my_cam\bin\Debug\video\2019-06-23_20_41_08.avi", true);
            //aviManager.AddAudioStream(@"E:\5.program\C#\my_cam_old\my_cam\bin\Debug\video\2019-06-23_20_41_08.wav", 0);
            //aviManager.Close();


            _proc = HookCallback;
            r_btn = this.run_btn;
            // From : https://dotblogs.com.tw/huanlin/2008/04/23/3320
            // From : https://dotblogs.com.tw/huanlin/2008/04/23/3319
            _hookID = SetHook(_proc);


            this.Left = Screen.PrimaryScreen.Bounds.Width - this.Width - 120;
            this.Top  = Screen.PrimaryScreen.Bounds.Height - this.Height - 120;

            //f2_t = new Thread(run_f2);
            //f2_t.Start();
            f2 = new Form2();
            f2.Show();
            f2.UI_Init();

            video_path = my.pwd() + "\\video";
            log(video_path);
            if (!my.is_dir(video_path))
            {
                my.mkdir(video_path);
            }
            mn         = my.date("Y-m-d_H_i_s");
            video_path = my.pwd() + "\\video\\" + mn + ".avi";
            audio_path = my.pwd() + "\\video\\" + mn + ".wav";
            log(video_path);
            log(audio_path);
        }