/// <summary> 加载其他信息 /// </summary> public void HandlerOther() { string dbName = GlobalStaticObj_Server.DbPrefix + GlobalStaticObj_Server.CommAccCode; //获取宇通加密秘钥 yuTongWebService.GlobalStaticObj_YT.KeySecurity_YT = DBHelper.GetSingleValue("获取服务站省份", dbName, "sys_config", "key_value", "key_name='KeySecurity_YT'", ""); //获取服务站所长省份,cxz GlobalStaticObj_Server.Instance.ServiceStationProvince = DBHelper.GetSingleValue("获取服务站省份", dbName, "tb_company", "province", string.Format("data_source='2' and sap_code='{0}'", yuTongWebService.GlobalStaticObj_YT.SAPCode), ""); CommonUtility.LoadAutoBackUpPlanInfo(); #region 启用服务 btnServer_Click(null, null); #endregion #region --启动云平台通讯服务 this.uiHandler += new UiHandler(this.InitCloundService); ThreadPool.QueueUserWorkItem(new WaitCallback(this._StartCloundService)); #endregion #region 启用宇通系统链接 btnYutong_Click(null, null); #endregion }
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == Keys.Escape) { if (this.formCmb.Visible) { this.formCmb.Hide(); return(true); } } else if (keyData == Keys.Enter) { panelLogin_Click(null, null); return(true); } else if (keyData == Keys.F5) { this.uiHandler -= new UiHandler(this.LoginResult); this.uiHandler -= new UiHandler(this.ShowAccData); this.uiHandler += new UiHandler(this.ShowAccData); ThreadPool.QueueUserWorkItem(new WaitCallback(this._LoadAccData)); return(true); } return(base.ProcessCmdKey(ref msg, keyData)); }
private void Awake() { if (instance == null) { instance = this; } }
/// <summary> /// Initializes a new instance of the <see cref="ManagerOverviewPage"/> class. /// Constructor /// </summary> /// <param name="parent"> /// the frame which tihs page is displayed in /// </param> /// <param name="ui"> /// the UIHandler for this UI /// </param> public ManagerOverviewPage(Frame parent, UiHandler ui) { InitializeComponent(); _parent = parent; _ui = ui; _ui.ManagerOverviewPage = this; LoadingBar.Visibility = System.Windows.Visibility.Hidden; LoadingBar.Value = 100; RemoveButton.IsEnabled = false; AddButton.IsEnabled = false; EndElectionButton.IsEnabled = false; IPLabel.Content = IPLabel.Content.ToString().Replace("255.255.255.255", ui._station.Communicator.GetIdentifyingString()); ManagerstationGrid.ItemsSource = _ui._station.PeerStatuses.Values; // Change the width of the window var wnd = Window.GetWindow(_parent); if (wnd != null) { wnd.Width = 1000; } PopulateList(); RefreshStatistics(); }
private void ButtonLoadTrainSet_Click(object sender, EventArgs e) { _instance = _parser.ParseData(loadTrainSet.Text); UiHandler.SetSlider(panelSlider, buttonTrain.Top, buttonTrain.Height); buttonTrain.Enabled = true; UiHandler.PanelVisible(panelTrain, _panels); }
private void InitializeHandlers() { try { UiReferenceContainer uiRefContainer = new UiReferenceContainer ( perfCpuTextBox, perfRamTextBox, logListBox, mySqlServerTextBox, mySqlPortNmrUpDown, mySqlBaseTextBox, mySqlUserTextBox, mySqlPassTextBox, mainTabControl, mySqlInstallerCreateTablesCheckBox, mySqlInstallerCreateDataCheckBox, newAccLoginTextBox, newAccPassTextBox, newAccAccessLevelNmrUpDown, newAccButton, tcpIpTextBox, tcpPortNumericUpDown ); _uiHandler = UiHandler.GetInstance(uiRefContainer); _gameManager = GameManager.GetInstance(_uiHandler, _uiHandler, _uiHandler); } catch (Exception exception) { MessageBox.Show($"A method InitializeHandlers() throws an exception: {exception.Message}"); } }
/// <summary> /// Constructor /// </summary> /// <param name="parent">the frame this page is shown in</param> /// <param name="ui">the UIHandler for this UI</param> public MasterPasswordPage(Frame parent, UiHandler ui) { InitializeComponent(); _parent = parent; _ui = ui; MasterPassWordLabel.Content = _ui.GeneratePassword(); }
private void _LoadReminder(DataSet ds) { this.loadFlag = false; UiHandler _uiHandler = new UiHandler(this.LoadReminder); this.Invoke(_uiHandler, ds); }
public void _ShowItem(DataTable dt) { this.loadFlag = false; UiHandler _uiHandler = new UiHandler(this.ShowItem); this.Invoke(_uiHandler, dt); }
private void panelLogin_Click(object sender, EventArgs e) { pictureBox4.Image = Properties.Resources.top2; if (this.enableFlag) { this.errorProvider.Clear(); if (string.IsNullOrEmpty(this.tbUser.Caption.Trim()) || this.tbUser.Caption.Trim() == "用户名") { Utility.Common.Validator.SetError(this.errorProvider, this.tbUser, "用户名不能为空!"); return; } if (string.IsNullOrEmpty(this.tbPwd.Caption.Trim()) || this.tbPwd.Caption.Trim() == "密码") { Utility.Common.Validator.SetError(this.errorProvider, this.tbPwd, "密码不能为空!"); return; } //FormLoading.StartLoading(this, new Size(110, 120)); this.enableFlag = false; this.userName = this.tbUser.Caption.Trim(); this.pwd = this.tbPwd.Caption.Trim(); this.uiHandler += new UiHandler(this.LoginResult); //登录验证 ThreadPool.QueueUserWorkItem(new WaitCallback(this._Login)); } else { FormMessgeBox.ShowMsg(this, "数据库连接异常!", this.panelTop.BackColor); } }
private void ButtonTestSet_Click(object sender, EventArgs e) { _drawer?.ResetPoints(); UiHandler.SetSlider(panelSlider, buttonTestSet.Top, buttonTestSet.Height); buttonTrain.Enabled = false; buttonTest.Enabled = false; UiHandler.PanelVisible(panelTestSet, _panels); }
void Awake() { uiHandler = GetComponent <UiHandler>(); sceneHandler = GetComponent <SceneHandler>(); audioSource = GetComponent <AudioSource>(); curentNode.SettingUp(firstNode); }
/// <summary> /// Initializes a new instance of the <see cref="CheckMasterPasswordDialog"/> class. /// constructor /// </summary> /// <param name="ui"> /// the UIHandler for this UI /// </param> public CheckMasterPasswordDialog(UiHandler ui, string reason) { InitializeComponent(); _ui = ui; PwTextbox.Focus(); Title = "Master Password"; AuthenticationReason.Text = reason; }
/// <summary> /// Initializes a new instance of the <see cref="DataLoadPage"/> class. /// constructor /// </summary> /// <param name="parent"> /// the frame in which this page is displayed /// </param> /// <param name="ui"> /// the UIHandler for this UI /// </param> public DataLoadPage(Frame parent, UiHandler ui, bool local = false) { InitializeComponent(); _parent = parent; _ui = ui; _local = local; LoadingLabel.Visibility = System.Windows.Visibility.Hidden; }
private void LoginResult(object obj) { this.uiHandler -= new UiHandler(this.LoginResult); string errMsg = obj.ToString(); if (!string.IsNullOrEmpty(errMsg)) { FormLoading.EndLoading(); FormMessgeBox.ShowMsg(this, errMsg, this.panelTop.BackColor); this.enableFlag = true; return; } if (GlobalStaticObj.gLoginDataSet == null || GlobalStaticObj.gLoginDataSet.Tables.Count == 0 || GlobalStaticObj.gLoginDataSet.Tables[0].Rows.Count < 1) { this.enableFlag = true; FormLoading.EndLoading(); FormMessgeBox.ShowMsg(this, "用户名或密码错误!", this.panelTop.BackColor); return; } if (HXCServerWinForm.GlobalStaticObj.gLoginDataSet.Tables[0].Rows.Count < 1) { this.enableFlag = true; FormMessgeBox.ShowMsg(this, "数据加载失败!", this.panelTop.BackColor); FormLoading.EndLoading(); return; } #region 设置全局变量 GlobalStaticObj_Server.Instance.UserID = GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["user_id"].ToString(); GlobalStaticObj_Server.Instance.UserName = GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["user_name"].ToString(); GlobalStaticObj_Server.Instance.LoginName = GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["land_name"].ToString(); GlobalStaticObj_Server.Instance.PassWord = GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["password"].ToString(); GlobalStaticObj_Server.Instance.RoleID = GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["role_id"].ToString(); GlobalStaticObj_Server.Instance.RoleName = GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["role_name"].ToString(); GlobalStaticObj_Server.Instance.OrgID = GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["org_id"].ToString(); GlobalStaticObj_Server.Instance.OrgName = GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["org_name"].ToString(); GlobalStaticObj_Server.Instance.ComID = GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["com_id"].ToString(); GlobalStaticObj_Server.Instance.ComName = GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["com_name"].ToString(); GlobalStaticObj_Server.Instance.LoginTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); #endregion //预加载信息 //LocalCache.PreLoad(); //登录记忆保存 this.SaveMemery(); FormLoading.EndLoading(); this.DialogResult = DialogResult.OK;//关键:设置登陆成功状态 }
void RefreshAccData() { this.Opacity = 1; this.uiHandler -= new UiHandler(this.LoginResult); this.uiHandler -= new UiHandler(this.ShowAccData); this.uiHandler += new UiHandler(this.ShowAccData); //加载帐套信息 ThreadPool.QueueUserWorkItem(new WaitCallback(this._LoadAccData)); }
/// <summary> /// Constructor /// </summary> /// <param name="ui">the UIHandler for this UI</param> /// <param name="parent">the frame in which this page is displayed</param> public BallotRequestPage(UiHandler ui, Frame parent) { _ui = ui; _parent = parent; _ui.BallotRequestPage = this; InitializeComponent(); checkValidityButton.IsEnabled = false; WaitingLabel.Content = ""; }
private void ButtonSave_Click(object sender, EventArgs e) { SaveTestSet.Enabled = false; savePanel.Visible = false; _parser.FormatAndSaveResult(fileNameBox.Text, _instance); UiHandler.PanelVisible(panelTrain, _panels); buttonTrain.Enabled = true; UiHandler.SetSlider(panelSlider, buttonTrain.Top, buttonTrain.Height); }
public WaitingForManagerPage(Frame parent, UiHandler ui) { _parent = parent; _ui = ui; InitializeComponent(); Window.GetWindow(_parent); _ui.WaitingForManagerPage = this; }
/// <summary> /// constructor /// </summary> /// <param name="ui">the UIHandler for this UI</param> public CheckMasterPasswordDialog(UiHandler ui) { InitializeComponent(); _ui = ui; Focus(); PwTextbox.Focus(); OKButton.IsEnabled = false; Title = "Master Password"; }
private void GoToResult_Click(object sender, EventArgs e) { Train.Visible = true; _ann.GoToResult(); GoToResults.Visible = false; UiHandler.PanelVisible(panelResult, _panels); buttonResult.Enabled = true; UiHandler.SetSlider(panelSlider, buttonResult.Top, buttonResult.Height); }
public PrecinctChoicePage(Frame parent, UiHandler ui) { InitializeComponent(); _parent = parent; _ui = ui; _ui.PrecinctChoicePage = this; _places = new SortedDictionary <string, PollingPlace>(); PopulateList(); }
/// <summary> /// Constructor /// </summary> /// <param name="parent">the frame this page is shown in</param> /// <param name="ui">the UIHandler for this UI</param> public OverviewPage(Frame parent, UiHandler ui) { InitializeComponent(); _parent = parent; _ui = ui; _ui.OverviewPage = this; LoadingBar.Visibility = Visibility.Hidden; LoadingBar.Value = 100; PopulateList(); }
private void GoToTest_Click(object sender, EventArgs e) { Train.Visible = true; GoToTest.Visible = false; GoToTest.Enabled = false; _ann.FixArchitecture(); UiHandler.PanelVisible(panelTest, _panels); buttonTest.Enabled = true; UiHandler.SetSlider(panelSlider, buttonTest.Top, buttonTest.Height); }
private void UCHomePage_Load(object sender, EventArgs e) { btnServer_Click(null, null); BindDatatoFrm(); #region --启动云平台通讯服务 this.uiHandler += new UiHandler(this.InitCloundService); ThreadPool.QueueUserWorkItem(new WaitCallback(this._StartCloundService)); #endregion }
/// <summary> /// Initializes a new instance of the <see cref="WaitingForManagerPage"/> class. /// </summary> /// <param name="parent"> /// The parent. /// </param> /// <param name="ui"> /// The ui. /// </param> public WaitingForManagerPage(Frame parent, UiHandler ui) { _parent = parent; _ui = ui; InitializeComponent(); Window.GetWindow(_parent); IPLabel.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(delegate { IPLabel.Content = "This is Station " + _ui.IdentifyingString(); })); _ui.WaitingForManagerPage = this; }
/// <summary> /// Constructor /// </summary> /// <param name="ip">the IP address of the station to accept</param> /// <param name="ui">the UIHandler for this UI</param> public AcceptStationDialog(IPEndPoint ip, UiHandler ui) { _ui = ui; _ip = ip; InitializeComponent(); StationLabel.Content = ip.Address.ToString(); Focus(); PwTextbox.Focus(); OKButton.IsEnabled = false; Title = "Accept Station"; }
private void Start() { InitSprites(); ShuffleSprites(); InitButtons(); Time.timeScale = 1f; startTime = Time.time; isGameFinished = isGamePaused = false; uiHandler = FindObjectOfType <UiHandler>(); }
private void ButtonTrain_Click(object sender, EventArgs e) { _ann?.ResetNetwork(); _drawer?.ResetPoints(); _ann?.ResetTraining(); Train.Visible = true; GoToTest.Visible = false; UiHandler.SetSlider(panelSlider, buttonTrain.Top, buttonTrain.Height); buttonTest.Enabled = false; UiHandler.PanelVisible(panelTrain, _panels); }
/// <summary> /// Initializes a new instance of the <see cref="AcceptStationDialog"/> class. /// Constructor /// </summary> /// <param name="ip"> /// the IP address of the station to accept /// </param> /// <param name="ui"> /// the UIHandler for this UI /// </param> public AcceptStationDialog(IPEndPoint ip, UiHandler ui) { _ui = ui; _ip = ip; InitializeComponent(); StationLabel.Content = StationLabel.Content.ToString().Replace("NAME", _ui.IdentifyingStringForStation(ip)); Activate(); PwTextbox.Focus(); OKButton.IsEnabled = false; Title = "Accept Station"; }
/// <summary> /// 动画加载 /// </summary> /// <param name="ctl"></param> public static void StartLoading(Control ctl) { if (formLoading != null) { EndLoading(); } formLoading = new FormLoading(); uiHandler -= new UiHandler(ShowText); uiHandler += new UiHandler(ShowText); formLoading.Show(); //formLoading.BringToFront(); AdjustLoacation(ctl); }
public UCAnnounce() { InitializeComponent(); SetStyle( ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.DoubleBuffer, true); LocalCache.AnnounceComplated -= new LocalCache.AnnounceComplate(this._ShowItem); LocalCache.AnnounceComplated += new LocalCache.AnnounceComplate(this._ShowItem); this.uiHandler -= new UiHandler(this.ShowItem); this.uiHandler += new UiHandler(this.ShowItem); }
public UCReminder() { InitializeComponent(); SetStyle( ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.DoubleBuffer, true); LocalCache.ReminderComplated -= new LocalCache.ReminderComplate(this._LoadReminder); LocalCache.ReminderComplated += new LocalCache.ReminderComplate(this._LoadReminder); this.uiHandler -= new UiHandler(this.LoadReminder); this.uiHandler += new UiHandler(this.LoadReminder); }
/// <summary> /// 动画加载 /// </summary> /// <param name="ctl">阴影覆盖控件</param> /// <param name="size"></param> public static void StartLoading(Control ctl,Size size) { if (formLoading != null) { EndLoading(); } formLoading = new FormLoading(); uiHandler -= new UiHandler(ShowText); uiHandler += new UiHandler(ShowText); formLoading.Show(); if (size.Width > ctl.Width) { size = new Size(ctl.Width, size.Height); } if (size.Height > ctl.Height) { size = new Size(size.Width, ctl.Height); } formLoading.Size = size; AdjustLoacation(ctl); }
private void panelLogin_Click(object sender, EventArgs e) { pictureBox4.Image = Properties.Resources.top2; if (this.enableFlag) { if (this.dtDb.Rows.Count == 0) { MessageBoxEx.Show("帐套信息加载中…"); this.RefreshAccData(); return; } this.errorProvider.Clear(); if (string.IsNullOrEmpty(this.tbUser.Caption.Trim()) || this.tbUser.Caption.Trim() == "用户名") { Utility.Common.Validator.SetError(this.errorProvider, this.tbUser, "用户名不能为空!"); return; } if (string.IsNullOrEmpty(this.tbPwd.Caption.Trim()) || this.tbPwd.Caption.Trim() == "密码") { Utility.Common.Validator.SetError(this.errorProvider, this.tbPwd, "密码不能为空!"); return; } //FormLoading.StartLoading(this,new Size(110,120)); this.enableFlag = false; this.userName = this.tbUser.Caption.Trim(); this.pwd = this.tbPwd.Caption.Trim(); this.uiHandler += new UiHandler(this.LoginResult); //保存帐套信息 string dbId = this.tbDb.Tag.ToString(); DataRow dr = this.dtDb.Select("Value='" + dbId + "'")[0]; GlobalStaticObj.CurrAccID = dbId; GlobalStaticObj.CurrAccCode = dr["Code"].ToString(); GlobalStaticObj.CurrAccName = dr["Name"].ToString(); GlobalStaticObj.IsDefaultAcc = dr["Status"].ToString() == DataSources.EnumYesNo.Yes.ToString("d"); this.timer.Enabled = true; //登录验证 ThreadPool.QueueUserWorkItem(new WaitCallback(this._Login)); } else { MessageBoxEx.Show("服务连接异常!"); } }
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == Keys.Escape) { if (this.formCmb.Visible) { this.formCmb.Hide(); return true; } } else if (keyData == Keys.Enter) { panelLogin_Click(null, null); return true; } else if (keyData == Keys.F5) { this.uiHandler -= new UiHandler(this.LoginResult); this.uiHandler -= new UiHandler(this.ShowAccData); this.uiHandler += new UiHandler(this.ShowAccData); ThreadPool.QueueUserWorkItem(new WaitCallback(this._LoadAccData)); return true; } return base.ProcessCmdKey(ref msg, keyData); }
private void LoginResult(object obj) { this.uiHandler -= new UiHandler(this.LoginResult); if (this.enableFlag) { return; } this.timer.Enabled = false; string errMsg = obj.ToString(); if (!string.IsNullOrEmpty(errMsg)) { FormLoading.EndLoading(); FormMessgeBox.ShowMsg(this, errMsg, this.panelTop.BackColor); this.enableFlag = true; return; } if (HXCPcClient.GlobalStaticObj.gLoginDataSet == null) { FormMessgeBox.ShowMsg(this, "数据加载失败!", this.panelTop.BackColor); FormLoading.EndLoading(); this.enableFlag = true; return; } if (HXCPcClient.GlobalStaticObj.gLoginDataSet.Tables[0].Rows.Count < 1) { FormLoading.EndLoading(); this.enableFlag = true; return; } try { #region 服务站信息 add by kord var dr = DBHelper.GetTable("获取当前服务站信息", GlobalStaticObj.CommAccCode, "tb_company", "*", "data_source = '2'", "", ""); if (dr == null || dr.Rows.Count == 0) { GlobalStaticObj.GlobalLogService.WriteLog("无法获取当前服务站信息"); } else { GlobalStaticObj.ServerStationCode = CommonCtrl.IsNullToString(dr.Rows[0]["sap_code"]); GlobalStaticObj.ServerStationName = CommonCtrl.IsNullToString(dr.Rows[0]["com_name"]); } #endregion GlobalStaticObj.CookieStr = GlobalStaticObj.gLoginDataSet.Tables["cookieStr"].Rows[0][0].ToString(); GlobalStaticObj.UserID = GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["user_id"].ToString(); GlobalStaticObj.UserName = GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["user_name"].ToString(); GlobalStaticObj.LandName = GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["land_name"].ToString(); GlobalStaticObj.PassWord = GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["password"].ToString(); GlobalStaticObj.CurrUserCom_Id = GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["com_id"].ToString(); GlobalStaticObj.CurrUserCom_Code = GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["com_code"].ToString(); GlobalStaticObj.CurrUserCom_Name = GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["com_name"].ToString(); GlobalStaticObj.CurrUserOrg_Id = GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["org_id"].ToString(); GlobalStaticObj.CurrUserOrg_Name = GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["org_name"].ToString(); GlobalStaticObj.CurrUserCom_Category = CommonCtrl.IsNullToString(HXCPcClient.GlobalStaticObj.gLoginDataSet.Tables[0].Rows[0]["category"]); //modify by kord } catch (Exception ex) { //write log } ThreadPool.SetMinThreads(3, 3); ThreadPool.SetMaxThreads(5, 5); //预加载信息 LocalCache.PreLoad(); //记忆登录保存 this.SaveMemery(); FormLoading.EndLoading(); this.DialogResult = DialogResult.OK;//关键:设置登陆成功状态 }
private void FormLogin_Load(object sender, EventArgs e) { this.dtDb = new DataTable(); this.dtDb.Columns.Add("DisplayName"); this.dtDb.Columns.Add("Name"); this.dtDb.Columns.Add("Value"); this.dtDb.Columns.Add("Code"); this.dtDb.Columns.Add("Status"); this.uiHandler -= new UiHandler(this.ShowAccData); this.uiHandler += new UiHandler(this.ShowAccData); //初始化Wcf WCFClientProxy.CreatePCClientProxy(); //加载帐套信息 ThreadPool.QueueUserWorkItem(new WaitCallback(this._LoadAccData)); //初始化配置 LocalVariable.Init(); //加载登录记忆 this.LoadMemery(); }
public void _ShowItem(DataTable dt) { this.loadFlag = false; UiHandler _uiHandler = new UiHandler(this.ShowItem); this.Invoke(_uiHandler,dt); }
/// <summary> 加载其他信息 /// </summary> public void HandlerOther() { GlobalStaticObj_Server.Instance.FilePath = System.Configuration.ConfigurationManager.AppSettings["savePath"].ToString(); string dbName = GlobalStaticObj_Server.DbPrefix + GlobalStaticObj_Server.CommAccCode; GlobalStaticObj_Server.Instance.DbServerInstallDir = DBHelper.GetSingleValue("获取数据库安装路径", dbName, "sys_config", "key_value", "key_name='DbServerInstallDir'", ""); GlobalStaticObj_Server.Instance.DbServerBackDir = DBHelper.GetSingleValue("获取数据库备份路径", dbName, "sys_config", "key_value", "key_name='DbServerBackDir'", ""); //获取宇通加密秘钥 yuTongWebService.GlobalStaticObj_YT.KeySecurity_YT = DBHelper.GetSingleValue("获取服务站省份", dbName, "sys_config", "key_value", "key_name='KeySecurity_YT'", ""); //获取服务站所长省份,cxz GlobalStaticObj_Server.Instance.ServiceStationProvince = DBHelper.GetSingleValue("获取服务站省份", dbName, "tb_company", "province", string.Format("data_source='2' and sap_code='{0}'", yuTongWebService.GlobalStaticObj_YT.SAPCode), ""); CommonUtility.LoadAutoBackUpPlanInfo(); #region 启用服务 btnServer_Click(null, null); #endregion #region --启动云平台通讯服务 this.uiHandler += new UiHandler(this.InitCloundService); ThreadPool.QueueUserWorkItem(new WaitCallback(this._StartCloundService)); #endregion #region 启用宇通系统链接 btnYutong_Click(null, null); #endregion }
private void ShowAccData(object obj) { this.uiHandler -= new UiHandler(this.ShowAccData); if (obj.ToString().Length > 0) { FormLoading.EndLoading(); if (this.formSet == null || !this.formSet.Visible) { FormMessgeBox.ShowMsg(this, "无法加载帐套数据!", this.panelTop.BackColor); } } this.enableFlag = true; //加载帐套 if (this.dtDb.Rows.Count > 0) { this.tbDb.Caption = this.dtDb.Rows[0]["DisplayName"].ToString(); this.tbDb.Tag = this.dtDb.Rows[0]["Value"].ToString(); if (this.tbUser.Caption.Trim().Length == 0) { this.tbUser.Focus(); } else { if (this.tbPwd.Caption.Trim().Length == 0) { this.tbPwd.Focus(); } else { this.panelLogin.Focus(); } } } this.formCmb = new FormCmb(); this.formCmb.DisplayName = "DisplayName"; this.formCmb.ValueName = "Value"; this.formCmb.ItemHeight = 35; this.formCmb.BackColor = Color.White; this.formCmb.SelectedColor = Color.FromArgb(97, 167, 208); this.formCmb.ItemSelected += new FormCmb.ItemSelectedHandler(this.SeletecdAccount); this.formCmb.BindCmb(this.tbDb.InnerTextBox, this.dtDb, this.tbDb.Location.X, this.panelDb.Height - this.tbDb.Location.Y - this.tbDb.Height, false); }