private void Window_Loaded(object sender, RoutedEventArgs e) { if (Parameters.LanguageType.Equals("CN") || Parameters.LanguageType.Equals("")) { AdvanceSetLanguageClass = new Language_CN.AdvanceSet(); this.DataContext = (Language_CN.AdvanceSet)AdvanceSetLanguageClass; } else if (Parameters.LanguageType.Equals("EN")) { AdvanceSetLanguageClass = new Language_EN.AdvanceSet(); this.DataContext = (Language_EN.AdvanceSet)AdvanceSetLanguageClass; } #region 权限 if (RoleTypeClass.RoleType != null && RoleTypeClass.RoleType != "") { if (RoleTypeClass.RoleType.Equals("RoleType")) { if (!RoleTypeClass.RolePrivilege.ContainsKey("后台设置")) { tiBackgroundSet.Visibility = System.Windows.Visibility.Collapsed; btnSave.IsEnabled = false; tabControl.SelectedIndex = 1; } else { tabControl.SelectedIndex = 0; tiBackgroundSet.Visibility = System.Windows.Visibility.Visible; btnSave.IsEnabled = Convert.ToBoolean(int.Parse(RoleTypeClass.RolePrivilege["后台设置"])); } if (!RoleTypeClass.RolePrivilege.ContainsKey("配置导入导出")) { tiImportExportSet.Visibility = System.Windows.Visibility.Collapsed; btnExport.IsEnabled = false; btnImport.IsEnabled = false; tabControl.SelectedIndex = 0; } else { tiImportExportSet.Visibility = System.Windows.Visibility.Visible; btnExport.IsEnabled = Convert.ToBoolean(int.Parse(RoleTypeClass.RolePrivilege["配置导入导出"])); btnImport.IsEnabled = Convert.ToBoolean(int.Parse(RoleTypeClass.RolePrivilege["配置导入导出"])); } } } #endregion txtDBIPAddr.DataContext = Parameters.ServerBaseParameter; txtLogsType.DataContext = Parameters.ServerBaseParameter; txtDataAlignMode.DataContext = Parameters.ServerBaseParameter; txtLogsFileSize.DataContext = Parameters.ServerBaseParameter; txtFTPServerIPAddr.DataContext = Parameters.ServerBaseParameter; txtFTPServerPort.DataContext = Parameters.ServerBaseParameter; txtFTPServerUser.DataContext = Parameters.ServerBaseParameter; txtFTPServerPass.DataContext = Parameters.ServerBaseParameter; txtFTPServerPath.DataContext = Parameters.ServerBaseParameter; txtCDMAPort.DataContext = Parameters.ServerBaseParameter; txtGSMV2Port.DataContext = Parameters.ServerBaseParameter; txtGSMPort.DataContext = Parameters.ServerBaseParameter; txtLTEPort.DataContext = Parameters.ServerBaseParameter; txtWCDMAPort.DataContext = Parameters.ServerBaseParameter; txtClientPort.DataContext = Parameters.ServerBaseParameter; txtAPPort.DataContext = Parameters.ServerBaseParameter; txtAndroidPort.DataContext = Parameters.ServerBaseParameter; txtTDSPort.DataContext = Parameters.ServerBaseParameter; //句柄 Parameters.AdvanceSettingWinHandle = new WindowInteropHelper(this).Handle; //载入基本参数 if (NetWorkClient.ControllerServer.Connected) { NetWorkClient.ControllerServer.Send(JsonInterFace.ServerBaseParameterRequest()); } }