コード例 #1
0
        private void SetDataBinding(DataGrid dg)
        {
            Classes.ClassConstants c                    = new Classes.ClassConstants();
            GUISetup.DataGridSetup gridSetup            = new DataGridSetup();
            Dictionary <string, List <string> > binding = new Dictionary <string, List <string> >();

            binding.Add("Date", new List <string>()
            {
                c.R_date, "100"
            });
            binding.Add("User Name", new List <string>()
            {
                c.R_username, "100"
            });
            binding.Add("Stars", new List <string>()
            {
                c.R_reviewStars, "100"
            });
            binding.Add("Text", new List <string>()
            {
                c.R_text, "500"
            });
            binding.Add("Funny", new List <string>()
            {
                c.R_funny, "65"
            });
            binding.Add("Useful", new List <string>()
            {
                c.R_useful, "65"
            });
            binding.Add("Cool", new List <string>()
            {
                c.R_cool, "65"
            });
            gridSetup.AddColumnToGrid(dg, binding);
        }