Exemplo n.º 1
0
        /// <summary>
        /// 自動予約登録情報の更新があれば再読み込みする
        /// </summary>
        /// <returns></returns>
        public ErrCode ReloadManualAutoAddInfo()
        {
            ErrCode ret = ErrCode.CMD_SUCCESS;

            try
            {
                if (updateAutoAddManualInfo == true)
                {
                    if (cmd == null)
                    {
                        return(ErrCode.CMD_ERR);
                    }

                    {
                        manualAutoAddList = new Dictionary <uint, ManualAutoAddData>();
                        List <ManualAutoAddData> list = new List <ManualAutoAddData>();

                        ret = (ErrCode)cmd.SendEnumManualAdd(ref list);
                        if (ret != ErrCode.CMD_SUCCESS)
                        {
                            return(ret);
                        }

                        list.ForEach(info => manualAutoAddList.Add(info.dataID, info));

                        updateAutoAddManualInfo = false;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
            }
            return(ret);
        }