private void ChangeFrameUrl(string subModule) { try { App.WriteLog("ChangeFrame", string.Format("Changing frame...\t{0}", subModule)); var moduleInfo = mListModuleInfos.FirstOrDefault(m => m.Module.ToString() == subModule); if (moduleInfo == null) { App.WriteLog("ChangeFrame", string.Format("ModuleInfo not exist.\t{0}", subModule)); return; } string url = moduleInfo.Url; if (PageHead != null) { PageHead.AppName = moduleInfo.AppName; } FrameTemp.Navigate(new Uri(url, UriKind.RelativeOrAbsolute)); App.WriteLog("ChangeFrame", string.Format("Frame url setted.\t{0}", url)); } catch (Exception ex) { App.ShowExceptionMessage(ex.Message); } }
private void InitTempFrame() { try { string strArgs = CurrentApp.StartArgs; if (string.IsNullOrEmpty(strArgs)) { //CurrentApp.ShowExceptionMessage(string.Format("StartArgs invalid")); //return; strArgs = "9801"; } var moduleInfo = mListModuleInfos.FirstOrDefault(m => m.Module.ToString() == strArgs); if (moduleInfo == null) { CurrentApp.WriteLog("PageLoad", string.Format("ModuleInfo not exist.\t{0}", strArgs)); return; } string url = moduleInfo.Url; FrameTemp.Navigate(new Uri(url, UriKind.RelativeOrAbsolute)); CurrentApp.WriteLog("PageLoad", string.Format("Frame url setted.\t{0}", url)); } catch (Exception ex) { CurrentApp.ShowExceptionMessage(ex.Message); } }
private void InitTempFrame() { try { if (PageHead != null) { PageHead.IsSettingEnable = false; } var loadingReturn = App.LoadingMessageReturn; if (loadingReturn == null) { return; } string subModule = loadingReturn.Data; var moduleInfo = mListModuleInfos.FirstOrDefault(m => m.Module.ToString() == subModule); if (moduleInfo == null) { App.WriteLog("PageLoad", string.Format("ModuleInfo not exist.\t{0}", subModule)); return; } string url = moduleInfo.Url; if (PageHead != null) { PageHead.AppName = moduleInfo.AppName; } FrameTemp.Navigate(new Uri(url, UriKind.RelativeOrAbsolute)); App.WriteLog("PageLoad", string.Format("Frame url setted.\t{0}", url)); } catch (Exception ex) { App.ShowExceptionMessage(ex.Message); } }
public TempMainView() { InitializeComponent(); mListModuleInfos = new List <ModuleInfo>(); FrameTemp.LoadCompleted += FrameTemp_LoadCompleted; FrameTemp.Navigating += (s, e) => FrameTemp.SuppressScriptErrors(true); }