Ejemplo n.º 1
0
        static void Main()
        {
            var app        = new AppBootstrap();
            var mainWindow = new MainWindow();

            app.Run(mainWindow);
        }
 public override void DidFinishLaunching(NSNotification notification)
 {
     Forms.Init();
     AppBootstrap.Init();
     LoadApplication(new App());
     base.DidFinishLaunching(notification);
 }
Ejemplo n.º 3
0
 //
 // This method is invoked when the application has loaded and is ready to run. In this
 // method you should instantiate the window, load the UI into it and then make the window
 // visible.
 //
 // You have 17 seconds to return from this method, or iOS will terminate your application.
 //
 public override bool FinishedLaunching(UIApplication app, NSDictionary options)
 {
     global::Xamarin.Forms.Forms.Init();
     AppBootstrap.Init();
     Bootstrap.Init();
     LoadApplication(new App());
     return(base.FinishedLaunching(app, options));
 }
Ejemplo n.º 4
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);
            AppBootstrap.Init();
            Bootstrap.Init(this);
            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());
        }
Ejemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        if (Ins == null)
        {
            Ins = this;
        }
        else
        {
            return;
            //throw new Exception("There is only one Client instance in this app");
        }
        //SRDebug.Init();
        DontDestroyOnLoad(this);
        // 初始变量赋值
        Application.targetFrameRate = 60;
        GlobalConsts.FrameTime      = 1f / Application.targetFrameRate;
        Screen.sleepTimeout         = SleepTimeout.NeverSleep;
        Application.runInBackground = true;
        Debug.Log("Application TargetFrameRate:" + Application.targetFrameRate);
        Debug.Log("Application RunInBackground:" + Application.runInBackground);
        Debug.Log("Application InstallMode:" + Application.installMode);
        Debug.Log("Application Unity Version:" + Application.unityVersion);

        //开启日志
        logger = Logger.GetInstance();
        logger.Start();
        logger.LogInfoToConsole = true;
        Logger.Info("Game Start");

#if UNITY_EDITOR
        GlobalConsts.isLuaBundleMode = GetRunMode(1) == 1;
        GlobalConsts.isResBundleMode = GetRunMode(2) == 1;

        if (GlobalConsts.isResBundleMode)
        {
            if (!Directory.Exists("Assets/Res") || !Directory.Exists("Assets/Lua"))
            {
                Logger.LogError("There is no 'Assets/Res' or 'Assets/Lua' Directory in the project!");
                return;
            }
        }
#endif
        AppBootstrap.Start(this);

        logger.LogInfoToConsole = false;//这个参数由后续决定是否再开启
        // Lua Start
        gameObject.AddComponent <LuaBootstrap>();
    }
Ejemplo n.º 6
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     TabLayoutResource = Resource.Layout.Tabbar;
     ToolbarResource   = Resource.Layout.Toolbar;
     base.OnCreate(savedInstanceState);
     MvvmAspire.Controls.UIHelper.Drawable = typeof(test.Droid.Resource.Drawable);
     MvvmAspire.Controls.UIHelper.Layout   = typeof(Resource.Layout);
     MvvmAspire.Controls.UIHelper.Id       = typeof(Resource.Id);
     MvvmAspire.Controls.UIHelper.Context  = this;
     AppBootstrap.Init();
     Bootstrap.Init(this);
     UserDialogs.Init(() => (Activity)this);
     Xamarin.Essentials.Platform.Init(this, savedInstanceState);
     global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
     LoadApplication(new App());
 }
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource       = Resource.Layout.Tabbar;
            ToolbarResource         = Resource.Layout.Toolbar;
            AppHelper.FastCellCache = FastCellCache.Instance;
            base.OnCreate(bundle);

            MvvmAspire.Controls.UIHelper.Drawable = typeof(TestApp.Droid.Resource.Drawable);
            MvvmAspire.Controls.UIHelper.Layout   = typeof(Resource.Layout);
            MvvmAspire.Controls.UIHelper.Id       = typeof(Resource.Id);
            MvvmAspire.Controls.UIHelper.Context  = this;
            global::Xamarin.Forms.Forms.Init(this, bundle);
            AppBootstrap.Init();
            Bootstrap.Init(this);

            LoadApplication(new App());
        }
Ejemplo n.º 8
0
    // Use this for initialization
    void Start()
    {
        DontDestroyOnLoad(this);

        httpRequest = gameObject.AddComponent <HttpRequest>();

        JsonData json = new JsonData();

        json["server"]   = "AccountServer";
        json["action"]   = "login_account";
        json["username"] = "******";
        json["password"] = "******";
        //StartCoroutine(testHttpLogin(json));
        //开启日志
        logger = Logger.GetInstance();
        logger.Start();
        //Logger.Error("Hell world1");
        //Logger.Error("Hell world2");
        AppBootstrap.Start(this);
    }