コード例 #1
0
            public TradingStationViewModel(Trade trade, CommodityDetailsViewModel container)
            {
                Trade = trade;

                _container = container;
                container.StationSelector.PropertyChanged += ContainerPropertyChanged;
            }
コード例 #2
0
        public DataSheetsHomeViewModel()
        {
            CommodityDetails = new CommodityDetailsViewModel();
            PlaceDetails     = new PlaceDetailsViewModel();

            CommoditiesView = new ListCollectionView(Environment.Commodities);
            CommoditiesView.GroupDescriptions.Add(new PropertyGroupDescription("Category"));
            CommoditiesView.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));
            CommoditiesView.CurrentChanged += CommoditiesViewCurrentChanged;

            PlacesView = new ListCollectionView(Environment.Objects);
            PlacesView.GroupDescriptions.Add(new PropertyGroupDescription("Star"));
            PlacesView.SortDescriptions.Add(new SortDescription("Star.Name", ListSortDirection.Ascending));
            PlacesView.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));
            CommoditiesView.MoveCurrentToPosition(0);
            PlacesView.CurrentChanged += PlacesViewCurrentChanged;
        }