public XactikaModeView(IEventAggregator aggregator, XactikaVMData model) { _aggregator = aggregator; _aggregator.Subscribe(this); StackLayout stack = new StackLayout(); ListChooserXF list = new ListChooserXF(); Button button = GetGamingButton("Submit Game Option", nameof(XactikaModeViewModel.ModeAsync)); if (ScreenUsed == EnumScreen.LargeTablet) { list.ItemHeight = 130; list.ItemWidth = 500; button.FontSize = 125; } else { list.ItemHeight = 80; list.ItemWidth = 300; button.FontSize = 100; } stack.Children.Add(list); stack.Children.Add(button); Content = stack; list.LoadLists(model.ModeChoose1); }
public MastermindOpeningView() { StackLayout stack = new StackLayout(); Label label = GetDefaultLabel(); label.FontSize = 50; label.Text = "Choose Level:"; label.Margin = new Thickness(0, 10, 0, 10); stack.Children.Add(label); _picker = new ListChooserXF(); _picker.Margin = new Thickness(5); if (ScreenUsed == EnumScreen.LargeTablet) { _picker.ItemHeight = 60; } else if (ScreenUsed == EnumScreen.SmallTablet) { _picker.ItemHeight = 40; } else { _picker.ItemHeight = 25; } stack.Children.Add(_picker); Button button = GetGamingButton("Level Information", nameof(MastermindOpeningViewModel.LevelInformationAsync)); stack.Children.Add(button); Content = stack; //this could be another view model (?) }
public CardsPlayerView(IEventAggregator aggregator) { aggregator.Subscribe(this); _list = new ListChooserXF(); _list.Orientation = StackOrientation.Horizontal; StackLayout stack = new StackLayout(); stack.Children.Add(_list); var thisBut = GetGamingButton("Submit", nameof(CardsPlayerViewModel.SubmitAsync)); if (ScreenUsed == EnumScreen.SmallPhone) { _list.ItemWidth = 155; _list.ItemHeight = 35; // well see thisBut.FontSize = 75; // can adjust as needed } else if (ScreenUsed == EnumScreen.SmallTablet) { _list.ItemWidth = 200; _list.ItemHeight = 50; // well see thisBut.FontSize = 150; // can adjust as needed } else { _list.ItemWidth = 400; _list.ItemHeight = 80; // well see thisBut.FontSize = 200; // can adjust as needed } stack.Children.Add(thisBut); Content = stack; _aggregator = aggregator; }
public ActionDirectionView(FluxxVMData model, ActionContainer actionContainer, KeeperContainer keeperContainer) { Text = "Direction"; StackLayout stack = new StackLayout(); SetUpMarginsOnParentControl(stack); //i think. ListChooserXF list = new ListChooserXF(); list.ItemHeight = 60; list.LoadLists(actionContainer.Direction1 !); stack.Children.Add(list); var button = GetGamingButton("Choose Direction", nameof(ActionDirectionViewModel.DirectionAsync)); button.HorizontalOptions = LayoutOptions.Start; button.VerticalOptions = LayoutOptions.Start; StackLayout otherStack = new StackLayout(); otherStack.Orientation = StackOrientation.Horizontal; stack.Children.Add(otherStack); otherStack.Children.Add(button); button = ActionHelpers.GetKeeperButton(); otherStack.Children.Add(button); Grid grid = new Grid(); grid.Children.Add(ThisDraw); grid.Children.Add(stack); Content = ActionHelpers.GetFinalStack(grid, model, actionContainer, keeperContainer); }
public ActionDoAgainView(FluxxVMData model, ActionContainer actionContainer, KeeperContainer keeperContainer) { Text = "Card List"; StackLayout stack = new StackLayout(); SetUpMarginsOnParentControl(stack); //i think. ListChooserXF list = new ListChooserXF(); list.LoadLists(actionContainer.CardList1 !); // i think ScrollView thisScroll = new ScrollView(); thisScroll.Orientation = ScrollOrientation.Vertical; thisScroll.Content = list; thisScroll.HeightRequest = 500; // well see. stack.Orientation = StackOrientation.Horizontal; stack.Children.Add(thisScroll); StackLayout finalStack = new StackLayout(); stack.Children.Add(finalStack); var button = GetGamingButton("Select Card", nameof(ActionDoAgainViewModel.SelectCardAsync)); // i think finalStack.Children.Add(button); button = GetGamingButton("View Card", nameof(ActionDoAgainViewModel.ViewCard)); finalStack.Children.Add(button); button = ActionHelpers.GetKeeperButton(); finalStack.Children.Add(button); Grid grid = new Grid(); grid.Children.Add(ThisDraw); grid.Children.Add(stack); Content = ActionHelpers.GetFinalStack(grid, model, actionContainer, keeperContainer); }
public AdvancedOptionsView(IEventAggregator aggregator) { aggregator.Subscribe(this); _aggregator = aggregator; _list1 = new ListChooserXF(); _list2 = new ListChooserXF(); _list1.Orientation = StackOrientation.Horizontal; _list2.Orientation = StackOrientation.Horizontal; _list1.Margin = new Thickness(5); _list2.Margin = new Thickness(5); var thisBut = GetGamingButton("Submit", nameof(AdvancedOptionsViewModel.SubmitAsync)); thisBut.FontSize = 200; thisBut.Margin = new Thickness(5); double buttonFontSize; if (ScreenUsed == EnumScreen.SmallPhone) { _list1.ItemWidth = 400; //well see when its on xamarin forms (lots of experimenting could be needed). _list2.ItemWidth = 400; _list1.ItemHeight = 50; _list2.ItemHeight = 50; buttonFontSize = 75; } else if (ScreenUsed == EnumScreen.SmallTablet) { _list1.ItemWidth = 600; //well see when its on xamarin forms (lots of experimenting could be needed). _list2.ItemWidth = 600; _list1.ItemHeight = 90; _list2.ItemHeight = 90; //has to experiment buttonFontSize = 150; } else { _list1.ItemWidth = 800; //well see when its on xamarin forms (lots of experimenting could be needed). _list2.ItemWidth = 800; _list1.ItemHeight = 120; _list2.ItemHeight = 120; buttonFontSize = 200; } Grid grid = new Grid(); AddLeftOverRow(grid, 50); AddLeftOverRow(grid, 50); AddAutoRows(grid, 1); AddControlToGrid(grid, _list1, 0, 0); AddControlToGrid(grid, _list2, 1, 0); AddControlToGrid(grid, thisBut, 2, 0); thisBut.FontSize = buttonFontSize; Content = grid; }
public SpiderSolitaireOpeningView() { _picker = new ListChooserXF(); if (ScreenUsed != EnumScreen.SmallPhone) { _picker.ItemWidth /= 2; } else { _picker.ItemWidth /= 4; _picker.ItemHeight = 20; } _picker.Margin = new Thickness(5); Content = _picker; }
public FirstOptionView(IEventAggregator aggregator) { aggregator.Subscribe(this); _list = new ListChooserXF(); StackLayout stack = new StackLayout(); stack.Children.Add(_list); double buttonFontSize; if (ScreenUsed == EnumScreen.SmallPhone) { _list.ItemWidth = 400; _list.ItemHeight = 100; buttonFontSize = 50; } else if (ScreenUsed == EnumScreen.SmallTablet) { _list.ItemWidth = 550; _list.ItemHeight = 150; buttonFontSize = 75; } else { _list.ItemWidth = 800; _list.ItemHeight = 175; buttonFontSize = 115; } //GamePackageViewModelBinder.ManuelElements.Clear(); var thisBut = GetGamingButton("Submit", nameof(FirstOptionViewModel.SubmitAsync)); thisBut.FontSize = buttonFontSize; //GamePackageViewModelBinder.ManuelElements.Add(thisBut); StackLayout otherStack = new StackLayout(); otherStack.Orientation = StackOrientation.Horizontal; otherStack.Children.Add(thisBut); thisBut = GetGamingButton("Description", nameof(FirstOptionViewModel.DescriptionAsync)); //GamePackageViewModelBinder.ManuelElements.Add(thisBut); thisBut.FontSize = buttonFontSize; otherStack.Children.Add(thisBut); stack.Children.Add(otherStack); Content = stack; _aggregator = aggregator; }
public MinesweeperOpeningView() { //this is the opening part. //only 2 parts needed are: //1. listview control //2. mines needed StackLayout stack = new StackLayout(); _picker = new ListChooserXF(); _picker.Margin = new Thickness(5); stack.Children.Add(_picker); SimpleLabelGridXF thisLab = new SimpleLabelGridXF(); thisLab.AddRow("Mines Needed", nameof(MinesweeperOpeningViewModel.HowManyMinesNeeded)); stack.Children.Add(thisLab.GetContent); Content = stack; }
public BasicPickerView(PaydayVMData model, IEventAggregator aggregator) { ListChooserXF list = new ListChooserXF(); list.ItemHeight = 50; //iffy. StackLayout stack = new StackLayout() { Orientation = StackOrientation.Horizontal }; stack.Children.Add(list); list.LoadLists(model.PopUpList); Button button = GetSmallerButton("Submit", nameof(BasicSubmitViewModel.SubmitAsync)); button.HorizontalOptions = LayoutOptions.Start; button.VerticalOptions = LayoutOptions.Start; //button.FontSize = 100; //make 100 instead of 200 now. stack.Children.Add(button); //can always adjust as needed anyways. Content = stack; _aggregator = aggregator; }
public BasicPlayerPicker(LifeBoardGameVMData model, IEventAggregator aggregator, LifeBoardGameGameContainer gameContainer) { //i think just the listview and submit //hopefully this one does not need end turn (?) //this is desktop anyways. ListChooserXF list = new ListChooserXF(); list.ItemHeight = 50; // try this. StackLayout stack = new StackLayout(); //{ // Orientation = StackOrientation.Horizontal //}; stack.Children.Add(list); list.LoadLists(model.PlayerPicker); _button = GetGamingButton("Submit", nameof(BasicSubmitViewModel.SubmitAsync)); _button.FontSize = 80; //could be iffy. stack.Children.Add(_button); //can always adjust as needed anyways. Content = stack; _aggregator = aggregator; _gameContainer = gameContainer; }
public ActionDiscardRulesView(FluxxVMData model, ActionContainer actionContainer, KeeperContainer keeperContainer) { StackLayout mainStack = new StackLayout(); var firstInfo = new SimpleLabelGridXF(); firstInfo.AddRow("Rules To Discard", nameof(ActionDiscardRulesViewModel.RulesToDiscard)); // i think mainStack.Children.Add(firstInfo.GetContent); var nextLabel = GetDefaultLabel(); nextLabel.Margin = new Thickness(3, 15, 0, 2); nextLabel.Text = "Choose Rules To Discard"; ScrollView scroll = new ScrollView(); // could have to scroll scroll.Orientation = ScrollOrientation.Vertical; scroll.HeightRequest = 400; ListChooserXF rule1 = new ListChooserXF(); rule1.LoadLists(actionContainer !.Rule1 !); rule1.ItemHeight = 40; rule1.ItemWidth = 600; scroll.Content = rule1; StackLayout otherStack = new StackLayout(); otherStack.Orientation = StackOrientation.Horizontal; mainStack.Children.Add(otherStack); otherStack.Children.Add(scroll); var button = GetGamingButton("View Card", nameof(ActionDiscardRulesViewModel.ViewRuleCard)); StackLayout finalStack = new StackLayout(); finalStack.Children.Add(button); button = GetGamingButton("Discard Selected Rule(s)", nameof(ActionDiscardRulesViewModel.DiscardRulesAsync)); finalStack.Children.Add(button); button = ActionHelpers.GetKeeperButton(); finalStack.Children.Add(button); otherStack.Children.Add(finalStack); Content = ActionHelpers.GetFinalStack(mainStack, model, actionContainer, keeperContainer); }