Пример #1
0
 public MainWindow()
 {
     GlobalInformation.ReadConfigFile(); // Save information from the config file
     _controller = new MainWindowViewModel();
     InitializeComponent();
     this.DataContext     = _controller;
     Searchbar.Foreground = Brushes.DimGray;
     Searchbar.Text       = "Search picture";
     log.Debug("Applikation erfolgreich gestartet.");
 }
Пример #2
0
        public MainWindow()
        {
            GlobalInformation.ReadConfigFile();
            InitializeComponent();

            _controller          = new MainWindowViewModel();
            this.DataContext     = _controller;
            Searchbar.Foreground = Brushes.DimGray;
            Searchbar.Text       = "Search picture";
            Searchbar.FontSize   = 14;
        }
Пример #3
0
 /// <summary>
 /// set initial folder for pictures to be manage
 /// </summary>
 /// <param name="folder"></param>
 /// <returns></returns>
 public static GlobalInformation InitializeInstance(string folder)
 {
     if (_instance == null)
     {
         if (string.IsNullOrEmpty(folder))
         {
             throw new ArgumentNullException("folder");
         }
         _instance = new GlobalInformation(folder);
         return(_instance);
     }
     else
     {
         throw new SingletonInitializedTwiceException();
     }
 }
Пример #4
0
 public BusinessLayer()
 {
     _dataAccessLayer = new DataAccessLayer();
     GlobalInformation.ReadConfigFile();
     _pathFolder = GlobalInformation.Path;
 }
Пример #5
0
 public void ut_configfile_picturepath()
 {
     GlobalInformation.ReadConfigFile();
     Assert.IsNotNull(GlobalInformation.Path);
 }
Пример #6
0
 public void ut_configfile_dbconnection()
 {
     GlobalInformation.ReadConfigFile();
     Assert.IsNotNull(GlobalInformation.ConnectionString);
 }
Пример #7
0
 /// <summary>
 /// destroy instance and folder that is set
 /// </summary>
 public static void Uninitialize()
 {
     _instance = null;
 }