private void init()
        {
            /*
             * grades = new List<Grades>();
             * dgGrades.ItemsSource = grades;*/

            dictSchools = new Dictionary <string, string>
            {
                { "Tsinghua University", "i9d365d46dc450c068dc90d4d7e90d8397e4301ff" },
                { "University of Waterloo", "i2404d1fc87e790eb390f8a077554538c78e05c49" }
            };

            this.client = BlockChainClient.GetInstance();
            this.cbSchools.ItemsSource = dictSchools;

            this.tbName.Visibility    = Visibility.Hidden;
            this.lbName.Visibility    = Visibility.Hidden;
            this.tbStudID.Visibility  = Visibility.Hidden;
            this.lbStudID.Visibility  = Visibility.Hidden;
            this.tbTerm.Visibility    = Visibility.Hidden;
            this.lbTerm.Visibility    = Visibility.Hidden;
            this.cbSchools.Visibility = Visibility.Hidden;
            this.lbSchools.Visibility = Visibility.Hidden;
            this.dgGrades.Visibility  = Visibility.Hidden;
        }
Beispiel #2
0
 public static BlockChainClient GetInstance()
 {
     if (instance == null)
     {
         instance = new BlockChainClient("acdb", "Asset5", "5ae3f829292d37001232430a");
     }
     return(instance);
 }
        private void init()
        {
            grades = new List <Grades>();

            /*grades.Add(new Grades()
             * {
             *  CourseID = "111111111",
             *  CourseName = "作弊101",
             *  Credit = "0",
             *  Mark = "-50"
             * });*/
            dgGrades.ItemsSource = grades;

            dictSchools = new Dictionary <string, string>
            {
                { "Tsinghua University", "i94fcba8aa927150a1df622c9c5328036087594f3" },
                { "University of Waterloo", "i2404d1fc87e790eb390f8a077554538c78e05c49" }
            };

            this.client = BlockChainClient.GetInstance();
            this.cbSchools.ItemsSource = dictSchools;
        }