public void SetUp() { _themes = Substitute.For <IColorThemes>(); _original = new ComboBox(); _original.Items.AddRange(new[] { "Test Item" }); _customBox = new ComboBoxCustom(_themes, "test-root/", _original); }
public void SetUp() { _agsEditorDirs = Substitute.For <IAGSEditorDirectories>(); _agsEditorDirs.LocalAppData.Returns(Directory.GetCurrentDirectory()); _settings = Substitute.For <IAppSettings>(); _themes = new ColorThemes(_agsEditorDirs, _settings); }
public ComboBoxCustom(IColorThemes themes, string root, ComboBox original) { _themes = themes; _root = root; Dock = original.Dock; DropDownStyle = original.DropDownStyle; FormattingEnabled = original.FormattingEnabled; Location = original.Location; MaxDropDownItems = original.MaxDropDownItems; Name = original.Name; Size = original.Size; TabIndex = original.TabIndex; BeginUpdate(); foreach (var i in original.Items) { Items.Add(i); } EndUpdate(); }