コード例 #1
0
ファイル: MainPresenter.cs プロジェクト: kszysiu/hfm-net
        public MainPresenter(MainGridModel mainGridModel, IMainView view, IMessagesView messagesView, IMessageBoxView messageBoxView,
            IOpenFileDialogView openFileDialogView, ISaveFileDialogView saveFileDialogView,
            IClientDictionary clientDictionary, IProteinBenchmarkCollection benchmarkCollection,
            IProteinDictionary proteinDictionary, IUnitInfoCollection unitInfoCollection, IUpdateLogic updateLogic,
            RetrievalLogic retrievalLogic, IExternalProcessStarter processStarter,
            IPreferenceSet prefs, IClientSettingsManager settingsManager)
        {
            _gridModel = mainGridModel;
             //_gridModel.BeforeResetBindings += delegate { _view.DataGridView.FreezeSelectionChanged = true; };
             _gridModel.AfterResetBindings += delegate
                                          {
                                             //_view.DataGridView.FreezeSelectionChanged = false;
                                             DisplaySelectedSlotData();
                                             _view.RefreshControlsWithTotalsData(_gridModel.SlotTotals);
                                          };
             _gridModel.SelectedSlotChanged += (sender, e) =>
                                           {
                                              if (e.Index >=0 && e.Index < _view.DataGridView.Rows.Count)
                                              {
                                                 _view.DataGridView.Rows[e.Index].Selected = true;
                                                 DisplaySelectedSlotData();
                                              }
                                           };

             // Views
             _view = view;
             _messagesView = messagesView;
             _messageBoxView = messageBoxView;
             _openFileDialogView = openFileDialogView;
             _saveFileDialogView = saveFileDialogView;
             // Collections
             _clientDictionary = clientDictionary;
             _benchmarkCollection = benchmarkCollection;
             _proteinDictionary = proteinDictionary;
             _unitInfoCollection = unitInfoCollection;
             // Logic Services
             _updateLogic = updateLogic;
             _updateLogic.Owner = _view;
             _retrievalLogic = retrievalLogic;
             _retrievalLogic.Initialize();
             _processStarter = processStarter;
             // Data Services
             _prefs = prefs;
             _settingsManager = settingsManager;

             _clientDictionary.ClientEdited += HandleClientEdit;
             _clientDictionary.DictionaryChanged += delegate { AutoSaveConfig(); };
        }
コード例 #2
0
ファイル: QueueControl.cs プロジェクト: kszysiu/hfm-net
 public void SetProteinCollection(IProteinDictionary proteinCollection)
 {
     _proteinCollection = proteinCollection;
 }
コード例 #3
0
ファイル: MarkupReader.cs プロジェクト: pnoodles/hfm-net
 public MarkupReader(IPreferenceSet prefs, IProteinDictionary proteinDictionary)
 {
     _prefs             = prefs;
     _proteinDictionary = proteinDictionary;
 }
コード例 #4
0
 public ProteinCalculatorModel(IPreferenceSet prefs, IProteinDictionary proteinDictionary)
 {
     _prefs = prefs;
      _proteinDictionary = proteinDictionary;
 }
コード例 #5
0
ファイル: MarkupReader.cs プロジェクト: harlam357/hfm-net
 public MarkupReader(IPreferenceSet prefs, IProteinDictionary proteinDictionary)
 {
    _prefs = prefs;
    _proteinDictionary = proteinDictionary;
 }
コード例 #6
0
ファイル: BenchmarksForm.cs プロジェクト: kszysiu/hfm-net
        public BenchmarksForm(IPreferenceSet prefs, IProteinDictionary proteinDictionary, IProteinBenchmarkCollection benchmarkCollection,
            IClientDictionary clientDictionary, IMessageBoxView messageBoxView, IExternalProcessStarter processStarter)
        {
            _prefs = prefs;
             _proteinDictionary = proteinDictionary;
             _benchmarkCollection = benchmarkCollection;
             _graphColors = _prefs.Get<List<Color>>(Preference.GraphColors);
             _clientDictionary = clientDictionary;
             _messageBoxView = messageBoxView;
             _processStarter = processStarter;
             _zedGraphManager = new ZedGraphManager();

             InitializeComponent();
        }
コード例 #7
0
ファイル: UnitInfoDatabase.cs プロジェクト: kszysiu/hfm-net
        public UnitInfoDatabase(IPreferenceSet prefs, IProteinDictionary proteinDictionary, ILogger logger)
        {
            if (proteinDictionary == null) throw new ArgumentNullException("proteinDictionary");
             _proteinDictionary = proteinDictionary;

             if (logger != null)
             {
            _logger = logger;
             }

             ForceDateTimesToUtc = true;
             if (prefs != null && !String.IsNullOrEmpty(prefs.ApplicationDataFolderPath))
             {
            DatabaseFilePath = System.IO.Path.Combine(prefs.ApplicationDataFolderPath, Constants.SqLiteFilename);
             }
        }
コード例 #8
0
ファイル: UnitInfoDatabase.cs プロジェクト: kszysiu/hfm-net
 public UnitInfoDatabase(IPreferenceSet prefs, IProteinDictionary proteinDictionary)
     : this(prefs, proteinDictionary, null)
 {
 }
コード例 #9
0
ファイル: UnitInfoDatabase.cs プロジェクト: kszysiu/hfm-net
        public ProteinDataUpdater(IUnitInfoDatabase database, IProteinDictionary proteinDictionary)
        {
            if (database == null) throw new ArgumentNullException("database");
             if (proteinDictionary == null) throw new ArgumentNullException("proteinDictionary");

             _database = database;
             _proteinDictionary = proteinDictionary;

             Debug.Assert(_database.Connected);
        }