private void SetFilename(string filename) { var index = this.listBoxGraphics.FindStringExact(filename, 1); this.listBoxGraphics.SelectedIndex = Math.Max(0, index); }