/// ------------------------------------------------------------------------------------------------
 /// Name		DrawScreen
 ///
 /// <summary>	PopLayout Onload function
 /// </summary>
 /// <remarks>
 /// </remarks>
 /// ------------------------------------------------------------------------------------------------
 private void DrawScreen()
 {
     CenterPopup   = new PopupLayouts(Content, this, PageScroll);
     Content       = CenterPopup;
     RelativePopup = new PopupLayouts(Content, this, PageScroll);
     Content       = RelativePopup;
 }
Exemplo n.º 2
0
        ///
        /// ------------------------------------------------------------------------------------------------
        /// Name		DrawScreen
        /// <summary>
        /// Initializes a new instance of the PopupLayouts
        /// </summary>
        /// ------------------------------------------------------------------------------------------------
        ///
        private void DrawScreen()
        {
            try
            {
                if (PopupContent == null)
                {
                    PopupContent = new PopupLayouts(Content, Instace(), PageScroll);
                    if (Device.OS != TargetPlatform.iOS)
                    {
                        Content = PopupContent;
                    }
                }

                if (CenterPopupContent == null)
                {
                    CenterPopupContent = new PopupLayouts(Content, Instace(), PageScroll);
                    if (Device.OS != TargetPlatform.iOS)
                    {
                        Content = CenterPopupContent;
                    }
                }
            }
            catch (Exception ex)
            {
                LogTracking.LogTrace(ex.ToString());
            }
        }
Exemplo n.º 3
0
 /// ------------------------------------------------------------------------------------------------
 #region Public Constructor
 /// ------------------------------------------------------------------------------------------------
 ///
 /// <summary>
 /// Initializes a new instance of the <see cref="T:ActionView{T}"/> class.
 /// </summary>
 public ActionView(PopupLayouts parentPopup)
 {
     try
     {
         if (parentPopup == null)
         {
             return;
         }
         InitializeComponent();
         // Tap Search
         var tapSearch = new TapGestureRecognizer();
         tapSearch.Tapped += (s, e) =>
         {
             parentPopup.DismisPopup();
             //await Task.Delay(250);
             SplitView.CenterPopupContent.ShowPopupCenter(new SearchView(), 0.5);
         };
         // Tap Sync
         var tapSync = new TapGestureRecognizer();
         tapSync.Tapped += (s, e) =>
         {
             parentPopup.DismisPopup();
             SplitView.HubMaster.SyncCheck();
         };
         Gl_Search.GestureRecognizers.Add(tapSearch);
         Gl_Sync.GestureRecognizers.Add(tapSync);
     }
     catch (Exception ex)
     {
         LogTracking.LogTrace(ex.ToString());
     }
 }
        ///
        #endregion
        /// ------------------------------------------------------------------------------------------------

        /// ------------------------------------------------------------------------------------------------
        #region Constructor
        /// ------------------------------------------------------------------------------------------------
        ///
        public AddVisitPopupView(PopupLayouts parentPopup, bool isFromMap = false)
        {
            try
            {
                InitializeComponent();

                if (isFromMap)
                {
                    NewSrUi();
                }
                else
                {
                    if (parentPopup == null)
                    {
                        return;
                    }
                    //Add new image
                    var tapAddImage = new TapGestureRecognizer();
                    tapAddImage.Tapped += (sender, e) =>
                    {
                        parentPopup.DismisPopup();
                        OnCameraCapture();
                    };
                    Gl_Add.GestureRecognizers.Add(tapAddImage);
                    //Add audio
                    var tapAddAudio = new TapGestureRecognizer();
                    tapAddAudio.Tapped += async(sender, e) =>
                    {
                        parentPopup.DismisPopup();
                        var isMicrophoneAvailable = DependencyService.Get <IRecorder>().IsMicrophoneAvailable();
                        if (isMicrophoneAvailable)
                        {
                            //if (Device.OS.Equals(TargetPlatform.WinPhone) || Device.OS.Equals(TargetPlatform.Windows))
                            //{
                            //    await Task.Delay(600);
                            //}
                            SplitView.CenterPopupContent.ShowPopupCenter(new AddNewAudioView(), 0.5);
                        }
                        else
                        {
                            await SplitView.DisplayAlert("No Microphone",
                                                         "The Microphone is not available for this device. Please check in the device settings to see if the Microphone has been disabled.",
                                                         "OK", null);
                        }
                    };
                    Gl_AddAudio.GestureRecognizers.Add(tapAddAudio);
                }
            }
            catch (Exception ex)
            {
                LogTracking.LogTrace(ex.ToString());
            }
        }
        /// ------------------------------------------------------------------------------------------------
        #region Private Functions

        /// ------------------------------------------------------------------------------------------------
        /// ------------------------------------------------------------------------------------------------
        /// Name		DrawScreen
        /// <summary>
        /// Initializes a new instance of the PopupLayouts
        /// </summary>
        /// ------------------------------------------------------------------------------------------------
        ///
        private void DrawScreen()
        {
            if (PopupContent == null)
            {
                PopupContent = new PopupLayouts(Content, this, PageScroll);
                Content      = PopupContent;
            }
            if (CenterPopupContent == null)
            {
                CenterPopupContent = new PopupLayouts(Content, this, PageScroll);
                Content            = CenterPopupContent;
            }
        }
Exemplo n.º 6
0
 /// ------------------------------------------------------------------------------------------------
 #region Public Constructor
 /// ------------------------------------------------------------------------------------------------
 ///
 public EnvironmentsView(PopupLayouts parentPopup)
 {
     try
     {
         InitializeComponent();
         // Demo Environment Tapped.
         TapGestureRecognizer tapDemo = new TapGestureRecognizer();
         tapDemo.Tapped += (s, e) =>
         {
             parentPopup.DismisPopup();
             AppData.Environment = OnSiteEnvironments.Sales;
         };
         Gl_Demo.GestureRecognizers.Add(tapDemo);
         // Test Environment Tapped.
         TapGestureRecognizer tapTest = new TapGestureRecognizer();
         tapTest.Tapped += (s, e) =>
         {
             parentPopup.DismisPopup();
             AppData.Environment = OnSiteEnvironments.Staging;
         };
         Gl_Test.GestureRecognizers.Add(tapTest);
         // Dev Environment Tapped.
         TapGestureRecognizer tapDev = new TapGestureRecognizer();
         tapDev.Tapped += (s, e) =>
         {
             parentPopup.DismisPopup();
             AppData.Environment = OnSiteEnvironments.Dev;
         };
         Gl_Dev.GestureRecognizers.Add(tapDev);
         // Live Environment Tapped.
         TapGestureRecognizer tapLive = new TapGestureRecognizer();
         tapLive.Tapped += (s, e) =>
         {
             parentPopup.DismisPopup();
             AppData.Environment = OnSiteEnvironments.Production;
         };
         Gl_Live.GestureRecognizers.Add(tapLive);
         // QA Environment Tapped.
         TapGestureRecognizer tapQa = new TapGestureRecognizer();
         tapQa.Tapped += (s, e) =>
         {
             parentPopup.DismisPopup();
             AppData.Environment = OnSiteEnvironments.QA;
         };
         Gl_QA.GestureRecognizers.Add(tapQa);
     }
     catch (Exception ex)
     {
         LogTracking.LogTrace(ex.ToString());
     }
 }
Exemplo n.º 7
0
        /// ------------------------------------------------------------------------------------------------

        /// ------------------------------------------------------------------------------------------------
        #region Public Constructor
        /// ------------------------------------------------------------------------------------------------
        ///

        public MenuView(PopupLayouts parentPopup)
        {
            try
            {
                InitializeComponent();
                BackgroundColor  = Styles.GetColour("StatusBlue");
                this.parentPopup = parentPopup;
                TapGestures();
                _isExecute = true;
            }
            catch (Exception ex)
            {
                LogTracking.LogTrace(ex.ToString());
            }
        }
        /// ------------------------------------------------------------------------------------------------

        /// ------------------------------------------------------------------------------------------------
        #region public constructor
        public AddVisitsPopUp(PopupLayouts parentPopup)
        {
            try
            {
                InitializeComponent();
                _isExecute   = true;
                PopupContent = parentPopup;
                SRiRecordMeta record;
                record = AppData.PropertyModel.SelectedRecord.Record;
                Lstvw_Actions.ItemsSource = AppData.ConfigModel.Visits(record.Organisation).OrderBy(a => a.Code + a.Description).Select(x => new KeyValuePair <string, string>(x.Code, x.Description)).ToList().ToGroupedList();
            }
            catch (Exception ex)
            {
                LogTracking.LogTrace(ex.ToString());
            }
        }
        /// ------------------------------------------------------------------------------------------------

        /// ------------------------------------------------------------------------------------------------
        #region Constructor
        public FilterByRequest(FilterByRequestType data, PopupLayouts popupLayouts)
        {
            try
            {
                InitializeComponent();
                PopupLayout    = popupLayouts;
                BindingContext = data;
                var itemTapped = new TapGestureRecognizer();
                itemTapped.Tapped += ImageShow;
                Gl_RequestType.GestureRecognizers.Add(itemTapped);
            }
            catch (Exception ex)
            {
                LogTracking.LogTrace(ex.ToString());
            }
        }
Exemplo n.º 10
0
        /// ------------------------------------------------------------------------------------------------
        #region Public Constructor
        /// ------------------------------------------------------------------------------------------------
        ///
        /// <summary>
        /// Initializes a new instance of the <see cref="T:ActionView{T}"/> class.
        /// </summary>
        /// ------------------------------------------------------------------------------------------------
        ///
        public AddView(PopupLayouts parentPopup)
        {
            InitializeComponent();
            if (parentPopup == null)
            {
                return;
            }
            //Add new image
            var tapAddImage = new TapGestureRecognizer();

            tapAddImage.Tapped += (sender, e) =>
            {
                parentPopup.DismisPopup();
                OnCameraCapture();
            };
            Gl_Add.GestureRecognizers.Add(tapAddImage);
        }
Exemplo n.º 11
0
        /// ------------------------------------------------------------------------------------------------

        /// ------------------------------------------------------------------------------------------------
        #region Public Constructor
        ///
        ///  ------------------------------------------------------------------------------------------------
        ///  <summary>
        ///   Initializes a new instance of the class
        ///  </summary>
        ///  <param name="visitActionView"></param>
        /// <param name="parentPopup"></param>
        public AddActionView(VisitActionPage visitActionView, PopupLayouts parentPopup)
        {
            try
            {
                InitializeComponent();
                _popupContent = parentPopup;
                VisitInstance = visitActionView;
                var sriVisit = AppData.PropertyModel.SelectedVisit.Visit;
                Lstvw_Actions.ItemsSource = AppData.ConfigModel.Actions(sriVisit.Organisation, sriVisit.Visit.VisitType)
                                            .OrderBy(a => a.Historic + a.Description)
                                            .Select(x => new KeyValuePair <string, string>(x.Code, x.Description))
                                            .ToList().ToGroupedList();
                _isExecute = true;
            }
            catch (Exception ex)
            {
                LogTracking.LogTrace(ex.ToString());
            }
        }
Exemplo n.º 12
0
        /// ------------------------------------------------------------------------------------------------
        /// Name		DrawScreen
        ///
        /// <summary>	PopLayout Onload function
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// ------------------------------------------------------------------------------------------------
        private void DrawScreen()
        {
            try
            {
                CenterPopup = new PopupLayouts(Content, this, PageScroll);
                if (Device.OS != TargetPlatform.iOS)
                {
                    Content = CenterPopup;
                }

                RelativePopup = new PopupLayouts(Content, this, PageScroll);
                if (Device.OS != TargetPlatform.iOS)
                {
                    Content = RelativePopup;
                }
            }
            catch (Exception ex)
            {
                LogTracking.LogTrace(ex.ToString());
            }
        }
Exemplo n.º 13
0
 /// ------------------------------------------------------------------------------------------------
 /// Name		DrawScreen
 /// <summary>
 /// Initializes a new instance of the PopupLayouts
 /// </summary>
 /// ------------------------------------------------------------------------------------------------
 ///
 private void DrawScreen()
 {
     try
     {
         if (Content.GetType() != typeof(PopupLayouts))
         {
             PopupContent = new PopupLayouts(Content, this, PageScroll);
             if (Device.OS != TargetPlatform.iOS)
             {
                 Content = PopupContent;
             }
             //
             CenterPopupContent = new PopupLayouts(Content, this, PageScroll);
             if (Device.OS != TargetPlatform.iOS)
             {
                 Content = CenterPopupContent;
             }
         }
     }
     catch (Exception ex)
     {
         LogTracking.LogTrace(ex.ToString());
     }
 }
Exemplo n.º 14
0
        /// ------------------------------------------------------------------------------------------------

        /// ------------------------------------------------------------------------------------------------
        #region Public Constructor
        /// <summary>
        /// Initializes a new instance of the <see cref="T:FilterView{T}"/> class.
        /// </summary>
        public FilterView(PopupLayouts popupLayouts)
        {
            try
            {
                InitializeComponent();
                PopupLayout = popupLayouts;
                ChangeButton(AppData.PropertyModel.Filter);
                ToggleSort(AppData.PropertyModel.Sort);
                int index = 0;
                btn_Incomplete.FontSize = FontSizeView.CustomFontSizeSmSmMi;
                btn_Complete.FontSize   = FontSizeView.CustomFontSizeSmSmMi;
                btn_All.FontSize        = FontSizeView.CustomFontSizeSmSmMi;
                foreach (var item in AppData.PropertyModel.FilterTypes)
                {
                    if (!String.IsNullOrEmpty(item.Value))
                    {
                        _filterByRequestType = new FilterByRequestType()
                        {
                            Text      = item.Value,
                            IsVisible = AppContext.AppContext.GetListIndex != null && AppContext.AppContext.GetListIndex.Value == index &&
                                        !AppContext.AppContext.CheckFilterTickImage,
                            index = index,
                            Key   = item.Key
                        };
                        Sl_RequestTypeList.Children.Add(new FilterByRequest(_filterByRequestType, PopupLayout));
                    }
                    index++;
                }
                _isExecute = true;
                TapGestures();
            }
            catch (Exception ex)
            {
                LogTracking.LogTrace(ex.ToString());
            }
        }