private void MainForm_Load(object sender, System.EventArgs e) { ComboBoxAuthors = comboBoxAuthors; ComboBoxPresses = comboBoxPresses; ListBoxBooks = listBoxBooks; ViewEvent?.Invoke(this, EventArgs.Empty); }
private void AddButton_Click(object sender, EventArgs e) { var addPerson = new FormAddPerson(this); var addListPresenter = new AddPersonPresenter(addPerson); addPerson.ShowDialog(); ViewEvent?.Invoke(this, EventArgs.Empty); }
private void listViewNames_MouseDoubleClick(object sender, EventArgs e) { if (listViewNames.SelectedItems.Count > 0) { var formAllInfo = new FormAllInfo(listViewNames.SelectedIndices[0]); formAllInfo.ShowDialog(); } ViewEvent?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Called whenever the Views gameobject is destroyed /// Removes eventlisteners, and invokes the OnDestroy event /// </summary> public virtual void OnDestroy() { if (design == null) { return; } design.onValueChange.RemoveListener(Render); design.onUIValueChange.RemoveListener(Render); onDestroy.Invoke(this); }
/// <summary> /// Initializes the View with the provided Design, and binds it to the related events of the Design. /// </summary> /// <param name="design">The Design this View will render</param> /// <param name="isInstantiated">Was this View instantiated via script?</param> public virtual void Init(Design design, bool isInstantiated = false) { this.design = design; this.isInstantiated = isInstantiated; design.onValueChange.AddListener(Render); design.onDestroy.AddListener(OnDesignDestroy); onInit.Invoke(this); SetupAddOns(); SetupAddOnListeners(); Render(design); }
private void FillListView() { listViewCheck.Items.Clear(); ViewEvent?.Invoke(listViewCheck); }
private void MainForm_Load(object sender, EventArgs e) { ViewEvent?.Invoke(listView); }
private void FormNameList_Load(object sender, EventArgs e) { ViewEvent?.Invoke(listViewNames, EventArgs.Empty); }
private void OnViewEvent(Gallerie e) { ViewEvent?.Invoke(this, e); }