예제 #1
0
 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);
 }
예제 #2
0
 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;
     }
 }
예제 #3
0
        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);
        }