예제 #1
0
 public StorageService()
 {
     if (m_DBService == null)
     {
         Mef.Initialize(this);
     }
 }
예제 #2
0
 public StorageService()
 {
     if (m_DBService == null)
     {
         Mef.Initialize(this, new List <Type> {
             typeof(StorageRepo), typeof(MessageboxService)
         });
     }
 }
예제 #3
0
 public MainService()
 {
     if (m_DBService == null)
     {
         Mef.Initialize(this, new List <Type> {
             GetType(), typeof(StorageRepo)
         });
     }
 }
예제 #4
0
        public ReferenceService()
        {
            if (m_DBService == null)
            {
                Mef.Initialize(this, new List <Type> {
                    GetType(), typeof(HistoryRepo)
                });
            }

            LastHistory = m_HistoryRepo.GetLastOpened(); // Our currently open file in Sumatra
        }
예제 #5
0
        public FormVolume()
        {
            InitializeComponent();

            if (m_DBService == null)
            {
                Mef.Initialize(this, new List <Type> {
                    GetType(), typeof(ModelsForViewing)
                });
            }
        }
예제 #6
0
        /// <summary>
        /// Coming in here means add a new citation. We are called from Sumatra.
        /// </summary>
        /// <param name="message"></param>
        public BelGui(EventData message) : this()
        {
            if (DBService == null)
            {
                Mef.Initialize(this);
            }

            List <RawCitation> rawCitations = DBService.Select <RawCitation>();

            DBService.ClearTable <RawCitation>();

            // Get volume and storage
            History history = HistoryRepo.GetLastOpened(); // Our currently open file in Sumatra

            VM.CurrentVolume  = DBService.SelectById <Volume>(history.VolumeId);
            VM.CurrentStorage = DBService.SelectById <Storage>(history.StorageId);

            // Create new citation
            VM.CurrentCitation = CitationRepo.CreateNewCitation(rawCitations, message);

            CitationService.CitationChanged += CitationService_CitationChanged;
            LoadControls();
        }
예제 #7
0
 public CitationRepo()
 {
     Mef.Initialize(this);
 }