Exemplo n.º 1
0
        public ToolBarController(PaintModel model, IToolBarView toolBarView)
        {
            this.model = model;
              this.toolBarView = toolBarView;

              this.toolBarView.ButtonClicked += OnButtonClick;
        }
Exemplo n.º 2
0
 /// <exception cref="ArgumentNullException">any argument is null</exception>
 /// <exception cref="ArgumentException">defaultDirectory is empty</exception>
 public FilesViewPresenter(IFilesView filesView,
                           IToolBarView toolBarView,
                           IAddressToolBar addressToolBar,
                           ICommandsContainer commandsContainer,
                           IEnvironmentHelper environmentHelper,
                           Options options,
                           IMessageHelper messageHelper)
 {
     Checker.CheckNull(filesView, toolBarView, addressToolBar, commandsContainer, environmentHelper);
     this.filesView         = filesView;
     this.toolBarView       = toolBarView;
     this.addressToolBar    = addressToolBar;
     this.commandsContainer = commandsContainer;
     this.environmentHelper = environmentHelper;
     this.options           = options;
     this.messageHelper     = messageHelper;
     sorter = FileSorter.CreateSorter(options.InitialSortColumn, options.InitialSortDirection);
     filesView.SortByName            += view_SortByName;
     filesView.SortByLength          += ViewSortByLength;
     filesView.SortByType            += view_SortByType;
     filesView.SortByModifiedDate    += ViewSortByModifiedDate;
     filesView.OpenDirectory         += view_OpenDirectory;
     filesView.Cipher                += view_Cipher;
     filesView.Decipher              += view_Decipher;
     filesView.ToUpperDirectory      += view_ToUpperDirectory;
     filesView.SelectedEntityChanged += view_SelectedEntityChanged;
     addressToolBar.PathChanged      += addressToolBar_PathChanged;
 }
Exemplo n.º 3
0
        public PaintForm()
        {
            InitializeComponent();
              toolsBar.ImageList = imageList;

              toolBarView = toolBarUserControll;
        }
Exemplo n.º 4
0
        protected override void OnViewLoaded(object view)
        {
            _toolBarView = (IToolBarView)view;
            RefreshToolBarTray();

            base.OnViewLoaded(view);
        }
 public ToolBarPresenter(IToolBarView toolBarView, ICommandsContainer commandsContainer)
 {
     this.commandsContainer        = commandsContainer;
     toolBarView.ToUpperDirectory += toolBarView_ToUpperDirectory;
     toolBarView.RefreshDirectory += toolBarView_RefreshDirectory;
     toolBarView.Cipher           += toolBarView_Cipher;
     toolBarView.Decipher         += toolBarView_Decipher;
     toolBarView.GenerateKeys     += toolBarView_GenerateKeys;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="ToolBarPresentationModel"/> class.
        /// </summary>
        /// <param name="view">The view.</param>
        /// <param name="settingsManager">The settings manager.</param>
        public ToolBarPresentationModel(
            IToolBarView view, 
            ISettingsManagerPresentationModel settingsManager)
        {
            _view = view;
            _view.Model = this;
            _settingsManager = settingsManager;

            _closeApplicationCommand = new DelegateCommand<object>(
                OnCloseApplicationCommandExecuted,
                OnCloseApplicationCommandCanExecute);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ToolBarPresentationModel"/> class.
        /// </summary>
        /// <param name="view">The view.</param>
        /// <param name="settingsManager">The settings manager.</param>
        public ToolBarPresentationModel(
            IToolBarView view,
            ISettingsManagerPresentationModel settingsManager)
        {
            _view            = view;
            _view.Model      = this;
            _settingsManager = settingsManager;

            _closeApplicationCommand = new DelegateCommand <object>(
                OnCloseApplicationCommandExecuted,
                OnCloseApplicationCommandCanExecute);
        }
Exemplo n.º 8
0
 public ToolBarViewModel(IToolBarView view) : base(view)
 {
 }