private bool ChangeTrophyTime(int trophyId, DateTime trophyTime) { if (IsTrophySync(trophyId)) { MessageBox.Show(Properties.strings.SyncedTrophyCanNotEdit); return(false); } else { if (ValidateSelectedDate(trophyTime)) { try { tpsn.ChangeTime(trophyId, trophyTime); TROPUSR.TrophyTimeInfo tti = tusr.trophyTimeInfoTable[trophyId]; tti.Time = trophyTime; tusr.trophyTimeInfoTable[trophyId] = tti; haveBeenEdited = true; return(true); } catch (Exception ex) { MessageBox.Show(ex.Message); return(false); } } else { return(false); } } }
private void listViewEx1_SubItemEndEditing(object sender, ListViewEx.SubItemEndEditingEventArgs e) { try { tpsn.ChangeTime(e.Item.ImageIndex, Convert.ToDateTime(e.DisplayText)); TROPUSR.TrophyTimeInfo tti = tusr.trophyTimeInfoTable[e.Item.ImageIndex]; tti.Time = Convert.ToDateTime(e.DisplayText); tusr.trophyTimeInfoTable[e.Item.ImageIndex] = tti; haveBeenEdited = true; } catch (Exception ex) { e.Cancel = true; MessageBox.Show(ex.Message); } }