Example #1
0
        public MapTabEffectsViewModel()
        {
            Statuses = new CollectionBoxViewModel(new StringConv(typeof(MapStatus), new object[0]));
            Statuses.OnMemberChanged += Statuses_Changed;
            Statuses.OnEditItem      += Statuses_EditItem;

            MapEffect = new ClassBoxViewModel(new StringConv(typeof(ActiveEffect), new object[0]));
            MapEffect.OnMemberChanged += MapEffect_Changed;
            MapEffect.OnEditItem      += MapEffect_Edit;

            CheckEvents = new CollectionBoxViewModel(new StringConv(typeof(SingleCharEvent), new object[0]));
            CheckEvents.OnMemberChanged += CheckEvents_Changed;
            CheckEvents.OnEditItem      += Events_EditItem;
        }
        public GroundTabPropertiesViewModel()
        {
            ScrollEdges = new ObservableCollection <string>();
            for (int ii = 0; ii <= (int)Map.ScrollEdge.Clamp; ii++)
            {
                ScrollEdges.Add(((Map.ScrollEdge)ii).ToLocal());
            }

            BG = new ClassBoxViewModel(new StringConv(typeof(MapBG), new object[0]));
            BG.OnMemberChanged      += BG_Changed;
            BG.OnEditItem           += MapBG_Edit;
            BlankBG                  = new TileBoxViewModel();
            BlankBG.OnMemberChanged += BlankBG_Changed;
            BlankBG.OnEditItem      += AutoTile_Edit;

            Music = new ObservableCollection <string>();
            reloadMusic();
        }
        public MapTabPropertiesViewModel()
        {
            Sights = new ObservableCollection <string>();
            for (int ii = 0; ii <= (int)Map.SightRange.Blind; ii++)
            {
                Sights.Add(((Map.SightRange)ii).ToLocal());
            }

            Elements = new ObservableCollection <string>();
            string[] element_names = DataManager.Instance.DataIndices[DataManager.DataType.Element].GetLocalStringArray();
            for (int ii = 0; ii < element_names.Length; ii++)
            {
                Elements.Add(ii.ToString("D2") + ": " + element_names[ii]);
            }

            ScrollEdges = new ObservableCollection <string>();
            for (int ii = 0; ii <= (int)Map.ScrollEdge.Clamp; ii++)
            {
                ScrollEdges.Add(((Map.ScrollEdge)ii).ToLocal());
            }

            BG = new ClassBoxViewModel(new StringConv(typeof(MapBG), new object[0]));
            BG.OnMemberChanged      += BG_Changed;
            BG.OnEditItem           += MapBG_Edit;
            BlankBG                  = new TileBoxViewModel();
            BlankBG.OnMemberChanged += BlankBG_Changed;
            BlankBG.OnEditItem      += AutoTile_Edit;

            DevForm form = (DevForm)DiagManager.Instance.DevEditor;

            TextureMap = new DictionaryBoxViewModel(form.MapEditForm, new StringConv(typeof(AutoTile), new object[0]));
            TextureMap.OnMemberChanged += TextureMap_Changed;
            TextureMap.OnEditKey       += TextureMap_EditKey;
            TextureMap.OnEditItem      += TextureMap_EditItem;

            Music = new ObservableCollection <string>();
            reloadMusic();
        }