protected void FillHistoricView(IEditView view) { FillBaseView(view); view.editUserId = 4; view.createUserId = 3; view.editDate = DateTime.Now; }
public EditPresenter(IEditView view, IUsersRepository userRepository) { this.view = view; this.userRepository = userRepository; view.AddUser += AddUser; view.EditUser += EditUser; }
public EditPresenter(IEditView view) { _view = view; _view.Storage = _model.GetIngredients(); _view.menu = _model.GetMenu(DateTime.Parse(closeTime)); _view.AddingDish += new EventHandler <DishEventArgs>(OnAddingDish); _view.RefreshingMenu += new EventHandler <EventArgs>(OnRefreshingMenu); _view.RemovingDish += new EventHandler <EventArgs>(OnRemovingDish); }
private void OnFilmsViewEditRequested(object sender, FormLocationWithFilmInfo info) { EditForm form = new EditForm(); if (ShowForm(form, info.Location)) { editView = form; editView.SetFilmInfo(info.FilmName, info.FilmCountry, info.FilmYear); editView.EditStarted += OnEditViewEditStarted; } }
// Edit vview applications public void ApplyToEditView(EntityPackage package, IEditView view) { ApplyToBaseView(package.Entity, view); //History has a creator and an editor. The create date comes from base var creatorRelation = package.GetRelation(Keys.CreatorRelation); view.editDate = (DateTime)creatorRelation.createDateProper(); view.createUserId = creatorRelation.entityId1; view.editUserId = long.Parse(creatorRelation.value); }
public EditVideoViewModel(ILibraryService libraryService, IEditView view, IEventAggregator eventAggregator) : base(view) { this._libraryService = libraryService; this._eventAggregator = eventAggregator; this.CategoryViewModels = new ObservableCollection<CategoryViewModel>(); this.Tags = new ObservableCollection<Tag>(); this.CreateCategories(libraryService); this.CreateTags(libraryService); eventAggregator.GetEvent<VideoEditing>().Subscribe(v => { this.Video = v; }); //eventAggregator.GetEvent<VideoEdited>().Subscribe(this.VideoEdited); this.CreateCategoryCommand = new DelegateCommand(this.CreateCategory); }
public EditPresenter(IEditView ve, BindingList <Valute> LVal, BindingList <Valute> RVal) { EditValuteList1 = LVal; bufList = RVal; EditView = ve; EditView.Value = "1"; EditView.ListBoxValuteLeft_Add(EditValuteList1); EditView.TextChangedValue += View_TextChangeValue; EditView.SelectedEditValute += View_SelectedValuteEdit; EditView.Show(); }
public void Edit() { IEditView editView = (IEditView)_viewFactory.Create("EditView"); if (_view.SelectedConfiguration != null) { editView.Configuration = _view.SelectedConfiguration; editView.EditMode = EditMode.Edit; editView.ShowDialog(); } else _view.ShowMessage(MessageType.Error, LocalizableStringHelper.GetLocalizableString("InvalidConfigurationError_Tittle"), LocalizableStringHelper.GetLocalizableString("InvalidConfigurationError_Text")); }
//ctor public EditPresenter(IEditView editView, Person person) { _editView = editView ?? throw new ArgumentNullException(nameof(editView)); //редактируемый _editView.CurrentPerson = person ?? throw new ArgumentNullException(nameof(person)); //кнопка _editView.OkPerson = new SimpleButtonEventHandler(OnOk, CanOk); _editView.OkPerson.CheckEnabled(); //событие изменений свойств у редактируемого _editView.PropertyChanged = new SimpleEventHandler(OnPropertyChanged); //правила для проверки SetCheckRules(); }
public void ApplyFromEditView(IEditView view, EntityPackage package, string type) { ApplyFromBaseView(view, package.Entity); package.Entity.type = type; var relation = new EntityRelation() { entityId1 = view.createUserId, entityId2 = view.id, type = Keys.CreatorRelation, value = view.editUserId.ToString(), createDate = view.editDate }; package.Add(relation); }
private void ShowEdit(IEditView editView, User user) { if (user == null) { user = new User() { Id = 0, Name = string.Empty, Age = 30 }; } var editPresenter = new EditPresenter(editView, usersRepository); editPresenter.MainPresenter = this; editPresenter.Edit(user); }
protected virtual void AttachEditEvents(IEditView <T> editView) { }
public void SetView(IEditView view) { _view = view; }
/// <summary> /// The <see cref="EditPresenter"/> constructor will receive the <see cref="IEditView"/> interface from the /// <see cref="Views.Windows.Dialogs.EditWindow"/> and couple together with the view. /// </summary> /// <param name="view"></param> public EditPresenter(IEditView view) { _view = view; }
public void New() { IEditView editView = (IEditView)_viewFactory.Create("EditView"); editView.EditMode = EditMode.New; if (editView.ShowDialog() == DialogResult.OK) UpdateView(); }