Inheritance: BridgeTry.Frontend.Common.Views.MainView
Esempio n. 1
0
        public MainWindow()
            : base() {
            TinyIoCContainer.Current.Register<WebMarco.Backend.App.Common.BaseAppDelegate, AppDelegate>(AppDelegate.Instance);
            TinyIoCContainer.Current.Register<AppHelper.Data.Manager, Manager>(new Manager());
            AppHelper.Data.ConnectDatabase();
            /// Program entry point is here
            /// 

            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(730, 490);
            InitializeComponent();

            MainView = new MainView(this);
            var mainWebView = (MainWebView)MainView;
            //browser = new ChromiumWebBrowser("http://html5test.com/");
            mainWebView.Dock = DockStyle.Fill;
            //browser.BackColor = System.Drawing.Color.Blue;            
            //mainWebView.DownloadHandler = new DownloadHandler();
            //browser.MenuHandler = new MenuHandler();
            mainWebView.NavStateChanged += OnBrowserNavStateChanged;
            mainWebView.ConsoleMessage += OnBrowserConsoleMessage;
            mainWebView.StatusMessage += OnBrowserStatusMessage;
            mainWebView.TitleChanged += OnBrowserTitleChanged;
            mainWebView.AddressChanged += OnBrowserAddressChanged;
            Controls.Add(mainWebView);

            //MainView.Load(); //TODO: here??! is it safe?..no:(
        }
Esempio n. 2
0
        protected override void OnCreate(Bundle bundle) {
            TinyIoCContainer.Current.Register<WebMarco.Backend.App.Common.BaseAppDelegate, AppDelegate>(AppDelegate.Instance);
            TinyIoCContainer.Current.Register<AppHelper.Data.Manager, Manager>(new Manager((Context)this));
            AppHelper.Data.ConnectDatabase();
            base.OnCreate(bundle);

            /// Program entry point is here
            


            MainView = new MainView(this);
            SetContentView((View)MainView);
            MainView.Load();
        }
Esempio n. 3
0
        public override void MakeKeyAndVisible() {
            ///Is not necessary
            //TinyIoCContainer.Current.Register<WebMarco.Backend.App.Common.BaseAppDelegate, AppDelegate>((AppDelegate)(AppDelegate.Instance));
            //TinyIoCContainer.Current.Register<AppHelper.Data.Manager, Manager>(new Manager());
            //AppHelper.Data.ConnectDatabase();//TODO: noo has to be done async - otherwise will kill the app on huge db load due to timeout
            MainView = new MainView(this);
            MainView.CurrentFrame = Rectangle.GetWithRectangleF(UIScreen.MainScreen.Bounds);
            //SetContentView((View)MainView);
            UIViewController rootViewController = new UIViewController();
            rootViewController.View = (UIView)MainView;
            //MainView.Load(); //TODO: or here
            RootViewController = rootViewController;
            base.MakeKeyAndVisible();

            MainView.Load(); //TODO: or here

            /// Program entry point is here




        }