コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: dmonjeau/wpf-demos
        public ViewModel()
        {
            this.PaletteList = new ObservableCollection <string>();
            PaletteList.Add("Metro");
            PaletteList.Add("AutumnBrights");
            PaletteList.Add("Florahues");
            PaletteList.Add("Pineapple");
            PaletteList.Add("TomotoSpectrum");
            PaletteList.Add("RedChrome");
            PaletteList.Add("BlueChrome");
            PaletteList.Add("PurpleChrome");
            PaletteList.Add("GreenChrome");
            PaletteList.Add("Elite");
            PaletteList.Add("LightCandy");
            PaletteList.Add("SandyBeach");

            //PieSeries
            this.CountryStatus = new ObservableCollection <Model>();
            CountryStatus.Add(new Model {
                Country = "Finland", Status = 12.68
            });
            CountryStatus.Add(new Model {
                Country = "Germany", Status = 10.59
            });
            CountryStatus.Add(new Model {
                Country = "Poland", Status = 11.16
            });
            CountryStatus.Add(new Model {
                Country = "France", Status = 10.48
            });
            CountryStatus.Add(new Model {
                Country = "Australia", Status = 10.13
            });
            CountryStatus.Add(new Model {
                Country = "Israel", Status = 10.50
            });
            CountryStatus.Add(new Model {
                Country = "Brazil", Status = 7.99
            });
            CountryStatus.Add(new Model {
                Country = "Switzerland", Status = 7.25
            });
            CountryStatus.Add(new Model {
                Country = "Russia", Status = 6.25
            });
            CountryStatus.Add(new Model {
                Country = "Singapore", Status = 5.90
            });

            //Active User in Year of 2012,2014,2015
            this.AnnualStatus = new ObservableCollection <Model>();
            AnnualStatus.Add(new Model {
                SocialNetwork = "Facebook", Year2012 = 788, Year2014 = 1440, Year2015 = 1336
            });
            AnnualStatus.Add(new Model {
                SocialNetwork = "QZone", Year2012 = 210, Year2014 = 632, Year2015 = 629
            });
            AnnualStatus.Add(new Model {
                SocialNetwork = "WhatsApp", Year2012 = 800, Year2014 = 800, Year2015 = 600
            });
            AnnualStatus.Add(new Model {
                SocialNetwork = "WeChat", Year2012 = 668, Year2014 = 668, Year2015 = 468
            });
            AnnualStatus.Add(new Model {
                SocialNetwork = "Google+", Year2012 = 549, Year2014 = 549, Year2015 = 343
            });
            AnnualStatus.Add(new Model {
                SocialNetwork = "Twitter", Year2012 = 540, Year2014 = 540, Year2015 = 284
            });
            AnnualStatus.Add(new Model {
                SocialNetwork = "Instagram", Year2012 = 302, Year2014 = 302, Year2015 = 300
            });
            AnnualStatus.Add(new Model {
                SocialNetwork = "Skype", Year2012 = 300, Year2014 = 300, Year2015 = 300
            });

            //Active Users
            this.ActiveUsers = new ObservableCollection <Model>();
            ActiveUsers.Add(new Model {
                SocialNetwork = "Twitter", Status = 302
            });
            ActiveUsers.Add(new Model {
                SocialNetwork = "WeChat", Status = 559
            });
            ActiveUsers.Add(new Model {
                SocialNetwork = "Instagram", Status = 300
            });
            ActiveUsers.Add(new Model {
                SocialNetwork = "Skype", Status = 300
            });
            ActiveUsers.Add(new Model {
                SocialNetwork = "WhatsApp", Status = 800
            });
            ActiveUsers.Add(new Model {
                SocialNetwork = "Google+", Status = 540
            });
            ActiveUsers.Add(new Model {
                SocialNetwork = "QZone", Status = 668
            });
            ActiveUsers.Add(new Model {
                SocialNetwork = "Facebook", Status = 1184
            });

            // Registered users
            this.RegisteredUsers = new ObservableCollection <Model>();
            RegisteredUsers.Add(new Model {
                SocialNetwork = "Twitter", Status = 500
            });
            RegisteredUsers.Add(new Model {
                SocialNetwork = "WeChat", Status = 1120
            });
            RegisteredUsers.Add(new Model {
                SocialNetwork = "Instagram", Status = 300
            });
            RegisteredUsers.Add(new Model {
                SocialNetwork = "Skype", Status = 663
            });
            RegisteredUsers.Add(new Model {
                SocialNetwork = "WhatsApp", Status = 800
            });
            RegisteredUsers.Add(new Model {
                SocialNetwork = "Google+", Status = 540
            });
            RegisteredUsers.Add(new Model {
                SocialNetwork = "QZone", Status = 1000
            });
            RegisteredUsers.Add(new Model {
                SocialNetwork = "Facebook", Status = 2000
            });
        }
コード例 #2
0
        public PaletteViewModel()
        {
            this.PaletteList = new ObservableCollection <ChartColorPalette>();
            PaletteList.Add(ChartColorPalette.Metro);
            PaletteList.Add(ChartColorPalette.AutumnBrights);
            PaletteList.Add(ChartColorPalette.FloraHues);
            PaletteList.Add(ChartColorPalette.Pineapple);
            PaletteList.Add(ChartColorPalette.TomotoSpectrum);
            PaletteList.Add(ChartColorPalette.RedChrome);
            PaletteList.Add(ChartColorPalette.BlueChrome);
            PaletteList.Add(ChartColorPalette.PurpleChrome);
            PaletteList.Add(ChartColorPalette.GreenChrome);
            PaletteList.Add(ChartColorPalette.Elite);
            PaletteList.Add(ChartColorPalette.LightCandy);
            PaletteList.Add(ChartColorPalette.SandyBeach);
            PaletteList.Add(ChartColorPalette.Custom);

            //PieSeries
            this.FacebookStatistics = new ObservableCollection <PaletteModel>();
            FacebookStatistics.Add(new PaletteModel {
                Country = "Finland", UsersCount = 12.68
            });
            FacebookStatistics.Add(new PaletteModel {
                Country = "Germany", UsersCount = 10.59
            });
            FacebookStatistics.Add(new PaletteModel {
                Country = "Poland", UsersCount = 11.16
            });
            FacebookStatistics.Add(new PaletteModel {
                Country = "France", UsersCount = 10.48
            });
            FacebookStatistics.Add(new PaletteModel {
                Country = "Australia", UsersCount = 10.13
            });
            FacebookStatistics.Add(new PaletteModel {
                Country = "Brazil", UsersCount = 7.99
            });
            FacebookStatistics.Add(new PaletteModel {
                Country = "Russia", UsersCount = 6.25
            });
            FacebookStatistics.Add(new PaletteModel {
                Country = "Israel", UsersCount = 10.50
            });

            //Active User in Year of 2012,2014,2015
            this.Users = new ObservableCollection <PaletteModel>();
            Users.Add(new PaletteModel {
                SocialSite = "Facebook", Year2012 = 788, Year2014 = 1240, Year2015 = 1550
            });
            Users.Add(new PaletteModel {
                SocialSite = "QZone", Year2012 = 310, Year2014 = 632, Year2015 = 900
            });
            Users.Add(new PaletteModel {
                SocialSite = "Google+", Year2012 = 500, Year2014 = 743, Year2015 = 890
            });
            Users.Add(new PaletteModel {
                SocialSite = "Twitter", Year2012 = 250, Year2014 = 540, Year2015 = 784
            });
            Users.Add(new PaletteModel {
                SocialSite = "Skype", Year2012 = 120, Year2014 = 300, Year2015 = 520
            });
            Users.Add(new PaletteModel {
                SocialSite = "WeChat", Year2012 = 180, Year2014 = 390, Year2015 = 550
            });
            Users.Add(new PaletteModel {
                SocialSite = "Instagram", Year2012 = 120, Year2014 = 250, Year2015 = 850
            });
            Users.Add(new PaletteModel {
                SocialSite = "WhatsApp", Year2012 = 100, Year2014 = 300, Year2015 = 300
            });

            //Active Users
            this.ActiveUsers = new ObservableCollection <PaletteModel>();
            ActiveUsers.Add(new PaletteModel {
                SocialSite = "Twitter", UsersCount = 302
            });
            ActiveUsers.Add(new PaletteModel {
                SocialSite = "Skype", UsersCount = 300
            });
            ActiveUsers.Add(new PaletteModel {
                SocialSite = "WeChat", UsersCount = 559
            });
            ActiveUsers.Add(new PaletteModel {
                SocialSite = "Google+", UsersCount = 650
            });
            ActiveUsers.Add(new PaletteModel {
                SocialSite = "WhatsApp", UsersCount = 800
            });
            ActiveUsers.Add(new PaletteModel {
                SocialSite = "Facebook", UsersCount = 1184
            });

            // Registered users
            this.RegisteredUsers = new ObservableCollection <PaletteModel>();
            RegisteredUsers.Add(new PaletteModel {
                SocialSite = "Twitter", UsersCount = 500
            });
            RegisteredUsers.Add(new PaletteModel {
                SocialSite = "Skype", UsersCount = 663
            });
            RegisteredUsers.Add(new PaletteModel {
                SocialSite = "WeChat", UsersCount = 1120
            });
            RegisteredUsers.Add(new PaletteModel {
                SocialSite = "Google+", UsersCount = 540
            });
            RegisteredUsers.Add(new PaletteModel {
                SocialSite = "WhatsApp", UsersCount = 920
            });
            RegisteredUsers.Add(new PaletteModel {
                SocialSite = "Facebook", UsersCount = 1600
            });
        }
コード例 #3
0
        public PaletteViewModel()
        {
            this.PaletteList = new ObservableCollection <ChartColorPalette>();
            PaletteList.Add(ChartColorPalette.Metro);
            PaletteList.Add(ChartColorPalette.AutumnBrights);
            PaletteList.Add(ChartColorPalette.FloraHues);
            PaletteList.Add(ChartColorPalette.Pineapple);
            PaletteList.Add(ChartColorPalette.TomatoSpectrum);
            PaletteList.Add(ChartColorPalette.RedChrome);
            PaletteList.Add(ChartColorPalette.BlueChrome);
            PaletteList.Add(ChartColorPalette.PurpleChrome);
            PaletteList.Add(ChartColorPalette.GreenChrome);
            PaletteList.Add(ChartColorPalette.Elite);
            PaletteList.Add(ChartColorPalette.LightCandy);
            PaletteList.Add(ChartColorPalette.SandyBeach);

            //PieSeries
            this.FacebookStatistics = new ObservableCollection <PaletteModel>();
            FacebookStatistics.Add(new PaletteModel {
                Country = "Finland", UsersCount = 12.68
            });
            FacebookStatistics.Add(new PaletteModel {
                Country = "Germany", UsersCount = 10.59
            });
            FacebookStatistics.Add(new PaletteModel {
                Country = "Poland", UsersCount = 11.16
            });
            FacebookStatistics.Add(new PaletteModel {
                Country = "France", UsersCount = 10.48
            });
            FacebookStatistics.Add(new PaletteModel {
                Country = "Australia", UsersCount = 10.13
            });
            FacebookStatistics.Add(new PaletteModel {
                Country = "Brazil", UsersCount = 7.99
            });
            FacebookStatistics.Add(new PaletteModel {
                Country = "Switzerland", UsersCount = 7.25
            });
            if (AnalyticsInfo.VersionInfo.DeviceFamily != "Windows.Mobile")
            {
                FacebookStatistics.Add(new PaletteModel {
                    Country = "Russia", UsersCount = 6.25
                });
                FacebookStatistics.Add(new PaletteModel {
                    Country = "Israel", UsersCount = 10.50
                });
            }

            //Active User in Year of 2012,2014,2015
            this.Users = new ObservableCollection <PaletteModel>();
            Users.Add(new PaletteModel {
                SocialSite = "Facebook", Year2012 = 788, Year2014 = 1440, Year2015 = 1336
            });
            Users.Add(new PaletteModel {
                SocialSite = "QZone", Year2012 = 210, Year2014 = 632, Year2015 = 629
            });
            Users.Add(new PaletteModel {
                SocialSite = "WhatsApp", Year2012 = 800, Year2014 = 800, Year2015 = 600
            });
            Users.Add(new PaletteModel {
                SocialSite = "WeChat", Year2012 = 668, Year2014 = 668, Year2015 = 468
            });
            Users.Add(new PaletteModel {
                SocialSite = "Google+", Year2012 = 549, Year2014 = 549, Year2015 = 343
            });
            Users.Add(new PaletteModel {
                SocialSite = "Twitter", Year2012 = 540, Year2014 = 540, Year2015 = 284
            });
            Users.Add(new PaletteModel {
                SocialSite = "Instagram", Year2012 = 302, Year2014 = 302, Year2015 = 300
            });
            Users.Add(new PaletteModel {
                SocialSite = "Skype", Year2012 = 300, Year2014 = 300, Year2015 = 300
            });

            //Active Users
            this.ActiveUsers = new ObservableCollection <PaletteModel>();
            ActiveUsers.Add(new PaletteModel {
                SocialSite = "Twitter", UsersCount = 302
            });
            ActiveUsers.Add(new PaletteModel {
                SocialSite = "WeChat", UsersCount = 559
            });
            ActiveUsers.Add(new PaletteModel {
                SocialSite = "QZone", UsersCount = 668
            });
            ActiveUsers.Add(new PaletteModel {
                SocialSite = "Skype", UsersCount = 300
            });

            if (AnalyticsInfo.VersionInfo.DeviceFamily != "Windows.Mobile")
            {
                ActiveUsers.Add(new PaletteModel {
                    SocialSite = "Instagram", UsersCount = 300
                });
                ActiveUsers.Add(new PaletteModel {
                    SocialSite = "Google+", UsersCount = 540
                });
                ActiveUsers.Add(new PaletteModel {
                    SocialSite = "WhatsApp", UsersCount = 800
                });
            }
            ActiveUsers.Add(new PaletteModel {
                SocialSite = "Facebook", UsersCount = 1184
            });

            // Registered users
            this.RegisteredUsers = new ObservableCollection <PaletteModel>();
            RegisteredUsers.Add(new PaletteModel {
                SocialSite = "Twitter", UsersCount = 500
            });
            RegisteredUsers.Add(new PaletteModel {
                SocialSite = "WeChat", UsersCount = 1120
            });
            RegisteredUsers.Add(new PaletteModel {
                SocialSite = "Skype", UsersCount = 663
            });
            RegisteredUsers.Add(new PaletteModel {
                SocialSite = "QZone", UsersCount = 1000
            });
            if (AnalyticsInfo.VersionInfo.DeviceFamily != "Windows.Mobile")
            {
                RegisteredUsers.Add(new PaletteModel {
                    SocialSite = "Google+", UsersCount = 540
                });
                RegisteredUsers.Add(new PaletteModel {
                    SocialSite = "Instagram", UsersCount = 300
                });
                RegisteredUsers.Add(new PaletteModel {
                    SocialSite = "WhatsApp", UsersCount = 800
                });
            }
            RegisteredUsers.Add(new PaletteModel {
                SocialSite = "Facebook", UsersCount = 2000
            });
        }