2 * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 internal class PreloadedWindow : Window
21 static PreloadedWindow s_precreated;
23 public PreloadedWindow(bool useBaseLayout=true) : base("PreloadWindow")
27 InitializeBaseLayout();
29 BackButtonPressed += DummyHandler;
30 BackButtonPressed -= DummyHandler;
31 void DummyHandler(object sender, System.EventArgs e) { }
34 public Layout BaseLayout
40 public void InitializeBaseLayout()
42 var conformant = new Conformant(this);
45 var layout = new Layout(conformant);
46 layout.SetTheme("layout", "application", "default");
50 conformant.SetContent(BaseLayout);
53 public void WarmupWidgets()
55 new Entry(this).Unrealize();
56 new Scroller(this).Unrealize();
57 new Box(this).Unrealize();
58 new Label(this).Unrealize();
59 new GenList(this).Unrealize();
60 new Button(this).Unrealize();
61 new Check(this).Unrealize();
62 new Naviframe(this).Unrealize();
63 new Slider(this).Unrealize();
64 new Spinner(this).Unrealize();
65 new ProgressBar(this).Unrealize();
66 new GestureLayer(this).Unrealize();
67 new Polygon(this).Unrealize();
68 new Image(this).Unrealize();
69 //TODO: Consider to call Image.LoadAsync()
72 public static PreloadedWindow GetInstance()
74 var instance = s_precreated;