示例#1
0
        void ChangeClient(int key)
        {
            UcFrameBase current = (UcFrameBase)ucClient.Child;

            if (current.HideFrame())
            {
                UcFrameBase panel = _DicClinet[key];
                if (panel != null)
                {
                    ucClient.Child = panel;
                }
            }
        }
示例#2
0
        public void RegisterClientPanel(UcFrameBase panel, int iKey, bool bShow)
        {
            bool ret = _DicClinet.TryAdd(iKey, panel);

            if (ret)
            {
                panel.OnRequestParentService += OnRequestParentService;
                if (bShow)
                {
                    ucClient.Child = panel;
                }
            }
        }
示例#3
0
        public void RegisterSubNavigationPanel(UcFrameBase panel, int iKey, bool bShow)
        {
            bool ret = _DicSubNavigation.TryAdd(iKey, panel);

            if (ret)
            {
                panel.OnRequestParentService += OnRequestParentService;
                if (bShow)
                {
                    ucSubNavigation.Child = panel;
                }
            }
        }
示例#4
0
        void OnRequestParentService(object sender, enumFrameService enService, params object[] args)
        {
            switch (enService)
            {
            case enumFrameService.ChangeClientFrame:
            {
                ChangeClient((int)args[0]);
            }
            break;

            case enumFrameService.ChangeSideFrame:
            {
                UcFrameBase panel = _DicSubNavigation[(int)args[0]];
                if (panel != null)
                {
                    ucSubNavigation.Child = panel;
                }
            }
            break;

            case enumFrameService.ClearClientFrame:
                ucClient.Child = null;
                break;

            case enumFrameService.ClearSideFrame:
                ucSubNavigation.Child = null;
                break;

            case enumFrameService.PopUpWindow:

            case enumFrameService.UserEvent:
                OnUserEvent?.Invoke(sender, enService, args);
                break;

            case enumFrameService.Close:
                Application.Current.Shutdown();
                break;

            default:
                break;
            }
        }
示例#5
0
 public void RegisterNavigationPanel(UcFrameBase panel)
 {
     ucNavigation.Child            = panel;
     panel.OnRequestParentService += OnRequestParentService;
 }
示例#6
0
 public void RegisterTitlePanel(UcFrameBase panel)
 {
     ucTitle.Child = panel;
     panel.OnRequestParentService += OnRequestParentService;
 }