Exemplo n.º 1
0
        private void pageChange(PageChangeModel changeModel)
        {
            if (changeModel.Page == PageEnum.WPFPage)
            {
                WebOrHostDisplayEvent?.Invoke(Visibility.Hidden, Visibility.Visible);

                ResolveWPFPage(changeModel);
                return;
            }
            if (changeModel.Page == PageEnum.WebPage)
            {
                WebOrHostDisplayEvent?.Invoke(Visibility.Visible, Visibility.Hidden);
                Task.Factory.StartNew(() => EventBus.Default.Trigger(new NavigateEventData()
                {
                    Url          = changeModel.Url,
                    NavigateType = NavigateEnum.Url
                }));
                return;
            }
            if (changeModel.Page == PageEnum.WebComponet)
            {
                Task.Factory.StartNew(() => EventBus.Default.Trigger(new NavigateEventData()
                {
                    NavigateType = NavigateEnum.Component,
                    ComponentDto = changeModel.ComponentDto
                }));
            }
        }
Exemplo n.º 2
0
        private void SignalrRouteProxyClient_GetHomeEvent(string obj)
        {
            Dispatcher.BeginInvoke(new Action(() =>
            {
                WebOrHostDisplayEvent?.Invoke(Visibility.Collapsed, Visibility.Visible);

                if (mainFrame.Content == null)
                {
                    SmartSystemLEConsts.SystemModules.First()?.MainMenuViews.First()?.OpenCommand.Execute(SmartSystemLEConsts.SystemModules.First()?.MainMenuViews.First());
                }
            }));
        }