예제 #1
0
파일: FormsManager.cs 프로젝트: Nieko/Nieko
        public bool Show(EndPoint formEndPoint, bool throwOnFormMissing)
        {
            if (!FormsByEndPoint.ContainsKey(formEndPoint))
            {
                if (throwOnFormMissing)
                {
                    throw new ArgumentException(formEndPoint.GetFullPath() + " does not have an associated form");
                }

                return true;
            }

            return RegionNavigator.NavigateTo(formEndPoint);
        }
예제 #2
0
        private string GetLog(EndPoint endPoint)
        {
            if (endPoint == null || endPoint == EndPoint.Root)
            {
                return "desktop";
            }

            return endPoint.GetFullPath(); 
        }
예제 #3
0
        public bool NavigateTo(EndPoint destination)
        {
            if (!destination.CreateMenuEntry)
            {
                throw new ArgumentException(destination.GetFullPath() + " does not have a menu entry");
            }

            var menu = FindMenu(destination.GetMenuPath());

            if (menu == null)
            {
                return false;
            }

            return menu.Navigate();
        }