Пример #1
0
        public ViewPosicao1(PainelDto Painel, object obj, EnumPage Page)
        {
            InitializeComponent();

            PanelGeral.ControlTemplate = new ControlTemplate(typeof(DefaultPageTemplate));

            _posicaoHistorico = (PosicaoHistorico)obj;

            _pageAnterior = Page;

            marginListRow = new Thickness(
                marginStacklayoutLeftRight
                , marginStacklayoutTopBottom
                );


            mapaPosicao = new Map();

            _viewModelPosicao = new ViewModelPosicao(
                Painel
                , obj
                , EnumPage.Posicao
                , Page
                );

            _viewModelPosicao._view = this as IViewPosicao;
            this.BindingContext     = _viewModelPosicao;

            this._messageService =
                DependencyService.Get <IMessageService>();

            MontaLoad();

            ExibeTitulo();
        }
Пример #2
0
        public ListDetalhes_ViewCell(
            PainelDto Painel
            , Object paramContext
            , EnumPage paramPage
            )
            : base(Color.White)
        {
            _enumPage = paramPage;

            if (_enumPage == EnumPage.DetalhesAlerta)
            {
                _viewModelUnidades = (ViewModelDetalhes)paramContext;
            }
            else if (_enumPage == EnumPage.DetalhesUnidade)
            {
                _viewModelUnidades = (ViewModelDetalhes)paramContext;
                ShowStatusRastreadorUnidadeRastreada = true;
            }
            else
            {
                _viewModelHistorico = (ViewModelHistorico)paramContext;
            }
            _painelDto = Painel;

            this._messageService =
                DependencyService.Get <IMessageService>();

            this._navigationService =
                DependencyService.Get <INavigationService>();


            this._util = DependencyService.Get <IUtilPlataform>();
        }
 public void NavigateToPosicao(PainelDto Painel, object obj, EnumPage Page)
 {
     Device.BeginInvokeOnMainThread(() =>
     {
         Application.Current.MainPage.Navigation.PushAsync(new ViewPosicao(Painel, obj, Page));
     });
 }
 public void NavigateToHistorico(
     PainelDto painel
     , object obj
     , EnumPage Page
     )
 {
     Device.BeginInvokeOnMainThread(() =>
     {
         Application.Current.MainPage.Navigation.PushAsync(new ViewHistorico(painel, obj));
     });
 }
        public ViewModelListaComandos(
            object obj
            , EnumPage Page
            , String paramNomeUnidade
            )
        {
            _page     = Page;
            TxtBuscar = paramNomeUnidade;
            _painel   = (PainelDto)obj;

            this.RefreshCommand          = new Command(this.Refresh);
            this.VoltarCommand           = new Command(this.VoltarAction);
            this.ComandoHistoricoCommand = new Command(this.ComandoHistoricoAction);

            _refreshTime = App.Configuracao.RefreshTime;
            _tokensource = new CancellationTokenSource();
        }
 public void NavigateToListarComandos(
     object obj
     , EnumPage Page
     , string paramNomeUnidade = ""
     )
 {
     Device.BeginInvokeOnMainThread(() =>
     {
         Application.Current.MainPage.Navigation.PushAsync(
             new ViewListaComandos(
                 obj
                 , Page
                 , paramNomeUnidade
                 )
             );
     });
 }
        public ViewModelHistorico(
            PainelDto Painel
            , object obj
            , EnumPage Page
            )
        {
            posicaoHistorico = (PosicaoHistorico)obj;
            ExibeTitulo();
            DefaultTemplateBuild();
            _painelDto = Painel;

            _actualPage = Page;

            _returnPage = EnumPage.Detalhes;

            this.RefreshCommand = new Command(this.Refresh);
            this.ListHistorico_RefreshCommand = new Command(this.ListHistoricoRefresh);
            this.BuscarMaisCommand            = new Command(this.BuscarMais);

            this.MapaCommand     = new Command(this.MapaAction);
            this.MapaTypeCommand = new Command(this.MapaTypeAction);


            if (Painel.Id == 2) //Tela de Alertas
            {
                periodoBusca = -2;
            }
            else
            {
                periodoBusca = -4;
            }


            MapaTelaNormal();

            HeightPainelBuscarMais = _app.DefaultTemplateHeightNavegationBar;

            HeightPainelLista =
                DefaultHeightContent - (
                    HeightPainelMapa
                    + HeightPainelBuscarMais
                    );
            BtnTopIsEnabled           = false;
            MapaButtonBackgroundColor = _desactiveBackgroundColor;
        }
        public ViewModelDetalhes(
            object obj
            , EnumPage Page
            )
        {
            DefaultTemplateBuild();
            _page = Page;

            _painel = (PainelDto)obj;

            this.RefreshCommand  = new Command(this.Refresh);
            this.MapaCommand     = new Command(this.MapaAction);
            this.MapaTypeCommand = new Command(this.MapaTypeAction);
            this.BuscarCommand   = new Command(this.Buscar);

            this.ListaEventoCommand = new Command(this.ListaEvento);

            _refreshTime = App.Configuracao.RefreshTime;
            _tokensource = new CancellationTokenSource();

            _filtroEventosBackgroundColor = _desactiveBackgroundColor;
            _mapaButtonBackgroundColor    = _desactiveBackgroundColor;
        }
Пример #9
0
        public ViewModelPosicao(
            PainelDto Painel
            , object obj
            , EnumPage Page
            , EnumPage paramLastPage
            )
        {
            _posicaoDetalhes = (PosicaoHistorico)obj;

            _actualPage = Page;
            _painelDto  = Painel;
            _returnPage = paramLastPage;

            this.MapaCommand     = new Command(this.MapaAction);
            this.MapaTypeCommand = new Command(this.MapaTypeAction);

            BtnTopIsEnabled = false;

            _tokensource = new CancellationTokenSource();

            CalculaAlturaMapa();

            MapaButtonBackgroundColor = _desactiveBackgroundColor;
        }
        public ViewListaComandos(
            object obj
            , EnumPage Page
            , string paramNomeUnidade
            )
        {
            InitializeComponent();

            PanelGeral.ControlTemplate = new ControlTemplate(typeof(DefaultPageTemplate));

            _viewModelListaComandos = new ViewModelListaComandos(
                obj
                , _actualPage
                , paramNomeUnidade
                );
            _viewModelListaComandos._viewComandos = this as IViewListaComandos;
            _pageContent        = new ListPagePadrao(_viewModelListaComandos);
            PanelGeral.Content  = _pageContent;
            this.BindingContext = _viewModelListaComandos;

            _painelDto = (PainelDto)obj;

            _actualPage = Page;

            _pageContent.ListComandos.ItemTemplate = new DataTemplate(() =>
            {
                return(new ListComandos_ViewCell(_actualPage));
            });

            PainelTopLoad.ShowAlert();

            _pageContent.ListComandos.ItemTapped += ListComandos_ItemTapped;

            this._messageService =
                DependencyService.Get <IMessageService>();
        }
Пример #11
0
        public ViewDetalhes(object obj, EnumPage Page)
        {
            InitializeComponent();

            PanelGeral.ControlTemplate = new ControlTemplate(typeof(DefaultPageTemplate));

            _viewModelDetalhes = new ViewModelDetalhes(
                obj
                , _actualPage
                );
            _viewModelDetalhes._viewDetalhes = this as IViewDetalhes;

            _pageContent = new ListPagePadrao(_viewModelDetalhes);

            PanelGeral.Content = _pageContent;

            this.BindingContext = _viewModelDetalhes;

            _painelDto = (PainelDto)obj;

            _actualPage = Page;

            _pageContent.ListComandos.ItemTemplate = new DataTemplate(() =>
            {
                return(new ListDetalhes_ViewCell(_painelDto, _viewModelDetalhes, _actualPage));
            });

            ExibeTitulo(null);

            PainelTopLoad.ShowAlert();

            if (_actualPage == EnumPage.DetalhesAlerta)
            {
                _pageContent.ListViewPanelTop.IsVisible = false;
            }
        }
Пример #12
0
 public void navigateToPage(EnumPage page)
 {
     mainPage.navigateToPage(page);
 }
Пример #13
0
        public HeroBanner GetBanner(EnumPage page)
        {
            var result = context.Set <HeroBanner>().OrderByDescending(x => x.Updated).FirstOrDefault(x => x.Page == page);

            return(result ?? new HeroBanner());
        }
Пример #14
0
        public HeroBannerModel GetHeroBanner(EnumPage page)
        {
            var result = Repo.GetBanner(page);

            return(DataToModel(result));
        }
Пример #15
0
 public void navigateToPage(EnumPage page)
 {
     splitViewIcons_lb.SelectedIndex = (int)page;
     navigateToSelectedPage();
 }