本文整理汇总了C#中PhoneApplicationFrame类的典型用法代码示例。如果您正苦于以下问题:C# PhoneApplicationFrame类的具体用法?C# PhoneApplicationFrame怎么用?C# PhoneApplicationFrame使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PhoneApplicationFrame类属于命名空间,在下文中一共展示了PhoneApplicationFrame类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Configure
public static void Configure(Container container, PhoneApplicationFrame root)
{
container.Register<IJiraService>(c => new JiraService{Store = c.Resolve<IDocumentStore>()});
container.Register<IScheduler>(c => new Scheduler());
container.Register(c => new SignInCommandHandler{Bus = c.Resolve<IBus>()});
container.Register(c => new SyncHandler{Bus = c.Resolve<IBus>(), Jira = c.Resolve<IJiraService>()});
container.Register(
c => new SyncProjectHandler
{
Bus = c.Resolve<IBus>(),
Store = c.Resolve<IDocumentStore>(),
Jira = c.Resolve<IJiraService>(),
Scheduler = c.Resolve<IScheduler>()
});
container.Register(c => new SyncNewlyDiscoveredProjectsByDefaultHandler {Bus = c.Resolve<IBus>()});
container.Register(c => new ProfileLoggedInEventHandler { Store = c.Resolve<IDocumentStore>() });
var bus = container.Resolve<IBus>();
bus.RegisterHandler<SignInCommandHandler, SignInCommand>();
bus.RegisterHandler<SyncHandler, ApplicationLoadedEvent>();
bus.RegisterHandler<ProfileLoggedInEventHandler, LoggedInEvent>();
bus.RegisterHandler<SyncHandler, LoggedInEvent>();
bus.RegisterHandler<SyncProjectHandler, ProjectsDiscoveredEvent>();
bus.RegisterHandler<SyncProjectHandler, SyncProjectCommand>();
bus.RegisterHandler<SyncNewlyDiscoveredProjectsByDefaultHandler, DiscoveredNewProjectEvent>();
}
开发者ID:aluetjen,项目名称:Wp7Jira,代码行数:29,代码来源:Module.cs
示例2: EnsureMainFrame
private bool EnsureMainFrame()
{
if (_mainFrame != null)
{
return true;
}
_mainFrame = Application.Current.RootVisual as PhoneApplicationFrame;
if (_mainFrame != null)
{
// Could be null if the app runs inside a design tool
_mainFrame.Navigating += (s, e) =>
{
if (Navigating != null)
{
Navigating(s, e);
}
};
return true;
}
return false;
}
开发者ID:npatta01,项目名称:Code777,代码行数:25,代码来源:NavigationService.cs
示例3: WindowsPhoneBootstrapperBase
/// <summary>
/// Initializes a new instance of the <see cref="WindowsPhoneBootstrapperBase" /> class.
/// </summary>
protected WindowsPhoneBootstrapperBase([NotNull] PhoneApplicationFrame rootFrame, PlatformInfo platform = null)
: base(platform ?? PlatformExtensions.GetPlatformInfo())
{
Should.NotBeNull(rootFrame, "rootFrame");
_rootFrame = rootFrame;
PhoneApplicationService.Current.Launching += OnLaunching;
}
开发者ID:MuffPotter,项目名称:MugenMvvmToolkit,代码行数:10,代码来源:WindowsPhoneBootstrapperBase.cs
示例4: OpenPickerPage
public void OpenPickerPage()
{
if (null == PickerPageUri)
{
throw new ArgumentException("PickerPageUri property must not be null.");
}
if (null == _frame)
{
_frame = Application.Current.RootVisual as PhoneApplicationFrame;
if (null != _frame)
{
_frameContentWhenOpened = _frame.Content;
// Save and clear host page transitions for the upcoming "popup" navigation
UIElement frameContentWhenOpenedAsUIElement = _frameContentWhenOpened as UIElement;
if (null != frameContentWhenOpenedAsUIElement)
{
_savedNavigationInTransition = TransitionService.GetNavigationInTransition(frameContentWhenOpenedAsUIElement);
TransitionService.SetNavigationInTransition(frameContentWhenOpenedAsUIElement, null);
_savedNavigationOutTransition = TransitionService.GetNavigationOutTransition(frameContentWhenOpenedAsUIElement);
TransitionService.SetNavigationOutTransition(frameContentWhenOpenedAsUIElement, null);
}
_frame.Navigated += OnFrameNavigated;
_frame.NavigationStopped += OnFrameNavigationStoppedOrFailed;
_frame.NavigationFailed += OnFrameNavigationStoppedOrFailed;
_frame.Navigate(PickerPageUri);
}
}
}
开发者ID:Reedman,项目名称:WinPhoneApp,代码行数:33,代码来源:ExpanderSelectorPageBase.cs
示例5: CreateViewsContainer
protected override IMvxPhoneViewsContainer CreateViewsContainer(PhoneApplicationFrame rootFrame)
{
var viewsContainer = new MultiAssemblyViewsContainer();
var viewFinder = new LazyViewFinder(() => typeof(ThirdView).Assembly);
viewsContainer.AddSecondary(viewFinder);
return viewsContainer;
}
开发者ID:PawelStroinski,项目名称:MultiAssemblyNav,代码行数:7,代码来源:Setup.cs
示例6: NavigationServiceFacade
public NavigationServiceFacade(PhoneApplicationFrame frame)
{
if (frame == null)
throw new ArgumentNullException("frame");
this.frame = frame;
}
开发者ID:AleksandarDev,项目名称:Eve,代码行数:7,代码来源:NavigationServiceFacade.cs
示例7: NotificationService
public NotificationService(
PhoneApplicationFrame RootFrame,
[Dispatcher] IScheduler Dispatcher
) {
RootFrame.Navigated += OnFrameNavigated;
NotificationScheduler = Dispatcher;
}
开发者ID:rollingthunder,项目名称:DiversityMobile,代码行数:7,代码来源:NotificationService.cs
示例8: CreatePhoneApplicationFrame
protected override PhoneApplicationFrame CreatePhoneApplicationFrame()
{
rootFrame = new PhoneApplicationFrame();
rootFrame.Navigated += rootFrame_Navigated;
rootFrame.Navigating += rootFrame_Navigating;
return rootFrame;
}
开发者ID:emaori,项目名称:WinPhone_CM_AppResume_Example,代码行数:7,代码来源:AppBootstrapper.cs
示例9: PhoneModule
public PhoneModule(PhoneApplicationFrame frame, IScheduler dispatcher)
{
if (frame == null) throw new ArgumentNullException("frame");
if (dispatcher == null) throw new ArgumentNullException("dispatcher");
_frame = frame;
_dispatcher = dispatcher;
}
开发者ID:Galad,项目名称:Hanno,代码行数:7,代码来源:PhoneModule.cs
示例10: Configure
public static void Configure(PhoneApplicationFrame rootFrame)
{
DocumentStore = new DocumentStore();
Container = new Container();
Container.Register<IDocumentStore>(c => new DocumentStore());
Container.Register<IBus>(c => new Bus(c));
Container.Register(c => new ActivityNewActivityHandler { Bus = c.Resolve<IBus>(), DocumentStore = DocumentStore });
Container.Register(c => new TestModeActivatedHandler { Bus = c.Resolve<IBus>() });
Container.Register(c => new ActivateTestModeHandler { Bus = c.Resolve<IBus>() });
Container.Register(c => new ClearCacheHandler { DocumentStore = c.Resolve<IDocumentStore>() });
Container.Register(c => new Contexts.Review.Domain.ClearCacheHandler { DocumentStore = c.Resolve<IDocumentStore>() });
var bus = Container.Resolve<IBus>();
bus.RegisterHandler<ActivityNewActivityHandler, NewActivityEvent>();
bus.RegisterHandler<TestModeActivatedHandler, TestModeActivatedEvent>();
bus.RegisterHandler<ActivateTestModeHandler, ActivateCommand>();
bus.RegisterHandler<Contexts.Settings.ClearCacheHandler, ClearCacheCommand>();
bus.RegisterHandler<Contexts.Review.Domain.ClearCacheHandler, ClearCacheCommand>();
Contexts.Import.Module.Configure(Container);
Contexts.Import.ModuleUi.Configure(Container, rootFrame);
Contexts.Review.Module.Confiure(Container);
}
开发者ID:aluetjen,项目名称:Wp7Jira,代码行数:27,代码来源:Config.cs
示例11: Initialize
/// <summary>
/// Initializes the application context for use through out the entire application life time.
/// </summary>
/// <param name="frame">
/// The <see cref="T:Microsoft.Phone.Controls.PhoneApplicationFrame" /> of the current application.
/// </param>
public static void Initialize(PhoneApplicationFrame frame)
{
// Initialize Ioc container.
var kernel = new StandardKernel();
kernel.Bind<Func<Type, NotifyableEntity>>().ToMethod(context => t => context.Kernel.Get(t) as NotifyableEntity);
kernel.Bind<PhoneApplicationFrame>().ToConstant(frame);
kernel.Bind<INavigationService>().To<NavigationService>().InSingletonScope();
kernel.Bind<IStorage>().To<IsolatedStorage>().InSingletonScope();
kernel.Bind<ISerializer<byte[]>>().To<BinarySerializer>().InSingletonScope();
kernel.Bind<IGoogleMapsClient>().To<GoogleMapsClient>().InSingletonScope();
kernel.Bind<IDataContext>().To<DataContext>().InSingletonScope();
kernel.Bind<IConfigurationContext>().To<ConfigurationContext>().InSingletonScope();
Initialize(kernel);
// Initialize event handlers and other properties.
GeoCoordinateWatcher = new GeoCoordinateWatcher(GeoPositionAccuracy.High) {MovementThreshold = 10D};
((DataContext) Data).AppVersion = new AssemblyName(Assembly.GetExecutingAssembly().FullName).Version;
Data.PreventScreenLock.ValueChanged += (old, @new) => { PhoneApplicationService.Current.UserIdleDetectionMode = @new ? IdleDetectionMode.Disabled : IdleDetectionMode.Enabled; };
Data.UseLocationService.ValueChanged += (old, @new) =>
{
if (@new) GeoCoordinateWatcher.Start();
else GeoCoordinateWatcher.Stop();
};
IsNetworkAvailable = NetworkInterface.GetIsNetworkAvailable();
NetworkChange.NetworkAddressChanged += (s, e) => IsNetworkAvailable = NetworkInterface.GetIsNetworkAvailable();
}
开发者ID:soleon,项目名称:Travlexer,代码行数:36,代码来源:ApplicationContext.cs
示例12: Initialize
public void Initialize(PhoneApplicationFrame frame)
{
_mangoIndicator = new ProgressIndicator();
frame.Navigated += OnRootFrameNavigated;
(frame.Content as PhoneApplicationPage).SetValue(SystemTray.ProgressIndicatorProperty, _mangoIndicator);
}
开发者ID:arvinbb,项目名称:Readr7,代码行数:8,代码来源:GlobalLoading.cs
示例13: InitializePhoneApplication
private void InitializePhoneApplication()
{
if (phoneApplicationInitialized) return;
RootFrame = new PhoneApplicationFrame();
RootFrame.Navigated += CompleteInitializePhoneApplication;
RootFrame.NavigationFailed += RootFrame_NavigationFailed;
phoneApplicationInitialized = true;
}
开发者ID:CrisRowlands,项目名称:XMLTreeView,代码行数:8,代码来源:App.xaml.cs
示例14: NavigationServiceAdapter
public NavigationServiceAdapter(PhoneApplicationFrame frame)
{
this.frame = frame;
this.frame.Navigated += frame_Navigated;
this.frame.Navigating += frame_Navigating;
this.frame.Obscured += frame_Obscured;
this.RecoveredFromTombstoning = false;
}
开发者ID:radityagumay,项目名称:EFinance,代码行数:8,代码来源:NavigationServiceAdapter.cs
示例15: Configure
public static void Configure(Container container, PhoneApplicationFrame root)
{
container.Register(c => new SignInActivator { RootFrame = root });
var bus = container.Resolve<IBus>();
bus.RegisterHandler<SignInActivator, UnauthorizedNotLoggedInEvent>();
}
开发者ID:aluetjen,项目名称:Wp7Jira,代码行数:8,代码来源:ModuleUi.cs
示例16: Initialize
public void Initialize(PhoneApplicationFrame frame)
{
// If using AgFx:
//DataManager.Current.PropertyChanged += OnDataManagerPropertyChanged;
_mangoIndicator = new ProgressIndicator();
frame.Navigated += OnRootFrameNavigated;
}
开发者ID:prashantvc,项目名称:WinBox-Win8,代码行数:8,代码来源:GlobalLoading.cs
示例17: ProgressService
public ProgressService(PhoneApplicationFrame rootFrame)
{
_indicator = new ProgressIndicator {Text = DefaultIndicatorText};
rootFrame.Navigated += RootFrameOnNavigated;
UpdateProgressBarAttachment(rootFrame.Content);
}
开发者ID:Bunk,项目名称:trellow,代码行数:8,代码来源:ProgressService.cs
示例18: IsMainFrame
private bool IsMainFrame()
{
if (mainFrame != null)
{
return true;
}
mainFrame = Application.Current.RootVisual as PhoneApplicationFrame;
return mainFrame != null;
}
开发者ID:Frannsoft,项目名称:dnd35encyclopedia,代码行数:9,代码来源:NavigationService.cs
示例19: scan
public void scan(string options)
{
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
this.currentRootVisual = Application.Current.RootVisual as PhoneApplicationFrame;
this.currentRootVisual.Navigated += this.OnFrameNavigated;
this.currentRootVisual.Navigate(new Uri("/Plugins/com.phonegap.plugins.barcodescanner/Scan.xaml", UriKind.Relative));
});
}
开发者ID:nadyaA,项目名称:BarcodeScanner,代码行数:9,代码来源:BarcodeScanner.cs
示例20: CreateViewsContainer
protected override IMvxPhoneViewsContainer CreateViewsContainer(PhoneApplicationFrame rootFrame)
{
var viewsContainer = new MultiAssemblyViewsContainer();
var sometimesViewFinder = new LazyViewFinder(() => typeof(ProductEditing).Assembly);
viewsContainer.AddSecondary(sometimesViewFinder);
var rarelyViewFinder = new LazyViewFinder(() => typeof(ExportAndImport).Assembly);
viewsContainer.AddSecondary(rarelyViewFinder);
return viewsContainer;
}
开发者ID:PawelStroinski,项目名称:Diettr-GPL,代码行数:9,代码来源:Setup.cs
注:本文中的PhoneApplicationFrame类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论