Ejemplo n.º 1
0
        private void MainForm_Load(object sender, System.EventArgs e)
        {
            ComboBoxAuthors = comboBoxAuthors;
            ComboBoxPresses = comboBoxPresses;
            ListBoxBooks    = listBoxBooks;

            ViewEvent?.Invoke(this, EventArgs.Empty);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
    /// <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);
    }
Ejemplo n.º 5
0
 /// <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);
 }
Ejemplo n.º 6
0
 private void FillListView()
 {
     listViewCheck.Items.Clear();
     ViewEvent?.Invoke(listViewCheck);
 }
Ejemplo n.º 7
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     ViewEvent?.Invoke(listView);
 }
Ejemplo n.º 8
0
 private void FormNameList_Load(object sender, EventArgs e)
 {
     ViewEvent?.Invoke(listViewNames, EventArgs.Empty);
 }
Ejemplo n.º 9
0
 private void OnViewEvent(Gallerie e)
 {
     ViewEvent?.Invoke(this, e);
 }