Ejemplo n.º 1
0
        public void SetEntryMode(EntryMode mode)
        {
            var command = (byte)((int)Command.SetEntryMode | (int)mode);

            SendCommand(command);
            Thread.Sleep(100);
        }
Ejemplo n.º 2
0
        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;
                }
            }
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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;
            }
        }
Ejemplo n.º 5
0
        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);
            }
        }
Ejemplo n.º 6
0
 void showItemTypePrompt()
 {
     setPromptWidth();
     txtScan.Clear();
     txtScan.Focus();
     lblScan.Text = "RF/NB? >>";
     _entryMode   = EntryMode.ItemType;
 }
Ejemplo n.º 7
0
 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";
 }
Ejemplo n.º 10
0
 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();
 }
Ejemplo n.º 11
0
 private void AbortEntryMode()
 {
     if (_changingEntryMode)
     {
         return;
     }
     _changingEntryMode = true;
     _digitControls[_editModePosition].Highlight = false;
     UpdateDigitsValues();
     _currentEntryMode  = EntryMode.None;
     _changingEntryMode = false;
 }
Ejemplo n.º 12
0
 void showCustomerPrompt()
 {
     _location = null;
     _customer = null;
     setPromptWidth();
     pnlScan.Visible = true;
     txtScan.Focus();
     txtScan.Clear();
     lblScan.Text        = "Customer >>";
     lblCustomer.Visible = false;
     _entryMode          = EntryMode.Customer;
 }
Ejemplo n.º 13
0
 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;
 }
Ejemplo n.º 14
0
 void showSerialNoPrompt()
 {
     _serialNo = string.Empty;
     _itemType = string.Empty;
     refreshProductHeader();
     setPromptWidth(.7M);
     txtScan.Clear();
     txtScan.Focus();
     lblScan.Text = "SERIAL >>";
     _entryMode   = EntryMode.SerialNo;
     hideError();
 }
Ejemplo n.º 15
0
 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);
 }
Ejemplo n.º 16
0
 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;
 }
Ejemplo n.º 17
0
        /// <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");
            }
        }
Ejemplo n.º 18
0
        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() }));
        }
Ejemplo n.º 19
0
 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;
 }
Ejemplo n.º 20
0
 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;
 }
Ejemplo n.º 21
0
        /// <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";
        }
Ejemplo n.º 23
0
 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);
     }
 }
Ejemplo n.º 24
0
        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"));
        }
Ejemplo n.º 25
0
 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;
 }
Ejemplo n.º 26
0
        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;
                }
            }
        }
Ejemplo n.º 28
0
        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;
            }
        }
Ejemplo n.º 29
0
        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;
            }
        }
Ejemplo n.º 30
0
        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;
                }
            }
        }
Ejemplo n.º 31
0
 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();
            }
        }
Ejemplo n.º 34
0
        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;
            }
        }
Ejemplo n.º 36
0
 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;
 }
Ejemplo n.º 37
0
 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;
 }
Ejemplo n.º 38
0
 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;
 }
Ejemplo n.º 39
0
 private void AbortEntryMode()
 {
     if (_changingEntryMode)
     {
         return;
     }
     _changingEntryMode = true;
     _digitControls[_editModePosition].Highlight = false;
     UpdateDigitsValues();
     _currentEntryMode = EntryMode.None;
     _changingEntryMode = false;
 }
Ejemplo n.º 40
0
 /// <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");
     }
 }
Ejemplo n.º 41
0
 /// <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 "";
     }
 }
Ejemplo n.º 42
0
 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;
 }