using CommunityToolkit.Mvvm.Messaging; using DotNet4.Utilities; using LiveTools.Data; using Newtonsoft.Json.Linq; using ryCommon; using ryCommonDb; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; namespace LiveTools { /// /// FrmLogin.xaml 的交互逻辑 /// public partial class FrmAccountInfo : UserControl { public FrmAccountInfo() { InitializeComponent(); LblUserId.Text = Config.UserInfo.UserId; LblNickName.Text = Config.UserInfo.NickName; LblOutDate.Text = Config.UserInfo.OutDateStr; LblPriceAds.Text = Config.UserInfo.PriceAds; if (Config.UserInfo.BuyContact.Length > 0) { LblBuyContact.Text = "购买联系方式:" + Config.UserInfo.BuyContact; } WeakReferenceMessenger.Default.Register(this, OnReceive); } private void UserControl_Loaded(object sender, RoutedEventArgs e) { } private void OnReceive(object recipient, string message) { if (message=="login") { LblUserId.Text = Config.UserInfo.UserId; LblNickName.Text = Config.UserInfo.NickName; LblOutDate.Text = Config.UserInfo.OutDateStr; } } private void BtnOK_Click(object sender, RoutedEventArgs e) { } private void BtnUseSN_Click(object sender, RoutedEventArgs e) { FrmUseSN frm = new FrmUseSN(); frm.Owner = Application.Current.MainWindow; if(frm.ShowDialog()==true) { LblOutDate.Text = Config.UserInfo.OutDateStr; } } } }