예제 #1
0
        public MainViewModel()
        {
            if (!ApplicationManager.Initialized)
            {
                ApplicationManager.ApplicationInitialized += SetupVersionChecking;
            }
            else
            {
                SetupVersionChecking();
            }
            AppSettingsViewModel = new AppSettingsViewModel(this);
            UpdateInstalledJavaVersion();
            Entities = ServerManager.Instance.Entities;
            Entities.CollectionChanged += ServerListChanged;
            if (Entities.Count != 0)
            {
                SelectedEntity = Entities[0];
                HasServers     = true;
            }

            Boi      = new BitmapImage(new Uri("pack://application:,,,/View/Resources/images/Icons/BoiTransparent.png"));
            BoiHover = new BitmapImage(new Uri("pack://application:,,,/View/Resources/images/Icons/BoiTransparentHover.png"));

            DateTime now = DateTime.Now;

            if (now.Month == 12 && now.Day < 27)
            {
                Boi      = new BitmapImage(new Uri("pack://application:,,,/View/Resources/images/Icons/XMasBoiTransparent.png"));
                BoiHover = new BitmapImage(new Uri("pack://application:,,,/View/Resources/images/Icons/XMasBoiTransparentHover.png"));
            }
        }
예제 #2
0
 public MainViewModel()
 {
     if (!ApplicationManager.Initialized)
     {
         ApplicationManager.ApplicationInitialized += SetupVersionChecking;
     }
     else
     {
         SetupVersionChecking();
     }
     //ImportViewModel = new ImportViewModel();
     AppSettingsViewModel        = new AppSettingsViewModel(this);
     Entities                    = ServerManager.Instance.Entities;
     Entities.CollectionChanged += ServerListChanged;
     if (Entities.Count != 0)
     {
         SelectedEntity = Entities[0];
         HasServers     = true;
     }
 }