public void SetUserData(int number) { CheckUserDataChanged(); if (!_dic_user_data.ContainsKey(number)) { _dic_user_data.Add(number, new UserData()); User_Serializer.ReadDB(_dic_user_data[number], number); } SavePointNumber = number; savePointChanged?.Invoke(); CalcUserData(_user_data_edited); }
public void CheckUserDataChanged() { if (_user_data_edited) { MessageBoxResult res = MessageBox.Show("변경사항이 있습니다. 변경하시겠습니까?", "Save", MessageBoxButton.YesNo); if (res == MessageBoxResult.Yes) { User_Serializer.SaveDataBase(_dic_user_data[SavePointNumber], SavePointNumber); } _user_data_edited = false; } }
public void SetUserData(int number) { CheckUserDataChanged(); if (!_dic_user_data.ContainsKey(number)) { UserData user = new UserData(); User_Serializer.ReadDB(ref user, number); _dic_user_data.Add(number, user); } SavePointNumber = number; JobChanged(_dic_user_data[number].Job); //JobDataChanged?.Invoke(); CalcUserData(_user_data_edited); }