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

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