2019-09-10 18:04:01 +03:00
|
|
|
|
using ElmSharp;
|
2020-08-18 00:38:44 +03:00
|
|
|
|
using Xamarin.Forms.Platform.Tizen.Native;
|
2019-09-10 18:04:01 +03:00
|
|
|
|
using ELayout = ElmSharp.Layout;
|
|
|
|
|
|
|
|
|
|
namespace Xamarin.Forms.Platform.Tizen
|
|
|
|
|
{
|
|
|
|
|
public class PreloadedWindow : Window
|
|
|
|
|
{
|
|
|
|
|
static PreloadedWindow s_precreated;
|
|
|
|
|
|
|
|
|
|
public PreloadedWindow() : base("FormsWindow-pre")
|
|
|
|
|
{
|
|
|
|
|
s_precreated = this;
|
|
|
|
|
Initialize();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ELayout BaseLayout
|
|
|
|
|
{
|
|
|
|
|
get;
|
|
|
|
|
protected set;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected void Initialize()
|
|
|
|
|
{
|
|
|
|
|
var conformant = new Conformant(this);
|
|
|
|
|
conformant.Show();
|
|
|
|
|
|
2020-08-18 00:38:44 +03:00
|
|
|
|
var layout = new ApplicationLayout(conformant);
|
2019-09-10 18:04:01 +03:00
|
|
|
|
layout.Show();
|
|
|
|
|
|
|
|
|
|
BaseLayout = layout;
|
|
|
|
|
conformant.SetContent(BaseLayout);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static PreloadedWindow GetInstance()
|
|
|
|
|
{
|
|
|
|
|
var instance = s_precreated;
|
|
|
|
|
s_precreated = null;
|
|
|
|
|
return instance;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|