Example #1
0
        /// <summary>
        /// 打开新窗体
        /// </summary>
        /// <param name="exportKey"></param>
        public void NavigationForNewWindow(string exportKey,
                                           object param       = null,
                                           bool showInTaskBar = false,
                                           bool topMost       = false)
        {
            NormalNavigationArgs args = NormalNavigationArgs.CreateWindowNavigationArgs(exportKey, param, showInTaskBar, topMost);

            MsgAggregation.Instance.SendNavigationMsgForWindow(args);
        }
        /// <summary>
        /// 创建导航消息,但并不用导航事件发送
        /// </summary>
        /// <param name="exportKey"></param>
        /// <param name="parameters"></param>
        /// <returns></returns>
        private NormalNavigationArgs CreateNavigationArgs(string exportKey, object parameters, bool showInTaskBar, out UcViewBase targetView)
        {
            if (string.IsNullOrWhiteSpace(exportKey))
            {
                throw new NullReferenceException(string.Format("导航目标窗体Key【{0}】为空", exportKey));
            }
            NormalNavigationArgs result = NormalNavigationArgs.CreateWindowNavigationArgs(exportKey, parameters, showInTaskBar);

            targetView = NavigationViewCreater.CreateView(result.MsgToken, result.Parameter);
            return(result);
        }