public ProgressAttachmentView(IProgressAttachmentModel model) { InitializeComponent(); _model = model; _presenter = new ProgressAttachmentPresenter(this, model, SynchronizationContext.Current); _presenter.ConnectEvents(); this.Disposed += (sender, args) => _presenter.DisconnectEvents(); var icon = ShellIcon.GetSmallIcon(_model.Name); if (icon != null) { pbAttachment.Image = icon.ToBitmap(); } lblAttachmentName.Text = _model.Name; }
public ProgressAttachmentView(IProgressAttachmentModel model) { InitializeComponent(); _model = model; _presenter = new PublicAtttachmentPresenter(model, this); this.Load += delegate { Initalise(); _presenter.ConnectEvents(); }; }
public PublicAtttachmentPresenter(IProgressAttachmentModel model, IProgressAttachmentView view) { _model = model; _view = view; }
public ProgressAttachmentPresenter(IProgressAttachmentView view, IProgressAttachmentModel model, SynchronizationContext context) { _view = view; _model = model; _context = context; }