public EditLearningItem_ViewModel_WPF(
            IDialogServiceExtended DialogService_, 
            IPlayer Player_,
            INavigationService NavigationService_,
            AppSetting AppSetting_,
            EFDbConnect EFDbConnect_)
        {
            
            if (!IsInDesignModeNet())
            {
                DialogService = DialogService_;
                Player = Player_;
                NavigationService = NavigationService_;
                AppSetting = AppSetting_;
                EFDbConnect = EFDbConnect_;

                Languages = new ObservableCollection<Language>(EFDbConnect.Table<Language>().ToList());

                // Commands
                CommandDispatcher = new MvxCommand<string>(CmdDispatcher);

            }

            PlayerVisibility = Visibility.Visible;
            DownloadVideoButton = new ButtonModel();

            if (IsInDesignModeNet())
            {
                LearningItem = new LearningItem();
                LearningItem.Name = "Mazzy in Gondoland";
                
                LearningItem.VideoFileName = "C:\\Users\\Public\\Videos\\Sample Videos\\Mazzy.mkv";

                LearningItem.SubtitleCollection = new SynchronizedObservableCollection<Subtitles>();

                LearningItem.SubtitleCollection.Add(new Subtitles           {
                    Name = "English-Russian"
                });

                LearningItem.SubtitleCollection.Add(new Subtitles
                {
                    Name = "English-Ukraine"
                });

                //CurrentSubtitles = LearningItem.SubtitleCollection[0];
                
            }

           
        }
Esempio n. 2
0
		/// <summary>
		/// Sets the data model for the "menu button" -- the label
		/// that the user clicks to open or close the menu.
		/// </summary>
		public void setModel(ButtonModel @newModel)
		{
		}
Esempio n. 3
0
    void SetUpButtons()
    {
        // YesButton
        var yesButtonModel = new ButtonModel();

        m_YesButton.SetModel(yesButtonModel);
        m_YesButton.SetDefaultText(GameTextUtil.GetText("common_button4"));
        yesButtonModel.OnClicked += () =>
        {
            OnClickYesButton();
        };
        yesButtonModel.Appear();
        yesButtonModel.SkipAppearing();

        // NoButton
        var noButtonModel = new ButtonModel();

        m_NoButton.SetModel(noButtonModel);
        m_NoButton.SetDefaultText(GameTextUtil.GetText("common_button5"));
        noButtonModel.OnClicked += () =>
        {
            OnClickNoButton();
        };
        noButtonModel.Appear();
        noButtonModel.SkipAppearing();

        // NextButton
        var nextButtonModel = new ButtonModel();

        m_NextButton.SetModel(nextButtonModel);
        m_NextButton.SetDefaultText("次へ");
        nextButtonModel.OnClicked += () =>
        {
            OnClickNextButton();
        };
        nextButtonModel.Appear();
        nextButtonModel.SkipAppearing();


        // ReturnButton
        var returnButtonModel = new ButtonModel();

        m_ReturnButton.SetModel(returnButtonModel);
        returnButtonModel.OnClicked += () =>
        {
            OnSelectReturn();
        };
        returnButtonModel.Appear();
        returnButtonModel.SkipAppearing();

        // CloseButton
        var closeButtonModel = new ButtonModel();

        m_CloseButton.SetModel(closeButtonModel);
        m_CloseButton.SetDefaultText(GameTextUtil.GetText("common_button1"));
        closeButtonModel.OnClicked += () =>
        {
            OnClose();
        };
        closeButtonModel.Appear();
        closeButtonModel.SkipAppearing();
    }
 public ActionResult UpdateButton(ButtonModel button)
 {
     RedisService.Instance.SetValue <ButtonModel>(Constants.REDIS_KEY_BUTTON, button);
     return(GetAllControlsView(true));
 }
Esempio n. 5
0
        public static void initialize(ContentManager Content, string _imagePath, string _xmlPath, string _fontPath)
        {
            spriteFont = Content.Load <SpriteFont>(_fontPath);

            buttonModel = new ButtonModel(_imagePath, _xmlPath, spriteFont);
        }
		/// <summary>
		/// Returns whether a <code>ButtonModel</code> is selected.
		/// </summary>
		public bool isSelected(ButtonModel @m)
		{
			return default(bool);
		}
 /// <summary>
 /// Sets the selected value for the <code>ButtonModel</code>.
 /// </summary>
 public void setSelected(ButtonModel @m, bool @b)
 {
 }
Esempio n. 8
0
        public JsonResult List(ButtonModel model, PageInfo pageInfo)
        {
            var result = ButtonService.GetListByFilter(model, pageInfo);

            return(Json(result));
        }
Esempio n. 9
0
    private void SetUpSwitchButtons()
    {
        var indexActionMap = new List <System.Action>
        {
            OnSelectSwitch0,
            OnSelectSwitch1,
            OnSelectSwitch2,
        };

        var tabName = new List <string>
        {
            GameTextUtil.GetText("map_tab1"),
            GameTextUtil.GetText("map_tab2"),
            GameTextUtil.GetText("map_tab3"),
        };

        var areaCategoryLabel = new List <MasterDataDefineLabel.AreaCategory>
        {
            MasterDataDefineLabel.AreaCategory.RN_STORY,
            MasterDataDefineLabel.AreaCategory.RN_SCHOOL,
            MasterDataDefineLabel.AreaCategory.RN_EVENT,
        };

        m_buttonAnimationFinish = false;

        int size = m_switchButtonRoots.Length;

        for (int i = 0; i < size; i++)
        {
            int  index    = i;
            bool bufEvent = MainMenuUtil.checkHelpBufEvent(areaCategoryLabel[index]);

            var model = new AreaSelectSwitchButtonModel(index);
            model.OnClicked += () =>
            {
                if (model.isSelected)
                {
                    return;
                }

                indexActionMap[index]();
            };
            model.OnShowedNext += () =>
            {
                if (index == size - 1)
                {
                    m_buttonAnimationFinish = true;
                    return;
                }

                m_switchButtons[index + 1].Appear();
            };
            model.labelText = tabName[index];

            AreaSelectSwitchButton
            .Attach(m_switchButtonRoots[index])
            .SetModel(model, bufEvent);

            m_switchButtons.Add(model);
        }

        {
            var model = new ButtonModel();
            model.OnClicked += () =>
            {
                OnSelectMapButton();
            };

            RegionSwitchButton
            .Attach(RegionButtonRoot)
            .SetModel(model);
        }
    }
Esempio n. 10
0
        static Buttons()
        {
            NewMap = new ButtonModel()
            {
                Name      = "New Map",
                IsEnabled = true,
                Shortcut  = new KeyGesture(Key.N, ModifierKeys.Control)
            };
            NewMap.Click += onNewMap;
            NewMapTool    = new ButtonModel()
            {
                Name      = "New Map",
                IsEnabled = true
            };
            NewMapTool.Click += onNewMap;

            OpenMap = new ButtonModel()
            {
                Name      = "Open Map",
                IsEnabled = true,
                Shortcut  = new KeyGesture(Key.O, ModifierKeys.Control)
            };
            OpenMap.Click += onOpenMap;
            OpenMapTool    = new ButtonModel()
            {
                Name      = "Open Map",
                IsEnabled = true
            };
            OpenMapTool.Click += onOpenMap;

            SaveMap = new ButtonModel()
            {
                Name     = "Save Map",
                Shortcut = new KeyGesture(Key.S, ModifierKeys.Control)
            };
            SaveMap.Click += onSaveMap;
            SaveMapTool    = new ButtonModel()
            {
                Name = "Save Map"
            };
            SaveMapTool.Click += onSaveMap;

            SaveMapAs = new ButtonModel()
            {
                Name = "Save Map As"
            };
            SaveMapAs.Click += onSaveMapAs;

            AddLayer = new ButtonModel()
            {
                Name      = "Add Layer",
                IsEnabled = true
            };
            AddLayerTool = new ButtonModel()
            {
                Name = "Add Layer"
            };

            RemoveLayer = new ButtonModel()
            {
                Name = "Remove Layer"
            };
            AddLayer.Click += onRemoveLayer;
            RemoveLayerTool = new ButtonModel()
            {
                Name = "Remove Layer"
            };
            RemoveLayerTool.Click += onRemoveLayer;

            Current.MapChanged += delegate(CurrentPropertyChangedEventArgs <IMap> e)
            {
                var map = e.NewValue;
                if (map != null)
                {
                    map.PropertyChanged += delegate(object sender2, PropertyChangedEventArgs e2)
                    {
                        if (e2.PropertyName == nameof(IMap.IsDirty))
                        {
                            updateSaveEnabled();
                        }
                    };
                }
                updateMapChanged();
                updateSaveEnabled();
            };
            updateMapChanged();
            updateSaveEnabled();

            Options = new ButtonModel()
            {
                Name      = "Options",
                IsEnabled = true
            };
            Options.Click += onOptions;
            OptionsTool    = new ButtonModel()
            {
                Name      = "Options",
                IsEnabled = true
            };
            OptionsTool.Click += onOptions;

            File = new ButtonModel()
            {
                Name      = "_File",
                IsEnabled = true,
                Children  = new System.Collections.ObjectModel.ObservableCollection <IButtonModel>()
                {
                    NewMap,
                    OpenMap,
                    SaveMap,
                    SaveMapAs
                }
            };

            Edit = new ButtonModel()
            {
                Name      = "_Edit",
                IsEnabled = true
            };

            View = new ButtonModel()
            {
                Name      = "_View",
                IsEnabled = true
            };

            Layers = new ButtonModel()
            {
                Name      = "_Layers",
                IsEnabled = true,
                Children  = new System.Collections.ObjectModel.ObservableCollection <IButtonModel>()
                {
                    AddLayer,
                    RemoveLayer
                }
            };

            Tools = new ButtonModel()
            {
                Name      = "_Tools",
                IsEnabled = true,
                Children  = new System.Collections.ObjectModel.ObservableCollection <IButtonModel>()
                {
                    Options
                }
            };

            Help = new ButtonModel()
            {
                Name      = "_Help",
                IsEnabled = true
            };

            PluginManager.Instance.Reloaded += pluginsReloaded;
        }
Esempio n. 11
0
 protected void RegisterButton(ButtonModel paButton)
 {
     SupportedButtons.Add(paButton);
 }
Esempio n. 12
0
 public async Task <ActionResult <string> > Create([FromBody] ButtonModel model)
 {
     return(await model.GenerateView());
 }
Esempio n. 13
0
        public override void build()
        {
            base.build();
            background = new StaticObject(".\\Sprites\\rufusConcept");
            background.init(content);
            addChild(background);

            outt = false;

            ButtonModel playModel = new ButtonModel(".\\Sprites\\GUI\\playButtonNew\\playButtonNew", ".\\Sprites\\GUI\\playButtonNew\\playButtonNewXML", null);


            soundButton = new SoundButton(null);
            soundButton.init(content);
            soundButton.position.X = 700f;
            soundButton.position.Y = 40f;

            infoButton = new InfoButton(Game1.showDevCard);
            infoButton.init(content);
            infoButton.position.X = 40f;
            infoButton.position.Y = 40f;

            playButton            = new SimpleButton(playModel, "", new Point(), gotoGame);
            playButton.fontMargin = new Vector2(55, 15);
            playButton.fontScale  = 1;
            playButton.init(content);
            playButton.position.Y = 480;
            playButton.position.X = 500;
            playButton.tweener    = new Tweener(playButton.position.Y, 350f, TimeSpan.FromSeconds(1.0f), Back.EaseOut);
            playButton.tweener.Start();

            ButtonModel shopModel = new ButtonModel(".\\Sprites\\GUI\\shopButton\\shopButton", ".\\Sprites\\GUI\\shopButton\\shopButtonXML", null);

            shopButton            = new SimpleButton(shopModel, "", new Point(), gotoShop);
            shopButton.fontMargin = new Vector2(55, 15);
            shopButton.fontScale  = 1;
            shopButton.init(content);
            shopButton.position.Y = 480;
            shopButton.position.X = 148;
            shopButton.tweener    = new Tweener(shopButton.position.Y, 350f, TimeSpan.FromSeconds(1.0f), Back.EaseOut);
            shopButton.tweener.Start();

            statisticsButton = new StatisticsButton(openStatistic);
            statisticsButton.init(content);
            statisticsButton.position.Y = 480;
            statisticsButton.position.X = 40;
            statisticsButton.tweener    = new Tweener(statisticsButton.position.Y, 350f, TimeSpan.FromSeconds(1.0f), Back.EaseOut);
            statisticsButton.tweener.Start();

            ButtonModel logoModel = new ButtonModel(".\\Sprites\\GUI\\rufusLogo", "", null);

            logoButton = new SimpleButton(logoModel, "", new Point(), null);
            logoButton.init(content);
            logoButton.position.Y = -100;
            logoButton.position.X = 140;
            logoButton.tweener    = new Tweener(logoButton.position.Y, 20f, TimeSpan.FromSeconds(1.0f), Back.EaseOut);
            logoButton.tweener.Start();

            starsLabel = new IncrementalLabel(0, ButtonFactory.spriteFont);
            starsLabel.init(content);
            starsLabel.newValue(GameModel.currentPoints);
            starsLabel.position.Y = shopButton.position.Y + 25;
            starsLabel.position.X = shopButton.position.X + 72;
            starsLabel.fontSize   = 0.8f;

            addChild(playButton);
            addChild(shopButton);
            addChild(statisticsButton);
            addChild(logoButton);
            addChild(starsLabel);
            addChild(soundButton);
            addChild(infoButton);
        }
Esempio n. 14
0
        public void Reload()
        {
            if (this.Plugins != null)
            {
                foreach (var item in this.Plugins)
                {
                    item.Key.Unload();
                }
            }

            _container.ComposeParts(this);

            var          plugins             = new Dictionary <IPlugin, IPluginMetadata>();
            var          menus               = new List <IButtonModel>();
            IButtonModel toolsMenu           = null;
            var          toolPluginMenus     = new List <IButtonModel>();
            var          toolbar             = new List <Tuple <string, IEnumerable <IButtonModel> > >();
            var          statusItems         = new List <Tuple <string, IEnumerable <IStatusItem> > >();
            var          layerProviders      = new List <PluginItemProvider <ILayer> >();
            var          projectionProviders = new List <PluginItemProvider <IProjection> >();
            var          datums              = new List <Datum>();
            var          anchorableTools     = new List <Tuple <IDockElement, DataTemplate> >();
            var          pluginsSettings     = new Dictionary <IPlugin, object>();

            foreach (var item in this.LoadedPlugins)
            {
                var plugin   = item.Value;
                var metadata = new PluginMetadata(item.Metadata, plugin.GetType().Assembly);
                plugins.Add(plugin, metadata);

                var pMenu = plugin.Menu;
                if (pMenu != null && pMenu.Items.Any())
                {
                    switch (pMenu.ItemsLocation)
                    {
                    case PluginMenu.PluginMenuLocation.TopLevel:
                        menus.AddRange(pMenu.Items);
                        if (toolsMenu == null)
                        {
                            toolsMenu = pMenu.Items.FirstOrDefault(m => m.Name == "Tools" || m.Name == "_Tools");
                        }
                        break;

                    case PluginMenu.PluginMenuLocation.ToolsMenu:
                        toolPluginMenus.AddRange(pMenu.Items);
                        break;

                    case PluginMenu.PluginMenuLocation.ToolsSubmenu:
                        toolPluginMenus.Add(new ButtonModel()
                        {
                            Name     = metadata.Name,
                            Children = new System.Collections.ObjectModel.ObservableCollection <IButtonModel>(pMenu.Items)
                        });
                        break;
                    }
                }

                var pToolbar = plugin.ToolBar;
                if (pToolbar != null && pToolbar.Any())
                {
                    toolbar.Add(new Tuple <string, IEnumerable <IButtonModel> >(metadata.Name, plugin.ToolBar));
                }

                var pStatusBar = plugin.StatusBar;
                if (pStatusBar != null && pStatusBar.Any())
                {
                    statusItems.Add(new Tuple <string, IEnumerable <IStatusItem> >(metadata.Name, plugin.StatusBar));
                }

                var pProjectionProviders = plugin.ProjectionProviders;
                if (pProjectionProviders != null && pProjectionProviders.Any())
                {
                    projectionProviders.AddRange(pProjectionProviders);
                }

                var pDatums = plugin.Datums;
                if (pDatums != null && pDatums.Any())
                {
                    datums.AddRange(pDatums);
                }

                var pSettings = plugin.Settings;
                if (pSettings != null)
                {
                    pluginsSettings.Add(plugin, pSettings);
                }

                var gPlugin = plugin as IGraphicalPlugin;
                if (gPlugin != null)
                {
                    var pLayerProviders = gPlugin.LayerProviders;
                    if (pLayerProviders != null && pLayerProviders.Any())
                    {
                        layerProviders.AddRange(pLayerProviders);
                    }

                    var pAnchorableTools = gPlugin.AnchorableTools;
                    if (pAnchorableTools != null && pAnchorableTools.Any())
                    {
                        foreach (var tool in pAnchorableTools)
                        {
                            anchorableTools.Add(tool);
                        }
                    }
                }
            }

            if (toolsMenu == null)
            {
                toolsMenu = new ButtonModel()
                {
                    Name = "_Tools"
                };
            }
            else
            {
                toolsMenu.Children.Add(new ButtonModel()
                {
                    IsSeparator = true
                });
            }
            foreach (var item in toolPluginMenus)
            {
                toolsMenu.Children.Add(item);
            }

            this.Plugins             = plugins;
            this.Menus               = menus;
            this.Toolbar             = toolbar;
            this.StatusItems         = statusItems;
            this.LayerProviders      = layerProviders;
            this.ProjectionProviders = projectionProviders;
            this.Datums              = datums;
            this.AnchorableTools     = anchorableTools;
            this.PluginsSettings     = pluginsSettings;

            this.Reloaded?.Invoke(this, new EventArgs());
        }
Esempio n. 15
0
 private void OnButtonPressed(ButtonModel model) =>
 model.ButtonPressed = true;
Esempio n. 16
0
        private async Task <KeypadModel> GetKeypadAsync(long stateId)
        {
            var buttonList = await _buttonService.GetButtonList(stateId);

            buttonList = buttonList.OrderBy(x => x.Row).ThenBy(x => x.Order).ToList();

            var keypad = new KeypadModel()
            {
                Rows = new List <KeypadRowModel>()
            };

            foreach (var button in buttonList)
            {
                if (keypad.Rows.Count < button.Row)
                {
                    keypad.Rows.Add(new KeypadRowModel());
                    keypad.Rows[button.Row - 1].Buttons = new List <ButtonModel>();
                }

                var newButton = new ButtonModel
                {
                    Id         = button.Code,
                    Type       = button.Type,
                    ButtonView = new ButtonSimpleModel
                    {
                        Type     = button.ViewType,
                        Text     = button.Text,
                        ImageUrl = button.ImageUrl
                    },
                    BehaviourType = button.BehaviourType
                };


                if (button.Type == ButtonTypeEnum.Selection)
                {
                    newButton.ButtonSelection = JsonConvert.DeserializeObject <ButtonSelectionModel>(button.Data);
                }
                else if (button.Type == ButtonTypeEnum.Calendar)
                {
                    newButton.ButtonCalendar = JsonConvert.DeserializeObject <ButtonCalendarModel>(button.Data);
                    var pc  = new PersianCalendar();
                    var now = $"{pc.GetYear(DateTime.Now)}-{pc.GetMonth(DateTime.Now)}-{pc.GetDayOfMonth(DateTime.Now)}";
                    newButton.ButtonCalendar.DefaultValue = now;
                }
                else if (button.Type == ButtonTypeEnum.NumberPicker)
                {
                    newButton.ButtonNumberPicker = JsonConvert.DeserializeObject <ButtonNumberPickerModel>(button.Data);
                }
                else if (button.Type == ButtonTypeEnum.StringPicker)
                {
                    newButton.ButtonStringPicker = JsonConvert.DeserializeObject <ButtonStringPickerModel>(button.Data);
                }
                else if (button.Type == ButtonTypeEnum.Location)
                {
                    newButton.ButtonLocation = JsonConvert.DeserializeObject <ButtonLocationModel>(button.Data);
                }
                else if (button.Type == ButtonTypeEnum.Alert)
                {
                    newButton.ButtonAlert = JsonConvert.DeserializeObject <ButtonAlertModel>(button.Data);
                }
                else if (button.Type == ButtonTypeEnum.Textbox)
                {
                    newButton.ButtonTextBox = JsonConvert.DeserializeObject <ButtonTextBoxModel>(button.Data);
                }
                else if (button.Type == ButtonTypeEnum.Payment)
                {
                    // handled in another method
                }
                else if (button.Type == ButtonTypeEnum.Call)
                {
                    newButton.ButtonCall = JsonConvert.DeserializeObject <ButtonCallModel>(button.Data);
                }

                keypad.Rows[button.Row - 1].Buttons.Add(newButton);
            }

            return(keypad);
        }
Esempio n. 17
0
    private void AddButtons()
    {
        var createViewMap = new List <System.Func <GameObject, MainMenuFooterButtonModel, ButtonView> >
        {
            (GameObject parent, MainMenuFooterButtonModel model) =>
            {
                return(MainMenuFooterHomeButton.
                       Attach(parent).
                       SetModel(model.AddCategory(MAINMENU_CATEGORY.HOME)));
            },
            (GameObject parent, MainMenuFooterButtonModel model) =>
            {
                return(MainMenuFooterUnitsButton.
                       Attach(parent).
                       SetModel(model.AddCategory(MAINMENU_CATEGORY.UNIT), m_unitBufEvent));
            },
            (GameObject parent, MainMenuFooterButtonModel model) =>
            {
                return(MainMenuFooterGachaButton.
                       Attach(parent).
                       SetModel(model.AddCategory(MAINMENU_CATEGORY.GACHA)));
            },
            (GameObject parent, MainMenuFooterButtonModel model) =>
            {
                return(MainMenuFooterShopButton.
                       Attach(parent).
                       SetModel(model.AddCategory(MAINMENU_CATEGORY.SHOP)));
            },
            (GameObject parent, MainMenuFooterButtonModel model) =>
            {
                return(MainMenuFooterHelpButton.
                       Attach(parent).
                       SetModel(model.AddCategory(MAINMENU_CATEGORY.QUEST), m_helpBufEvent));
            }
        };

        int size = m_buttonRoots.Length;

        UnityEngine.Debug.Assert(createViewMap.Count == size, "The count of footer button gameObjects is invalid.");

        for (int i = 0; i < size; i++)
        {
            int index  = i;
            var button = new MainMenuFooterButtonModel();
            button.OnClicked += () =>
            {
                // TODO : OnTouchMenuが整理されたらここも新しい処理に切り替える
                OnTouchMenu((FOOTER_MENU_TYPE)index);
            };

            ButtonList[index] = createViewMap[index](m_buttonRoots[index], button).GetRoot();

            m_buttons.Add(button);
        }

        m_buttons[0].isSelected = true;

        //戻るボタン
        {
            var retBtnModel = new ButtonModel();
            retBtnModel.OnClicked += () =>
            {
                OnSelectReturn();
            };

            MainMenuFooterReturnButton.Attach(returnButton).SetModel(retBtnModel);

            retBtnModel.Appear();
        }
    }
Esempio n. 18
0
 /// <summary>
 /// Returns whether a <code>ButtonModel</code> is selected.
 /// </summary>
 public bool isSelected(ButtonModel @m)
 {
     return(default(bool));
 }
Esempio n. 19
0
 /// <summary>
 /// Sets the data model for the "menu button" -- the label
 /// that the user clicks to open or close the menu.
 /// </summary>
 public void setModel(ButtonModel @newModel)
 {
 }
Esempio n. 20
0
    private void SetUpButtons()
    {
        // 昇順
        var ascendingButtonModel = new ButtonModel();

        AscendingButton.SetModel <ButtonModel>(ascendingButtonModel);
        AscendingButton.m_OnText        = string.Format(GameTextUtil.GetText("filter_choice"), GameTextUtil.GetText("filter_text19"));
        AscendingButton.m_OffText       = GameTextUtil.GetText("filter_text19");
        ascendingButtonModel.OnClicked += () =>
        {
            OnClickAscButton();
        };
        ascendingButtonModel.Appear();
        ascendingButtonModel.SkipAppearing();

        // 降順
        var descendingButtonModel = new ButtonModel();

        DescendingButton.SetModel <ButtonModel>(descendingButtonModel);
        DescendingButton.m_OnText        = string.Format(GameTextUtil.GetText("filter_choice"), GameTextUtil.GetText("filter_text20"));
        DescendingButton.m_OffText       = GameTextUtil.GetText("filter_text20");
        descendingButtonModel.OnClicked += () =>
        {
            OnClickDescButton();
        };
        descendingButtonModel.Appear();
        descendingButtonModel.SkipAppearing();

        // 初期化
        var resetButtonModel = new ButtonModel();

        ResetButton.SetModel <ButtonModel>(resetButtonModel);
        ResetButton.m_OnText        = GameTextUtil.GetText("filter_text51");
        resetButtonModel.OnClicked += () =>
        {
            OnClickResetButton();
        };
        resetButtonModel.Appear();
        resetButtonModel.SkipAppearing();

        // レア度
        var rareButtonModel = new ButtonModel();

        RareButton.SetModel <ButtonModel>(rareButtonModel);
        RareButton.m_OnText        = string.Format(GameTextUtil.GetText("filter_choice"), GameTextUtil.GetSortDialogFilterText(MAINMENU_FILTER_TYPE.FILTER_RARE));
        RareButton.m_OffText       = GameTextUtil.GetSortDialogFilterText(MAINMENU_FILTER_TYPE.FILTER_RARE);
        rareButtonModel.OnClicked += () =>
        {
            OnClickFilterButton(MAINMENU_FILTER_TYPE.FILTER_RARE);
        };
        rareButtonModel.Appear();
        rareButtonModel.SkipAppearing();

        // 種族
        var kindButtonModel = new ButtonModel();

        KindButton.SetModel <ButtonModel>(kindButtonModel);
        KindButton.m_OnText        = string.Format(GameTextUtil.GetText("filter_choice"), GameTextUtil.GetSortDialogFilterText(MAINMENU_FILTER_TYPE.FILTER_KIND));
        KindButton.m_OffText       = GameTextUtil.GetSortDialogFilterText(MAINMENU_FILTER_TYPE.FILTER_KIND);
        kindButtonModel.OnClicked += () =>
        {
            OnClickFilterButton(MAINMENU_FILTER_TYPE.FILTER_KIND);
        };
        kindButtonModel.Appear();
        kindButtonModel.SkipAppearing();

        // 一括ON
        var elementAllOnButtonModel = new ButtonModel();

        ElementAllOnButton.SetModel <ButtonModel>(elementAllOnButtonModel);
        ElementAllOnButton.m_OnText        = GameTextUtil.GetText("filter_text58");
        elementAllOnButtonModel.OnClicked += () =>
        {
            OnClickElementAllOnButton();
        };
        elementAllOnButtonModel.Appear();
        elementAllOnButtonModel.SkipAppearing();

        // 一括OFF
        var elementAllOffButtonModel = new ButtonModel();

        ElementAllOffButton.SetModel <ButtonModel>(elementAllOffButtonModel);
        ElementAllOffButton.m_OnText        = GameTextUtil.GetText("filter_text57");
        elementAllOffButtonModel.OnClicked += () =>
        {
            OnClickElementAllOffButton();
        };
        elementAllOffButtonModel.Appear();
        elementAllOffButtonModel.SkipAppearing();
    }
Esempio n. 21
0
        public override void build()
        {
            base.build();

            loadScreen.init(content);
            //SALVAR O CENARIO ATUAL
            RufusModel     temp  = GameModel.levelsModels.ElementAt(GameModel.currentLevelID);
            LevelBehaviour temp2 = (LevelBehaviour)(temp.behaviour);

            currentLevelModel = temp2.levelModel;

            background = new BackLevelView(currentLevelModel.bgPath);
            if (currentLevelModel.clouds != null)
            {
                background.addClouds(currentLevelModel.clouds);
            }
            background.setColor(currentLevelModel.color);

            background.init(content);
            addChild(background);
            background.start();
            outt = false;

            ButtonModel playModel = new ButtonModel(".\\Sprites\\GUI\\readyButton\\readyButton", ".\\Sprites\\GUI\\readyButton\\readyButtonXML", null);

            playButton = new SimpleButton(playModel, "", new Point(), gotoGame);
            playButton.init(content);
            playButton.position.Y = 570;
            playButton.position.X = 400 - playButton.texture.Width / 2;
            playButton.tweener    = new Tweener(playButton.position.Y, 350f, TimeSpan.FromSeconds(1.0f), Back.EaseOut);
            playButton.tweener.Start();

            locationButton = new SimpleButton(new ButtonModel(".\\Sprites\\GUI\\locationButton\\locationButton", ".\\Sprites\\GUI\\locationButton\\locationButtonXML", null), "", new Point(), changeLevelModel);
            locationButton.init(content);
            locationButton.position.Y = 480;
            locationButton.position.X = 400 - locationButton.texture.Width / 2;
            locationButton.tweener    = new Tweener(locationButton.position.Y, 260f, TimeSpan.FromSeconds(1.0f), Back.EaseOut);
            locationButton.tweener.Start();

            backButton = new HomeButton(gotoInit);
            backButton.init(content);
            backButton.position.Y = 40;
            backButton.position.X = 40;
            // backButton.tweener = new Tweener(backButton.position.Y, 40f, TimeSpan.FromSeconds(1.0f), Back.EaseOut);
            // backButton.tweener.Start();

            changeLevel = new ArrowButton(changeRufus);
            changeLevel.init(content);
            changeLevel.position.Y    = -40;
            changeLevel.position.X    = 490;
            changeLevel.spriteEffects = SpriteEffects.FlipHorizontally;
            changeLevel.scale         = new Vector2(.8f);
            changeLevel.tweener       = new Tweener(changeLevel.position.Y, 120f, TimeSpan.FromSeconds(1.0f), Cubic.EaseOut);
            changeLevel.tweener.Start();

            changeLevelBack = new ArrowButton(changeRufusBack);
            changeLevelBack.init(content);
            changeLevelBack.position.Y    = -40;
            changeLevelBack.position.X    = 268;
            changeLevelBack.spriteEffects = SpriteEffects.None;
            changeLevelBack.scale         = new Vector2(.8f);
            changeLevelBack.tweener       = new Tweener(changeLevel.position.Y, 120f, TimeSpan.FromSeconds(1.0f), Cubic.EaseOut);
            changeLevelBack.tweener.Start();

            backRufusBox = new SimpleButton(new ButtonModel(".\\Sprites\\GUI\\backChoiceRufus", "", null), "", new Point(), openCard);
            backRufusBox.init(content);
            backRufusBox.position.Y = -backRufusBox.texture.Height;
            backRufusBox.position.X = 400 - backRufusBox.texture.Width / 2;
            backRufusBox.tweener    = new Tweener(backRufusBox.position.Y, 40f, TimeSpan.FromSeconds(1.0f), Cubic.EaseOut);
            backRufusBox.tweener.Start();


            rufusImage = new StaticObject(GameModel.rufusModels.ElementAt(GameModel.currentRufusID).largePath);
            rufusImage.init(content);
            rufusImage.position.Y = backRufusBox.position.Y + rufusImage.texture.Height / 2 + backRufusBox.texture.Height / 2;
            rufusImage.position.X = 400 - rufusImage.texture.Width / 2;

            soundButton = new SoundButton(null);
            soundButton.init(content);
            soundButton.position.X = 700f;
            soundButton.position.Y = 40f;

            helpButton = new HelpButton(null);
            helpButton.init(content);
            helpButton.position.X = 600f;
            helpButton.position.Y = 40f;

            addChild(backRufusBox);
            addChild(playButton);
            addChild(changeLevel);
            addChild(changeLevelBack);
            addChild(locationButton);
            addChild(backButton);
            addChild(rufusImage);
            addChild(soundButton);
            addChild(helpButton);
        }
Esempio n. 22
0
		/// <summary>
		/// Sets the selected value for the <code>ButtonModel</code>.
		/// </summary>
		public void setSelected(ButtonModel @m, bool @b)
		{
		}
Esempio n. 23
0
        public JsonResult List(ButtonModel model, PageInfo pageInfo)
        {
            var result = ButtonService.GetListByFilter(model, pageInfo);

            return(Json(result, JsonRequestBehavior.AllowGet));
        }