/// <summary> /// Creates the application host. /// </summary> /// <returns>An application <see cref="Host">host</see>.</returns> protected override Host CreateHost() { var host = new FrameHost<_view>(); host.WithConfiguration<NavigationSettings>() .DependsOn<ShowShellView<FrameShellView<_view>>>() .Configure( ns => ns.CacheSize = 1 ); return host; }
public void InitializeHosts() { //InitializeHosts ColorFrameHost = new FrameHost <TColorFrame>(); DepthFrameHost = new FrameHost <TDepthFrame>(); SkeletonFrameHost = new FrameHost <TSkeletonFrame>(); ColorFrameReady += ColorFrameHost.SendFrame; DepthFrameReady += DepthFrameHost.SendFrame; SkeletonFrameReady += SkeletonFrameHost.SendFrame; }
/// <summary> /// Creates the application host. /// </summary> /// <returns>An application <see cref="Host">host</see>.</returns> protected override Host CreateHost() { var host = new FrameHost<MainPage>();$if$ ($enableSettings$ == true) // adding an entry for the Settings contract (aka charm) host.WithConfiguration<ContractSettings>() .Configure( cs => cs.AddSetting( "Defaults", "DefaultSettings" ) );$endif$$if$ ($enableSearch$ == true) // enabling the Search contract (aka charm) host.WithConfiguration<ContractSettings>() .Configure( cs => cs.SearchOptions.PlaceholderText = "Enter your search" ) .Configure( cs => cs.SearchOptions.ShowOnKeyboardInput = true );$endif$ return host; }
private static void Main() { if ((System.Windows.Media.RenderCapability.Tier >> 16) != 2) { MessageBox.Show("警告:此系统不支持硬件渲染"); } App app = new App(); FrameHost frameHost = new FrameHost(); TocTinyClient.Theme.ThemeSwitcher.SwitchTheme(TocTinyClient.Theme.ThemeEnum.AERO, frameHost); frameHost.Loaded += (sender, e) => frameHost.Frame.Navigate(new Login()); app.Exit += (s, e) => { Environment.Exit(0); }; app.DispatcherUnhandledException += (sender, e) => { TocErrorReport tocErrorReport = new TocErrorReport(); tocErrorReport.dzzz.Text = e.Exception.ToString(); frameHost.Frame.Navigate(tocErrorReport); e.Handled = true; return; }; app.Run(frameHost); }
public void InitializeHosts() { //InitializeHosts ColorFrameHost = new FrameHost<TColorFrame>(); DepthFrameHost = new FrameHost<TDepthFrame>(); SkeletonFrameHost = new FrameHost<TSkeletonFrame>(); ColorFrameReady += ColorFrameHost.SendFrame; DepthFrameReady += DepthFrameHost.SendFrame; SkeletonFrameReady += SkeletonFrameHost.SendFrame; }