public void close() { if (_aio != null) { _aio.StopAi(_aioId); _aio.ResetDevice(_aioId); _aio.Exit(_aioId); _aio = null; } }
//ロギング開始 private void loggingStartBtn_Click(object sender, EventArgs e) { Form1 mainForm = (Form1)this.Owner; //ラベルで動作を変える if (loggingStartBtn.Text == "開始") { resetAio(); int aioStartLogging = aio.StartAi(devId); startTime = DateTime.Now; if (aioStartLogging != 0) { statusMsg(aioStartLogging, null); return; } aioConvertStarted = true; statusMsg(0, "変換を開始しました"); loggingStartBtn.Text = "取得中..."; devMemoryTimer.Start(); mainForm.logFormData(true); } else { devMemoryTimer.Stop(); int aioStopLogging = aio.StopAi(devId); if (aioStopLogging != 0) { statusMsg(aioStopLogging, null); return; } aioConvertStarted = false; loggingStartBtn.Text = "開始"; statusMsg(0, "変換を停止しました"); mainForm.logFormData(false); } //mainForm.statusLabel.Text = "test"; }