public DeleteForm(Mdb mdb, NfcMain nfc) { this.mdb = mdb; this.nfc = nfc; InitializeComponent(); }
public MainForm() { InitializeComponent(); this.lbl_name.Text = ""; this.timer_add.Enabled = true; this.timer_user_interval.Enabled = true; this.sttl_status.Text = ""; string[] arguments = System.Environment.GetCommandLineArgs(); if (arguments.Length > 1) { db_path = arguments[1]; } else { db_path = "time.mdb"; } mdb = new Mdb(db_path, Mdb.MDB_VER_JET); nfc = new NfcMain(); if (!mdb.DbOpen()) { Debug.WriteLine("INFO:DB failed"); this.sttl_status.Text = "データベースへの接続失敗"; app_failed = true; } if (!nfc.Reader()) { Debug.WriteLine("INFO:failed"); this.sttl_status.Text = "カードリーダーの初期化に失敗"; app_failed = true; } else { Debug.WriteLine("INFO:Success"); nfc.StartPolling(); } }