public DataEntryWithNavigation() { Text = "Simple Data Entry with Navigation"; // Initialize the BindingSource. FileNewOnClick(null, EventArgs.Empty); // Create the panel. PersonPanel personpnl = new PersonPanel(bindsrc); personpnl.Parent = this; personpnl.Dock = DockStyle.Fill; // Create the menu. MenuStrip menu = new MenuStrip(); menu.Parent = this; ToolStripMenuItem item = (ToolStripMenuItem)menu.Items.Add("&File"); item.DropDownItems.Add("&New", null, FileNewOnClick); item.DropDownItems.Add("&Open...", null, FileOpenOnClick); item.DropDownItems.Add("Save &As...", null, FileSaveAsOnClick); // Create the BindingNavigator. BindingNavigator bindnav = new BindingNavigator(true); bindnav.Parent = this; bindnav.Dock = DockStyle.Bottom; bindnav.BindingSource = bindsrc; }
private void Awake() { Instance = this; personPanel = Instantiate(personPanel, tabsPanel.transform); technologyPanel = Instantiate(technologyPanel, tabsPanel.transform); economicPanel = Instantiate(economicPanel, tabsPanel.transform); diplomacyPanel = Instantiate(diplomacyPanel, tabsPanel.transform); tradePanel = Instantiate(tradePanel, tabsPanel.transform); var actions = new ShowSmth[] { ShowTrade, ShowDiplomacy, Nope, ShowTechnology, ShowEconomic, ShowPersons }; buttonSelector = new ButtonSelector(ModeButton, actions); PanelMover = panel.GetComponent <PanelMover>(); }
public DataEntryWithBinding() { Text = "Simple Data Entry with Binding"; // Initialize BindingSource object. bindsrc.Add(new Person()); // Create the panel. PersonPanel personpnl = new PersonPanel(bindsrc); personpnl.Parent = this; personpnl.Dock = DockStyle.Fill; // Create the menu. MenuStrip menu = new MenuStrip(); menu.Parent = this; ToolStripMenuItem item = (ToolStripMenuItem)menu.Items.Add("&File"); item.DropDownItems.Add("&New", null, FileNewOnClick); item.DropDownItems.Add("&Open...", null, FileOpenOnClick); item.DropDownItems.Add("Save &As...", null, FileSaveAsOnClick); }