private void OnTableButtonClicked(TableButton tableButton) { //Highlight only the clicked button buttons.ForEach(button => { button.Toggle(true); }); tableButton.Toggle(false); }
public void AddTableButton(string name) { var button = new TableButton(); button.Init(name, Form.TableBtn_X_MouseUp, Form.TableBtn_X_MouseHover); Form.FLPanel_Tables.Controls.Add(button); Form.FLPanel_Tables.SetFlowBreak(button, true); }
public static HtmlString TableButtonDelete(this HtmlHelper helper, string url) { var btn = new TableButton() { Id = "btnDelete", Href = url, Title = "Excluir", Icon = "icon-trash" }; return(new HtmlString(btn.ToString())); }
public static HtmlString TableButtonEdit(this HtmlHelper helper, string url) { var btn = new TableButton() { Id = "btnEdit", Href = url, Title = "Editar", Icon = "icon-pencil" }; return(new HtmlString(btn.ToString())); }
public RestaurantOverview_Form() { InitializeComponent(); TableTopLogic tablelogic = new TableTopLogic(); List <TableTop> AllTables = tablelogic.tableTopListLogic(); foreach (TableTop table in AllTables) { TableButton tablebutton = new TableButton(table); if (table.GetTableId() % 2 == 0) { this.flowlaypnl_table_overview_even.Controls.Add(tablebutton); //add the even buttons here (2,4,6,8,10) } else { this.flowlaypnl_table_overview_uneven.Controls.Add(tablebutton); //add the uneven buttons here (1,3,5,7,9) } } }
/* * @view контекстное меню * Переименовать таблицу. */ private void TSMI_TableBtnX__Rename_Click(object sender, EventArgs e) { TableButton button = FLPanel_Tables.Controls.Cast <TableButton>() .Where(x => x.Text == CtxMenuTableButtonName) .ElementAt(0); string oldName = button.Text; var dialog = new AddTableDialog(); dialog.Init(Model, View, oldName); dialog.ShowDialog(); var result = dialog.Result; if (result.Success) { Model.RenameTable(oldName, result.Value.Name); IsFileSaved = false; } }
private void Edit_MouseUp(object sender, MouseEventArgs e) { TableButton.Focus(); TableButton.SelectAll(); TableButton.IsReadOnly = false; }
public TableButtonControlCollection(TableButton owner) : base(owner) { this.owner = owner; }
void Start() { SA = FindObjectOfType(typeof(_3DSelfAssembly)) as _3DSelfAssembly; // GUI ELEMENTS // Play Button playButton.GetComponent <Button>(); playButton.onClick.AddListener(StartReconfiguration); // Pause Button pauseButton.GetComponent <Button>(); pauseButton.onClick.AddListener(Pause); // Reset Button resetButton.GetComponent <Button>(); resetButton.onClick.AddListener(reset); // Minimize Button minimizeButton.GetComponent <Button>(); minimizeButton.onClick.AddListener(Minimize); // Quit Button quitButton.GetComponent <Button>(); quitButton.onClick.AddListener(Quit); // Slider reconfigurationSpeed.GetComponents <Slider>(); reconfigurationSpeed.minValue = _3DSelfAssembly.maxSpeed; reconfigurationSpeed.maxValue = _3DSelfAssembly.minSpeed; reconfigurationSpeed.value = _3DSelfAssembly.minSpeed - _3DSelfAssembly.defaultSpeed; //reconfigurationSpeed.minValue = 1f; //reconfigurationSpeed.maxValue = 0.02f; //reconfigurationSpeed.value = 0.5f; // Number of Agents Input Field numAgentsField.GetComponent <InputField>(); if (SuggestedShapeSelected != true && Reset != true) { numAgentsField.text = _3DSelfAssembly.defaultNumAgents.ToString(); } else { numAgentsField.text = _3DSelfAssembly.NumAgents.ToString(); } // GOAL SHAPE SELECTORS // Default Goal Shape if (SuggestedShapeSelected != true && Reset != true) { GoalShapeButton.Shape = SelectedGoalShape.Default; } // Goal Shape Buttons // Default Shape defaultShapeButton.GetComponent <Button>(); DefaultButtonClass = new DefaultButton(); if (GoalShapeButton.Shape == SelectedGoalShape.Default) { defaultShapeButton.image.color = selectedButton; } defaultShapeButton.onClick.AddListener(() => ChangeGoalShape(SA.DefaultShape, DefaultButtonClass)); // Chair chairButton.GetComponent <Button>(); ChairButtonClass = new ChairButton(); if (GoalShapeButton.Shape == SelectedGoalShape.Chair) { chairButton.image.color = selectedButton; } chairButton.onClick.AddListener(() => ChangeGoalShape(Chair, ChairButtonClass)); // Stool stoolButton.GetComponent <Button>(); StoolButtonClass = new StoolButton(); if (GoalShapeButton.Shape == SelectedGoalShape.Stool) { stoolButton.image.color = selectedButton; } stoolButton.onClick.AddListener(() => ChangeGoalShape(Stool, StoolButtonClass)); // Table tableButton.GetComponent <Button>(); TableButtonClass = new TableButton(); if (GoalShapeButton.Shape == SelectedGoalShape.Table) { tableButton.image.color = selectedButton; } tableButton.onClick.AddListener(() => ChangeGoalShape(Table, TableButtonClass)); // House houseButton.GetComponent <Button>(); HouseButtonClass = new HouseButton(); if (GoalShapeButton.Shape == SelectedGoalShape.House) { houseButton.image.color = selectedButton; } houseButton.onClick.AddListener(() => ChangeGoalShape(House, HouseButtonClass)); //Custom customShapeButton.GetComponent <Button>(); if (GoalShapeButton.Shape == SelectedGoalShape.Custom) { customShapeButton.image.color = selectedButton; } //customShapeButton.onClick.AddListener(CustomisedGoalShape); }