// // GenericBrowserPopup.Designer.cs // // Author: // Michael Becker // // Copyright (c) 2019 // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . using System; using MBS.Framework.UserInterface; using MBS.Framework.UserInterface.Controls; using MBS.Framework.UserInterface.Layouts; using MBS.Framework.Drawing; using MBS.Framework.UserInterface.Controls.ListView; namespace UniversalEditor.UserInterface.Dialogs { partial class GenericBrowserPopup where TObj : class, References where TRef : class, ReferencedBy { private Button cmdReset = null; private Button cmdNone = null; private TextBox txtSearch = null; private ListViewControl lv = null; private Container ctSearchAndShowAll = null; private DefaultTreeModel tm = null; private void InitializeComponent() { this.Decorated = false; this.Layout = new BoxLayout(Orientation.Vertical); this.ctSearchAndShowAll = new Container(); this.ctSearchAndShowAll.Layout = new BoxLayout(Orientation.Horizontal); this.txtSearch = new TextBox(); this.txtSearch.Changed += txtSearch_Changed; this.txtSearch.KeyDown += txtSearch_KeyDown; this.ctSearchAndShowAll.Controls.Add(this.txtSearch, new BoxLayout.Constraints(true, true)); this.cmdReset = new Button(); this.cmdReset.Text = "_Reset"; this.cmdReset.Click += cmdReset_Click; this.ctSearchAndShowAll.Controls.Add(this.cmdReset, new BoxLayout.Constraints(false, false)); this.cmdNone = new Button(); this.cmdNone.Text = "_None"; this.cmdNone.Click += cmdNone_Click; this.ctSearchAndShowAll.Controls.Add(this.cmdNone, new BoxLayout.Constraints(false, false)); this.Controls.Add(ctSearchAndShowAll, new BoxLayout.Constraints(false, true)); this.tm = new DefaultTreeModel(new Type[] { typeof(string), typeof(string) }); this.lv = new ListViewControl(); lv.Columns.Add(new ListViewColumnText(tm.Columns[0], "Name")); lv.Columns.Add(new ListViewColumnText(tm.Columns[1], "Description")); lv.RowActivated += this.lv_RowActivated; this.lv.Model = tm; this.Controls.Add(this.lv, new BoxLayout.Constraints(true, true)); this.MinimumSize = new Dimension2D (300, 200); StartPosition = WindowStartPosition.Manual; } } }