Ejemplo n.º 1
0
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            string content = "========\n该节次课程\n========\n\n";

            foreach (var item in Items)
            {
                content += item.Name + "\n" + item.Description + "\n\n";
            }

            content += "========\n课程详情\n========\n\n";

            foreach (var course in Courses)
            {
                content += course.Name + "\n\n" +
                           "课程编号:" + course.Code + "\n" +
                           "任课教师:" + course.Teacher + "\n" +
                           "教师编号:" + course.TeacherId + "\n" +
                           "课程学分:" + course.Credit + "\n\n" +
                           "时间地点:\n\n" + course.LocationTime + "\n\n--------\n\n";
            }

            var msgDialog = new CommonDialog(content)
            {
                Title = "课程详情",
            };

            await msgDialog.ShowAsyncQueue();
        }
Ejemplo n.º 2
0
        private async void GatewayLogin()
        {
            try
            {
                if (GatewayClient.GetDefaultUser() != null)
                {
                    this.GatewayClient.Username = GatewayClient.GetDefaultUser().Username;
                    this.GatewayClient.Password = GatewayClient.GetDefaultUser().Password;

                    var res = await this.GatewayClient.Login();

                    var dialog = new CommonDialog(res)
                    {
                        Title = "提示",
                    };
                    await dialog.ShowAsyncQueue();
                }
            }
            catch { }
        }