void Code_sel_cbx_Event() { code_sel_cbx.SelectedIndexChanged += (d, z) => { chooseType = (ChooseType)(code_sel_cbx.SelectedIndex + 1); }; }
public void SetContext(ChooseType choose, Operation op) { this.type = choose; this.op = op; // change GUI opButtonText.text = (this.op == Operation.Open ? "Open" : "Save"); }
void Awake() { if (chooseBtn != null) { chooseBtn.gameObject.SetActive(true); } if (chooseYetBtn != null) { chooseYetBtn.gameObject.SetActive(false); } curType = ChooseType.GETBOOK; if (chooseEx != null) { chooseEx.IsGray = UISpriteEx.ColorGray.normal; } }
public ChooseGroupWindow(ChooseType s) { InitializeComponent(); type = s; StudentsGroupsList = (DBCollection)this.Resources["StudentsGroupsList"]; StudentsGroupsViewSource = (CollectionViewSource)this.Resources["StudentsGroupsViewSource"]; UpdateStudentsGroups(); DataGridSelectionMode sl; if (s == ChooseType.Single) { sl = DataGridSelectionMode.Single; Title = "Выбор группы"; } else { sl = DataGridSelectionMode.Extended; Title = "Выбор групп"; StudentsGroupsDataGrid.ToolTip = "Для выделения нескольких элементов нажмите и удерживайте Ctrl."; } StudentsGroupsDataGrid.SelectionMode = sl; }
public void DrawIndexChooser() { indexCount = EditorGUILayout.IntField("Index Count", indexCount); indexChooseType = (ChooseType)EditorGUILayout.EnumPopup("Index Choose Type", indexChooseType); }