/// <summary>
        /// InsertButton - Add a new button to the dialog
        /// </summary>
        /// <param name="button"></param>
        public void InsertButton(FlexButton button)
        {
            Button formButton = new Button();

            int offset = _buttonWidth + _margin;

            formButton.Name     = button.Id;
            formButton.Text     = button.Text;
            formButton.Size     = new Size(_buttonWidth, _buttonHeight);
            formButton.Location = new Point(
                buttonPanel.ClientSize.Width - (_buttonWidth + _margin),
                _margin
                );
            formButton.Anchor     = AnchorStyles.Right | AnchorStyles.Top;
            formButton.MouseDown += formButton_MouseDown;
            formButton.MouseUp   += formButton_MouseUp;

            //
            // move all existing buttons left
            //
            foreach (Control control in buttonPanel.Controls)
            {
                control.Location = new Point(
                    control.Location.X - offset,
                    control.Location.Y
                    );
            }

            buttonPanel.Controls.Add(formButton);
        }
Esempio n. 2
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 uiApplication, NSDictionary launchOptions)
        {
            // initialisation des composants
            Rg.Plugins.Popup.Popup.Init();
            Forms.SetFlags("CollectionView_Experimental");

            //test


            global::Xamarin.Forms.Forms.Init();
            // initialisation des composants
            AiForms.Renderers.iOS.SettingsViewInit.Init(); //need to write here
            SfCalendarRenderer.Init();

            FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
            CachedImageRenderer.InitImageSourceHandler();
            Xamarin.FormsMaps.Init();
            CardsViewRenderer.Preserve();
            ImageCircleRenderer.Init();
            FlexButton.Init();
            FormsMaterial.Init();
            // Fin initialisation des composants

            LoadApplication(new App());
            FloatingActionButtonRenderer.InitRenderer();
            return(base.FinishedLaunching(uiApplication, launchOptions));
        }
Esempio 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)
        {
            if (UIDevice.CurrentDevice.CheckSystemVersion(10, 0))
            {
                // Ask the user for permission to get notifications on iOS 10.0+
                UNUserNotificationCenter.Current.RequestAuthorization(
                    UNAuthorizationOptions.Alert | UNAuthorizationOptions.Badge | UNAuthorizationOptions.Sound,
                    (approved, error) => { });
            }
            else if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0))
            {
                // Ask the user for permission to get notifications on iOS 8.0+
                var settings = UIUserNotificationSettings.GetSettingsForTypes(
                    UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound,
                    new NSSet());

                UIApplication.SharedApplication.RegisterUserNotificationSettings(settings);
            }


            global::Xamarin.Forms.Forms.Init();

            CachedImageRenderer.Init();
            FloatingActionButtonRenderer.InitRenderer();
            FlexButton.Init();

            LoadApplication(new App(new iOSInitializer()));

            return(base.FinishedLaunching(app, options));
        }
Esempio n. 4
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();
     LoadApplication(new App());
     FlexButton.Init();
     return(base.FinishedLaunching(app, options));
 }
Esempio n. 5
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();
     FlexButton.Init();
     LoadApplication(new App(new iOSInitializer()));
     AnimationViewRenderer.Init();
     return(base.FinishedLaunching(app, options));
 }
Esempio n. 6
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 uiApplication, NSDictionary launchOptions)
        {
            // initialisation des composants
            Rg.Plugins.Popup.Popup.Init();
            Forms.SetFlags("CollectionView_Experimental");

            //test

            //For banner notification
            UNUserNotificationCenter.Current.Delegate = new iOSBannerNotification();
            //Ask user permission to display notification . its support for iOS 8

            // We have checked to see if the device is running iOS 8, if so we are required to ask for the user's permission to receive notifications
            if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0))
            {
                var notificationSettings = UIUserNotificationSettings.GetSettingsForTypes(
                    UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, null
                    );

                UIApplication.SharedApplication.RegisterUserNotificationSettings(notificationSettings);
            }



            // check for a notification
            if (launchOptions != null)
            {
                if (launchOptions.ContainsKey(UIApplication.LaunchOptionsLocalNotificationKey))
                {
                    UILocalNotification localNotification = launchOptions[UIApplication.LaunchOptionsLocalNotificationKey] as UILocalNotification;
                    if (localNotification != null)
                    {
                        new UIAlertView(localNotification.AlertAction, localNotification.AlertBody, null, "OK", null).Show();
                        // reset our badge
                        UIApplication.SharedApplication.ApplicationIconBadgeNumber = 0;
                    }
                }
            }


            global::Xamarin.Forms.Forms.Init();
            // initialisation des composants
            AiForms.Renderers.iOS.SettingsViewInit.Init(); //need to write here
            SfCalendarRenderer.Init();

            FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
            CachedImageRenderer.InitImageSourceHandler();
            Xamarin.FormsMaps.Init();
            CardsViewRenderer.Preserve();
            ImageCircleRenderer.Init();
            FlexButton.Init();
            FormsMaterial.Init();
            // Fin initialisation des composants

            LoadApplication(new App());
            FloatingActionButtonRenderer.InitRenderer();
            return(base.FinishedLaunching(uiApplication, launchOptions));
        }
Esempio n. 7
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();
            Xamarin.Forms.DependencyService.Register <Microblink.Forms.iOS.MicroblinkScannerFactoryImplementation>();
            FlexButton.Init();
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Esempio n. 8
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();
            SharpnadoInitializer.Initialize();
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
            FlexButton.Init();
            LoadApplication(new App(new iOSInitializer()));

            return(base.FinishedLaunching(app, options));
        }
Esempio n. 9
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)
 {
     Xamarin.Forms.Forms.Init();
     XF.Material.iOS.Material.Init();
     FlexButton.Init();
     AnimationViewRenderer.Init();
     LoadApplication(new App());
     Plugin.InputKit.Platforms.iOS.Config.Init();
     return(base.FinishedLaunching(app, options));
 }
        //
        // 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.SetFlags("Shell_Experimental", "Visual_Experimental", "CollectionView_Experimental", "FastRenderers_Experimental");
            global::Xamarin.Forms.Forms.Init();
            CardsViewRenderer.Preserve();
            ImageCircleRenderer.Init();
            FlexButton.Init();
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Esempio n. 11
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)
        {
            Cfe.Mobile.App.Ordenes.Core.Core.OS.DependencyService.Register <OS.OS, Cfe.Mobile.App.Ordenes.Core.Core.OS.IOS>();
            Cfe.Mobile.App.Ordenes.Core.Core.OS.DependencyService.Register <OS.DB, Cfe.Mobile.App.Ordenes.Core.Core.OS.IDB>();

            global::Xamarin.Forms.Forms.Init();
            FlexButton.Init();
            Xamarin.FormsMaps.Init();
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
        /// <summary>
        /// UpdateButton - Change the text on a button
        /// </summary>
        /// <param name="button"></param>
        public void UpdateButton(FlexButton button)
        {
            Control[] controls = buttonPanel.Controls.Find(button.Id, true);
            if (controls == null ||
                controls.Length != 1)
            {
                throw new ApplicationException("Unable to find the button to update");
            }
            Control formControl = controls[0];

            formControl.Text = button.Text;
            formControl.Tag  = button;
        }
Esempio n. 13
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.SetFlags("CollectionView_Experimental");
            global::Xamarin.Forms.Forms.Init();

            FlexButton.Init();


            LoadApplication(new App());



            return(base.FinishedLaunching(app, options));
        }
Esempio n. 14
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            FlexButton.Init();

            // Code for starting up the Xamarin Test Cloud Agent
#if DEBUG
            Xamarin.Calabash.Start();
#endif

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Esempio n. 15
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();

            CarouselViewRenderer.Init();

            ZXing.Net.Mobile.Forms.iOS.Platform.Init();

            FlexButton.Init();

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Esempio n. 16
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();
            FlexButton.Init();

            LocalNotificationService.Init();

            UIApplication.SharedApplication.SetMinimumBackgroundFetchInterval(UIApplication.BackgroundFetchIntervalMinimum);

            global::Xamarin.Forms.Forms.Init();

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
        /// <summary>
        /// DeleteButton - Remove a button from the dialog
        /// </summary>
        /// <param name="button"></param>
        public void DeleteButton(FlexButton button)
        {
            buttonPanel.Controls.RemoveByKey(button.Id);

            if (buttonPanel.HasChildren)
            {
                int offset = _margin + _buttonWidth;
                int left   = buttonPanel.ClientSize.Width - buttonPanel.Controls.Count * (offset);

                for (int i = 0; i < buttonPanel.Controls.Count; i++)
                {
                    buttonPanel.Controls[i].Left = left;
                    left += offset;
                }
            }
        }
Esempio n. 18
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)
        {
            SQLitePCL.Batteries_V2.Init();
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
            Rg.Plugins.Popup.Popup.Init();
            FlexButton.Init();

            global::Xamarin.Forms.Forms.Init();

            CarouselViewRenderer.Init();
            SharpnadoInitializer.Initialize();

            LoadApplication(new TestApp.App());

            return(base.FinishedLaunching(app, options));
        }
Esempio n. 19
0
        public IEnumerator <ITask> OnDeleteButton(DeleteButton delete)
        {
            FlexButton existing = _state.Buttons.Find(delete.Body.CompareId);

            if (existing == null)
            {
                delete.ResponsePort.Post(
                    Fault.FromCodeSubcodeReason(
                        FaultCodes.Receiver,
                        DsspFaultCodes.UnknownEntry,
                        "A button with the requested ID does not exist: " + delete.Body.Id
                        )
                    );
            }
            else
            {
                Fault      fault  = null;
                FormInvoke invoke = new FormInvoke(
                    delegate
                {
                    _form.DeleteButton(delete.Body);
                }
                    );

                WinFormsServicePort.Post(invoke);
                yield return(Arbiter.Choice(
                                 invoke.ResultPort,
                                 EmptyHandler,
                                 delegate(Exception e)
                {
                    fault = Fault.FromException(e);
                }
                                 ));

                if (fault != null)
                {
                    delete.ResponsePort.Post(fault);
                }
                else
                {
                    _state.Buttons.Remove(existing);
                    delete.ResponsePort.Post(DefaultDeleteResponseType.Instance);
                    DoSendNotification(delete);
                }
            }
        }
Esempio n. 20
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)
        {
            ServicePointManager
            .ServerCertificateValidationCallback +=
                (sender, cert, chain, sslPolicyErrors) => true;
            global::Xamarin.Forms.Forms.Init();
            global::Xamarin.Forms.FormsMaterial.Init();
            CachedImageRenderer.Init();
            CachedImageRenderer.InitImageSourceHandler();
            var ignore = typeof(SvgCachedImage);

            FlexButton.Init();
            Popup.Init();
            Effects.Init();
            SharpnadoInitializer.Initialize(enableInternalLogger: true);
            LoadApplication(new App(new iOSInitializer()));

            return(base.FinishedLaunching(app, options));
        }
Esempio n. 21
0
        private void Icon_Clicked(object sender, EventArgs e)
        {
            //Get Icon Name
            FlexButton ButtonView = (FlexButton)sender;
            string     IconName   = ButtonView.Icon.ToString();

            IconName = IconName.Replace("File: ", "").Replace(".png", "");

            switch (IconName.ToLower())
            {
            case "phonecall":
                Device.OpenUri(new Uri($"tel:{CurrentRep.PhoneNumber}"));
                break;

            case "website":
                Device.OpenUri(CurrentRep.Website);
                break;

            case "email":
                Device.OpenUri(new Uri($"mailto:{CurrentRep.PrimaryEmail}"));
                break;
            }
        }