Esempio n. 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            // 初期設定
            AC = new AreaCapture(this);

            // フォーム作成
            this.VersionInstanse = new Version();
            //this.SettingInstanse = new Setting();

            //this.SettingInstanse.parentForm = this;

            // バージョン情報
            System.Diagnostics.FileVersionInfo ver =
                 System.Diagnostics.FileVersionInfo.GetVersionInfo(
                 System.Reflection.Assembly.GetExecutingAssembly().Location);
            this.VersionInstanse.strVersion = ver.ProductVersion;

            // 設定値割り当て
            this.textBox_path.Text = Properties.Settings.Default.path;
            this.textBox_X.Text = Properties.Settings.Default.X;
            this.textBox_Y.Text = Properties.Settings.Default.Y;
            this.textBox_width.Text = Properties.Settings.Default.width;
            this.textBox_height.Text = Properties.Settings.Default.height;
            this.textBox_second.Text = Properties.Settings.Default.second;
            this.textBox_sheets.Text = Properties.Settings.Default.sheets;

            //AC.Top = Int32.Parse(this.textBox_Y.Text);
            //AC.Left = Int32.Parse(this.textBox_X.Text);
            AC.Width = Int32.Parse(this.textBox_width.Text);
            AC.Height = Int32.Parse(this.textBox_height.Text);

            //はじめのファイル名を指定する
            //はじめに「ファイル名」で表示される文字列を指定する
            //ofd.FileName = "default.html";
            //はじめに表示されるフォルダを指定する
            //指定しない(空の文字列)の時は、現在のディレクトリが表示される
            //ofd.InitialDirectory = @"C:\";
            //[ファイルの種類]ではじめに
            //「すべてのファイル」が選択されているようにする
            ofd.FilterIndex = 2;
            //タイトルを設定する
            ofd.Title = "開くファイルを選択してください";
            //ダイアログボックスを閉じる前に現在のディレクトリを復元するようにする
            ofd.RestoreDirectory = true;

            // 開始フラグ
            boolStartFlag = false;

            this.button_start.Text = "連キャプ\r\n開始";

            //timer1.Interval = 1000;
        }