Ejemplo n.º 1
0
        void app_ApplicationLanguageChanged(object sender, Languages current)
        {
            if (statesView != null)
            {
                statesView.Filter = null;
            }

            States.Clear();

            M2SceneNode node = ModelSceneService.Instance.MainM2SceneNode;

            if (node != null)
            {
                for (int i = 0; i < (int)E_M2_STATES.EMS_COUNT; ++i)
                {
                    if (node.IsStateValid((E_M2_STATES)i))
                    {
                        M2State s = new M2State();
                        s.State = (E_M2_STATES)i;
                        s.Name  = s.GetStateName(current);
                        States.Add(s);
                    }
                }
            }

            statesView = CollectionViewSource.GetDefaultView(States);

            FilterState();
        }
Ejemplo n.º 2
0
        public void FillData(M2SceneNode node)
        {
            App app = Application.Current as App;

            States.Clear();
            for (int i = 0; i < (int)E_M2_STATES.EMS_COUNT; ++i)
            {
                if (node.IsStateValid((E_M2_STATES)i))
                {
                    M2State s = new M2State();
                    s.State = (E_M2_STATES)i;
                    s.Name  = s.GetStateName(app.Language);
                    States.Add(s);
                }
            }

            statesView = CollectionViewSource.GetDefaultView(States);
        }