コード例 #1
0
 public DesignStockpileSample()
 {
     var c = new StockpileCriteriaEditable();
     /*
     c.ItemIDs.Add(ItemID.Log);
     c.ItemIDs.Add(ItemID.Door);
     c.MaterialCategories.Add(MaterialCategory.Wood);
     */
     this.Criteria = c.ToItemFilter();
 }
コード例 #2
0
        public DesignStockpileSample()
        {
            var c = new StockpileCriteriaEditable();

            /*
             * c.ItemIDs.Add(ItemID.Log);
             * c.ItemIDs.Add(ItemID.Door);
             * c.MaterialCategories.Add(MaterialCategory.Wood);
             */
            this.Criteria = c.ToItemFilter();
        }
コード例 #3
0
        void StockpileEditControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            var stockpile = (Stockpile)this.DataContext;

            if (stockpile == null || stockpile.Criteria == null)
            {
                this.Criteria = new StockpileCriteriaEditable();
            }
            else
            {
                this.Criteria = new StockpileCriteriaEditable(stockpile.Criteria);
            }

            Notify("Criteria");
        }
コード例 #4
0
        void StockpileEditControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            var stockpile = (Stockpile)this.DataContext;

            if (stockpile == null || stockpile.Criteria == null)
            {
                this.Criteria = new StockpileCriteriaEditable();
            }
            else
            {
                this.Criteria = new StockpileCriteriaEditable(stockpile.Criteria);
            }

            Notify("Criteria");
        }