public void Init()
      {
         _prefs = MockRepository.GenerateStub<IPreferenceSet>();
         _queryCollection = MockRepository.GenerateStub<IQueryParametersCollection>();
         _view = MockRepository.GenerateMock<IHistoryView>();
         _viewFactory = MockRepository.GenerateMock<IViewFactory>();
         _messageBoxView = MockRepository.GenerateMock<IMessageBoxView>();

         _database = MockRepository.GenerateMock<IUnitInfoDatabase>();
         _database.Stub(x => x.Connected).Return(true);
         _model = new HistoryPresenterModel(_database);
      }
Exemple #2
0
 public HistoryPresenter(IPreferenceSet prefs, IQueryParametersCollection queryCollection, IHistoryView view, 
     IQueryView queryView, IOpenFileDialogView openFileView, ISaveFileDialogView saveFileView,
     IMessageBoxView messageBoxView, HistoryPresenterModel model)
 {
     _prefs = prefs;
      _queryCollection = queryCollection;
      _view = view;
      _queryView = queryView;
      _openFileView = openFileView;
      _saveFileView = saveFileView;
      _messageBoxView = messageBoxView;
      _model = model;
 }
 public HistoryPresenter(IPreferenceSet prefs, 
                         IQueryParametersCollection queryCollection, 
                         IHistoryView view, 
                         IViewFactory viewFactory, 
                         IMessageBoxView messageBoxView, 
                         IUnitInfoDatabase database,
                         HistoryPresenterModel model)
 {
    _prefs = prefs;
    _queryCollection = queryCollection;
    _view = view;
    _viewFactory = viewFactory;
    _messageBoxView = messageBoxView;
    _database = database;
    _model = model;
 }
        public void Init()
        {
            _prefs = MockRepository.GenerateStub<IPreferenceSet>();
             _queryCollection = MockRepository.GenerateStub<IQueryParametersCollection>();
             _view = MockRepository.GenerateMock<IHistoryView>();
             _queryView = MockRepository.GenerateMock<IQueryView>();
             _openFileView = MockRepository.GenerateMock<IOpenFileDialogView>();
             _saveFileView = MockRepository.GenerateMock<ISaveFileDialogView>();
             _messageBoxView = MockRepository.GenerateMock<IMessageBoxView>();

             _database = MockRepository.GenerateMock<IUnitInfoDatabase>();
             _model = new HistoryPresenterModel(_database);
        }
Exemple #5
0
      public void DataBindModel(HistoryPresenterModel model)
      {
         DataViewComboBox.DataSource = model.QueryBindingSource;
         DataViewEditButton.DataBindings.Add("Enabled", model, "EditAndDeleteButtonsEnabled", false, DataSourceUpdateMode.OnPropertyChanged);
         DataViewDeleteButton.DataBindings.Add("Enabled", model, "EditAndDeleteButtonsEnabled", false, DataSourceUpdateMode.OnPropertyChanged);

         rdoPanelProduction.DataSource = model;
         rdoPanelProduction.ValueMember = "BonusCalculation";
         ResultsTextBox.DataBindings.Add("Text", model, "TotalEntries", false, DataSourceUpdateMode.OnPropertyChanged);
         PageNumberTextBox.DataBindings.Add("Text", model, "CurrentPage", false, DataSourceUpdateMode.OnValidation); //OnPropertyChanged);
         ResultNumberUpDownControl.DataBindings.Add("Value", model, "ShowEntriesValue", false, DataSourceUpdateMode.OnPropertyChanged);

         dataGridView1.DataSource = model.HistoryBindingSource;

         Location = model.FormLocation;
         Size = model.FormSize;
         RestoreColumnSettings(model.FormColumns);
      }
 public void Init()
 {
     _database = MockRepository.GenerateMock <IUnitInfoDatabase>();
     _database.Stub(x => x.Connected).Return(true);
     _model = new HistoryPresenterModel(_database);
 }
 public void Init()
 {
    _database = MockRepository.GenerateMock<IUnitInfoDatabase>();
    _database.Stub(x => x.Connected).Return(true);
    _model = new HistoryPresenterModel(_database);
 }
 public void Init()
 {
     _database = MockRepository.GenerateMock<IUnitInfoDatabase>();
      _model = new HistoryPresenterModel(_database);
 }