예제 #1
0
 public void SetUp()
 {
     _themes   = Substitute.For <IColorThemes>();
     _original = new ComboBox();
     _original.Items.AddRange(new[] { "Test Item" });
     _customBox = new ComboBoxCustom(_themes, "test-root/", _original);
 }
예제 #2
0
 public void SetUp()
 {
     _agsEditorDirs = Substitute.For <IAGSEditorDirectories>();
     _agsEditorDirs.LocalAppData.Returns(Directory.GetCurrentDirectory());
     _settings = Substitute.For <IAppSettings>();
     _themes   = new ColorThemes(_agsEditorDirs, _settings);
 }
예제 #3
0
파일: ComboBoxCustom.cs 프로젝트: mo-g/ags
        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();
        }