Beispiel #1
0
 static void Preload()
 {
     Elementary.Initialize();
     Elementary.ThemeOverlay();
     _           = new PreloadedWindow();
     IsPreloaded = true;
 }
Beispiel #2
0
        public static PreloadedWindow GetInstance()
        {
            var instance = s_precreated;

            s_precreated = null;
            return(instance);
        }
Beispiel #3
0
        internal PreloadedWindow(bool useBaseLayout = true) : base("PreloadWindow")
        {
            s_precreated = this;
            if (useBaseLayout)
            {
                InitializeBaseLayout();
            }
            WarmupWidgets();
            BackButtonPressed += DummyHandler;
            BackButtonPressed -= DummyHandler;
            void DummyHandler(object sender, System.EventArgs e)
            {
            }

            if (Elementary.GetProfile() == "wearable")
            {
                WarmupWearableWidgets();
            }
        }
Beispiel #4
0
 /// <summary>
 /// For internal use only
 /// </summary>
 internal static Window CreateWindow(string name) => PreloadedWindow.GetInstance() ?? new Window(name);