public SearchSimViewModel() { var test = CarrierData.Get(); CarrierOptions = new ObservableCollection <Carrier>(CarrierData.Get()); PrefixNumberOptions = new ObservableCollection <PrefixNumber>(PrefixNumberData.Get()); NumberTypeOptions = new ObservableCollection <SimTypeOption>(); }
public EditCarrierViewModel(CarrierData carrier) { Address = carrier.Address; Business = new BusinessTypeViewModel(carrier.Business); Contact = carrier.Contact; NotificationId = carrier.NotificationId; CarrierId = carrier.Id; }
/// <summary> /// USSpendingAccountCoverage class constructor /// </summary> public USSpendingAccountCoverage() { this.userAreaField = new UserAreaType(); this.directDepositDataField = new USSpendingAccountCoverageDirectDepositData(); this.carrierField = new CarrierData(); this.rolloverBalanceField = new USSpendingAccountCoverageRolloverBalance(); this.contributionDataField = new List <ContributionDataType>(); }
public EditCarrierViewModel(CarrierData carrier) { Address = carrier.Address; Business = new BusinessTypeViewModel(carrier.Business); Contact = carrier.Contact; NotificationId = carrier.NotificationId; CarrierId = carrier.Id; }
public EditSimListViewModel() { CarrierOptions = new ObservableCollection <Carrier>(CarrierData.Get()); NumberTypeOptions = new ObservableCollection <SimTypeOption>(); PreLoadData = new Command(() => { ApiUrl = $"api/sim/myeditsims?Page={Page}"; }); }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value == null || (short)value == 0) { return("Chọn nhà mạng"); } Int16 CarrierId = (Int16)value; return(CarrierData.Get().SingleOrDefault(x => x.Id == CarrierId).Name); }
public string GetCarrierConfig(RunTimeError error, string cpriport, string flowdirection, string carrierindex) { string getdata = ""; try { CarrierData data = rCarrierConfig.GetCarrierConfig(cpriport, flowDirectionDic[flowdirection], byte.Parse(carrierindex)); getdata = showCarrierData(data); } catch (Exception e) { WriteTraceText(error, "Rumaster Get Carrier Config error : " + e.Message); } return(getdata); }
public void SetCarrierConfig(RunTimeError error, string cpriport, string flowdirection, string carriernumber, string enabled, string carrierid, string technology, string frequency, string axccontainer, string gain, string fsinfo, string axcContainerGroupLength, string bfPeriod, string syncmode) { try { FsInfo fsinfoData = new FsInfo(); string[] fsinfostr = fsinfo.Split(); if (fsinfostr.Length >= 4) { fsinfoData.Addr = byte.Parse(fsinfostr[0]); fsinfoData.Hf = byte.Parse(fsinfostr[1]); fsinfoData.Bf = byte.Parse(fsinfostr[2]); fsinfoData.BfOffset = byte.Parse(fsinfostr[3]); } Gain gainData = new Gain(); string[] gainstr = gain.Split(); if (fsinfostr.Length >= 3) { gainData.GainEnable = boolDic[gainstr[0]]; gainData.GainDb = double.Parse(gainstr[1]); gainData.GainFact = double.Parse(gainstr[2]); } CarrierData data = new CarrierData(); data.axcContainerGroupLength = byte.Parse(axcContainerGroupLength); data.bfPeriod = byte.Parse(bfPeriod); data.carrierId = byte.Parse(carrierid); data.carrierNumber = byte.Parse(carriernumber); data.enabled = boolDic[enabled]; data.sampleFrequency = freqDic[frequency]; data.technology = technologyDic[technology]; data.startAxcContainer = byte.Parse(axccontainer); data.syncMode = syncModeDic[syncmode]; data.fsInfo = fsinfoData; data.gain = gainData; rCarrierConfig.SetCarrierConfig(cpriport, flowDirectionDic[flowdirection], data); //showCarrierData(data); } catch (Exception e) { WriteTraceText(error, "Rumaster Set Carrier Config error : " + e.Message); } }
public void SetCarrierPosition(Vector3 position) => Carrier = new CarrierData { Position = position };
private string showCarrierData(CarrierData data) { //#cpriPort#flowDirection#axcContainerGroupLength#bfPeriod#carrierId#carrierNumber#enabled#fsInfo#gain#frequency##axcContainer#syncMode#technology string strdata = ""; string carrierNumber = data.carrierNumber.ToString(); strdata = strdata + "Number=" + carrierNumber + SPACER_FLAG_SEC; if (data.enabled == true) { strdata = strdata + "Enabled=" + "true" + SPACER_FLAG_SEC; } else if (data.enabled == false) { strdata = strdata + "Enabled=" + "false" + SPACER_FLAG_SEC; } string carrierId = data.carrierId.ToString(); strdata = strdata + "Id=" + carrierId + SPACER_FLAG_SEC; string tech = data.technology.ToString(); strdata = strdata + "Technology=" + tech + SPACER_FLAG_SEC; string Frequency = data.sampleFrequency.ToString(); strdata = strdata + "SampleFrequency=" + Frequency + SPACER_FLAG_SEC; string startAxcContainer = data.startAxcContainer.ToString(); strdata = strdata + "AxcContainer=" + startAxcContainer + SPACER_FLAG_SEC; Gain gaindata = data.gain; if (gaindata.GainEnable == true) { strdata = strdata + "GainEnable=" + "true" + SPACER_FLAG_SEC; } else if (gaindata.GainEnable == false) { strdata = strdata + "GainEnable=" + "false" + SPACER_FLAG_SEC; } string gaindb = gaindata.GainDb.ToString(); strdata = strdata + "GainDb=" + gaindb + SPACER_FLAG_SEC; string gainfact = gaindata.GainFact.ToString(); strdata = strdata + "GainFact=" + gainfact + SPACER_FLAG_SEC; FsInfo fsinfodata = data.fsInfo; string addr = fsinfodata.Addr.ToString(); strdata = strdata + "FsInfoAddress=" + addr + SPACER_FLAG_SEC; string hf = fsinfodata.Hf.ToString(); strdata = strdata + "FsInfoHF=" + hf + SPACER_FLAG_SEC; string bf = fsinfodata.Bf.ToString(); strdata = strdata + "FsInfoBF=" + bf + SPACER_FLAG_SEC; string bfoffset = fsinfodata.BfOffset.ToString(); strdata = strdata + "FsInfoBfOffset=" + bfoffset + SPACER_FLAG_SEC; string axcContainerGroupLength = data.axcContainerGroupLength.ToString(); strdata = strdata + "axcContainerGroupLength=" + axcContainerGroupLength + SPACER_FLAG_SEC; string bfPeriod = data.bfPeriod.ToString(); strdata = strdata + "bfPeriod=" + bfPeriod + SPACER_FLAG_SEC; string syncmode = data.syncMode.ToString(); strdata = strdata + "syncMode=" + syncmode; //WriteTraceText(strdata); return strdata; }
private void RumasterSetCarrierConfig(string cpriport, string flowdirection, string carriernumber, string enabled, string carrierid, string technology, string frequency, string axccontainer, string gain, string fsinfo,string axcContainerGroupLength,string bfPeriod,string syncmode) { try { FsInfo fsinfoData = new FsInfo(); string[] fsinfostr = fsinfo.Split(SPACER_FLAG_SEC); if (fsinfostr.Length >= 4) { fsinfoData.Addr = byte.Parse(fsinfostr[0]); fsinfoData.Hf = byte.Parse(fsinfostr[1]); fsinfoData.Bf = byte.Parse(fsinfostr[2]); fsinfoData.BfOffset = byte.Parse(fsinfostr[3]); } Gain gainData = new Gain(); string[] gainstr = gain.Split(SPACER_FLAG_SEC); if (fsinfostr.Length >= 3) { gainData.GainEnable = boolDic[gainstr[0]]; gainData.GainDb = double.Parse(gainstr[1]); gainData.GainFact = double.Parse(gainstr[2]); } CarrierData data = new CarrierData(); data.axcContainerGroupLength = byte.Parse(axcContainerGroupLength); data.bfPeriod = byte.Parse(bfPeriod); data.carrierId = byte.Parse(carrierid); data.carrierNumber = byte.Parse(carriernumber); data.enabled = boolDic[enabled]; data.sampleFrequency = freqDic[frequency]; data.technology = technologyDic[technology]; data.startAxcContainer = byte.Parse(axccontainer); data.syncMode = syncModeDic[syncmode]; data.fsInfo = fsinfoData; data.gain = gainData; rCarrierConfig.SetCarrierConfig(cpriport, flowDirectionDic[flowdirection], data); showCarrierData(data); } catch (Exception e) { WriteTraceText("Rumaster Set Carrier Config failed!--" + e.Message); } }
private string showCarrierData(CarrierData data) { //#cpriPort#flowDirection#axcContainerGroupLength#bfPeriod#carrierId#carrierNumber#enabled#fsInfo#gain#frequency##axcContainer#syncMode#technology string strdata = ""; string carrierNumber = data.carrierNumber.ToString(); strdata = strdata + "Number=" + carrierNumber; if (data.enabled == true) { strdata = strdata + "Enabled=" + "true"; } else if (data.enabled == false) { strdata = strdata + "Enabled=" + "false"; } string carrierId = data.carrierId.ToString(); strdata = strdata + "Id=" + carrierId; string tech = data.technology.ToString(); strdata = strdata + "Technology=" + tech; string Frequency = data.sampleFrequency.ToString(); strdata = strdata + "SampleFrequency=" + Frequency; string startAxcContainer = data.startAxcContainer.ToString(); strdata = strdata + "AxcContainer=" + startAxcContainer; Gain gaindata = data.gain; if (gaindata.GainEnable == true) { strdata = strdata + "GainEnable=" + "true"; } else if (gaindata.GainEnable == false) { strdata = strdata + "GainEnable=" + "false"; } string gaindb = gaindata.GainDb.ToString(); strdata = strdata + "GainDb=" + gaindb; string gainfact = gaindata.GainFact.ToString(); strdata = strdata + "GainFact=" + gainfact; FsInfo fsinfodata = data.fsInfo; string addr = fsinfodata.Addr.ToString(); strdata = strdata + "FsInfoAddress=" + addr; string hf = fsinfodata.Hf.ToString(); strdata = strdata + "FsInfoHF=" + hf; string bf = fsinfodata.Bf.ToString(); strdata = strdata + "FsInfoBF=" + bf; string bfoffset = fsinfodata.BfOffset.ToString(); strdata = strdata + "FsInfoBfOffset=" + bfoffset; string axcContainerGroupLength = data.axcContainerGroupLength.ToString(); strdata = strdata + "axcContainerGroupLength=" + axcContainerGroupLength; string bfPeriod = data.bfPeriod.ToString(); strdata = strdata + "bfPeriod=" + bfPeriod; string syncmode = data.syncMode.ToString(); strdata = strdata + "syncMode=" + syncmode; //WriteTraceText(strdata); return(strdata); }
public void Initialize(CarrierData source) { transform.position = source.Position; resourceUnits = source.Resources; }