public RepeatableFlexPageViewModel(INavigationService navigationService, IPageDialogService pageDlg) { FlexDirection.Value = Xamarin.Forms.FlexDirection.Row; FlexAlignItems.Value = Xamarin.Forms.FlexAlignItems.Start; FlexJustify.Value = Xamarin.Forms.FlexJustify.Start; FlexWrap.Value = Xamarin.Forms.FlexWrap.NoWrap; ScrollDirection.Value = ScrollOrientation.Horizontal; SetColors(DirectionColor, 0); SetColors(AColor, 3); SetColors(JColor, 3); SetColors(WrapColor, 0); DirectionCommand.Subscribe(x => { var idx = int.Parse(x); FlexDirection.Value = (Xamarin.Forms.FlexDirection)idx; SetScrollDirection(); SetColors(DirectionColor, idx); }); AlignItemsCommand.Subscribe(x => { var idx = int.Parse(x); FlexAlignItems.Value = (Xamarin.Forms.FlexAlignItems)idx; SetColors(AColor, idx); }); JustifyContentCommand.Subscribe(x => { var idx = int.Parse(x); FlexJustify.Value = (Xamarin.Forms.FlexJustify)idx; SetColors(JColor, idx); }); WrapCommand.Subscribe(x => { var idx = int.Parse(x); FlexWrap.Value = (Xamarin.Forms.FlexWrap)idx; SetScrollDirection(); SetColors(WrapColor, idx); }); BoxList = new ObservableCollection <Hoge>(Shuffle()); AddCommand.Subscribe(_ => { BoxList.Add(GetNextItem()); }); DeleteCommand.Subscribe(_ => { BoxList.Remove(BoxList.Last()); }); ReplaceCommand.Subscribe(__ => { BoxList[0] = GetNextItem(); }); ClearCommand.Subscribe(__ => { BoxList.Clear(); }); }
public DirectionDialog(string key, int left, int top, int bottom, int right, int renderOrder, DirectionCommand command, Game game) : base(key, left, top, bottom, right, renderOrder) { Game = game; Command = command; }
public DirectionDialog(DirectionCommand command, Game game) : this("DirectionDialog", 20, 10, 24, 40, -1, command, game) { }