Exemplo n.º 1
0
        public static CountriesListVM CreateObject()
        {
            CountriesListVM clvm = new CountriesListVM
            {
                CountryItems = new ObservableCollection <CountryVM>()
            };

            clvm.View        = CollectionViewSource.GetDefaultView(clvm.CountryItems);
            clvm.View.Filter = o =>
            {
                CountryVM c = o as CountryVM;
                return(c.CountryDataIsSufficient);
            };
            return(clvm);
        }
Exemplo n.º 2
0
        public MainWindow()
        {
            CountriesViewModel = CountriesListVM.CreateObject();
            InitializeComponent();
            DataContext = this;

            PlotQtyDict = new Dictionary <string, string>()
            {
                { "N", "Population" },
                { "y", "Production (per capita)" },
                { "A", "TFP" },
                { "K", "Kapital Supply" },
                { "L", "Labor Supply" }
            };
            PlotType = "N";

            KalmanFilterPlotQtyDict = new Dictionary <string, string>()
            {
                { "s", "Savings Rate" },
                { "g", "TFP Growth" },
                { "n", "Labor Supply Growth" }
            };
            KalmanFilterPlotType = "s";

            dpp  = DataPointPreferences.CreateObject(Colors.RosyBrown, 1, 4, 4);
            xlp  = LabelPreferences.NewLabelPreferences(Brushes.Black, Brushes.Gray, new FontFamily("Century Gothic"), 18, FontStyles.Italic, FontWeights.SemiBold);
            xlp2 = LabelPreferences.NewLabelPreferences(Brushes.Black, Brushes.Transparent, new FontFamily("Century Gothic"), 18, FontStyles.Italic, FontWeights.SemiBold);
            ylp  = LabelPreferences.NewLabelPreferences(Brushes.Tomato, Brushes.Transparent, new FontFamily("Century Gothic"), 18, FontStyles.Normal, FontWeights.SemiBold, LabelOrientations.VerticalBottomToTop);
            ap   = AxesPreferences2D.CreateObject(Colors.Black, Colors.Black, 1, 1, 40, 1);
            cp   = CurvePreferences.NewCurvePreferences(Brushes.DarkOliveGreen, 1, new DoubleCollection()
            {
                3, 2
            });
            cp2 = CurvePreferences.NewCurvePreferences(Brushes.DarkRed, 1, new DoubleCollection()
            {
                3, 2
            });

            PopulatePWT91DataTable();
        }