Exemple #1
0
        void ReleaseDesignerOutlets()
        {
            if (AdditionalInfoTextBox != null)
            {
                AdditionalInfoTextBox.Dispose();
                AdditionalInfoTextBox = null;
            }

            if (CurrentLocationTextBox != null)
            {
                CurrentLocationTextBox.Dispose();
                CurrentLocationTextBox = null;
            }

            if (DestinationTextBox != null)
            {
                DestinationTextBox.Dispose();
                DestinationTextBox = null;
            }

            if (FeedbackButton != null)
            {
                FeedbackButton.Dispose();
                FeedbackButton = null;
            }

            if (NameTextBox != null)
            {
                NameTextBox.Dispose();
                NameTextBox = null;
            }

            if (RequestButton != null)
            {
                RequestButton.Dispose();
                RequestButton = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (AddSeekiosButton != null)
            {
                AddSeekiosButton.Dispose();
                AddSeekiosButton = null;
            }

            if (AddSeekiosLabel != null)
            {
                AddSeekiosLabel.Dispose();
                AddSeekiosLabel = null;
            }

            if (AllSeekiosMapLabel != null)
            {
                AllSeekiosMapLabel.Dispose();
                AllSeekiosMapLabel = null;
            }

            if (CreditsLabel != null)
            {
                CreditsLabel.Dispose();
                CreditsLabel = null;
            }

            if (CreditsTitleLabel != null)
            {
                CreditsTitleLabel.Dispose();
                CreditsTitleLabel = null;
            }

            if (EmailUser != null)
            {
                EmailUser.Dispose();
                EmailUser = null;
            }

            if (FeedbackButton != null)
            {
                FeedbackButton.Dispose();
                FeedbackButton = null;
            }

            if (FeedbackLabel != null)
            {
                FeedbackLabel.Dispose();
                FeedbackLabel = null;
            }

            if (Head2View != null)
            {
                Head2View.Dispose();
                Head2View = null;
            }

            if (HeadView != null)
            {
                HeadView.Dispose();
                HeadView = null;
            }

            if (HistoriqueConsommationButton != null)
            {
                HistoriqueConsommationButton.Dispose();
                HistoriqueConsommationButton = null;
            }

            if (MapButton != null)
            {
                MapButton.Dispose();
                MapButton = null;
            }

            if (MyConsoLabel != null)
            {
                MyConsoLabel.Dispose();
                MyConsoLabel = null;
            }

            if (NameUser != null)
            {
                NameUser.Dispose();
                NameUser = null;
            }

            if (ParameterButton != null)
            {
                ParameterButton.Dispose();
                ParameterButton = null;
            }

            if (ParametersLabel != null)
            {
                ParametersLabel.Dispose();
                ParametersLabel = null;
            }

            if (SeekiosTutorialButton != null)
            {
                SeekiosTutorialButton.Dispose();
                SeekiosTutorialButton = null;
            }

            if (SettingsImageView != null)
            {
                SettingsImageView.Dispose();
                SettingsImageView = null;
            }

            if (UserGuideLabel != null)
            {
                UserGuideLabel.Dispose();
                UserGuideLabel = null;
            }

            if (UserImageView != null)
            {
                UserImageView.Dispose();
                UserImageView = null;
            }
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            // button click seekios tutorial
            SeekiosTutorialButton.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                NavigationService.LeftMenuView.RevealViewController().RightRevealToggleAnimated(true);
                App.Locator.LeftMenu.GoToListTutorial();
            }));

            // button click my consomation
            HistoriqueConsommationButton.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                NavigationService.LeftMenuView.RevealViewController().RightRevealToggleAnimated(true);
                App.Locator.Credits.GoToCreditHistoric();
            }));

            // button click on add a seekios
            AddSeekiosButton.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                NavigationService.LeftMenuView.RevealViewController().RightRevealToggleAnimated(true);
                App.Locator.LeftMenu.GoToAddSeekios();
            }));

            // button click on map all seekios
            MapButton.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                if (App.CurrentUserEnvironment.LsSeekios.Count == 0)
                {
                    AlertControllerHelper.ShowAlert(Application.LocalizedString("ZeroSeekios")
                                                    , Application.LocalizedString("NeedAtLeastOneSeekios")
                                                    , Application.LocalizedString("Close"));
                }
                else
                {
                    if (App.CurrentUserEnvironment.LsSeekios.All(a => a.LastKnownLocation_latitude == App.DefaultLatitude &&
                                                                 a.LastKnownLocation_longitude == App.DefaultLongitude))
                    {
                        if (App.CurrentUserEnvironment.LsSeekios.Count == 1)
                        {
                            AlertControllerHelper.ShowAlert(Application.LocalizedString("NoPosition")
                                                            , Application.LocalizedString("OneSeekiosNewlyAdded")
                                                            , Application.LocalizedString("Close"));
                        }
                        else
                        {
                            AlertControllerHelper.ShowAlert(Application.LocalizedString("NoPosition")
                                                            , Application.LocalizedString("PluralSeekiosNewlyAdded")
                                                            , Application.LocalizedString("Close"));
                        }
                    }
                    else
                    {
                        NavigationService.LeftMenuView.RevealViewController().RightRevealToggleAnimated(true);
                        App.Locator.LeftMenu.GoToSeekiosMapAllSeekios();
                    }
                }
            }));

            // button click on feedback
            FeedbackButton.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                var feedbackManager = BITHockeyManager.SharedHockeyManager.FeedbackManager;
                feedbackManager.ShowFeedbackListView();
                feedbackManager.ShowFeedbackComposeView();
                NavigationService.LeftMenuView.RevealViewController().RightRevealToggleAnimated(true);
            }));

            // button click on Parameter
            UserImageView.UserInteractionEnabled = true;
            UserImageView.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                NavigationService.LeftMenuView.RevealViewController().RightRevealToggleAnimated(true);
                App.Locator.LeftMenu.GoToParameter();
            }));
            EmailUser.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                NavigationService.LeftMenuView.RevealViewController().RightRevealToggleAnimated(true);
                App.Locator.LeftMenu.GoToParameter();
            }));
            NameUser.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                NavigationService.LeftMenuView.RevealViewController().RightRevealToggleAnimated(true);
                App.Locator.LeftMenu.GoToParameter();
            }));
            SettingsImageView.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                NavigationService.LeftMenuView.RevealViewController().RightRevealToggleAnimated(true);
                App.Locator.LeftMenu.GoToParameter();
            }));
            CreditsTitleLabel.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                NavigationService.LeftMenuView.RevealViewController().RightRevealToggleAnimated(true);
                App.Locator.LeftMenu.GoToParameter();
            }));
            CreditsLabel.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                NavigationService.LeftMenuView.RevealViewController().RightRevealToggleAnimated(true);
                App.Locator.LeftMenu.GoToParameter();
            }));
        }