public void SetEntryMode(EntryMode mode) { var command = (byte)((int)Command.SetEntryMode | (int)mode); SendCommand(command); Thread.Sleep(100); }
protected virtual void UpdateList() { object selectedItem = this.list.SelectedItem; this.list.Items.Clear(); this.list.Items.AddRange(this.FilterList()); if (selectedItem != null && this.list.Items.Contains(selectedItem)) { EntryMode oldMode = this.Mode; this.Mode = EntryMode.List; this.list.SelectedItem = selectedItem; this.Mode = oldMode; } if (this.list.Items.Count == 0) { selectedItem = null; this.HideList(); } else { int visItems = this.list.Items.Count; if (visItems > 8) { visItems = 8; } this.popup.Height = (visItems * this.list.ItemHeight) + 2; switch (this.BorderStyle) { case BorderStyle.FixedSingle: { this.popup.Height += 2; } break; case BorderStyle.Fixed3D: { this.popup.Height += 4; } break; case BorderStyle.None: default: { } break; } this.popup.Width = this.PopupWidth; if (this.list.Items.Count > 0 && this.list.SelectedIndex == -1) { EntryMode oldMode = this.Mode; this.Mode = EntryMode.List; this.list.SelectedIndex = 0; this.Mode = oldMode; } } }
public void Init() { ScaleCenter = FindObjectOfType <AssembleController>().transform.position; RotaAngleCenter = FindObjectOfType <AssembleController>().transform.position; RotaLeftBut = GameObject.Find("Canvas/BG/WorkAreaControl/PartPanel/Contrarotate").GetComponent <Button>(); RotaRightBut = GameObject.Find("Canvas/BG/WorkAreaControl/PartPanel/ClockwiseRotation").GetComponent <Button>(); _Slider = GameObject.Find("Canvas/BG/WorkAreaControl/SliderPlane/Slider").GetComponent <Slider>(); _SliderText = GameObject.Find("Canvas/BG/WorkAreaControl/SliderPlane/SliderText").GetComponent <Text>(); _ChangeModeBtn = GameObject.Find("Canvas/BG/WorkAreaControl/PartPanel/SwitchMode").GetComponent <Button>(); _LastNode = GameObject.Find("Canvas/BG/WorkAreaControl/PartPanel/Backspace").GetComponent <Button>(); _AddWorkSpaceBtn = GameObject.Find("Canvas/BG/WorkAreaControl/PartPanel/AddWordArea").GetComponent <Button>(); _DelWorkSpaceBtn = GameObject.Find("Canvas/BG/WorkAreaControl/PartPanel/DelWordArea").GetComponent <Button>(); if (AssembleModel.StudyModel == EntryMode.GetAssembleModel()) { _Skip = GameObject.Find("Canvas/BG/WorkAreaControl/PartPanel/Skip").GetComponent <Button>(); } _UIPartsPanelClass = GameObject.Find("Canvas/BG/PartsPanel/PartsClassPanel").GetComponent <UIPartsPanelClass>(); _UIPartsPage = GameObject.Find("Canvas/BG/PartsPanel/SinglePartPanel").GetComponent <UIPartsPage>(); _MainWorkSpace = GameObject.Find("Canvas/Floor/MainWorkSpace"); PartInfo = GameObject.Find("Canvas/BG/InfoPanel/Panel/Info").GetComponent <Text>(); //零件信息内容 NextParts = GameObject.Find("Canvas/BG/InfoPanel/Panel/Tips").GetComponent <Text>(); //下一步该零件零件提示内容 RotaLeftBut.onClick.AddListener(RotaLeftBtnClick); RotaRightBut.onClick.AddListener(RotaRightBtnClick); _ChangeModeBtn.onClick.AddListener(ChangeModeClick); _LastNode.onClick.AddListener(LastNodeClick); if (AssembleModel.StudyModel == EntryMode.GetAssembleModel()) { _Skip.onClick.AddListener(SkipClick); _AddWorkSpaceBtn.onClick.AddListener(AddWorkSpace); _DelWorkSpaceBtn.onClick.AddListener(DelWorkSpace); } #region Test InstalledNodeList.Add(NodesController.Instance.GetNodeList()[0]); NextInstallNode = _DependencyGraph.GetNextSteps(InstalledNodeList[InstalledNodeList.Count - 1]).Cast <Node>(); if (null != NextInstallNode && EntryMode.GetAssembleModel() == AssembleModel.StudyModel) //学习模式文字提示 { string err = ""; int index = 1; foreach (Node node in NextInstallNode) { node.SetInstallationState(InstallationState.NextInstalling); //跳转页面 //_UIPartsPage.SetIndex(node); index = _UIPartsPage.GetIndex(node); err += node.name + "(第" + index + "页)" + "/"; NextInstallNodeList.Add(node); } NextParts.text = err; } #endregion //菜单控件添加事件 _Slider.onValueChanged.AddListener(SlideTheSlider); }
private static void getListenServerAddresses(EntryMode mode = 0) { //throw new NotImplementedException(); string ip = ""; string port = ""; bool complete = false; switch (mode) { case EntryMode.Add: AddListenServerAddresses(); break; case EntryMode.Remove: RemoveListenServerAddresses(); break; case EntryMode.Clear: ClearListenServerAddresses(); break; default: break; } }
private void ChangeModeOnClick(object sender, System.EventArgs e) { Button button = (Button)sender; string pressed = button.Text; // Change the mode if (pressed.ToUpperInvariant() == "DEC") { currentmode = EntryMode.Decimal; btnDec.SetBackgroundColor(Color.Yellow); btnDec.SetTextColor(Color.Black); btnHex.SetBackgroundColor(defaultBackColor); btnHex.SetTextColor(Color.White); txtDec.SetTextColor(Color.Yellow); txtHex.SetTextColor(Color.White); } else { currentmode = EntryMode.Hex; btnDec.SetBackgroundColor(defaultBackColor); btnDec.SetTextColor(Color.White); btnHex.SetBackgroundColor(Color.Yellow); btnHex.SetTextColor(Color.Black); txtDec.SetTextColor(Color.White); txtHex.SetTextColor(Color.Yellow); } }
void showItemTypePrompt() { setPromptWidth(); txtScan.Clear(); txtScan.Focus(); lblScan.Text = "RF/NB? >>"; _entryMode = EntryMode.ItemType; }
void showBulkItemPrompt() { setPromptWidth(); txtScan.Text = "N"; txtScan.SelectAll(); lblScan.Text = "BULK? (y/n) >>"; _entryMode = EntryMode.BulkItem; }
protected virtual void UpdateList() { object selectedItem = list.SelectedItem; list.Items.Clear(); list.Items.AddRange(FilterList(Items).ToObjectArray()); if (selectedItem != null && list.Items.Contains(selectedItem)) { EntryMode oldMode = Mode; Mode = EntryMode.List; list.SelectedItem = selectedItem; Mode = oldMode; } if (list.Items.Count == 0) { HideList(); } else { int visItems = list.Items.Count; if (visItems > 8) { visItems = 8; } popup.Height = (visItems * list.ItemHeight) + 2; switch (BorderStyle) { case BorderStyle.FixedSingle: { popup.Height += 2; } break; case BorderStyle.Fixed3D: { popup.Height += 4; } break; default: { } break; } popup.Width = PopupWidth; if (list.Items.Count > 0 && list.SelectedIndex == -1) { EntryMode oldMode = Mode; Mode = EntryMode.List; list.SelectedIndex = 0; Mode = oldMode; } } }
private void SetEntryToAdd() { btnDeleteSelected.Enabled = false; currentMode = EntryMode.Add; txtName.Clear(); txtDescription.Clear(); chkFinished.Checked = false; btnAddEdit.Text = "Add"; }
void showRescanPrompt() { txtScan.Text = "N"; txtScan.SelectAll(); lblScan.Text = "Re-scan? >>"; showWarning("All data for the location/item will be deleted."); _entryMode = EntryMode.AdminRescan; txtScan.Focus(); }
private void AbortEntryMode() { if (_changingEntryMode) { return; } _changingEntryMode = true; _digitControls[_editModePosition].Highlight = false; UpdateDigitsValues(); _currentEntryMode = EntryMode.None; _changingEntryMode = false; }
void showCustomerPrompt() { _location = null; _customer = null; setPromptWidth(); pnlScan.Visible = true; txtScan.Focus(); txtScan.Clear(); lblScan.Text = "Customer >>"; lblCustomer.Visible = false; _entryMode = EntryMode.Customer; }
private void SetEntryToAdd() { txtTitle.Clear(); chkIsFinished.Checked = false; chkIsMilestone.Checked = false; dtpStartDate.Value = dtpDueDate.Value = DateTime.Now; numActualWorkingHours.Value = numWorkingHours.Minimum; btnAddEdit.Text = "Add New Task"; ReloadFreeEmployeesList(); lstSelectedEmployees.Items.Clear(); currentMode = EntryMode.Add; }
void showSerialNoPrompt() { _serialNo = string.Empty; _itemType = string.Empty; refreshProductHeader(); setPromptWidth(.7M); txtScan.Clear(); txtScan.Focus(); lblScan.Text = "SERIAL >>"; _entryMode = EntryMode.SerialNo; hideError(); }
private bool DigitKeyHandler(KeyEventArgs args) { if (!base.ClientRectangle.Contains(base.PointToClient(Control.MousePosition)) || this._changingEntryMode) { return(false); } if (this._currentEntryMode != EntryMode.None) { EntryMode currentEntryMode = this._currentEntryMode; if (currentEntryMode != EntryMode.Direct) { if (currentEntryMode == EntryMode.Arrow) { this.ArrowModeHandler(args); } } else { this.DirectModeHandler(args); } return(true); } if ((args.KeyCode >= Keys.D0 && args.KeyCode <= Keys.D9) || (args.KeyCode >= Keys.NumPad0 && args.KeyCode <= Keys.NumPad9)) { this.EnterDirectMode(); this.DirectModeHandler(args); return(true); } if (args.KeyCode == Keys.Up || args.KeyCode == Keys.Down || args.KeyCode == Keys.Left || args.KeyCode == Keys.Right) { this.EnterArrowMode(); this.ArrowModeHandler(args); return(true); } if (args.Modifiers == Keys.Control) { if (args.KeyCode == Keys.C) { Clipboard.SetText(string.Format("{0}", this.GetFrequencyValue()), TextDataFormat.Text); return(true); } if (args.KeyCode == Keys.V) { long frequencyValue = 0L; if (long.TryParse(Clipboard.GetText(), out frequencyValue)) { this.SetFrequencyValue(frequencyValue); } return(true); } } return(false); }
private void SetEntryToEdit(Task tag) { txtTitle.Text = tag.Title; chkIsFinished.Checked = tag.IsFinished; chkIsMilestone.Checked = tag.IsMilestone; dtpStartDate.Value = tag.StartingDate; dtpDueDate.Value = tag.DueDate; numActualWorkingHours.Value = tag.ActualWorkingHours ?? 0; btnAddEdit.Text = "Edit Selected Task"; ReloadFreeEmployeesList(); LoadEmployeeListIntoListView(lstSelectedEmployees, tag.AssignedEmployees); currentMode = EntryMode.Edit; }
/// <summary> /// All normal enum values are valid. /// </summary> /// <param name="value">The value to validate.</param> public override void ValidateEntry(EntryMode value) { switch (value) { case EntryMode.AbInitio: case EntryMode.AllOtherConditions: case EntryMode.Resume: break; default: throw new ArgumentOutOfRangeException("value"); } }
public ActionResult Submit(ContactPersonViewModel vm) { if (!ModelState.IsValid) { return(View("FrmContactPerson", vm)); } EntryMode em = vm.Id == 0 ? EntryMode.New : EntryMode.Edit; model.Submit(vm.getMap(), model.TblContactPersons.TblName, new Tuple <ColDef, object>(model.TblContactPersons.Id, vm.Id), em); return(RedirectToAction("Search", "Cockpit", new { cid = vm.Cid.ToString() })); }
void showLocationPrompt() { setPromptWidth(); txtScan.Clear(); txtScan.Focus(); lblScan.Text = "Location >>"; lblLocation.Visible = false; lblItemQty.Visible = false; _location = null; _item = null; _itemType = string.Empty; _bulkItemFlag = string.Empty; _entryMode = EntryMode.Location; }
void showProductPrompt() { _item = null; //reset the variable so next scan will take _qty = 0; _itemType = string.Empty; _bulkItemFlag = string.Empty; setPromptWidth(); txtScan.Focus(); txtScan.Clear(); // does this cause the TextChanged event? lblScan.Text = "ITEM >>"; lblProduct.Visible = false; lblItemQty.Visible = false; _entryMode = EntryMode.Product; }
/// <summary> /// Gets the RTE string that represents the cmi.entry value. /// </summary> /// <param name="entryMode"></param> /// <returns></returns> public static string GetRteEntry(EntryMode entryMode) { switch (entryMode) { case EntryMode.AbInitio: return("ab-initio"); case EntryMode.Resume: return("resume"); default: return(""); } }
private void SetEntryToEdit(int delieverabeID) { if (lstDelieverables.SelectedIndices.Count == 0) { SetEntryToAdd(); return; } btnDeleteSelected.Enabled = true; currentMode = EntryMode.Edit; Deliverable ret = Program.dbms.GetDeliverableByID(int.Parse(lstDelieverables.SelectedItems[0].Text)); txtName.Text = ret.Title; txtDescription.Text = ret.Description; chkFinished.Checked = ret.IsFinished; btnAddEdit.Text = "Edit"; }
void Awake() { if (Managers.Instance.IsPhone) { mode = EntryMode.Lista; layout = listLayout; grillaLayout.area.SetActive(false); GetComponent <RectTransform>().sizeDelta = new Vector2(0, 120); } else { mode = EntryMode.Grilla; layout = grillaLayout; listLayout.area.SetActive(false); } }
public ActionResult Submit(CustomerViewModel vm) { // example how to receive data directly from request: //String company = Request["company"].ToString(); if (!ModelState.IsValid) { return(View("FrmCustomer", vm)); } EntryMode em = vm.Cid == 0 ? EntryMode.New : EntryMode.Edit; model.Submit(vm.getMap(), model.TblCustomers.TblName, new Tuple <ColDef, object>(model.TblCustomers.Cid, vm.Cid), em); return(RedirectToAction("ListOfCustomers", "ListOfCustomers")); }
private void LeaveEntryMode() { if (_changingEntryMode) { return; } _changingEntryMode = true; _digitControls[_editModePosition].Highlight = false; if (_currentEntryMode == EntryMode.Direct) { var newFrequency = GetFrequencyValue(); SetFrequencyValue(newFrequency); } _currentEntryMode = EntryMode.None; _changingEntryMode = false; }
public ActionResult Submit(NoteViewModel vm) { if (!ModelState.IsValid) { return(View("FrmNote", vm)); } vm.EntryDate = DateTime.Now; vm.CreatedBy = "anonymous"; UploadFile(vm); EntryMode em = vm.Id == 0 ? EntryMode.New : EntryMode.Edit; model.Submit(vm.getMap(), model.TblNotes.TblName, new Tuple <ColDef, object>(model.TblNotes.Id, vm.Id), em); return(RedirectToAction("Search", "Cockpit", new { cid = vm.Cid.ToString() })); }
protected virtual void UpdateList() { object selectedItem = this.list.SelectedItem; this.list.Items.Clear(); //这里需要触发输入事件,让外面自己去根据输入填充搜索结果项 OnInputChanged(new EventArgs()); if (selectedItem != null && this.list.Items.Contains(selectedItem)) { EntryMode oldMode = this.Mode; this.Mode = EntryMode.List; this.list.SelectedItem = selectedItem; this.Mode = oldMode; } if (this.list.Items.Count == 0) { this.HideList(); } else { int visItems = this.list.Items.Count; if (visItems > 8) { visItems = 8; } this.popup.Height = (visItems * this.list.ItemHeight) + 2; this.popup.Width = this.Width; if (this.list.Items.Count > 0 && this.list.SelectedIndex == -1) { EntryMode oldMode = this.Mode; this.Mode = EntryMode.List; //this.list.SelectedIndex = 0; this.Mode = oldMode; } } }
void showProductDetails() { try { _qty = _engine.GetCalculatedInventory( _customer.CompCode, _customer.CustCode, _location.LocCode, _item.ItemCode); tick(); txtScan.Focus(); } catch (Exception ex) { showError(ex.Message); showProductPrompt(); _entryMode = EntryMode.ProductError; } }
void finish() { showError(string.Format("Item '{0}' scan completed", _item.ItemCode)); switch (_entryMode) { case EntryMode.Product: case EntryMode.SerialNo: case EntryMode.ItemType: case EntryMode.Finished: _item = null; showProductPrompt(); _entryMode = EntryMode.Finished; break; } }
protected virtual void UpdateList() { object selectedItem = list.SelectedItem; list.Items.Clear(); list.Items.AddRange(FilterList(Autocompleteitems).ToObjectArray()); if (selectedItem != null && list.Items.Contains(selectedItem)) { EntryMode oldMode = Mode; Mode = EntryMode.List; list.SelectedItem = selectedItem; Mode = oldMode; } if (list.Items.Count == 0) { HideList(); } else { int visItems = list.Items.Count; if (visItems > 8) { visItems = 8; } popup.Height = (visItems * list.ItemHeight) + 2; popup.Height += 2; if (list.Items.Count > 0 && list.SelectedIndex == -1) { EntryMode oldMode = Mode; Mode = EntryMode.List; list.SelectedIndex = 0; Mode = oldMode; } } }
public abstract void ValidateEntry(EntryMode value);
private void cboEntryMode_SelectedIndexChanged(object sender, EventArgs e) { _EntryMode = (EntryMode)cboEntryMode.SelectedItem; }
public void CallingForm(MerchantProfile merchantProfile, bool blnNewProfile, BankcardService bcs, ElectronicCheckingService ecks, StoredValueService svas, string serviceId) { _bcs = bcs; _ecks = ecks; _svas = svas; _strServiceID = serviceId; hideAllFields(); //Since MerchantProfile is saved at the serviceId level, display serviceId. txtMerchantProfileServiceId.Text = merchantProfile.ServiceId; if(blnNewProfile) {//New profile to add to CWS cmdAddUpdate.Text = "Add"; //Populate combo boxes with the Enumeration cboCountryCode.Sorted = true; cboCountryCode.DataSource = Enum.GetValues(typeof(TypeISOCountryCodeA3)); cboCountryCode.SelectedItem = TypeISOCountryCodeA3.NotSet; cboLanguage.Sorted = true; cboLanguage.DataSource = Enum.GetValues(typeof(TypeISOLanguageCodeA3)); cboLanguage.SelectedItem = TypeISOLanguageCodeA3.NotSet; cboCurrencyCode.Sorted = true; cboCurrencyCode.DataSource = Enum.GetValues(typeof(TypeISOCurrencyCodeA3)); cboCurrencyCode.SelectedItem = TypeISOCurrencyCodeA3.NotSet; cboCustomerPresent.Sorted = true; cboCustomerPresent.DataSource = Enum.GetValues(typeof(CustomerPresent)); cboCustomerPresent.SelectedItem = CustomerPresent.NotSet; cboRequestACI.Sorted = true; cboRequestACI.DataSource = Enum.GetValues(typeof(RequestACI)); cboRequestACI.SelectedItem = RequestACI.IsCPSMeritCapable; cboEntryMode.Sorted = true; cboEntryMode.DataSource = Enum.GetValues(typeof(EntryMode)); cboEntryMode.SelectedItem = EntryMode.NotSet; cboMerchantIndustryType.Sorted = true; cboMerchantIndustryType.DataSource = Enum.GetValues(typeof(IndustryType)); cboMerchantIndustryType.SelectedItem = IndustryType.NotSet; } else {//Existing Profile to Update; //Note : items commented out are not use so no need to wire up a text box as well as add to 'SaveMerchantInformation()' txtProfileId.Text = merchantProfile.ProfileId; txtProfileId.ReadOnly = true; lblLastUpdated.Text = "Last Updated : " + merchantProfile.LastUpdated; //MerchantData //MerchantData.Address txtCity.Text = merchantProfile.MerchantData.Address.City; txtPostalCode.Text = merchantProfile.MerchantData.Address.PostalCode; txtStateProvince.Text = merchantProfile.MerchantData.Address.StateProvince.ToString(); txtStreetAddress1.Text = merchantProfile.MerchantData.Address.Street1; txtStreetAddress2.Text = merchantProfile.MerchantData.Address.Street2; txtCustomerServiceInternet.Text = merchantProfile.MerchantData.CustomerServiceInternet; txtCustomerServicePhone.Text = merchantProfile.MerchantData.CustomerServicePhone; txtMerchantId.Text = merchantProfile.MerchantData.MerchantId; txtName.Text = merchantProfile.MerchantData.Name; txtPhone.Text = merchantProfile.MerchantData.Phone; txtTaxId.Text = merchantProfile.MerchantData.TaxId; if (_bcs != null) { //MerchantData.BankcardMerchantData txtABANumber.Text = merchantProfile.MerchantData.BankcardMerchantData.ABANumber; txtAcquirerBIN.Text = merchantProfile.MerchantData.BankcardMerchantData.AcquirerBIN; txtAgentBank.Text = merchantProfile.MerchantData.BankcardMerchantData.AgentBank; txtAgentChain.Text = merchantProfile.MerchantData.BankcardMerchantData.AgentChain; txtClientNum.Text = merchantProfile.MerchantData.BankcardMerchantData.ClientNumber; txtLocation.Text = merchantProfile.MerchantData.BankcardMerchantData.Location; //txtTBD.Text = _MerchantProfile.MerchantData.BankcardMerchantData.PrintCustomerServicePhone == ""; txtSecondaryTerminalId.Text = merchantProfile.MerchantData.BankcardMerchantData.SecondaryTerminalId; txtSettlementAgent.Text = merchantProfile.MerchantData.BankcardMerchantData.SettlementAgent; txtSharingGroup.Text = merchantProfile.MerchantData.BankcardMerchantData.SharingGroup; txtSIC.Text = merchantProfile.MerchantData.BankcardMerchantData.SIC; txtStoreId.Text = merchantProfile.MerchantData.BankcardMerchantData.StoreId; txtSocketNum.Text = merchantProfile.MerchantData.BankcardMerchantData.TerminalId; txtTimeZoneDifferential.Text = merchantProfile.MerchantData.BankcardMerchantData.TimeZoneDifferential; txtReimbursementAttribute.Text = merchantProfile.MerchantData.BankcardMerchantData.ReimbursementAttribute; } if (_svas != null) { //MerchantData.StoredValueMerchantData txtAgentChain.Text = merchantProfile.MerchantData.StoredValueMerchantData.AgentChain; txtClientNum.Text = merchantProfile.MerchantData.StoredValueMerchantData.ClientNumber; txtSIC.Text = merchantProfile.MerchantData.StoredValueMerchantData.SIC; txtStoreId.Text = merchantProfile.MerchantData.StoredValueMerchantData.StoreId; txtSocketNum.Text = merchantProfile.MerchantData.StoredValueMerchantData.TerminalId; _MerchantIndustryType = merchantProfile.MerchantData.StoredValueMerchantData.IndustryType; } if (_ecks != null) { //MerchantData.ElectronicCheckingMerchantData txtMerchantId.Text = merchantProfile.MerchantData.ElectronicCheckingMerchantData.OrginatorId; txtStoreId.Text = merchantProfile.MerchantData.ElectronicCheckingMerchantData.SiteId; txtSocketNum.Text = merchantProfile.MerchantData.ElectronicCheckingMerchantData.ProductId; } //First Populate with the Enumeration cboCountryCode.DataSource = Enum.GetValues(typeof(TypeISOCountryCodeA3)); //Now select the index that matches if (merchantProfile.MerchantData.Address.CountryCode.ToString().Length > 0) { cboCountryCode.SelectedItem = merchantProfile.MerchantData.Address.CountryCode; _CountryCode = (TypeISOCountryCodeA3)cboCountryCode.SelectedItem; } //First Populate with the Enumeration cboLanguage.DataSource = Enum.GetValues(typeof(TypeISOLanguageCodeA3)); //Now select the index that matches if (merchantProfile.MerchantData.Language.ToString().Length > 0) { cboLanguage.SelectedItem = merchantProfile.MerchantData.Language; _Language = (TypeISOLanguageCodeA3)cboLanguage.SelectedItem; } //First Populate with the Enumeration cboCurrencyCode.DataSource = Enum.GetValues(typeof(TypeISOCurrencyCodeA3)); //Now select the index that matches if (merchantProfile.MerchantData.Language.ToString().Length > 0) { cboCurrencyCode.SelectedItem = merchantProfile.TransactionData.BankcardTransactionDataDefaults.CurrencyCode; _CurrencyCode = (TypeISOCurrencyCodeA3)cboCurrencyCode.SelectedItem; } //First Populate with the Enumeration cboCustomerPresent.DataSource = Enum.GetValues(typeof(CustomerPresent)); //Now select the index that matches if (merchantProfile.TransactionData.BankcardTransactionDataDefaults.CustomerPresent.ToString().Length > 0) { cboCustomerPresent.SelectedItem = merchantProfile.TransactionData.BankcardTransactionDataDefaults.CustomerPresent; _CustomerPresent = (CustomerPresent)cboCustomerPresent.SelectedItem; } //First Populate with the Enumeration cboRequestACI.DataSource = Enum.GetValues(typeof(RequestACI)); //Now select the index that matches if (merchantProfile.TransactionData.BankcardTransactionDataDefaults.RequestACI.ToString().Length > 0) { cboRequestACI.SelectedItem = merchantProfile.TransactionData.BankcardTransactionDataDefaults.RequestACI; _RequestACI = (RequestACI)cboRequestACI.SelectedItem; } //First Populate with the Enumeration cboMerchantIndustryType.DataSource = Enum.GetValues(typeof(IndustryType)); if (merchantProfile.MerchantData.BankcardMerchantData.IndustryType.ToString().Length > 0) { cboMerchantIndustryType.SelectedItem = merchantProfile.MerchantData.BankcardMerchantData.IndustryType; _MerchantIndustryType = (IndustryType)cboMerchantIndustryType.SelectedItem; } //First Populate with the Enumeration cboEntryMode.DataSource = Enum.GetValues(typeof(EntryMode)); if (merchantProfile.TransactionData.BankcardTransactionDataDefaults.EntryMode.ToString().Length > 0) { cboEntryMode.SelectedItem = merchantProfile.TransactionData.BankcardTransactionDataDefaults.EntryMode; _EntryMode = (EntryMode)cboEntryMode.SelectedItem; } _Add = false; //In this case it's an update and not an add cmdAddUpdate.Text = "Update"; } if (_bcs != null) { if (_strServiceID == "C82ED00001" || _strServiceID == "71C8700001" || _strServiceID == "88D9300001" || _strServiceID == "B447F00001" || _strServiceID == "D806000001" || _strServiceID == "E88FD00001") showBCPExpandedFields(); else if (_strServiceID == "168511300C" || _strServiceID == "9999999999") showBCPExpandedFields(); else { showBCPFields(); } } if (_ecks != null) { showECKFields(); } if (_svas != null) { showSVAFields(); } }
private void EnterDirectMode() { if (_changingEntryMode) { return; } _changingEntryMode = true; for (var i = 0; i < _digitControls.Length; i++) { if (_digitControls[i] != null) { _digitControls[i].Masked = false; if (_digitControls[i].CursorInside) { _editModePosition = i; _digitControls[i].Highlight = true; } } } ZeroDigits(_digitControls.Length - 1); _currentEntryMode = EntryMode.Direct; _changingEntryMode = false; }
private void GetMerchantProfile() { if (cboAvailableProfiles.Text.Length < 1) { MessageBox.Show("Please select a merchant profileId"); cboAvailableProfiles.Focus(); return; } ((SampleCode_DeskTop)(Owner)).Helper.CheckTokenExpire(); string _strServiceID = ((SampleCode_DeskTop)(Owner)).Helper.ServiceID; string _strSessionToken = ((SampleCode_DeskTop)(Owner)).Helper.SessionToken; MerchantProfile merchantProfile = ((SampleCode_DeskTop)(Owner)).Helper.Cwssic.GetMerchantProfile(_strSessionToken, cboAvailableProfiles.Text, _strServiceID, TenderType.Credit); //Note : items commented out are not use so no need to wire up a text box as well as add to 'SaveMerchantInformation()' lblLastUpdated.Text = "Last Updated : " + merchantProfile.LastUpdated; //MerchantData //MerchantData.Address txtCity.Text = merchantProfile.MerchantData.Address.City; txtPostalCode.Text = merchantProfile.MerchantData.Address.PostalCode; txtStateProvince.Text = merchantProfile.MerchantData.Address.StateProvince.ToString(); txtStreetAddress1.Text = merchantProfile.MerchantData.Address.Street1; txtStreetAddress2.Text = merchantProfile.MerchantData.Address.Street2; txtCustomerServiceInternet.Text = merchantProfile.MerchantData.CustomerServiceInternet; txtCustomerServicePhone.Text = merchantProfile.MerchantData.CustomerServicePhone; txtMerchantId.Text = merchantProfile.MerchantData.MerchantId; txtName.Text = merchantProfile.MerchantData.Name; txtPhone.Text = merchantProfile.MerchantData.Phone; txtTaxId.Text = merchantProfile.MerchantData.TaxId; if (_bcs != null) { //MerchantData.BankcardMerchantData txtABANumber.Text = merchantProfile.MerchantData.BankcardMerchantData.ABANumber; txtAcquirerBIN.Text = merchantProfile.MerchantData.BankcardMerchantData.AcquirerBIN; txtAgentBank.Text = merchantProfile.MerchantData.BankcardMerchantData.AgentBank; txtAgentChain.Text = merchantProfile.MerchantData.BankcardMerchantData.AgentChain; txtClientNum.Text = merchantProfile.MerchantData.BankcardMerchantData.ClientNumber; txtLocation.Text = merchantProfile.MerchantData.BankcardMerchantData.Location; //txtTBD.Text = _MerchantProfile.MerchantData.BankcardMerchantData.PrintCustomerServicePhone == ""; txtSecondaryTerminalId.Text = merchantProfile.MerchantData.BankcardMerchantData.SecondaryTerminalId; txtSettlementAgent.Text = merchantProfile.MerchantData.BankcardMerchantData.SettlementAgent; txtSharingGroup.Text = merchantProfile.MerchantData.BankcardMerchantData.SharingGroup; txtSIC.Text = merchantProfile.MerchantData.BankcardMerchantData.SIC; txtStoreId.Text = merchantProfile.MerchantData.BankcardMerchantData.StoreId; txtSocketNum.Text = merchantProfile.MerchantData.BankcardMerchantData.TerminalId; txtTimeZoneDifferential.Text = merchantProfile.MerchantData.BankcardMerchantData.TimeZoneDifferential; txtReimbursementAttribute.Text = merchantProfile.MerchantData.BankcardMerchantData.ReimbursementAttribute; } if (_svas != null) { //MerchantData.StoredValueMerchantData txtAgentChain.Text = merchantProfile.MerchantData.StoredValueMerchantData.AgentChain; txtClientNum.Text = merchantProfile.MerchantData.StoredValueMerchantData.ClientNumber; txtSIC.Text = merchantProfile.MerchantData.StoredValueMerchantData.SIC; txtStoreId.Text = merchantProfile.MerchantData.StoredValueMerchantData.StoreId; txtSocketNum.Text = merchantProfile.MerchantData.StoredValueMerchantData.TerminalId; _MerchantIndustryType = merchantProfile.MerchantData.StoredValueMerchantData.IndustryType; } if (_ecks != null) { //MerchantData.ElectronicCheckingMerchantData txtMerchantId.Text = merchantProfile.MerchantData.ElectronicCheckingMerchantData.OrginatorId; txtStoreId.Text = merchantProfile.MerchantData.ElectronicCheckingMerchantData.SiteId; txtSocketNum.Text = merchantProfile.MerchantData.ElectronicCheckingMerchantData.ProductId; } //First Populate with the Enumeration cboCountryCode.DataSource = Enum.GetValues(typeof(TypeISOCountryCodeA3)); //Now select the index that matches if (merchantProfile.MerchantData.Address.CountryCode.ToString().Length > 0) { cboCountryCode.SelectedItem = merchantProfile.MerchantData.Address.CountryCode; _CountryCode = (TypeISOCountryCodeA3)cboCountryCode.SelectedItem; } //First Populate with the Enumeration cboLanguage.DataSource = Enum.GetValues(typeof(TypeISOLanguageCodeA3)); //Now select the index that matches if (merchantProfile.MerchantData.Language.ToString().Length > 0) { cboLanguage.SelectedItem = merchantProfile.MerchantData.Language; _Language = (TypeISOLanguageCodeA3)cboLanguage.SelectedItem; } //First Populate with the Enumeration cboCurrencyCode.DataSource = Enum.GetValues(typeof(TypeISOCurrencyCodeA3)); //Now select the index that matches if (merchantProfile.MerchantData.Language.ToString().Length > 0) { cboCurrencyCode.SelectedItem = merchantProfile.TransactionData.BankcardTransactionDataDefaults.CurrencyCode; _CurrencyCode = (TypeISOCurrencyCodeA3)cboCurrencyCode.SelectedItem; } //First Populate with the Enumeration cboCustomerPresent.DataSource = Enum.GetValues(typeof(CustomerPresent)); //Now select the index that matches if (merchantProfile.TransactionData.BankcardTransactionDataDefaults.CustomerPresent.ToString().Length > 0) { cboCustomerPresent.SelectedItem = merchantProfile.TransactionData.BankcardTransactionDataDefaults.CustomerPresent; _CustomerPresent = (CustomerPresent)cboCustomerPresent.SelectedItem; } //First Populate with the Enumeration cboRequestACI.DataSource = Enum.GetValues(typeof(RequestACI)); //Now select the index that matches if (merchantProfile.TransactionData.BankcardTransactionDataDefaults.RequestACI.ToString().Length > 0) { cboRequestACI.SelectedItem = merchantProfile.TransactionData.BankcardTransactionDataDefaults.RequestACI; _RequestACI = (RequestACI)cboRequestACI.SelectedItem; } //First Populate with the Enumeration cboMerchantIndustryType.DataSource = Enum.GetValues(typeof(IndustryType)); if (merchantProfile.MerchantData.BankcardMerchantData.IndustryType.ToString().Length > 0) { cboMerchantIndustryType.SelectedItem = merchantProfile.MerchantData.BankcardMerchantData.IndustryType; _MerchantIndustryType = (IndustryType)cboMerchantIndustryType.SelectedItem; } //First Populate with the Enumeration cboEntryMode.DataSource = Enum.GetValues(typeof(EntryMode)); if (merchantProfile.TransactionData.BankcardTransactionDataDefaults.EntryMode.ToString().Length > 0) { cboEntryMode.SelectedItem = merchantProfile.TransactionData.BankcardTransactionDataDefaults.EntryMode; _EntryMode = (EntryMode)cboEntryMode.SelectedItem; } }
private void AbortEntryMode() { if (this._changingEntryMode) return; this._changingEntryMode = true; this._digitControls[this._editModePosition].Highlight = false; this.UpdateDigitsValues(); this._currentEntryMode = EntryMode.None; this._changingEntryMode = false; }
private void EnterDirectMode() { if (this._changingEntryMode) return; this._changingEntryMode = true; for (int index = 0; index < this._digitControls.Length; ++index) { if (this._digitControls[index] != null) { this._digitControls[index].Masked = false; if (this._digitControls[index].CursorInside) { this._editModePosition = index; this._digitControls[index].Highlight = true; } } } this.ZeroDigits(this._digitControls.Length - 1); this._currentEntryMode = EntryMode.Direct; this._changingEntryMode = false; }
private void LeaveEntryMode() { if (this._changingEntryMode) return; this._changingEntryMode = true; this._digitControls[this._editModePosition].Highlight = false; if (this._currentEntryMode == EntryMode.Direct) this.SetFrequencyValue(this.GetFrequencyValue()); this._currentEntryMode = EntryMode.None; this._changingEntryMode = false; }
/// <summary> /// All normal enum values are valid. /// </summary> /// <param name="value">The value to validate.</param> public override void ValidateEntry(EntryMode value) { switch(value) { case EntryMode.AbInitio: case EntryMode.AllOtherConditions: case EntryMode.Resume: break; default: throw new ArgumentOutOfRangeException("value"); } }
/// <summary> /// Gets the RTE string that represents the cmi.entry value. /// </summary> /// <param name="entryMode"></param> /// <returns></returns> public static string GetRteEntry(EntryMode entryMode) { switch (entryMode) { case EntryMode.AbInitio: return "ab-initio"; case EntryMode.Resume: return "resume"; default: return ""; } }