private static CodeList GetRegionsCodeList() { var codeList = new CodeList(new InternationalString("en", "Regions"), "CL_Regions", "SDMX"); codeList.Add(new Code("Europe")); codeList.Add(new Code("North_America")); codeList.Add(new Code("Asia")); codeList.Add(new Code("Africa")); return(codeList); }
private static CodeList GetCountryCodeList() { var codeList = new CodeList(new InternationalString("en", "Countries"), "CL_Country", "SDMX"); codeList.Add(new Code("Japan")); codeList.Add(new Code("USA")); codeList.Add(new Code("UK")); codeList.Add(new Code("Germany")); codeList.Add(new Code("Brazil")); return(codeList); }
public OverFlowCheckViewModel() { tempSever = new SimpleTCP.SimpleTcpServer().Start(10086); tempSever.DataReceived += (sender, msg) => { IP = msg.TcpClient.Client.LocalEndPoint.ToString(); string message = Encoding.ASCII.GetString(msg.Data); Common.TCPHelper.COMMANDER cmd = new Common.TCPHelper.COMMANDER(message); messageList.Add(cmd); DMCode temp = new DMCode(); temp.CodeID = cmd.BoxId; temp.CodeName = cmd.CommandType; temp.Email = cmd.PackagePosition; temp.Info = cmd.PackagePositionCount; temp.Phone = cmd.DATETIME; severmeeage = cmd.GenerateSendSuccessMessage(); byte[] data1 = Encoding.ASCII.GetBytes(severmeeage); // tempSever.Send(tempSever.clientList[0],severmeeage); // tempSever.clientList[0].BeginSend(data1,0,data1.Length,SocketFlags.None, new AsyncCallback(Message_Send), tempSever.clientList[0]); CodeList.Add(temp); msg.Reply(severmeeage); }; FFmpegBinariesHelper.RegisterFFmpegBinaries(); // SetupLogging(); }
public void CreateCodeList() { var codelist = new CodeList(new InternationalString("en", "Countries"), "CL_COUNTRY", "UIS"); var code = new Code("CAN"); code.Description["en"] = "Canada"; codelist.Add(code); code = new Code("USA"); code.Description["en"] = "United States of America"; codelist.Add(code); var message = new StructureMessage(); message.Header = new Header("MSD_HDR", new Party("UIS")) { Prepared = DateTime.Now }; message.CodeLists.Add(codelist); message.Save("CL_COUNTRY.xml"); }
/// <summary> /// Function to Search the Billing Period List. /// </summary> /// <param name="obj"></param> /// <returns>void</returns> /// <createdBy></createdBy> /// <createdOn>May 20,2016</createdOn> public void FindCode(object obj) { CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgStart, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name)); try { Count = 0; if (obj == null) { CurrentPageIndex = 0; } if (CurrentPageIndex == 0) { Application.Current.Properties["FindUserGridLastScrollOffset"] = 0; Application.Current.Properties["FindUserGridCurrentPageIndex"] = 0; } CodeProp objCodeProp = new CodeProp(); objCodeProp.CurrentPageIndex = CurrentPageIndex; objCodeProp.PageSize = CurrentPageIndex > 0 ? _GridPageSizeOnScroll : _GridPageSize;; objCodeProp.DefaultPageSize = _GridPageSize; objCodeProp.CodeType = CodeType; var list = new ObservableCollection <CodeProp>(_serviceInstance.FindCode(objCodeProp)); if (CurrentPageIndex == 0) { CodeList = null; CodeList = new ObservableCollection <CodeProp>(list); } else { if (CodeList != null && CodeList.Count > 0) { foreach (CodeProp ud in new ObservableCollection <CodeProp>(list)) { CodeList.Add(ud); } } } Count = CodeList.ToList().Where(x => x.TotalPageCount > 0).FirstOrDefault().TotalPageCount; } catch (Exception ex) { LogHelper.LogErrorToDb(ex); bool displayErrorOnUI = false; CommonSettings.logger.LogError(this.GetType(), ex); if (displayErrorOnUI) { throw; } } finally { CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgEnd, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name)); } }
private static CodeList GetRegionsCodeList() { var codeList = new CodeList(new InternationalString("en", "Regions"), "CL_Regions", "SDMX"); codeList.Add(new Code("Europe")); codeList.Add(new Code("North_America")); codeList.Add(new Code("Asia")); codeList.Add(new Code("Africa")); return codeList; }
private static CodeList GetCountryCodeList() { var codeList = new CodeList(new InternationalString("en", "Countries"), "CL_Country", "SDMX"); codeList.Add(new Code("Japan")); codeList.Add(new Code("USA")); codeList.Add(new Code("UK")); codeList.Add(new Code("Germany")); codeList.Add(new Code("Brazil")); return codeList; }
/// <summary> /// Добавить оператор /// </summary> public void AddNode(Node node) { CodeList.Add(node); LabeledCode.Add(node.Label, node); }
string[] GetInformation() { int i, l; string exclusion, date = GetDistinctDate(CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(DateTime.Now, CalendarWeekRule.FirstDay, DayOfWeek.Sunday) - CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(DateTime.Now.AddDays(1 - DateTime.Now.Day), CalendarWeekRule.FirstDay, DayOfWeek.Sunday) + 1); Delay.Milliseconds = 605; for (i = 2; i < 4; i++) { foreach (var om in API.GetActPriceList().Split(';')) { exclusion = API.GetOptionCode(om.Insert(3, "."), i, date); if (CodeList.Exists(o => o.Equals(exclusion))) { continue; } CodeList.Add(exclusion); } } CodeList[1] = API.GetFutureCodeByIndex(24); string[] temp, market = API.GetCodeListByMarket(string.Empty).Split(';'); l = market.Length; foreach (string output in CodeList) { RemainingDay(output); } foreach (string sMarket in new CodeListByMarket()) { temp = API.GetCodeListByMarket(sMarket).Split(';'); for (i = 0; i < l; i++) { if (Array.Exists(temp, o => o.Equals(market[i]))) { market[i] = string.Empty; } } } for (i = 0; i < l; i++) { string tempCode = market[i]; if (API.GetMasterStockState(tempCode).Contains("거래정지")) { market[i] = string.Empty; continue; } if (tempCode.Length > 0) { foreach (string ex in new CodeListByExclude()) { if (API.GetMasterCodeName(tempCode).EndsWith(ex) && Array.Exists(exclude, o => o.Equals(tempCode)) == false) { market[i] = string.Empty; } } } } foreach (string output in SetCodeStorage(market)) { RemainingDay(output); } return(market); }