internal void UpdateState() { if (!renaming) { title.UnFocus(false); title.ReadOnly = true; try { containsCurrentMap = CollectionManager.FindCollection(originalName).Contains(BeatmapManager.Current.BeatmapChecksum); } catch { return; } title.Box.BorderColour = containsCurrentMap ? Color.YellowGreen : Color.White; string shortName = Name; if (Name.Length > 40) { shortName = Name.Substring(0, 40) + @"..."; } title.Text = string.Format(@"{0} ({1})", shortName, Count); if (Selected != title.Box.TextBold) { title.Box.TextBold = Selected; title.Box.TextChanged = true; } addButton.InitialColour = addSetButton.InitialColour = containsCurrentMap ? colourNotPresent : colourPresent; removeButton.InitialColour = removeSetButton.InitialColour = containsCurrentMap ? colourPresent : colourNotPresent; } else { title.Box.BorderColour = Color.Yellow; title.Text = Name; title.ReadOnly = false; title.Focus(false); } }
internal void UnFocus() { Textbox.UnFocus(true); }