| | |
| | | { |
| | | public partial class MainWindow : Window |
| | | { |
| | | private ObservableCollection<ViewData> viewDatas = new ObservableCollection<ViewData>(); |
| | | public ResWin resWin; |
| | | |
| | | private LoginWin win; |
| | | private LoginWin loginWin; |
| | | |
| | | private ObservableCollection<ViewData> viewDatas = new ObservableCollection<ViewData>(); |
| | | |
| | | public MainWindow() |
| | | { |
| | |
| | | // 设置 |
| | | private void Login_MouseLeftButtonDown(object sender, RoutedEventArgs e) |
| | | { |
| | | win = new LoginWin(); |
| | | loginWin = new LoginWin(); |
| | | this.Hide(); |
| | | win.Show(); |
| | | loginWin.Show(); |
| | | } |
| | | |
| | | public void SetLoginInfo() |
| | | { |
| | | if (win != null) win.Close(); |
| | | if (loginWin != null) loginWin.Close(); |
| | | this.Show(); |
| | | |
| | | //this.tbUid.Text = Tool.UserId.ToString(); |
| | | //this.tbToken.Text = Tool.Token; |
| | | |
| | | //string uidStr = this.tbUid.Text.Trim(); |
| | | //string didStr = this.tbDir.Text.Trim(); |
| | | |
| | | //int.TryParse(uidStr, out Common.UserId); |
| | | //int.TryParse(didStr, out Common.DirId); |
| | | this.tbUid.Text = CommonProp.UserId.ToString(); |
| | | this.tbUname.Text = CommonProp.Uname; |
| | | this.tbToken.Text = CommonProp.Token; |
| | | |
| | | this.btnLoad.IsEnabled = true; |
| | | this.btnImport.IsEnabled = true; |
| | |
| | | // 资源目录 |
| | | private void Dir_MouseLeftButtonDown(object sender, RoutedEventArgs e) |
| | | { |
| | | resWin = new ResWin(); |
| | | this.Hide(); |
| | | resWin.Show(); |
| | | } |
| | | |
| | | public void SetRes(string dircode, string fullName) |
| | | { |
| | | if (resWin != null) resWin.Close(); |
| | | this.Show(); |
| | | |
| | | if (!string.IsNullOrEmpty(dircode)) |
| | | { |
| | | CommonProp.Dircode = dircode; |
| | | this.tbDir.Text = fullName; |
| | | } |
| | | } |
| | | |
| | | // 数据目录 |