/// <summary>Raises the <see cref="E:System.Windows.Application.Startup"/> event. </summary> /// <param name="e">A <see cref="T:System.Windows.StartupEventArgs"/> that contains the event data.</param> protected override void OnStartup(StartupEventArgs e) { // TODO: Initialize application and register more message types if needed. Messenger.Default.Register(DefaultActions.GetTextMessageAction()); base.OnStartup(e); }
public void ShouldParseFromBoardMove(string @from, string to, DefaultActions moveType, string expectedSan) { var game = ChessFactory.NewChessGame(); var move = BoardMove.Create(from.ToBoardLocation(), to.ToBoardLocation(), (int)moveType); Assert.That(StandardAlgebraicNotation.ParseFromGameMove(game.BoardState, move).ToNotation(), Is.EqualTo(expectedSan)); }
protected override void OnStartup(StartupEventArgs e) { Messenger.Default.Register(DefaultActions.GetTextMessageAction()); Messenger.Default.Register <ShowProjectDetails>(ShowProjectDetails); Telemetry.TrackEvent("ApplicationStart"); AppDomain.CurrentDomain.UnhandledException += OnUnhandledException; }
public static void Main() { var resolution = new Resolution(Resolution.PixelSize._FHD, Resolution.OrientationTypes.Landscape); Game.CustomSettings() .SetResolution(resolution) .SetActions(DefaultActions.GetActionConfigurations(resolution)) .SetStageFactory(StageFactory) .Run(Id.Touch); }
public static ICoreStageFactory DefaultSettings() { var resolution = new Resolution( Resolution.PixelSize._FHD, Resolution.OrientationTypes.Landscape ); return(CustomSettings() .SetResolution(resolution) .SetActions(DefaultActions.GetActionConfigurations(resolution))); }
/// <summary>Called when a new instance of the application has been created. </summary> /// <param name="frame">The frame. </param><param name="args">The launch arguments.</param> public override Task OnInitializedAsync(MtFrame frame, ApplicationExecutionState args) { // TODO: Add your initialization logic here. var mapper = RegexViewModelToViewMapper.CreateDefaultMapper(GetType().GetTypeInfo().Assembly); Messenger.Default.Register(DefaultActions.GetNavigateMessageAction(mapper, frame)); Messenger.Default.Register(DefaultActions.GetGoBackMessageAction(frame)); Messenger.Default.Register(DefaultActions.GetTextMessageAction()); return(base.OnInitializedAsync(frame, args)); }
/// <summary>Raises the <see cref="E:System.Windows.Application.Startup"/> event. </summary> /// <param name="e">A <see cref="T:System.Windows.StartupEventArgs"/> that contains the event data.</param> protected override void OnStartup(StartupEventArgs e) { ServiceLocator.Default.RegisterSingleton <IDispatcher, UiDispatcher>(new UiDispatcher(Dispatcher)); Messenger.Default.Register(DefaultActions.GetTextMessageAction()); Messenger.Default.Register <OpenJsonDocumentMessage>(OpenJsonDocument); Messenger.Default.Register <SaveJsonDocumentMessage>(SaveJsonDocument); Telemetry.TrackEvent("ApplicationStart"); AppDomain.CurrentDomain.UnhandledException += OnUnhandledException; }
public override Task OnInitializedAsync(MtFrame frame, ApplicationExecutionState args) { // TODO: Called when the app is started (not resumed) //frame.PageAnimation = new TurnstilePageAnimation { UseBitmapCacheMode = true }; //frame.PageAnimation = new PushPageAnimation(); var mapper = RegexViewModelToViewMapper.CreateDefaultMapper(typeof(App).GetTypeInfo().Assembly); Messenger.Default.Register(DefaultActions.GetNavigateMessageAction(mapper, frame)); return(null); }
// Start is called before the first frame update void Awake() { if (instance == null) { instance = this; playerInput = new DefaultActions(); LoadRebinds(); DontDestroyOnLoad(this.gameObject); } else { DestroyImmediate(this.gameObject); } }
private void LoadData() { Messenger.Default.Register(DefaultActions.GetTextMessageAction()); Persons.LoadFromFile("Persons"); }
protected override void OnNavigatedTo(MtNavigationEventArgs args) { // TODO: This should be registered in the App's OnLaunched method after creating a new Frame object. Messenger.Default.Register(this, DefaultActions.GetTextMessageAction()); }
public ItemValue(DefaultActions action, string text) { Action = action; Text = text; }