void IStartUp.RegisterCustomClasses(GamePackageDIContainer container, bool multiplayer, BasicData data) { if (multiplayer == false) { throw new BasicBlankException("Only multiplayer are supported. For single player, try different startup class that does not rely on signal r"); } container.RegisterType <NetworkStartUp>(); if (_global == null) { _global = GlobalDataLoaderClass.Open(data.IsXamarinForms); } container.RegisterSingleton(_global); container.RegisterType <MultiplayerProductionSave>(); }
void IStartUp.StartVariables(BasicData data) //i think this is it for this one. { //this is where we get nick name, etc. //i think that here is where i could host a server as well (if necessary). if (_global == null) { _global = GlobalDataLoaderClass.Open(data.IsXamarinForms); } data.NickName = GlobalDataLoaderClass.CurrentNickName(_global); if (data.IsXamarinForms == false) { ScreenUsed = EnumScreen.Desktop; //hopefully the xamarin forms part will work (?) } }
public BasicLoaderPage() { if (Multiplayer.HasValue == false) { throw new BasicBlankException("Needs to set whether its multiplayer"); } Background = Brushes.Navy; if (Multiplayer !.Value) { if (GlobalDataLoaderClass.HasSettings(false) == false) { TextBlock label = GetDefaultLabel(); label.Text = "You must use the settings app in order to populate the settings so you have at least a nick name"; Content = label; Show(); //looks like i have to do the show method. otherwise, nothing. return; } _loadServer = new LoaderStartServerClass(false); //needs same thing for xamarin forms but will be true. _loadServer.PossibleStartServer(); //problem is here. } StartUp(); OS = EnumOS.WindowsDT; //this part is okay. var tempSize = DefaultWindowSize(); WindowHelper.CurrentWindow = this; WindowHelper.SetDefaultLocation(); WindowHelper.SetSize(tempSize.Width, tempSize.Height); _list.Orientation = Orientation.Horizontal; _list.ItemWidth += 50; if (TotalColumns == 0) { TotalColumns = 5; } _list.TotalColumns = TotalColumns; //this should be fine so i can test something else. Content = _list; Show(); }