/// <summary>按下 Save 鍵</summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnSave_Click(object sender, EventArgs e) { try { if (this.PositionInstances != null && this.PositionInstances.Any()) { //ToSave(); var currentConfig = this.RobotPathFileConfigSet.GetCurrentConfig(CmbBoxDeviceName.Text); JSonHelper.SaveInstanceToJsonFile(this.PositionInstances, currentConfig.PositionFileDirectory, TxtBxDevicePath.Text); RefreshPositionInfoList(); MessageBox.Show("存檔成功"); } else { MessageBox.Show("沒有資料"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }