public void OnOnSetDoubleClickedEventRaised(object sender, EventArgs e) { if (SetModel.SelectedSet != null) { SetModel.SelectedSet = _setlistboxPresenter._setlistboxView.HomeSetList.SelectedItem.Text; _setlistboxPresenter.CloseSetlistbox(); _setViewPresenter = StaticFactory.CreateSetViewPresenter(_mainView); //New SetViewPresenter on DCLICK _setViewPresenter.ShowSetView(); _mainView.btnRename.Visible = false; _mainView.btnAdd.Visible = false; _mainView.btnDel.Click -= OnBtnDelMainClickEventRaised; _mainView.btnBack.Visible = true; } }
/// <summary> /// BtnBack click logic /// </summary> public void OnBtnBackClickEventRaised(object sender, EventArgs e) { if (_mainView.MainPanel.Controls[0].Name == "AddSetViewOuterPanel") { _addSetPresenter.Dispose(); _mainView.MainPanel.Controls.Clear(); SetListboxInit(); //Init new SetListbox _mainView.btnBack.Visible = false; _mainView.btnAdd.Visible = true; _mainView.btnDel.Visible = true; _mainView.btnRename.Visible = true; } if (_mainView.MainPanel.Controls[0].Name == "SetViewMainPanel") { _setViewPresenter.Dispose(); _mainView.MainPanel.Controls[0].Dispose(); _mainView.MainPanel.Controls.Clear(); SetListboxInit(); _mainView.btnBack.Visible = false; _mainView.btnAdd.Visible = true; _mainView.btnDel.Visible = true; _mainView.btnDel.Click -= _setViewPresenter.BtnDelDeleteTopic_Click; _mainView.btnDel.Click += OnBtnDelMainClickEventRaised; _mainView.btnRename.Visible = true; } if (_mainView.MainPanel.Controls[0].Name == "videoPanel") { _mainView.MainPanel.Controls[0].Dispose(); _mainView.MainPanel.Controls.Clear(); _setViewPresenter = StaticFactory.CreateSetViewPresenter(_mainView); //New SetViewPresenter on DCLICK _setViewPresenter.ShowSetView(); } }