Пример #1
0
        internal Window GetOrCreateWindow(string Name)
        {
            Window ret = GetWindowByName(Name);

            if (ret != null)
            {
                return(ret);
            }

            //Otherwise create the window
            ret = new Window(Name, SharedData);
            AllWindows.Add(ret);
            return(ret);
        }
Пример #2
0
        public static void Init()
        {
            if (Initialized)
            {
                return;
            }


            AllWindows.Clear();
            AllWindows.Add(new WindowsConfig("HallPalier_F1"));
            AllWindows.Add(new WindowsConfig("HallPalier_F2"));
            AllWindows.Add(new WindowsConfig("HallPalier_F3"));

            AllWindows.Add(new WindowsConfig("HallRdc_F1"));
            AllWindows.Add(new WindowsConfig("HallRdc_F2"));

            AllWindows.Add(new WindowsConfig("Tesla_F1"));
            AllWindows.Add(new WindowsConfig("Tesla_F2"));
            AllWindows.Add(new WindowsConfig("Tesla_F3"));
            AllWindows.Add(new WindowsConfig("Tesla_F4"));

            AllWindows.Add(new WindowsConfig("Turing_F1"));
            AllWindows.Add(new WindowsConfig("Turing_F2"));
            AllWindows.Add(new WindowsConfig("Turing_F3"));

            AllWindows.Add(new WindowsConfig("Lumiere_F1"));
            AllWindows.Add(new WindowsConfig("Lumiere_F2"));
            AllWindows.Add(new WindowsConfig("Lumiere_F3"));

            AllWindows.Add(new WindowsConfig("Nobel_F1"));
            AllWindows.Add(new WindowsConfig("Nobel_F2"));
            AllWindows.Add(new WindowsConfig("Nobel_F3"));
            Load();
            _WindowsWatcherThread = new Thread(new ThreadStart(ThrRefresh));
            _WindowsWatcherThread.Start();

            Initialized = true;
        }
Пример #3
0
 private static void RegisterWindow(WindowKey windowKey, Type windowType, Type viewModelType)
 {
     AllWindows.Add(windowKey, new RegisteredWindow(windowKey, windowType, viewModelType));
 }