Ejemplo n.º 1
0
        public ActionDirectionView(FluxxVMData model, ActionContainer actionContainer, KeeperContainer keeperContainer)
        {
            Text = "Direction";
            StackPanel stack = new StackPanel();
            SKRect     rect  = ThisFrame.GetControlArea();

            SetUpMarginsOnParentControl(stack, rect); //i think.
            ListChooserWPF list = new ListChooserWPF();

            list.ItemHeight = 60;
            list.LoadLists(actionContainer.Direction1 !);
            stack.Children.Add(list);
            var button = GetGamingButton("Choose Direction", nameof(ActionDirectionViewModel.DirectionAsync));

            button.HorizontalAlignment = HorizontalAlignment.Left;
            button.VerticalAlignment   = VerticalAlignment.Top;
            StackPanel otherStack = new StackPanel();

            otherStack.Orientation = Orientation.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";
            StackPanel stack    = new StackPanel();
            SKRect     thisRect = ThisFrame.GetControlArea();

            SetUpMarginsOnParentControl(stack, thisRect); //i think.
            ListChooserWPF list = new ListChooserWPF();

            list.LoadLists(actionContainer.CardList1 !); // i think
            ScrollViewer thisScroll = new ScrollViewer();

            thisScroll.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
            thisScroll.Content = list;
            thisScroll.Height  = 500; // well see.
            stack.Orientation  = Orientation.Horizontal;
            stack.Children.Add(thisScroll);
            StackPanel finalStack = new StackPanel();

            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);
        }
Ejemplo n.º 3
0
        public AdvancedOptionsView(IEventAggregator aggregator)
        {
            aggregator.Subscribe(this);
            StackPanel stack = new StackPanel();

            _list1             = new ListChooserWPF();
            _list2             = new ListChooserWPF();
            _list1.Orientation = Orientation.Horizontal;
            _list2.Orientation = Orientation.Horizontal;
            _list1.Margin      = new Thickness(0);
            _list1.ItemWidth   = 800; //well see when its on xamarin forms (lots of experimenting could be needed).
            _list2.ItemWidth   = 800;
            _list1.ItemHeight  = 150;
            _list2.ItemHeight  = 150;
            _list2.Margin      = new Thickness(10, 50, 0, 20);
            stack.Children.Add(_list1);
            stack.Children.Add(_list2);
            var thisBut = GetGamingButton("Submit", nameof(AdvancedOptionsViewModel.SubmitAsync));

            thisBut.FontSize = 200;
            thisBut.Margin   = new Thickness(5, 50, 5, 5);
            stack.Children.Add(thisBut);

            Content     = stack;
            _aggregator = aggregator;
        }
Ejemplo n.º 4
0
 public SpiderSolitaireOpeningView()
 {
     _picker        = new ListChooserWPF();
     _picker.Margin = new Thickness(5);
     Content        = _picker;
     //this could be another view model (?)
 }
        public XactikaModeView(IEventAggregator aggregator, XactikaVMData model)
        {
            _aggregator = aggregator;
            _aggregator.Subscribe(this);
            StackPanel     stack = new StackPanel();
            ListChooserWPF list  = new ListChooserWPF();

            list.ItemHeight = 200;
            list.ItemWidth  = 600;
            Button button = GetGamingButton("Submit Game Option", nameof(XactikaModeViewModel.ModeAsync));

            button.FontSize = 150;
            stack.Children.Add(list);
            stack.Children.Add(button);
            Content = stack;
            list.LoadLists(model.ModeChoose1);
        }
Ejemplo n.º 6
0
        public CardsPlayerView(IEventAggregator aggregator)
        {
            aggregator.Subscribe(this);
            _list             = new ListChooserWPF();
            _list.ItemWidth   = 400;
            _list.ItemHeight  = 100;
            _list.Orientation = Orientation.Horizontal;
            StackPanel stack = new StackPanel();

            stack.Children.Add(_list);
            var thisBut = GetGamingButton("Submit", nameof(CardsPlayerViewModel.SubmitAsync));

            thisBut.FontSize = 200;
            stack.Children.Add(thisBut);
            Content     = stack;
            _aggregator = aggregator;
        }
Ejemplo n.º 7
0
        public BasicPickerView(PaydayVMData model)
        {
            ListChooserWPF list  = new ListChooserWPF();
            StackPanel     stack = new StackPanel()
            {
                Orientation = Orientation.Horizontal
            };

            stack.Children.Add(list);
            list.LoadLists(model.PopUpList);
            Button button = GetGamingButton("Submit", nameof(BasicSubmitViewModel.SubmitAsync));

            button.HorizontalAlignment = HorizontalAlignment.Left;
            button.VerticalAlignment   = VerticalAlignment.Top;
            button.FontSize            = 100; //make 100 instead of 200 now.
            stack.Children.Add(button);       //can always adjust as needed anyways.
            Content = stack;
        }
        public MinesweeperOpeningView()
        {
            //this is the opening part.
            //only 2 parts needed are:
            //1.  listview control
            //2.  mines needed

            StackPanel stack = new StackPanel();

            _picker        = new ListChooserWPF();
            _picker.Margin = new Thickness(5);
            stack.Children.Add(_picker);
            SimpleLabelGrid thisLab = new SimpleLabelGrid();

            thisLab.AddRow("Mines Needed", nameof(MinesweeperOpeningViewModel.HowManyMinesNeeded));
            stack.Children.Add(thisLab.GetContent);
            Content = stack;
        }
Ejemplo n.º 9
0
        public MastermindOpeningView()
        {
            StackPanel stack = new StackPanel();
            TextBlock  label = GetDefaultLabel();

            label.FontSize = 50;
            label.Text     = "Choose Level:";
            label.Margin   = new Thickness(0, 10, 0, 10);
            stack.Children.Add(label);
            _picker        = new ListChooserWPF();
            _picker.Margin = new Thickness(5);
            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 BasicPlayerPicker(LifeBoardGameVMData model)
        {
            //i think just the listview and submit
            //hopefully this one does not need end turn (?)
            //this is desktop anyways.
            ListChooserWPF list  = new ListChooserWPF();
            StackPanel     stack = new StackPanel()
            {
                Orientation = Orientation.Horizontal
            };

            stack.Children.Add(list);
            list.LoadLists(model.PlayerPicker);
            Button button = GetGamingButton("Submit", nameof(BasicSubmitViewModel.SubmitAsync));

            button.FontSize = 100;      //make 100 instead of 200 now.
            stack.Children.Add(button); //can always adjust as needed anyways.
            Content = stack;
        }
        public ActionDiscardRulesView(FluxxVMData model, ActionContainer actionContainer, KeeperContainer keeperContainer)
        {
            StackPanel mainStack = new StackPanel();

            var firstInfo = new SimpleLabelGrid();

            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";
            ScrollViewer scroll = new ScrollViewer(); // could have to scroll

            scroll.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
            scroll.Height = 400;
            ListChooserWPF rule1 = new ListChooserWPF();

            rule1.LoadLists(actionContainer !.Rule1 !);
            rule1.ItemHeight = 40;
            rule1.ItemWidth  = 600;
            scroll.Content   = rule1;
            StackPanel otherStack = new StackPanel();

            otherStack.Orientation = Orientation.Horizontal;
            mainStack.Children.Add(otherStack);
            otherStack.Children.Add(scroll);
            var        button     = GetGamingButton("View Card", nameof(ActionDiscardRulesViewModel.ViewRuleCard));
            StackPanel finalStack = new StackPanel();

            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);
        }
        public FirstOptionView(IEventAggregator aggregator)
        {
            aggregator.Subscribe(this);
            _list            = new ListChooserWPF();
            _list.ItemWidth  = 700;
            _list.ItemHeight = 200;
            StackPanel stack = new StackPanel();

            stack.Children.Add(_list);
            var thisBut = GetGamingButton("Submit", nameof(FirstOptionViewModel.SubmitAsync));

            thisBut.FontSize = 150;
            StackPanel otherStack = new StackPanel();

            otherStack.Orientation = Orientation.Horizontal;
            otherStack.Children.Add(thisBut);
            thisBut          = GetGamingButton("Description", nameof(FirstOptionViewModel.DescriptionAsync));
            thisBut.FontSize = 150;
            otherStack.Children.Add(thisBut);
            stack.Children.Add(otherStack);
            Content     = stack;
            _aggregator = aggregator;
        }