public FormEditDevice(Device _mDevice, IList <Device> _mListDevice) { InitializeComponent(); this.Translate(); this.UpdateUI(); base.DoInit(); //Create worker mThread = new ExBackgroundWorker(); mThread.WorkerReportsProgress = true; mThread.WorkerSupportsCancellation = true; mThread.ProgressChanged += new ProgressChangedEventHandler(bwAsync_WorkerChanged); mThread.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bwAsync_WorkerCompleted); mThread.DoWork += new DoWorkEventHandler(bwAsync_Worker); mDevice = _mDevice ?? new Device(); mListDevice = _mListDevice; txtDeviceCode.Text = mDevice.DeviceCode; txtDeviceName.Text = mDevice.DeviceName; txtTenRutGon.Text = mDevice.DeviceName_Short; txtHome.Text = Home.GetDefault(mDevice.HomeID).HomeName; txtRoom.Text = Room.GetDefault(mDevice.RoomID).RoomName; txtUser.Text = User.GetDefault(mDevice.UserID).UserName; }
public FormEditUser(User _mUser, IList <User> _mListUser) { InitializeComponent(); this.Translate(); this.UpdateUI(); base.DoInit(); //Create worker mThread = new ExBackgroundWorker(); mThread.WorkerReportsProgress = true; mThread.WorkerSupportsCancellation = true; mThread.ProgressChanged += new ProgressChangedEventHandler(bwAsync_WorkerChanged); mThread.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bwAsync_WorkerCompleted); mThread.DoWork += new DoWorkEventHandler(bwAsync_Worker); mUser = _mUser ?? new User(); mListUser = _mListUser; txtUserCode.Text = mUser.UserCode; txtUserName.Text = mUser.UserName; txtPass.Text = mUser.UserPassword; txtAPIKey.Text = mUser.APIKey; txtLocaltionName.Text = mUser.LocaltionName; txtLatitude.Text = mUser.Latitude; txtLongitude.Text = mUser.Longitude; txtHassIO_URL.Text = mUser.HassIO_URL; txtHassIO_KEY.Text = mUser.HassIO_KEY; }
private void DisplayButtons(MessageBoxButtons buttons) { switch (buttons) { case MessageBoxButtons.Ok: btnCancel.Visibility = Visibility.Collapsed; btnNo.Visibility = Visibility.Collapsed; btnYes.Visibility = Visibility.Visible; btnYes.Content = "Ok"; ExBackgroundWorker.DoWork_Focus(btnYes, 100); break; case MessageBoxButtons.OkCancel: btnCancel.Visibility = Visibility.Visible; btnNo.Visibility = Visibility.Collapsed; btnYes.Visibility = Visibility.Visible; btnYes.Content = "Ok"; ExBackgroundWorker.DoWork_FocusForLoad(btnCancel); break; case MessageBoxButtons.YesNo: btnCancel.Visibility = Visibility.Collapsed; btnNo.Visibility = Visibility.Visible; btnYes.Visibility = Visibility.Visible; ExBackgroundWorker.DoWork_Focus(btnNo, 100); break; case MessageBoxButtons.YesNoCancel: btnCancel.Visibility = Visibility.Visible; btnNo.Visibility = Visibility.Visible; btnYes.Visibility = Visibility.Visible; ExBackgroundWorker.DoWork_Focus(btnCancel, 100); break; } }
public override void ResultMessageBox(MessageBoxResult _MessageBoxResult, Control _errCtl) { if (_MessageBoxResult == MessageBoxResult.OK) { #region 更新処理 if (this.ProcKbn == eProcKbn.Update) { UpdateData(Common.geUpdateType.Update); } else { UpdateData(Common.geUpdateType.Insert); } #endregion } else { if (_errCtl != null) { ExBackgroundWorker.DoWork_Focus(_errCtl, 10); } } }
// F2ボタン(条件クリア) クリック public override void btnF2_Click(object sender, RoutedEventArgs e) { // 画面初期化 ExVisualTreeHelper.initDisplay(this.LayoutRoot); this.lst.Clear(); this.dg.ItemsSource = null; if (Common.gWinGroupType == Common.geWinGroupType.InpList) { DataInitWhere.InitDate(DataInitWhere.geDateKbn.Month, ref this.datEstimateYmd_F, ref this.datEstimateYmd_T); } else { DataInitWhere.InitDate(DataInitWhere.geDateKbn.Today, ref this.datEstimateYmd_F, ref this.datEstimateYmd_T); } // 取引区分 this.chkKake.IsChecked = false; this.chkCash.IsChecked = false; // 承認状態 this.chkStillApproval.IsChecked = false; this.chkApproval.IsChecked = false; this.chkResevation.IsChecked = false; this.chkRejetion.IsChecked = false; ExBackgroundWorker.DoWork_Focus(this.datEstimateYmd_F, 10); }
public FormViewHome() { InitializeComponent(); this.Translate(); this.UpdateUI(); base.DoInit(); //Create worker mThread = new ExBackgroundWorker(); mThread.WorkerReportsProgress = true; mThread.WorkerSupportsCancellation = true; mThread.ProgressChanged += new ProgressChangedEventHandler(bwAsync_WorkerChanged); mThread.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bwAsync_WorkerCompleted); mThread.DoWork += new DoWorkEventHandler(bwAsync_Worker); this.olvColumnUser.AspectGetter = delegate(object x) { Home data = (Home)x; if (data != null && data.HomeID > 0) { return(User.GetDefault(data.UserID).UserName); } return(""); }; }
public override void ResultMessageBox(MessageBoxResult _MessageBoxResult, Control _errCtl) { if (_MessageBoxResult == MessageBoxResult.OK) { #region 更新処理 UpdateData(); #endregion } else { if (_errCtl != null) { switch (_errCtl.Name) { case "dg": ExBackgroundWorker.DoWork_DataGridSelectCell(dg, _selectIndex, _selectColumn); break; default: ExBackgroundWorker.DoWork_Focus(_errCtl, 10); break; } } } }
public override bool UpdateDatabaseSequence(IDbConnection connection, IDbTransaction trans, ExBackgroundWorker worker) { synch_worker = worker; String sql = SanitaUtility.GetResourceFileStreamText("update_sequence"); if (!String.IsNullOrEmpty(sql)) { DataTable mDataTable = myBaseDao.DoGetDataTable(connection, trans, sql); if (mDataTable != null) { //Synch database if (synch_worker != null) { synch_worker.ReportProgress(0, mDataTable.Rows.Count); } int index_sql = 0; foreach (DataRow row in mDataTable.Rows) { if (row["sql_column"] != null) { String sql_update = row["sql_column"].ToString(); myBaseDao.DoUpdate(connection, trans, sql_update); } index_sql++; synch_worker.ReportProgress(index_sql, mDataTable.Rows.Count); } } } return(true); }
private void ExUserControl_Loaded(object sender, RoutedEventArgs e) { if (this.gPageType != Common.gePageType.None) { this.utlID.Visibility = System.Windows.Visibility.Visible; this.utlMstID.Visibility = System.Windows.Visibility.Collapsed; this.utlMstID.IsTabStop = false; this_txtID = this.utlID.txtID; } else { this.utlID.Visibility = System.Windows.Visibility.Collapsed; this.utlID.IsTabStop = false; this.utlMstID.Visibility = System.Windows.Visibility.Visible; this_txtID = this.utlMstID.txtID; } // 画面初期化 ExVisualTreeHelper.initDisplay(this.LayoutRoot); this.rdoAri.IsChecked = true; this.rdoAri_Checked(null, null); ExBackgroundWorker.DoWork_FocusForLoad(this.this_txtID); }
public FormEditIntent(Intent _mIntent, IList <Intent> _mListIntent) { InitializeComponent(); this.Translate(); this.UpdateUI(); base.DoInit(); //Create worker mThread = new ExBackgroundWorker(); mThread.WorkerReportsProgress = true; mThread.WorkerSupportsCancellation = true; mThread.ProgressChanged += new ProgressChangedEventHandler(bwAsync_WorkerChanged); mThread.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bwAsync_WorkerCompleted); mThread.DoWork += new DoWorkEventHandler(bwAsync_Worker); mIntent = _mIntent ?? new Intent(); mListIntent = _mListIntent; txtType.DataSource = DM_Intent_Type.GetDefaultList(0); txtType.DisplayMember = "DM_Intent_TypeName"; txtType.SelectedIndex = -1; txtName.Text = mIntent.IntentName; txtType.SelectedItem = DM_Intent_Type.GetDefault(txtType.DataSource, mIntent.DM_Intent_TypeID); }
private void ExUserControl_Loaded(object sender, RoutedEventArgs e) { if (Common.gblnLogin == false) { return; } // 画面初期化 ExVisualTreeHelper.initDisplay(this.LayoutRoot); // ファンクションキー初期設定 utlFunctionKey = ExVisualTreeHelper.GetUtlFunctionKey(this.LayoutRoot); utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Init; utlFunctionKey.Init(); // バインド設定 SetBinding(); //System.Globalization.CultureInfo Culture = new System.Globalization.CultureInfo(Thread.CurrentThread.CurrentCulture.Name); //// SelectedDateFormat=Shortのパターン //Culture.DateTimeFormat.ShortDatePattern = "yyyy/MM"; //// SelectedDateFormat=Longのパターン //Culture.DateTimeFormat.LongDatePattern = "ggy'年'M'月'"; //Thread.CurrentThread.CurrentCulture = Culture; ExBackgroundWorker.DoWork_Focus(this.utlPurchase.txtID, 100); }
public override void ResultMessageBox(Control _errCtl) { if (_errCtl != null) { ExBackgroundWorker.DoWork_Focus(_errCtl, 10); } }
// リスト取得コールバック呼出 public override void DataSelect(int intKbn, object objList) { if ((ExWebService.geWebServiceCallKbn)intKbn == this.WebServiceCallKbn) { if (objList != null) { entityList = (ObservableCollection <EntityStockInventory>)objList; //this.dgPrint.Focus(); //this.dgPrint.ItemsSource = null; //this.dgPrint.ItemsSource = entityList; this.dgUpdate.ItemsSource = null; this.dgUpdate.ItemsSource = entityList; ExBackgroundWorker.DoWork_Focus(this.dgUpdate, 10); this.utlFKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Upd; } else { entityList = null; //this.dgPrint.ItemsSource = null; this.dgUpdate.ItemsSource = null; ExBackgroundWorker.DoWork_Focus(this.datYmd, 10); this.utlFKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.New; } } }
private void Current_CheckAndDownloadUpdateCompleted(object sender, CheckAndDownloadUpdateCompletedEventArgs e) { if (e.UpdateAvailable) { ExMessageBox.Show("最新アプリケーションを更新しました、再起動してください。"); Application.Current.MainWindow.Close(); } else if (e.Error != null && e.Error is PlatformNotSupportedException) { ExMessageBox.Show("最新Silverligtバージョンを更新してください。"); blnUpdate = true; } else { if (e.Error == null) { } else { ExMessageBox.Show(e.Error.Message); } } ExBackgroundWorker.DoWork_Close(win, 2000); ExBackgroundWorker.DoWork_Focus(this.txtLoginID, 2100); }
// F2ボタン(条件クリア) クリック public override void btnF2_Click(object sender, RoutedEventArgs e) { // 画面初期化 ExVisualTreeHelper.initDisplay(this.LayoutRoot); this.lst.Clear(); this.dg.ItemsSource = null; if (Common.gWinGroupType == Common.geWinGroupType.InpList) { DataInitWhere.InitDate(DataInitWhere.geDateKbn.Month, ref this.datOrderYmd_F, ref this.datOrderYmd_T); } else { DataInitWhere.InitDate(DataInitWhere.geDateKbn.Today, ref this.datOrderYmd_F, ref this.datOrderYmd_T); } // 取引区分 this.chkKake.IsChecked = false; this.chkCash.IsChecked = false; // 完納区分 this.chkUnDelivary.IsChecked = false; this.chkPartDelivary.IsChecked = false; this.chkFullDelivary.IsChecked = false; this.chkTorikeshi.IsChecked = false; ExBackgroundWorker.DoWork_Focus(this.datOrderYmd_F, 10); }
public override void ResultMessageBox(MessageBoxResult _MessageBoxResult, Control _errCtl) { if (_MessageBoxResult == MessageBoxResult.OK) { #region 更新処理 switch (this.utlFunctionKey.gFunctionKeyEnable) { case Utl_FunctionKey.geFunctionKeyEnable.New: case Utl_FunctionKey.geFunctionKeyEnable.Init: UpdateData(Common.geUpdateType.Insert); break; case Utl_FunctionKey.geFunctionKeyEnable.Upd: UpdateData(Common.geUpdateType.Update); break; default: break; } #endregion } else { if (_errCtl != null) { ExBackgroundWorker.DoWork_Focus(_errCtl, 10); } } }
public override void ResultMessageBox(MessageBoxResult _MessageBoxResult, Control _errCtl) { if (_MessageBoxResult == MessageBoxResult.OK) { #region 更新処理 UpdateData(); #endregion } else { switch (_errCtl.Name) { case "dg": _errCtl.Focus(); this.dg.SelectedIndex = _selectIndex; dg.CurrentColumn = dg.Columns[_selectColumn]; ExBackgroundWorker.DoWork_Focus(_errCtl, 10); break; default: ExBackgroundWorker.DoWork_Focus(_errCtl, 10); break; } } }
private void InitDataSet() { try { if (this.ProcKbn == eProcKbn.Update) { if (this.IsGetCompanyGroupList == true && this.IsGetPersonList == true) { this.txtTitle.Text = this._entity._title; if (this._entity._gropu_id == 0) { cmbGroup.SelectedIndex = 0; } else { for (int i = 0; i <= cmbGroup.Items.Count - 1; i++) { if (ExCast.zCStr(this.cmbGroup.Items[i].ToString()) == this._entity._gropu_nm) { cmbGroup.SelectedIndex = i; } } } for (int i = 0; i <= cmbPerson.Items.Count - 1; i++) { if (ExCast.zCStr(this.cmbPerson.Items[i].ToString()) == this._entity._person_nm) { cmbPerson.SelectedIndex = i; } } for (int i = 0; i <= cmbLevel.Items.Count - 1; i++) { if (ExCast.zCStr(this.cmbLevel.Items[i].ToString()) == this._entity._duties_level_nm) { cmbLevel.SelectedIndex = i; } } for (int i = 0; i <= cmbState.Items.Count - 1; i++) { if (ExCast.zCStr(this.cmbState.Items[i].ToString()) == this._entity._duties_state_nm) { cmbState.SelectedIndex = i; } } this.txtPath.Text = this._entity._upload_file_name1; this.txtContent.Text = this._entity._content; ExBackgroundWorker.DoWork_Focus(this.txtTitle, 100); } } } catch (Exception ex) { ExMessageBox.Show(CLASS_NM + ".InitDataSet 初期データの設定に失敗しました。" + Environment.NewLine + ex.ToString(), "エラー確認"); this.DialogResult = false; } }
public override void DataSelect(int intKbn, object objList) { switch ((ExWebService.geWebServiceCallKbn)intKbn) { case _GetWebServiceCallKbn: if (objList != null) { _entity = (ObservableCollection <EntityCondition>)objList; EntityCondition entity = new EntityCondition(); // 明細初期設定 InitDetail(ref entity); _entity.Add(entity); SetDetailRecNo(); this.dg.ItemsSource = _entity; if (ExCast.zCInt(_entity[0]._lock_flg) == 0) { this.utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Upd; ExBackgroundWorker.DoWork_Focus(this.dg, 100); ExBackgroundWorker.DoWork_SelectedIndex(this.dg, 400, 0); ExBackgroundWorker.DoWork_DataGridColum(this.dg, 500, dg.Columns[0]); } else { this.utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Sel; } } else { _entity = new ObservableCollection <EntityCondition>(); EntityCondition entity = new EntityCondition(); // 明細初期設定 InitDetail(ref entity); _entity.Add(entity); SetDetailRecNo(); this.dg.ItemsSource = _entity; this.utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Upd; ExBackgroundWorker.DoWork_Focus(this.dg, 100); ExBackgroundWorker.DoWork_SelectedIndex(this.dg, 400, 0); ExBackgroundWorker.DoWork_DataGridColum(this.dg, 500, dg.Columns[0]); } break; default: break; } }
//Contructor public UtilityUpdateTime() { //Create worker m_BackgroundWorker = new ExBackgroundWorker(); m_BackgroundWorker.WorkerReportsProgress = true; m_BackgroundWorker.WorkerSupportsCancellation = true; m_BackgroundWorker.ProgressChanged += new ProgressChangedEventHandler(bwAsync_WorkerChanged); m_BackgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bwAsync_WorkerCompleted); m_BackgroundWorker.DoWork += new DoWorkEventHandler(bwAsync_Worker); }
// 受注リスト取得コールバック呼出 public override void DataSelect(int intKbn, object objList) { if ((ExWebService.geWebServiceCallKbn)intKbn == this.WebServiceCallKbn) { if (objList != null) { entityList = (ObservableCollection <EntityOrder>)objList; var records = (from n in entityList orderby n.order_ymd descending, n.no descending select new { n.no, n.order_ymd, n.estimateno, n.customer_nm, n.supplier_nm, n.supply_ymd, n.business_division_nm, n.deliver_division_nm }).Distinct(); this.lst.Clear(); foreach (var rec in records) { string _no = ExCast.zFormatForID(rec.no, Common.gintidFigureSlipNo); string _estimate_no = ExCast.zFormatForID(rec.estimateno, Common.gintidFigureSlipNo); if (ExCast.zCLng(_estimate_no) == 0) { _estimate_no = ""; } lst.Add(new DisplayOrderList(rec.no, _no, rec.order_ymd, rec.estimateno, _estimate_no, rec.customer_nm, rec.supplier_nm, rec.supply_ymd, rec.business_division_nm, rec.deliver_division_nm)); } this.dg.Focus(); this.dg.ItemsSource = null; this.dg.ItemsSource = lst; this.dgSelect.ItemsSource = null; this.dgSelect.ItemsSource = lst; if (lst.Count > 0) { this.dg.SelectedIndex = 0; } ExBackgroundWorker.DoWork_Focus(dg, 10); } else { entityList = null; this.lst.Clear(); this.dg.ItemsSource = null; this.dgSelect.ItemsSource = null; ExBackgroundWorker.DoWork_Focus(this.datOrderYmd_F, 10); } } }
// F2ボタン(条件クリア) クリック public override void btnF2_Click(object sender, RoutedEventArgs e) { // 画面初期化 ExVisualTreeHelper.initDisplay(this.LayoutRoot); this.lst.Clear(); this.dgSelect.ItemsSource = null; DataInitWhere.InitDate(DataInitWhere.geDateKbn.Month, ref this.datPaymentCloseYmd_F, ref this.datPaymentCloseYmd_T); this.datIssueYmd.SelectedDate = DateTime.Now; ExBackgroundWorker.DoWork_Focus(this.utlPaymentNo_F.txtID, 10); }
private void ExUserControl_Loaded(object sender, RoutedEventArgs e) { // 画面初期化 ExVisualTreeHelper.initDisplay(this.LayoutRoot); ExBackgroundWorker.DoWork_Focus(this.txtLoginID, 100); ExBackgroundWorker.DoWork_Focus(this.txtLoginID, 200); ExBackgroundWorker.DoWork_Focus(this.txtLoginID, 300); ExBackgroundWorker.DoWork_Focus(this.txtLoginID, 400); ExBackgroundWorker.DoWork_Focus(this.txtLoginID, 500); }
public FormConfigSchema() { InitializeComponent(); this.Translate(); this.UpdateUI(); base.DoInit(); //Create worker m_BackgroundWorker = new ExBackgroundWorker(); m_BackgroundWorker.WorkerReportsProgress = true; m_BackgroundWorker.WorkerSupportsCancellation = true; m_BackgroundWorker.ProgressChanged += new ProgressChangedEventHandler(bwAsync_WorkerChanged); m_BackgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bwAsync_WorkerCompleted); m_BackgroundWorker.DoWork += new DoWorkEventHandler(bwAsync_Worker); }
// F2ボタン(条件クリア) クリック public override void btnF2_Click(object sender, RoutedEventArgs e) { // 画面初期化 ExVisualTreeHelper.initDisplay(this.LayoutRoot); this.entityList = null; DataInitWhere.InitDateYm(ref this.datYm); // 取引区分 //this.chkSime.IsChecked = false; //this.chkKake.IsChecked = false; ExBackgroundWorker.DoWork_Focus(this.datYm, 10); }
// F2ボタン(クリア) クリック public override void btnF2_Click(object sender, RoutedEventArgs e) { this.utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Init; // 初期化 _entity = null; this.cmbUser.IsEnabled = true; InitCheck(); IsEnabledCheck(false); ExBackgroundWorker.DoWork_Focus(this.cmbUser, 10); // ロック解除 DataPgLock.gLockPg(PG_NM, "", (int)DataPgLock.geLockType.UnLock); }
// F2ボタン(クリア) クリック public override void btnF2_Click(object sender, RoutedEventArgs e) { // 初期化 _entity = null; this.dg.ItemsSource = _entity; this.utlClass.txtBindID.Text = ""; ExBackgroundWorker.DoWork_Focus(this.utlClass.txtBindID, 10); this.utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Init; // ロック解除 DataPgLock.gLockPg(PG_NM, "", (int)DataPgLock.geLockType.UnLock); //GetMstData(); }
public override void DataSelect(int intKbn, object objList) { switch ((ExWebService.geWebServiceCallKbn)intKbn) { case _GetWebServiceCallKbn: // 更新 if (objList != null) { _entity = (EntityPurchaseMst)objList; if (_entity.message != "" && _entity.message != null) { this.utlID.txtID.Text = ""; ExBackgroundWorker.DoWork_Focus(this.utlID, 10); return; } else { // バインド反映 SetBinding(); if (_entity._lock_flg == 0) { this.utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Upd; this.btnSalesBalance.IsEnabled = true; } else { this.utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Sel; this.btnSalesBalance.IsEnabled = true; } } } // 新規 else { _entity = new EntityPurchaseMst(); SetBinding(); this.utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.New; this.btnSalesBalance.IsEnabled = false; } this.utlID.txtID_IsReadOnly = true; ExBackgroundWorker.DoWork_Focus(this.txtName, 10); break; default: break; } }
// F2ボタン(クリア) クリック public override void btnF2_Click(object sender, RoutedEventArgs e) { // 初期化 _entity = null; SetBinding(); this.utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Init; this.utlID.txtID_IsReadOnly = false; this.utlID.txtID.Text = ""; ExBackgroundWorker.DoWork_Focus(this.utlID, 10); // ロック解除 DataPgLock.gLockPg(PG_NM, "", (int)DataPgLock.geLockType.UnLock); }
private void evtDataSelect(int intKbn, object objList) { if (objList != null) { objMstList = (ObservableCollection <EntityMstList>)objList; } else { objMstList = null; } this.dg.ItemsSource = objMstList; this.dg.SelectedIndex = 0; ExBackgroundWorker.DoWork_DataGridSelectedFirst(dg, 500); ExBackgroundWorker.DoWork_DataGridSelectedFirst(dg, 1000); }