コード例 #1
0
        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
            if (!(Window.Current.Content is Frame rootFrame))
            {
                rootFrame = new Frame();

                UseDefaultConfiguration();

                BitCSharpClientControls.Init();

                Xamarin.Forms.Forms.Init(e, new Assembly[]
                {
                    typeof(BitCSharpClientControls).GetTypeInfo().Assembly,
                    typeof(SfListViewRenderer).GetTypeInfo().Assembly
                }.Union(Rg.Plugins.Popup.Popup.GetExtraAssemblies()));

                Window.Current.Content = rootFrame;
            }

            if (rootFrame.Content == null)
            {
                rootFrame.Navigate(typeof(MainPage), e.Arguments);
            }

            Window.Current.Activate();
        }
コード例 #2
0
 /// <summary>
 /// Configures VersionTracking | RgPluginsPopup | BitCSharpClientControls (DatePicker, Checkbox, RadioButton, Frame)
 /// </summary>
 protected virtual void UseDefaultConfiguration()
 {
     _useDefaultConfiguration = true;
     VersionTracking.Track();
     Rg.Plugins.Popup.Popup.Init();
     BitCSharpClientControls.Init();
 }
コード例 #3
0
 /// <summary>
 /// Configures VersionTracking | RgPluginsPopup | Bit.Client.Xamarin.Controls (DatePicker, Frame)
 /// </summary>
 protected virtual void UseDefaultConfiguration()
 {
     _useDefaultConfiguration = true;
     Xamarin.Essentials.VersionTracking.Track();
     Rg.Plugins.Popup.Popup.Init();
     BitCSharpClientControls.Init();
     SetBitPlatformServices();
 }
コード例 #4
0
        public App()
        {
            InitializeComponent();

            BitCSharpClientControls.XamlInit();

            MainPage = new NavigationPage(new MainPage());
        }
コード例 #5
0
 /// <summary>
 /// Configures VersionTracking | RgPluginsPopup | Fast Renderers | Xamarin Essentials' Permissions  | BitCSharpClientControls (DatePicker, Checkbox, RadioButton, Frame)
 /// </summary>
 protected virtual void UseDefaultConfiguration(Bundle savedInstanceState)
 {
     _useDefaultConfiguration = true;
     Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
     Xamarin.Essentials.Platform.Init(this, savedInstanceState);
     VersionTracking.Track();
     BitCSharpClientControls.Init();
 }
コード例 #6
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     TabLayoutResource = Resource.Layout.Tabbar;
     ToolbarResource   = Resource.Layout.Toolbar;
     BitCSharpClientControls.Init();
     Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
     base.OnCreate(savedInstanceState);
     global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
     LoadApplication(new App());
 }
コード例 #7
0
 /// <summary>
 /// Configures VersionTracking | RgPluginsPopup | BitCSharpClientControls (DatePicker, Checkbox, RadioButton, Frame) | Set Min Width and Height
 /// </summary>
 protected virtual void UseDefaultConfiguration()
 {
     VersionTracking.Track();
     Rg.Plugins.Popup.Popup.Init();
     BitCSharpClientControls.Init();
     ApplicationView.GetForCurrentView().SetPreferredMinSize(new Size
     {
         Height = 1,
         Width  = 1
     });
 }
コード例 #8
0
 /// <summary>
 /// Configures VersionTracking | RgPluginsPopup | Bit.Client.Xamarin.Controls (DatePicker, Frame) | Set Min Width and Height
 /// </summary>
 protected virtual void UseDefaultConfiguration()
 {
     Xamarin.Essentials.VersionTracking.Track();
     Rg.Plugins.Popup.Popup.Init();
     BitCSharpClientControls.Init();
     ApplicationView.GetForCurrentView().SetPreferredMinSize(new Windows.Foundation.Size
     {
         Height = 1,
         Width  = 1
     });
     SetBitPlatformServices();
 }
コード例 #9
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            BitCSharpClientControls.Init();

            Forms.Init();

            Rg.Plugins.Popup.Popup.Init();

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
コード例 #10
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)
        {
            Rg.Plugins.Popup.Popup.Init();
            BitCSharpClientControls.Init();

            global::Xamarin.Forms.Forms.Init();
            SfDataGridRenderer.Init();
            new SfNumericTextBoxRenderer();

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
コード例 #11
0
        /// <summary>
        /// Configures VersionTracking | RgPluginsPopup | Fast Renderers | Xamarin Essentials' Permissions  | BitCSharpClientControls (DatePicker, Checkbox, RadioButton, Frame)
        /// </summary>
        protected virtual void UseDefaultConfiguration(Bundle savedInstanceState)
        {
            ((AppDomainSetup)AppDomain.CurrentDomain.GetType().GetProperty("SetupInformationNoCopy", BindingFlags.Instance | BindingFlags.NonPublic)
             .GetValue(AppDomain.CurrentDomain))
            .ApplicationBase = "/";     // workaround for app insight which tries to read app config file.

            _useDefaultConfiguration = true;
            Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            VersionTracking.Track();
            BitCSharpClientControls.Init();
            SetBitPlatformServices();
        }
コード例 #12
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            BitExceptionHandler.Current = new XamAppExceptionHandler();

            Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(SyncfusionLicense.Product_Key);

            UseDefaultConfiguration();
            Forms.Init();

            SfListViewRenderer.Init();
            BitCSharpClientControls.Init();

            LoadApplication(new App(new XamAppPlatformInitializer()));

            return(base.FinishedLaunching(app, options));
        }
コード例 #13
0
        /// <summary>
        /// Invoked when the application is launched normally by the end user.  Other entry points
        /// will be used such as when the application is launched to open a specific file.
        /// </summary>
        /// <param name="e">Details about the launch request and process.</param>
        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
            Frame rootFrame = Window.Current.Content as Frame;

            // Do not repeat app initialization when the Window already has content,
            // just ensure that the window is active
            if (rootFrame == null)
            {
                // Create a Frame to act as the navigation context and navigate to the first page
                rootFrame = new Frame();

                rootFrame.NavigationFailed += OnNavigationFailed;


                BitCSharpClientControls.Init();


                List <Assembly> assembliesToInclude = new List <Assembly>();
                assembliesToInclude.Add(typeof(SfDataGridRenderer).GetTypeInfo().Assembly);
                assembliesToInclude.Add(typeof(SfNumericTextBoxRenderer).GetTypeInfo().Assembly);
                Xamarin.Forms.Forms.Init(e, assembliesToInclude);

                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                    //TODO: Load state from previously suspended application
                }

                // Place the frame in the current Window
                Window.Current.Content = rootFrame;
            }

            if (rootFrame.Content == null)
            {
                // When the navigation stack isn't restored navigate to the first page,
                // configuring the new page by passing required information as a navigation
                // parameter
                rootFrame.Navigate(typeof(MainPage), e.Arguments);
            }
            // Ensure the current window is active
            Window.Current.Activate();
        }
コード例 #14
0
ファイル: MainActivity.cs プロジェクト: it3me/XamApp
        protected override void OnCreate(Bundle savedInstanceState)
        {
            BitExceptionHandler.Current = new XamAppExceptionHandler();

            Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(SyncfusionLicense.Product_Key);

            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            SetTheme(Resource.Style.MainTheme);

            base.OnCreate(savedInstanceState);

            UseDefaultConfiguration(savedInstanceState);
            UserDialogs.Init(this);
            Forms.Init(this, savedInstanceState);

            BitCSharpClientControls.Init();

            LoadApplication(new App(new XamAppPlatformInitializer(this)));
        }
コード例 #15
0
        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
            if (!(Window.Current.Content is Frame rootFrame))
            {
                rootFrame = new Frame();

                BitCSharpClientControls.Init();

                Xamarin.Forms.Forms.Init(e, new Assembly[] { }.Union(Rg.Plugins.Popup.Popup.GetExtraAssemblies()));

                Rg.Plugins.Popup.Popup.Init();

                Window.Current.Content = rootFrame;
            }

            if (rootFrame.Content == null)
            {
                rootFrame.Navigate(typeof(MainPage), e.Arguments);
            }

            Window.Current.Activate();
        }
コード例 #16
0
ファイル: MainActivity.cs プロジェクト: mo-kml/Sanaap
        protected override void OnCreate(Bundle bundle)
        {
            AppCenter.Start("9c1f248c-5434-458f-9c4c-f69b39722c1f", typeof(Analytics), typeof(Crashes));

            BitExceptionHandler.Current = new SanaapExceptionHandler();

            UserDialogs.Init(this);

            base.OnCreate(bundle);

            FFImageLoading.Forms.Platform.CachedImageRenderer.Init(false);

            UseDefaultConfiguration(bundle);

            Xamarin.Essentials.Platform.Init(this, bundle);

            CrossCurrentActivity.Current.Init(this, bundle);

            FormsGoogleMaps.Init(this, bundle);

            BitCSharpClientControls.Init();

            Forms.Init(this, bundle);

            CarouselViewRenderer.Init();

            ImageCircleRenderer.Init();

            Rg.Plugins.Popup.Popup.Init(this, bundle);

            LoadApplication(new App(new SanaapAppDroidInitializer(this)));

            //Xamarin.Forms.Application.Current.On<Xamarin.Forms.PlatformConfiguration.Android>()
            //    .UseWindowSoftInputModeAdjust(WindowSoftInputModeAdjust.Resize);

            Android.Views.View root = FindViewById(Android.Resource.Id.Content);
            Rect r = new Rect();

            {
                root.GetWindowVisibleDisplayFrame(r);
            }

            root.ViewTreeObserver.GlobalFocusChange += ViewTreeObserver_GlobalFocusChange;
            root.ViewTreeObserver.GlobalLayout      += (object sender, EventArgs e) =>
            {
                Rect r2 = new Rect();
                root.GetWindowVisibleDisplayFrame(r2);

                int keyboardHeight = r2.Height();

                root.ScrollTo(0, 20);

                if (clickYPosition > keyboardHeight)
                {
                    root.ScrollTo(0, clickYPosition - keyboardHeight + 30);
                }
                else
                {
                    root.ScrollTo(0, 0);
                }
            };
        }
コード例 #17
0
 static App()
 {
     BitCSharpClientControls.XamlInit();
 }
コード例 #18
0
 static App()
 {
     BitCSharpClientControls.XamlInit();
     BitApplication.XamlInit();
 }
コード例 #19
0
 public App()
     : this(null)
 {
     BitCSharpClientControls.XamlInit();
 }