protected override Result RunCommand(RhinoDoc doc, RunMode mode) { var panel_id = Views.UserStringsPanelControl.PanelId; var visible = Panels.IsPanelVisible(panel_id); if (mode == RunMode.Scripted) { var go = new Rhino.Input.Custom.GetOption(); go.SetCommandPrompt(LOC.STR("Choose document text option")); var hide_index = go.AddOption("Hide"); var show_index = go.AddOption("Show"); var toggle_index = go.AddOption("Toggle"); go.Get(); if (go.CommandResult() != Result.Success) { return(go.CommandResult()); } var option = go.Option(); if (null == option) { return(Result.Failure); } var index = option.Index; if (index == hide_index) { if (visible) { Panels.ClosePanel(panel_id); } } else if (index == show_index) { if (!visible) { Panels.OpenPanel(panel_id); } } else if (index == toggle_index) { if (visible) { Panels.ClosePanel(panel_id); } else { Panels.OpenPanel(panel_id); } } } else { Panels.OpenPanel(panel_id); } return(Result.Success); }
public SampleCsWizardPanelCommand() { // Rhino only creates one instance of each command class defined in a // plug-in, so it is safe to store a reference in a static property. Instance = this; Panels.RegisterPanel(PlugIn, typeof(MainPanel), LOC.STR("SampleCsWizardPanel"), null); }
protected void MontarLoc(string calificadorDeLugar3227, string identificacionLugar) { var loc = new LOC(calificadorDeLugar3227, new IdentificacionLugar(identificacionLugar, null, null, null), null, null, null); Segmentos.Add(loc); Mensaje += loc.getSegmento(); }
///<summary> /// Returns first repetition of LOC (Location Identification) - creates it if necessary ///</summary> public LOC GetLOC() { LOC ret = null; try { ret = (LOC)this.GetStructure("LOC"); } catch (HL7Exception e) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected error accessing data - this is probably a bug in the source code generator.", e); throw new System.Exception("An unexpected error ocurred", e); } return(ret); }
public static IList <DataRow> ProcessAdditionalMethodCases(string filename) { IList <DataRow> rowsToReturn = new List <DataRow>(); if (File.Exists(filename)) { //TODO:: MOVE TO OTHER CLASS var dataset = DataSetHelper.GetDataSetForCSV(filename); foreach (var row in dataset.Tables[0].Select()) { Bin loc = LOC.Discretize(row.Field <int>("LOC")); Bin cyclo = CYCLO.Discretize(row.Field <int>("CYCLO")); Bin atfd = ATFD.Discretize(row.Field <int>("ATFD")); Bin fdp = FDP.Discretize(row.Field <int>("FDP")); Bin laa = null; try { laa = LAA.Discretize(row.Field <double>("LAA")); } catch { laa = LAA.Discretize(row.Field <int>("LAA")); } Bin maxnesting = MAXNESTING.Discretize(row.Field <int>("MAXNESTING")); Bin noav = NOAV.Discretize(row.Field <int>("NOAV")); string featureEnvy = row.Field <string>("Feature_Envy"); string longMethod = row.Field <string>("Long_Method"); DataRow newRow = MethodDataset.Tables[0].NewRow(); newRow.SetField <string>("Name", row.Field <string>("Name")); newRow.SetField <string>("LOC", loc.ToString()); newRow.SetField <string>("CYCLO", cyclo.ToString()); newRow.SetField <string>("ATFD", atfd.ToString()); newRow.SetField <string>("FDP", fdp.ToString()); newRow.SetField <string>("LAA", laa.ToString()); newRow.SetField <string>("MAXNESTING", maxnesting.ToString()); newRow.SetField <string>("NOAV", noav.ToString()); newRow.SetField <string>("Feature_Envy", featureEnvy); newRow.SetField <string>("Long_Method", longMethod); rowsToReturn.Add(newRow); } } return(rowsToReturn); }
private void initialize() { if (cLOC == null) { cLOC = new LOC(); cLOC.iStation_ID_Characters = new int[3]; cLOC.iStation_ID_Characters[0] = 10; // K cLOC.iStation_ID_Characters[1] = 18; // S cLOC.iStation_ID_Characters[2] = 15; // P cLOC.buildStationID(); sStation_ID = cLOC.sStation_ID; } if (cNav_Master == null) { cNav_Master = new NAVmaster(); } }
public LOCDto CreateLOC(CreateLOCDto model) { var entry = new LOC { LOCId = id++, Rate = model.Rate, TypeRate = (TypeRate)2, TotalLineOfCredit = model.TotalLineOfCredit, AvalibleLineOfCredit = model.TotalLineOfCredit, Customer = _context.Customers.Single(x => x.CustomerId == model.CustomerId), CustomerId = model.CustomerId }; _context.LOCs.Add(entry); _context.SaveChanges(); return(_mapper.Map <LOCDto>(entry)); }
public Form1(Rectangle Bounds) { InitializeComponent(); this.Bounds = Bounds; FormBorderStyle = FormBorderStyle.None; WindowState = FormWindowState.Maximized; Cursor.Hide(); Icon.SetBounds(Bounds.Width / 3, 0, Bounds.Width / 3, Bounds.Height / 2); temp.SetBounds(0, Bounds.Height / 2, Bounds.Width, temp.Height); desc.SetBounds(0, Convert.ToInt32(Convert.ToDouble(Bounds.Height / 3) * 1.8), Bounds.Width, temp.Height); LOC.SetBounds(0, Bounds.Height - LOC.Height * 2, Bounds.Width, temp.Height); websocket.Opened += new EventHandler(websocket_Opened); websocket.Error += new EventHandler<ErrorEventArgs>(websocket_Error); websocket.MessageReceived += websocket_MessageReceived; websocket.Open(); XDocument xml = XDocument.Load("config.xml"); location = xml.Descendants("location").ToArray()[0].Value; unit = xml.Descendants("unit").ToArray()[0].Value; }
private void fillData(Package limNode, INamespaceSymbol roslynNode, bool setHasMember) { MainDeclaration.Instance.NamespaceStack.Push(limNode.Id); fillScopeData(limNode, roslynNode, setHasMember); foreach (var item in roslynNode.DeclaringSyntaxReferences) { string location = ""; SyntaxNode syntaxNode = item.GetSyntax(); if (!roslynNode.IsInMetadata()) { location = Commons.Common.ProcessPath(syntaxNode.SyntaxTree.FilePath); } uint key = 0; if (!string.IsNullOrEmpty(location)) { key = MainDeclaration.Instance.LimFactory.StringTable.set(location); } if (key == 0) { return; } if (!roslynNode.IsInMetadata() && !roslynNode.IsGlobalNamespace) { Commons.Common.AddIsContainedInEdge(limNode, syntaxNode); LOC.AddLocToComponent( MainDeclaration.Instance.Component.Id, key, (ulong)syntaxNode.GetLocation().GetLineSpan().EndLinePosition.Line + 1 ); } } }
public virtual Rhino.Commands.Result RunScript(RhinoDoc doc, Rhino.Commands.RunMode mode) { RhinoApp.WriteLine(LOC.STR("Scripting not supported for this option")); Rhino.UI.Dialogs.ShowMessageBox(LOC.STR("Scripting not supported for this option"), LOC.STR("Unsupported Option")); return(Rhino.Commands.Result.Success); }
public GanPlanRhinoPanel() { _instance = this; Panels.RegisterPanel(PlugIn, typeof(MainPanel), LOC.STR("GanPlanRhinoPanel"), null); }
public static Tuple <Exception, string, List <FileEntry> > Compile(bool exFormat, string file, string directory = null) { var list = new List <FileEntry>(); var fileName = Path.GetFileNameWithoutExtension(file); if (string.IsNullOrWhiteSpace(directory)) { directory = Path.GetDirectoryName(file); } string inputPath = Path.Combine(Path.GetDirectoryName(file), fileName), outputPath = Path.Combine(directory, fileName); Warning.Start(); try { switch ((Path.GetExtension(file) ?? string.Empty).ToLowerInvariant()) { case ".bin": switch (fileName.ToLowerInvariant()) { case "cos": var array = new short[181]; using (var stream = File.OpenRead(file)) using (var reader = new BinaryReader(stream)) for (var i = 0; i <= 180; i++) { array[i] = reader.ReadInt16(); } File.WriteAllText(outputPath += ".txt", string.Join(Environment.NewLine, array.Select(value => value / 256.0))); list.Add(new FileEntry(outputPath, "cos.txt")); break; case "font": DecompileFont(file, ref outputPath); list.Add(new FileEntry(outputPath, "font.xml")); break; default: { var index = 0; foreach (var path in Level.CreateFromCompiled(file).Decompile(outputPath)) { list.Add(new FileEntry(path, index == 0 ? "level.xml" : index == 1 ? "level.png" : "level.z.png")); index++; } break; } } break; case ".xml": var root = XHelper.Load(file).Elements().First(); switch (root.Name.LocalName.ToLowerInvariant()) { case "level": { var index = 0; foreach (var path in Level.CreateFromDecompiled(inputPath) .Compile(outputPath + ".bin")) { list.Add(new FileEntry(path, index == 0 ? "level.bin" : "model.eso")); index++; } break; } case "animation": AssetHelper.ParseEan(root, fileName).Save(outputPath = Path.Combine(directory, AssetUtil.CrcFullName(fileName, "models") + ".ean")); list.Add(new FileEntry(outputPath, "animation.ean")); break; case "material": { string name; Helper.AnalyzeFileName(out name, out outputPath, fileName); var ema = AssetHelper.ParseEma(root, name); ema.Save(Path.Combine(directory, outputPath += ".ema")); list.Add(new FileEntry(outputPath, "material.ema")); break; } case "models": { string name; Helper.AnalyzeFileName(out name, out outputPath, fileName); var eso = AssetHelper.ParseEso(root, name); eso.Save(Path.Combine(directory, outputPath += ".eso")); list.Add(new FileEntry(outputPath, "model.eso")); break; } case "font": { CompileFont(inputPath, out outputPath, root); list.Add(new FileEntry(outputPath, "font.bin")); break; } } break; case ".loc": LOC.FromFile(file).SaveXls(outputPath += ".xls"); list.Add(new FileEntry(outputPath, "text.xls")); break; case ".xls": LocHelper.FromXls(file).Save(outputPath += ".loc"); list.Add(new FileEntry(outputPath, "text.loc")); break; case ".etx": var etx = ETX.FromFile(file); etx.GetBitmap().Save(outputPath = Path.Combine(directory, etx.AssetHeader.Name + ".png")); list.Add(new FileEntry(outputPath, "texture.png")); break; case ".png": { var name = AssetUtil.CrcFullName(fileName, "textures") + ".etx"; (exFormat ? (ETX)ETX1804.CreateFromImage(file) : ETX1803.CreateFromImage(file)) .Save(outputPath = Path.Combine(directory, name)); list.Add(new FileEntry(outputPath, "texture.etx")); break; } case ".ean": var ean = EAN.FromFile(file); File.WriteAllText(outputPath = Path.Combine(directory, Helper.GetDecompiledFileName(fileName, ean) + ".xml"), AssetHelper.GetEanElement(ean).ToString()); list.Add(new FileEntry(outputPath, "animation.xml")); break; case ".ema": { var ema = EMA.FromFile(file); File.WriteAllText(outputPath = Path.Combine(directory, Helper.GetDecompiledFileName(fileName, ema) + ".xml"), AssetHelper.GetEmaElement(ema).ToString()); list.Add(new FileEntry(outputPath, "material.xml")); break; } case ".eso": { var eso = ESO.FromFile(file); File.WriteAllText(outputPath = Path.Combine(directory, Helper.GetDecompiledFileName(fileName, eso) + ".xml"), AssetHelper.GetEsoElement(eso).ToString()); list.Add(new FileEntry(outputPath, "model.xml")); break; } case ".txt": using (var stream = new FileStream(outputPath += ".bin", FileMode.Create, FileAccess.Write, FileShare.Read)) { var writer = new BinaryWriter(stream); foreach (var num in File.ReadAllText(file) .Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries) .Select(double.Parse)) { writer.Write((short)Math.Round(num * 256)); } } list.Add(new FileEntry(outputPath, "cos.bin")); break; default: switch (Path.GetFileName(file)) { case "audio": if (Directory.Exists(outputPath = Path.Combine(directory, "sfx"))) { Directory.Delete(outputPath, true); } Directory.CreateDirectory(outputPath); string xsb = Path.Combine(file, "sfx.xsb"), xwb = Path.Combine(file, "sfx.xwb"); int offset; using (var stream = new FileStream(xsb, FileMode.Open)) { stream.Position = 0x2A; using (var reader = new BinaryReader(stream)) offset = reader.ReadInt32(); } var unxwb = new Process { StartInfo = new ProcessStartInfo( Path.Combine(CurrentApp.Directory, "Resources/Libraries/unxwb.exe"), FormattableString.Invariant($"-d \"{outputPath}\" -b \"{xsb}\" {offset} \"{xwb}\"")) { UseShellExecute = false, CreateNoWindow = true } }; unxwb.Start(); unxwb.WaitForExit(); list.Add(new FileEntry(outputPath, "sfx")); break; case "sfx": Directory.CreateDirectory(outputPath = Path.Combine(directory, "audio")); string tempPath = Helper.GetRandomDirectory(), tempInputPath = Path.Combine(tempPath, "sfx"), tempOutputPath = Path.Combine(tempPath, "audio"); /************************************************************************************ * create temp input dir because it's still occupied for unknown reason; * * create temp output dir because COMException will be thrown if output dir and * * temp input dir is not under the same drive. * ************************************************************************************/ Directory.CreateDirectory(tempInputPath); var projectPath = GenerateXactProject(file, tempInputPath); using (var project = new CXACTMasterProject()) { project.Create(); project.Load(projectPath, new CXACTMasterProjectCallback(), 0); project.Build(new CXACTMasterProjectCallback(), tempOutputPath, false, false); } foreach (var path in Directory.EnumerateFiles(tempOutputPath)) { var target = Path.Combine(outputPath, Path.GetFileName(path)); File.Delete(target); File.Move(path, target); } try { Directory.Delete(tempPath, true); } catch { Trace.WriteLine(tempPath, "Delete tempPath failed"); } list.Add(new FileEntry(outputPath, "audio")); break; default: throw new NotSupportedException(Localization.DecompileUnrecognizedFile); } break; } return(new Tuple <Exception, string, List <FileEntry> >(null, Warning.Fetch(), list)); } catch (Exception exc) { return(new Tuple <Exception, string, List <FileEntry> >(exc, Warning.Fetch(), list)); } finally { Warning.Clear(); } }
public static void SaveXls(this LOC loc, string path) { var workbook = new Workbook(); var worksheet = new Worksheet("localization") { Cells = { [0, 0] = new Cell("id") }
/// <summary> /// Build passenger list. /// Original from https://www.cbp.gov/sites/default/files/documents/paxlst_012_36_3.txt /// </summary> static TSPAXLST BuildPassengerList(string controlNumber) { var result = new TSPAXLST(); // Message header result.UNH = new UNH(); result.UNH.MessageReferenceNumber_01 = controlNumber.PadLeft(14, '0'); result.UNH.MessageIdentifier_02 = new S009(); result.UNH.MessageIdentifier_02.MessageType_01 = "PAXLST"; result.UNH.MessageIdentifier_02.MessageVersionNumber_02 = "D"; result.UNH.MessageIdentifier_02.MessageReleaseNumber_03 = "03B"; result.UNH.MessageIdentifier_02.ControllingAgencyCoded_04 = "UN"; result.BGM = new BGM(); result.BGM.DOCUMENTMESSAGENAME_01 = new C002(); result.BGM.DOCUMENTMESSAGENAME_01.Documentnamecode_01 = "10"; result.BGM.DOCUMENTMESSAGEIDENTIFICATION_02 = new C106(); result.BGM.DOCUMENTMESSAGEIDENTIFICATION_02.Documentidentifier_01 = "LOCKKH04103101"; result.BGM.Messagefunctioncode_03 = "4"; result.RFF = new RFF(); result.RFF.REFERENCE_01 = new C506(); result.RFF.REFERENCE_01.Referencecodequalifier_01 = "RFA"; result.RFF.REFERENCE_01.Referenceidentifier_02 = "03"; // Repeating TDT Groups result.TDTLoop = new List <Loop_TDT_PAXLST>(); // Begin TDT Group var tdtLoop1 = new Loop_TDT_PAXLST(); tdtLoop1.TDT = new TDT(); tdtLoop1.TDT.Transportstagecodequalifier_01 = "11"; tdtLoop1.TDT.CARRIER_05 = new C040(); tdtLoop1.TDT.CARRIER_05.Carrieridentifier_01 = "LOCK"; tdtLoop1.TDT.CARRIER_05.Codelistidentificationcode_02 = "172"; tdtLoop1.DTM = new DTM(); tdtLoop1.DTM.DATETIMEPERIOD_01 = new C507(); tdtLoop1.DTM.DATETIMEPERIOD_01.Dateortimeorperiodfunctioncodequalifier_01 = "132"; tdtLoop1.DTM.DATETIMEPERIOD_01.Dateortimeorperiodtext_02 = "20041230"; tdtLoop1.DTM.DATETIMEPERIOD_01.Dateortimeorperiodformatcode_03 = "102"; // End TDT Group result.TDTLoop.Add(tdtLoop1); // Repeating RFF Groups result.NADLoop2 = new List <Loop_NAD_PAXLST_2>(); // Begin NAD Group 1 var nadLoop1 = new Loop_NAD_PAXLST_2(); nadLoop1.NAD = new NAD(); nadLoop1.NAD.Partyfunctioncodequalifier_01 = "VW"; nadLoop1.NAD.PARTYIDENTIFICATIONDETAILS_02 = new C082(); nadLoop1.NAD.PARTYIDENTIFICATIONDETAILS_02.Partyidentifier_01 = "0000041153"; nadLoop1.NAD.PARTYIDENTIFICATIONDETAILS_02.Codelistidentificationcode_02 = "109"; nadLoop1.NAD.PARTYNAME_04 = new C080(); nadLoop1.NAD.PARTYNAME_04.Partyname_01 = "AOMAD"; nadLoop1.NAD.PARTYNAME_04.Partyname_02 = "CHRIS"; nadLoop1.NAD.PARTYNAME_04.Partynameformatcode_06 = "1"; nadLoop1.NAD.STREET_05 = new C059(); nadLoop1.NAD.STREET_05.Streetandnumberorpostofficeboxidentifier_01 = "11107 SUNSET HILLS ROAD"; nadLoop1.NAD.Cityname_06 = "RESTON"; nadLoop1.NAD.COUNTRYSUBENTITYDETAILS_07 = new C819(); nadLoop1.NAD.COUNTRYSUBENTITYDETAILS_07.Countrysubentitynamecode_01 = "VA"; nadLoop1.NAD.COUNTRYSUBENTITYDETAILS_07.Codelistidentificationcode_02 = "163"; nadLoop1.NAD.COUNTRYSUBENTITYDETAILS_07.Codelistresponsibleagencycode_03 = "5"; nadLoop1.NAD.Postalidentificationcode_08 = "20190"; // Repeating ATT nadLoop1.ATT = new List <ATT>(); var attNad1 = new ATT(); attNad1.Attributefunctioncodequalifier_01 = "2"; attNad1.ATTRIBUTEDETAIL_03 = new List <C956>(); var c9561 = new C956(); c9561.Attributedescriptioncode_01 = "M"; attNad1.ATTRIBUTEDETAIL_03.Add(c9561); var c9562 = new C956(); c9562.Attributedescriptioncode_01 = "M"; attNad1.ATTRIBUTEDETAIL_03.Add(c9562); var c9563 = new C956(); c9563.Attributedescriptioncode_01 = "M"; attNad1.ATTRIBUTEDETAIL_03.Add(c9563); var c9564 = new C956(); c9564.Attributedescriptioncode_01 = "M"; attNad1.ATTRIBUTEDETAIL_03.Add(c9564); var c9565 = new C956(); c9565.Attributedescriptioncode_01 = "M"; attNad1.ATTRIBUTEDETAIL_03.Add(c9565); nadLoop1.ATT.Add(attNad1); // Repeating DTM nadLoop1.DTM = new List <DTM>(); var dtmNad1 = new DTM(); dtmNad1.DATETIMEPERIOD_01 = new C507(); dtmNad1.DATETIMEPERIOD_01.Dateortimeorperiodfunctioncodequalifier_01 = "329"; dtmNad1.DATETIMEPERIOD_01.Dateortimeorperiodtext_02 = "19350919"; dtmNad1.DATETIMEPERIOD_01.Dateortimeorperiodformatcode_03 = "102"; nadLoop1.DTM.Add(dtmNad1); // Repeating EMP nadLoop1.EMP = new List <EMP>(); var empNad1 = new EMP(); empNad1.Employmentdetailscodequalifier_01 = "4"; empNad1.QUALIFICATIONCLASSIFICATION_04 = new C950(); empNad1.QUALIFICATIONCLASSIFICATION_04.Qualificationclassificationdescriptioncode_01 = "1"; empNad1.Qualificationapplicationareacode_06 = "8"; nadLoop1.EMP.Add(empNad1); // Repeating NAT nadLoop1.NAT = new List <NAT>(); var natNad1 = new NAT(); natNad1.Nationalitycodequalifier_01 = "2"; natNad1.NATIONALITYDETAILS_02 = new C042(); natNad1.NATIONALITYDETAILS_02.Nationalitynamecode_01 = "US"; natNad1.NATIONALITYDETAILS_02.Codelistresponsibleagencycode_03 = "5"; nadLoop1.NAT.Add(natNad1); // Repeating DOC NAD Groups nadLoop1.DOCLoop = new List <Loop_DOC_PAXLST>(); // Begin DOC NAD Group 1 var docNad1 = new Loop_DOC_PAXLST(); docNad1.DOC = new DOC(); docNad1.DOC.DOCUMENTMESSAGENAME_01 = new C002(); docNad1.DOC.DOCUMENTMESSAGENAME_01.Documentnamecode_01 = "5K"; docNad1.DOC.DOCUMENTMESSAGEDETAILS_02 = new C503(); docNad1.DOC.DOCUMENTMESSAGEDETAILS_02.Documentidentifier_01 = "P100971204141"; docNad1.LOC = new List <LOC>(); var locDoc1 = new LOC(); locDoc1.Locationfunctioncodequalifier_01 = "91"; locDoc1.LOCATIONIDENTIFICATION_02 = new C517(); locDoc1.LOCATIONIDENTIFICATION_02.Locationnamecode_01 = "VA"; locDoc1.LOCATIONIDENTIFICATION_02.Codelistidentificationcode_02 = "163"; docNad1.LOC.Add(locDoc1); var locDoc2 = new LOC(); locDoc2.Locationfunctioncodequalifier_01 = "91"; locDoc2.LOCATIONIDENTIFICATION_02 = new C517(); locDoc2.LOCATIONIDENTIFICATION_02.Locationnamecode_01 = "US"; locDoc2.LOCATIONIDENTIFICATION_02.Codelistidentificationcode_02 = "162"; docNad1.LOC.Add(locDoc2); // End DOC NAD Group 1 nadLoop1.DOCLoop.Add(docNad1); // Begin DOC NAD Group 2 var docNad2 = new Loop_DOC_PAXLST(); docNad2.DOC = new DOC(); docNad2.DOC.DOCUMENTMESSAGENAME_01 = new C002(); docNad2.DOC.DOCUMENTMESSAGENAME_01.Documentnamecode_01 = "39"; docNad2.DOC.DOCUMENTMESSAGEDETAILS_02 = new C503(); docNad2.DOC.DOCUMENTMESSAGEDETAILS_02.Documentidentifier_01 = "15504141"; docNad2.LOC = new List <LOC>(); var locDoc3 = new LOC(); locDoc3.Locationfunctioncodequalifier_01 = "91"; locDoc3.LOCATIONIDENTIFICATION_02 = new C517(); locDoc3.LOCATIONIDENTIFICATION_02.Locationnamecode_01 = "US"; locDoc3.LOCATIONIDENTIFICATION_02.Codelistidentificationcode_02 = "162"; docNad2.LOC.Add(locDoc3); // End DOC NAD Group 2 nadLoop1.DOCLoop.Add(docNad2); // End NAD Group 1 result.NADLoop2.Add(nadLoop1); return(result); }
public override void OnUpdate() { initialize(); string ResName = "ElectricCharge"; double dPowerRequired = 10.0 * dW_to_EC; // 10 W is typical receive power for NAV radio double dElectric_Draw = dPowerRequired * TimeWarp.deltaTime; double elecAvail = 0.0; if (bOn) { elecAvail = part.RequestResource(ResName, dElectric_Draw) / dElectric_Draw; } bPowered = (elecAvail > 0.90); if (cRecv.vPosition.updatePositionData(vessel.mainBody, vessel.latitude, vessel.longitude, vessel.altitude)) { cNav_Master.updateReceiver(iReceiver_ID, cRecv); } //string sMsg = "Recv freq " + cRecv.getFrequency().ToString("000.00"); //print(sMsg); cNav_Master.onReceiverUpdate(); if (bPowered) { if (cRecv.isActiveILS()) { cTuned_GLS = cNav_Master.getStationGLS(iReceiver_ID) as GLS; cTuned_LOC = cNav_Master.getStationLOC(iReceiver_ID) as LOC; cTuned_VOR = null; } else { cTuned_VOR = cNav_Master.getStationVOR(iReceiver_ID) as VOR; cTuned_GLS = null; cTuned_LOC = null; } cTuned_DME = cNav_Master.getStationDME(iReceiver_ID) as DME; } else { cTuned_VOR = null; cTuned_LOC = null; cTuned_DME = null; cTuned_GLS = null; } if (cTuned_VOR != null) { if (cTuned_VOR.getFlux(cRecv.vPosition) < 2.0e-9 || !cTuned_VOR.inLineOfSight(cRecv.vPosition)) { cTuned_VOR = null; } } if (cTuned_LOC != null) { if (cTuned_LOC.getFlux(cRecv.vPosition) < 2.0e-9 || !cTuned_LOC.inLineOfSight(cRecv.vPosition)) { cTuned_LOC = null; } } if (cTuned_DME != null) { if (cTuned_DME.getFlux(cRecv.vPosition) < 2.0e-9 || !cTuned_DME.inLineOfSight(cRecv.vPosition)) { cTuned_DME = null; } } if (cTuned_GLS != null) { if (cTuned_GLS.getFlux(cRecv.vPosition) > 2.0e-9 || !cTuned_GLS.inLineOfSight(cRecv.vPosition)) { cTuned_GLS = null; } } if (cTuned_VOR != null) { sTuned_Station = cTuned_VOR.sStation_ID; } else if (cTuned_LOC != null) { sTuned_Station = cTuned_LOC.sStation_ID; } else if (cTuned_DME != null) { sTuned_Station = cTuned_LOC.sStation_ID; } else if (cTuned_GLS != null) { sTuned_Station = cTuned_GLS.sStation_ID; } else { sTuned_Station = "---"; } }
/// <summary> /// Constructs an HL7 segment for the specified Segments enum object /// </summary> /// <param name="seg">The Segments enum object to construct for</param> public Segment(Segments seg) { switch (seg) { case Segments.ABS: ABS abs = new ABS(); Name = abs.Name; Description = abs.Description; Fields = abs.Fields; break; case Segments.ACC: ACC acc = new ACC(); Name = acc.Name; Description = acc.Description; Fields = acc.Fields; break; case Segments.ADD: ADD add = new ADD(); Name = add.Name; Description = add.Description; Fields = add.Fields; break; case Segments.AFF: AFF aff = new AFF(); Name = aff.Name; Description = aff.Description; Fields = aff.Fields; break; case Segments.AIG: AIG aig = new AIG(); Name = aig.Name; Description = aig.Description; Fields = aig.Fields; break; case Segments.AIL: AIL ail = new AIL(); Name = ail.Name; Description = ail.Description; Fields = ail.Fields; break; case Segments.AIP: AIP aip = new AIP(); Name = aip.Name; Description = aip.Description; Fields = aip.Fields; break; case Segments.AIS: AIS ais = new AIS(); Name = ais.Name; Description = ais.Description; Fields = ais.Fields; break; case Segments.AL1: AL1 al1 = new AL1(); Name = al1.Name; Description = al1.Description; Fields = al1.Fields; break; case Segments.APR: APR apr = new APR(); Name = apr.Name; Description = apr.Description; Fields = apr.Fields; break; case Segments.ARQ: ARQ arq = new ARQ(); Name = arq.Name; Description = arq.Description; Fields = arq.Fields; break; case Segments.AUT: AUT aut = new AUT(); Name = aut.Name; Description = aut.Description; Fields = aut.Fields; break; case Segments.BHS: BHS bhs = new BHS(); Name = bhs.Name; Description = bhs.Description; Fields = bhs.Fields; break; case Segments.BLC: BLC blc = new BLC(); Name = blc.Name; Description = blc.Description; Fields = blc.Fields; break; case Segments.BLG: BLG blg = new BLG(); Name = blg.Name; Description = blg.Description; Fields = blg.Fields; break; case Segments.BPO: BPO bpo = new BPO(); Name = bpo.Name; Description = bpo.Description; Fields = bpo.Fields; break; case Segments.BPX: BPX bpx = new BPX(); Name = bpx.Name; Description = bpx.Description; Fields = bpx.Fields; break; case Segments.BTS: BTS bts = new BTS(); Name = bts.Name; Description = bts.Description; Fields = bts.Fields; break; case Segments.BTX: BTX btx = new BTX(); Name = btx.Name; Description = btx.Description; Fields = btx.Fields; break; case Segments.CDM: CDM cdm = new CDM(); Name = cdm.Name; Description = cdm.Description; Fields = cdm.Fields; break; case Segments.CER: CER cer = new CER(); Name = cer.Name; Description = cer.Description; Fields = cer.Fields; break; case Segments.CM0: CM0 cm0 = new CM0(); Name = cm0.Name; Description = cm0.Description; Fields = cm0.Fields; break; case Segments.CM1: CM1 cm1 = new CM1(); Name = cm1.Name; Description = cm1.Description; Fields = cm1.Fields; break; case Segments.CM2: CM2 cm2 = new CM2(); Name = cm2.Name; Description = cm2.Description; Fields = cm2.Fields; break; case Segments.CNS: CNS cns = new CNS(); Name = cns.Name; Description = cns.Description; Fields = cns.Fields; break; case Segments.CON: CON con = new CON(); Name = con.Name; Description = con.Description; Fields = con.Fields; break; case Segments.CSP: CSP csp = new CSP(); Name = csp.Name; Description = csp.Description; Fields = csp.Fields; break; case Segments.CSR: CSR csr = new CSR(); Name = csr.Name; Description = csr.Description; Fields = csr.Fields; break; case Segments.CSS: CSS css = new CSS(); Name = css.Name; Description = css.Description; Fields = css.Fields; break; case Segments.CTD: CTD ctd = new CTD(); Name = ctd.Name; Description = ctd.Description; Fields = ctd.Fields; break; case Segments.CTI: CTI cti = new CTI(); Name = cti.Name; Description = cti.Description; Fields = cti.Fields; break; case Segments.DB1: DB1 db1 = new DB1(); Name = db1.Name; Description = db1.Description; Fields = db1.Fields; break; case Segments.DG1: DG1 dg1 = new DG1(); Name = dg1.Name; Description = dg1.Description; Fields = dg1.Fields; break; case Segments.DRG: DRG drg = new DRG(); Name = drg.Name; Description = drg.Description; Fields = drg.Fields; break; case Segments.DSC: DSC dsc = new DSC(); Name = dsc.Name; Description = dsc.Description; Fields = dsc.Fields; break; case Segments.DSP: DSP dsp = new DSP(); Name = dsp.Name; Description = dsp.Description; Fields = dsp.Fields; break; case Segments.ECD: ECD ecd = new ECD(); Name = ecd.Name; Description = ecd.Description; Fields = ecd.Fields; break; case Segments.ECR: ECR ecr = new ECR(); Name = ecr.Name; Description = ecr.Description; Fields = ecr.Fields; break; case Segments.EDU: EDU edu = new EDU(); Name = edu.Name; Description = edu.Description; Fields = edu.Fields; break; case Segments.EQL: EQL eql = new EQL(); Name = eql.Name; Description = eql.Description; Fields = eql.Fields; break; case Segments.EQP: EQP eqp = new EQP(); Name = eqp.Name; Description = eqp.Description; Fields = eqp.Fields; break; case Segments.EQU: EQU equ = new EQU(); Name = equ.Name; Description = equ.Description; Fields = equ.Fields; break; case Segments.ERQ: ERQ erq = new ERQ(); Name = erq.Name; Description = erq.Description; Fields = erq.Fields; break; case Segments.ERR: ERR err = new ERR(); Name = err.Name; Description = err.Description; Fields = err.Fields; break; case Segments.EVN: EVN evn = new EVN(); Name = evn.Name; Description = evn.Description; Fields = evn.Fields; break; case Segments.FAC: FAC fac = new FAC(); Name = fac.Name; Description = fac.Description; Fields = fac.Fields; break; case Segments.FHS: FHS fhs = new FHS(); Name = fhs.Name; Description = fhs.Description; Fields = fhs.Fields; break; case Segments.FT1: FT1 ft1 = new FT1(); Name = ft1.Name; Description = ft1.Description; Fields = ft1.Fields; break; case Segments.FTS: FTS fts = new FTS(); Name = fts.Name; Description = fts.Description; Fields = fts.Fields; break; case Segments.GOL: GOL gol = new GOL(); Name = gol.Name; Description = gol.Description; Fields = gol.Fields; break; case Segments.GP1: GP1 gp1 = new GP1(); Name = gp1.Name; Description = gp1.Description; Fields = gp1.Fields; break; case Segments.GP2: GP2 gp2 = new GP2(); Name = gp2.Name; Description = gp2.Description; Fields = gp2.Fields; break; case Segments.GT1: GT1 gt1 = new GT1(); Name = gt1.Name; Description = gt1.Description; Fields = gt1.Fields; break; case Segments.IAM: IAM iam = new IAM(); Name = iam.Name; Description = iam.Description; Fields = iam.Fields; break; case Segments.IIM: IIM iim = new IIM(); Name = iim.Name; Description = iim.Description; Fields = iim.Fields; break; case Segments.IN1: IN1 in1 = new IN1(); Name = in1.Name; Description = in1.Description; Fields = in1.Fields; break; case Segments.IN2: IN2 in2 = new IN2(); Name = in2.Name; Description = in2.Description; Fields = in2.Fields; break; case Segments.IN3: IN3 in3 = new IN3(); Name = in3.Name; Description = in3.Description; Fields = in3.Fields; break; case Segments.INV: INV inv = new INV(); Name = inv.Name; Description = inv.Description; Fields = inv.Fields; break; case Segments.IPC: IPC ipc = new IPC(); Name = ipc.Name; Description = ipc.Description; Fields = ipc.Fields; break; case Segments.ISD: ISD isd = new ISD(); Name = isd.Name; Description = isd.Description; Fields = isd.Fields; break; case Segments.LAN: LAN lan = new LAN(); Name = lan.Name; Description = lan.Description; Fields = lan.Fields; break; case Segments.LCC: LCC lcc = new LCC(); Name = lcc.Name; Description = lcc.Description; Fields = lcc.Fields; break; case Segments.LCH: LCH lch = new LCH(); Name = lch.Name; Description = lch.Description; Fields = lch.Fields; break; case Segments.LDP: LDP ldp = new LDP(); Name = ldp.Name; Description = ldp.Description; Fields = ldp.Fields; break; case Segments.LOC: LOC loc = new LOC(); Name = loc.Name; Description = loc.Description; Fields = loc.Fields; break; case Segments.LRL: LRL lrl = new LRL(); Name = lrl.Name; Description = lrl.Description; Fields = lrl.Fields; break; case Segments.MFA: MFA mfa = new MFA(); Name = mfa.Name; Description = mfa.Description; Fields = mfa.Fields; break; case Segments.MFE: MFE mfe = new MFE(); Name = mfe.Name; Description = mfe.Description; Fields = mfe.Fields; break; case Segments.MFI: MFI mfi = new MFI(); Name = mfi.Name; Description = mfi.Description; Fields = mfi.Fields; break; case Segments.MRG: MRG mrg = new MRG(); Name = mrg.Name; Description = mrg.Description; Fields = mrg.Fields; break; case Segments.MSA: MSA msa = new MSA(); Name = msa.Name; Description = msa.Description; Fields = msa.Fields; break; case Segments.MSH: MSH msh = new MSH(); Name = msh.Name; Description = msh.Description; Fields = msh.Fields; break; case Segments.NCK: NCK nck = new NCK(); Name = nck.Name; Description = nck.Description; Fields = nck.Fields; break; case Segments.NDS: NDS nds = new NDS(); Name = nds.Name; Description = nds.Description; Fields = nds.Fields; break; case Segments.NK1: NK1 nk1 = new NK1(); Name = nk1.Name; Description = nk1.Description; Fields = nk1.Fields; break; case Segments.NPU: NPU npu = new NPU(); Name = npu.Name; Description = npu.Description; Fields = npu.Fields; break; case Segments.NSC: NSC nsc = new NSC(); Name = nsc.Name; Description = nsc.Description; Fields = nsc.Fields; break; case Segments.NST: NST nst = new NST(); Name = nst.Name; Description = nst.Description; Fields = nst.Fields; break; case Segments.NTE: NTE nte = new NTE(); Name = nte.Name; Description = nte.Description; Fields = nte.Fields; break; case Segments.OBR: OBR obr = new OBR(); Name = obr.Name; Description = obr.Description; Fields = obr.Fields; break; case Segments.OBX: OBX obx = new OBX(); Name = obx.Name; Description = obx.Description; Fields = obx.Fields; break; case Segments.ODS: ODS ods = new ODS(); Name = ods.Name; Description = ods.Description; Fields = ods.Fields; break; case Segments.ODT: ODT odt = new ODT(); Name = odt.Name; Description = odt.Description; Fields = odt.Fields; break; case Segments.OM1: OM1 om1 = new OM1(); Name = om1.Name; Description = om1.Description; Fields = om1.Fields; break; case Segments.OM2: OM2 om2 = new OM2(); Name = om2.Name; Description = om2.Description; Fields = om2.Fields; break; case Segments.OM3: OM3 om3 = new OM3(); Name = om3.Name; Description = om3.Description; Fields = om3.Fields; break; case Segments.OM4: OM4 om4 = new OM4(); Name = om4.Name; Description = om4.Description; Fields = om4.Fields; break; case Segments.OM5: OM5 om5 = new OM5(); Name = om5.Name; Description = om5.Description; Fields = om5.Fields; break; case Segments.OM6: OM6 om6 = new OM6(); Name = om6.Name; Description = om6.Description; Fields = om6.Fields; break; case Segments.OM7: OM7 om7 = new OM7(); Name = om7.Name; Description = om7.Description; Fields = om7.Fields; break; case Segments.ORC: ORC orc = new ORC(); Name = orc.Name; Description = orc.Description; Fields = orc.Fields; break; case Segments.ORG: ORG org = new ORG(); Name = org.Name; Description = org.Description; Fields = org.Fields; break; case Segments.OVR: OVR ovr = new OVR(); Name = ovr.Name; Description = ovr.Description; Fields = ovr.Fields; break; case Segments.PCR: PCR pcr = new PCR(); Name = pcr.Name; Description = pcr.Description; Fields = pcr.Fields; break; case Segments.PD1: PD1 pd1 = new PD1(); Name = pd1.Name; Description = pd1.Description; Fields = pd1.Fields; break; case Segments.PDA: PDA pda = new PDA(); Name = pda.Name; Description = pda.Description; Fields = pda.Fields; break; case Segments.PDC: PDC pdc = new PDC(); Name = pdc.Name; Description = pdc.Description; Fields = pdc.Fields; break; case Segments.PEO: PEO peo = new PEO(); Name = peo.Name; Description = peo.Description; Fields = peo.Fields; break; case Segments.PES: PES pes = new PES(); Name = pes.Name; Description = pes.Description; Fields = pes.Fields; break; case Segments.PID: PID pid = new PID(); Name = pid.Name; Description = pid.Description; Fields = pid.Fields; break; case Segments.PR1: PR1 pr1 = new PR1(); Name = pr1.Name; Description = pr1.Description; Fields = pr1.Fields; break; case Segments.PRA: PRA pra = new PRA(); Name = pra.Name; Description = pra.Description; Fields = pra.Fields; break; case Segments.PRB: PRB prb = new PRB(); Name = prb.Name; Description = prb.Description; Fields = prb.Fields; break; case Segments.PRC: PRC prc = new PRC(); Name = prc.Name; Description = prc.Description; Fields = prc.Fields; break; case Segments.PRD: PRD prd = new PRD(); Name = prd.Name; Description = prd.Description; Fields = prd.Fields; break; case Segments.PSH: PSH psh = new PSH(); Name = psh.Name; Description = psh.Description; Fields = psh.Fields; break; case Segments.PTH: PTH pth = new PTH(); Name = pth.Name; Description = pth.Description; Fields = pth.Fields; break; case Segments.PV1: PV1 pv1 = new PV1(); Name = pv1.Name; Description = pv1.Description; Fields = pv1.Fields; break; case Segments.PV2: PV2 pv2 = new PV2(); Name = pv2.Name; Description = pv2.Description; Fields = pv2.Fields; break; case Segments.QAK: QAK qak = new QAK(); Name = qak.Name; Description = qak.Description; Fields = qak.Fields; break; case Segments.QID: QID qid = new QID(); Name = qid.Name; Description = qid.Description; Fields = qid.Fields; break; case Segments.QPD: QPD qpd = new QPD(); Name = qpd.Name; Description = qpd.Description; Fields = qpd.Fields; break; case Segments.QRD: QRD qrd = new QRD(); Name = qrd.Name; Description = qrd.Description; Fields = qrd.Fields; break; case Segments.QRF: QRF qrf = new QRF(); Name = qrf.Name; Description = qrf.Description; Fields = qrf.Fields; break; case Segments.QRI: QRI qri = new QRI(); Name = qri.Name; Description = qri.Description; Fields = qri.Fields; break; case Segments.RCP: RCP rcp = new RCP(); Name = rcp.Name; Description = rcp.Description; Fields = rcp.Fields; break; case Segments.RDF: RDF rdf = new RDF(); Name = rdf.Name; Description = rdf.Description; Fields = rdf.Fields; break; case Segments.RF1: RF1 rf1 = new RF1(); Name = rf1.Name; Description = rf1.Description; Fields = rf1.Fields; break; case Segments.RGS: RGS rgs = new RGS(); Name = rgs.Name; Description = rgs.Description; Fields = rgs.Fields; break; case Segments.RMI: RMI rmi = new RMI(); Name = rmi.Name; Description = rmi.Description; Fields = rmi.Fields; break; case Segments.ROL: ROL rol = new ROL(); Name = rol.Name; Description = rol.Description; Fields = rol.Fields; break; case Segments.RQ1: RQ1 rq1 = new RQ1(); Name = rq1.Name; Description = rq1.Description; Fields = rq1.Fields; break; case Segments.RQD: RQD rqd = new RQD(); Name = rqd.Name; Description = rqd.Description; Fields = rqd.Fields; break; case Segments.RXA: RXA rxa = new RXA(); Name = rxa.Name; Description = rxa.Description; Fields = rxa.Fields; break; case Segments.RXC: RXC rxc = new RXC(); Name = rxc.Name; Description = rxc.Description; Fields = rxc.Fields; break; case Segments.RXD: RXD rxd = new RXD(); Name = rxd.Name; Description = rxd.Description; Fields = rxd.Fields; break; case Segments.RXE: RXE rxe = new RXE(); Name = rxe.Name; Description = rxe.Description; Fields = rxe.Fields; break; case Segments.RXG: RXG rxg = new RXG(); Name = rxg.Name; Description = rxg.Description; Fields = rxg.Fields; break; case Segments.RXO: RXO rxo = new RXO(); Name = rxo.Name; Description = rxo.Description; Fields = rxo.Fields; break; case Segments.RXR: RXR rxr = new RXR(); Name = rxr.Name; Description = rxr.Description; Fields = rxr.Fields; break; case Segments.SAC: SAC sac = new SAC(); Name = sac.Name; Description = sac.Description; Fields = sac.Fields; break; case Segments.SCH: SCH sch = new SCH(); Name = sch.Name; Description = sch.Description; Fields = sch.Fields; break; case Segments.SFT: SFT sft = new SFT(); Name = sft.Name; Description = sft.Description; Fields = sft.Fields; break; case Segments.SID: SID sid = new SID(); Name = sid.Name; Description = sid.Description; Fields = sid.Fields; break; case Segments.SPM: SPM spm = new SPM(); Name = spm.Name; Description = spm.Description; Fields = spm.Fields; break; case Segments.SPR: SPR spr = new SPR(); Name = spr.Name; Description = spr.Description; Fields = spr.Fields; break; case Segments.STF: STF stf = new STF(); Name = stf.Name; Description = stf.Description; Fields = stf.Fields; break; case Segments.TCC: TCC tcc = new TCC(); Name = tcc.Name; Description = tcc.Description; Fields = tcc.Fields; break; case Segments.TCD: TCD tcd = new TCD(); Name = tcd.Name; Description = tcd.Description; Fields = tcd.Fields; break; case Segments.TQ1: TQ1 tq1 = new TQ1(); Name = tq1.Name; Description = tq1.Description; Fields = tq1.Fields; break; case Segments.TQ2: TQ2 tq2 = new TQ2(); Name = tq2.Name; Description = tq2.Description; Fields = tq2.Fields; break; case Segments.TXA: TXA txa = new TXA(); Name = txa.Name; Description = txa.Description; Fields = txa.Fields; break; case Segments.UB1: UB1 ub1 = new UB1(); Name = ub1.Name; Description = ub1.Description; Fields = ub1.Fields; break; case Segments.UB2: UB2 ub2 = new UB2(); Name = ub2.Name; Description = ub2.Description; Fields = ub2.Fields; break; case Segments.URD: URD urd = new URD(); Name = urd.Name; Description = urd.Description; Fields = urd.Fields; break; case Segments.URS: URS urs = new URS(); Name = urs.Name; Description = urs.Description; Fields = urs.Fields; break; case Segments.VAR: VAR var = new VAR(); Name = var.Name; Description = var.Description; Fields = var.Fields; break; case Segments.VTQ: VTQ vtq = new VTQ(); Name = vtq.Name; Description = vtq.Description; Fields = vtq.Fields; break; } }
public RigidBodyRhinoPlugIn() { Instance = this; Panels.RegisterPanel(Instance, typeof(TimePanel), LOC.STR("TimePanel"), null, PanelType.System); RigidBodyEvents events = new RigidBodyEvents(); }
public override void OnUpdate() { base.OnUpdate(); if (biAAE != vessel.isActiveAndEnabled) { biAAE = vessel.isActiveAndEnabled; string sMsg = "LOC vessel is Active and Enbled = " + biAAE; print(sMsg); } if (biAV != vessel.isActiveVessel) { biAV = vessel.isActiveVessel; string sMsg = "LOC vessel is Active Vessel = " + biAV; print(sMsg); } double dElectric_Draw = 10.0 * dW_to_EC; double elecAvail = part.RequestResource("ElectricCharge", dElectric_Draw) / dElectric_Draw; bool bPowered = (elecAvail > 0.90); dIndicated_Deviation = -10.0; sStation_ID = "---"; if (bPowered) { cNav_Select = null; foreach (Part p in vessel.Parts) { //string sMsg1 = "VI: " + p.name; //print(sMsg1); foreach (PartModule m in p.Modules) { //string sMsg2 = "VIm: " + m.name; //print(sMsg2); VHF_NAV_Receiver cNav = m as VHF_NAV_Receiver; if (cNav != null) { cNav_Select = cNav; } } } if (cNav_Select != null) { //string sMsg = "LOC indicator found receiver " + cNav_Select.moduleName; //print(sMsg); LOC cLOC = cNav_Select.getTunedLOC(); if (cLOC != null) { dIndicated_Deviation = cLOC.getOffset(cNav_Select.getPosition()); sStation_ID = cLOC.sStation_ID; } else { sStation_ID = "---"; } } else { sStation_ID = "---"; } } }
private void InitializeComponents() { m_seed_lb = new Label() { Text = Localization.LocalizeString("Seed", 4), VerticalAlignment = VerticalAlignment.Center, }; m_seed = new NumericStepper() { Value = 0, MaxValue = int.MaxValue, MinValue = 0, MaximumDecimalPlaces = 0, Width = 75, Tag = IntegratorSetting.Seed, }; m_diffusesamples_lb = new Label() { Text = Localization.LocalizeString("Diffuse Samples", 10), VerticalAlignment = VerticalAlignment.Center, }; m_diffusesamples = new NumericStepper() { Value = 0, MaxValue = int.MaxValue, MinValue = 0, MaximumDecimalPlaces = 0, Width = 75, Tag = IntegratorSetting.DiffuseSamples, }; m_glossysamples_lb = new Label() { Text = Localization.LocalizeString("Glossy Samples", 11), VerticalAlignment = VerticalAlignment.Center, }; m_glossysamples = new NumericStepper() { Value = 0, MaxValue = int.MaxValue, MinValue = 0, MaximumDecimalPlaces = 0, Width = 75, Tag = IntegratorSetting.GlossySamples, }; m_transmissionsamples_lb = new Label() { Text = Localization.LocalizeString("Transmission Samples", 12), VerticalAlignment = VerticalAlignment.Center, }; m_transmissionsamples = new NumericStepper() { Value = 0, MaxValue = int.MaxValue, MinValue = 0, MaximumDecimalPlaces = 0, Width = 75, Tag = IntegratorSetting.TransmissionSamples, }; m_maxbounce_lb = new Label() { Text = LOC.STR("Maximum bounces"), VerticalAlignment = VerticalAlignment.Center, }; m_maxbounce = new NumericStepper() { Value = 0, MaxValue = int.MaxValue, MinValue = 0, MaximumDecimalPlaces = 0, Width = 75, Tag = IntegratorSetting.MaxBounce, }; m_maxdiffusebounce_lb = new Label() { Text = Localization.LocalizeString("Diffuse", 31), ToolTip = Localization.LocalizeString("Maximum Diffuse Bounces", 15), VerticalAlignment = VerticalAlignment.Center, }; m_maxdiffusebounce = new NumericStepper() { Value = 0, ToolTip = Localization.LocalizeString("Maximum Diffuse Bounces", 15), MaxValue = int.MaxValue, MinValue = 0, MaximumDecimalPlaces = 0, Width = 75, Tag = IntegratorSetting.MaxDiffuseBounce, }; m_maxglossybounce_lb = new Label() { Text = Localization.LocalizeString("Glossy", 32), ToolTip = Localization.LocalizeString("Maximum Glossy Bounces", 16), VerticalAlignment = VerticalAlignment.Center, }; m_maxglossybounce = new NumericStepper() { Value = 0, ToolTip = Localization.LocalizeString("Maximum Glossy Bounces", 16), MaxValue = int.MaxValue, MinValue = 0, MaximumDecimalPlaces = 0, Width = 75, Tag = IntegratorSetting.MaxGlossyBounce, }; m_maxvolumebounce_lb = new Label() { Text = Localization.LocalizeString("Volume", 33), ToolTip = Localization.LocalizeString("Maximum Volume Bounces", 17), VerticalAlignment = VerticalAlignment.Center, }; m_maxvolumebounce = new NumericStepper() { Value = 0, ToolTip = Localization.LocalizeString("Maximum Volume Bounces", 17), MaxValue = int.MaxValue, MinValue = 0, MaximumDecimalPlaces = 0, Width = 75, Tag = IntegratorSetting.MaxVolumeBounce, }; m_maxtransmissionbounce_lb = new Label() { Text = LOC.STR("Transmission"), ToolTip = Localization.LocalizeString("Maximum Transmission Bounces", 18), VerticalAlignment = VerticalAlignment.Center, }; m_maxtransmissionbounce = new NumericStepper() { Value = 0, ToolTip = Localization.LocalizeString("Maximum Transmission Bounces", 18), MaxValue = int.MaxValue, MinValue = 0, MaximumDecimalPlaces = 0, Width = 75, Tag = IntegratorSetting.MaxTransmissionBounce, }; m_maxtranspbounce_lb = new Label() { Text = LOC.STR("Transparency"), ToolTip = LOC.STR("Maximum Transparency Bounces"), VerticalAlignment = VerticalAlignment.Center, }; m_maxtranspbounce = new NumericStepper() { Value = 0, ToolTip = LOC.STR("Maximum Transparency Bounces"), MinValue = 0, MaximumDecimalPlaces = 0, Width = 75, Tag = IntegratorSetting.TransparentMaxBounce, }; }
/// <summary> /// Build cargo report. /// Original from https://www.cbp.gov/sites/default/files/documents/cuscar_012_30_3.txt /// </summary> static TSCUSCAR BuildCargoReport(string controlNumber) { var result = new TSCUSCAR(); // Message header result.UNH = new UNH(); result.UNH.MessageReferenceNumber_01 = controlNumber.PadLeft(14, '0'); result.UNH.MessageIdentifier_02 = new S009(); result.UNH.MessageIdentifier_02.MessageType_01 = "CUSCAR"; result.UNH.MessageIdentifier_02.MessageVersionNumber_02 = "D"; result.UNH.MessageIdentifier_02.MessageReleaseNumber_03 = "03B"; result.UNH.MessageIdentifier_02.ControllingAgencyCoded_04 = "UN"; result.BGM = new BGM(); result.BGM.DOCUMENTMESSAGENAME_01 = new C002(); result.BGM.DOCUMENTMESSAGENAME_01.Documentnamecode_01 = "85"; result.BGM.DOCUMENTMESSAGENAME_01.Documentname_04 = "STANDARD"; result.BGM.DOCUMENTMESSAGEIDENTIFICATION_02 = new C106(); result.BGM.DOCUMENTMESSAGEIDENTIFICATION_02.Documentidentifier_01 = "LOCKKH04112206"; result.BGM.Messagefunctioncode_03 = "22"; // Repeating DTM result.DTM = new List <DTM>(); var dtm1 = new DTM(); dtm1.DATETIMEPERIOD_01 = new C507(); dtm1.DATETIMEPERIOD_01.Dateortimeorperiodfunctioncodequalifier_01 = "132"; dtm1.DATETIMEPERIOD_01.Dateortimeorperiodtext_02 = "200412301200"; dtm1.DATETIMEPERIOD_01.Dateortimeorperiodformatcode_03 = "203"; result.DTM.Add(dtm1); // Repeating LOC result.LOC = new List <LOC>(); var loc1 = new LOC(); loc1.Locationfunctioncodequalifier_01 = "60"; loc1.LOCATIONIDENTIFICATION_02 = new C517(); loc1.LOCATIONIDENTIFICATION_02.Locationnamecode_01 = "0901"; loc1.LOCATIONIDENTIFICATION_02.Codelistidentificationcode_02 = "77"; result.LOC.Add(loc1); // Repeating RFF Groups result.RFFLoop = new List <Loop_RFF_CUSCAR>(); // Begin RFF Group var rffLoop1 = new Loop_RFF_CUSCAR(); rffLoop1.RFF = new RFF(); rffLoop1.RFF.REFERENCE_01 = new C506(); rffLoop1.RFF.REFERENCE_01.Referencecodequalifier_01 = "ABO"; rffLoop1.RFF.REFERENCE_01.Referenceidentifier_02 = "ABO04100000"; // End RFF Group result.RFFLoop.Add(rffLoop1); // Repeating RFF Groups result.NADLoop = new List <Loop_NAD_CUSCAR>(); // Begin NAD Group 1 var nadLoop1 = new Loop_NAD_CUSCAR(); nadLoop1.NAD = new NAD(); nadLoop1.NAD.Partyfunctioncodequalifier_01 = "CA"; nadLoop1.NAD.PARTYIDENTIFICATIONDETAILS_02 = new C082(); nadLoop1.NAD.PARTYIDENTIFICATIONDETAILS_02.Partyidentifier_01 = "LOCK"; nadLoop1.NAD.PARTYIDENTIFICATIONDETAILS_02.Codelistidentificationcode_02 = "172"; nadLoop1.NAD.STREET_05 = new C059(); nadLoop1.NAD.STREET_05.Streetandnumberorpostofficeboxidentifier_01 = "11107 SUNSET HILLS ROAD"; nadLoop1.NAD.STREET_05.Streetandnumberorpostofficeboxidentifier_02 = "77705 ARLINGTON ROAD"; nadLoop1.NAD.Cityname_06 = "RESTON"; nadLoop1.NAD.COUNTRYSUBENTITYDETAILS_07 = new C819(); nadLoop1.NAD.COUNTRYSUBENTITYDETAILS_07.Countrysubentitynamecode_01 = "VA"; nadLoop1.NAD.COUNTRYSUBENTITYDETAILS_07.Codelistidentificationcode_02 = "163"; nadLoop1.NAD.Postalidentificationcode_08 = "20190"; // End NAD Group 1 result.NADLoop.Add(nadLoop1); // Begin NAD Group 2 var nadLoop2 = new Loop_NAD_CUSCAR(); nadLoop2.NAD = new NAD(); nadLoop2.NAD.Partyfunctioncodequalifier_01 = "VW"; nadLoop2.NAD.PARTYIDENTIFICATIONDETAILS_02 = new C082(); nadLoop2.NAD.PARTYIDENTIFICATIONDETAILS_02.Partyidentifier_01 = "0000041047"; nadLoop2.NAD.PARTYIDENTIFICATIONDETAILS_02.Codelistidentificationcode_02 = "109"; nadLoop2.NAD.PARTYNAME_04 = new C080(); nadLoop2.NAD.PARTYNAME_04.Partyname_01 = "AADLER"; nadLoop2.NAD.PARTYNAME_04.Partyname_02 = "KEN"; // End NAD Group 2 result.NADLoop.Add(nadLoop2); // Repeating FTX result.FTX = new List <FTX>(); var ftx1 = new FTX(); ftx1.Textsubjectcodequalifier_01 = "INS"; ftx1.TEXTREFERENCE_03 = new C107(); ftx1.TEXTREFERENCE_03.Freetextdescriptioncode_01 = "INSURANCE INFOR"; ftx1.TEXTLITERAL_04 = new C108(); ftx1.TEXTLITERAL_04.Freetext_01 = "NAMESTATE FARM INSURANCE COMPANY"; ftx1.TEXTLITERAL_04.Freetext_02 = "PLCYQO123456789"; ftx1.TEXTLITERAL_04.Freetext_03 = "AMNT100000"; ftx1.TEXTLITERAL_04.Freetext_04 = "YEAR2004"; result.FTX.Add(ftx1); // Repeating TDT Groups result.TDTLoop = new List <Loop_TDT_CUSCAR>(); // Begin TDT Group var tdtLoop1 = new Loop_TDT_CUSCAR(); tdtLoop1.TDT = new TDT(); tdtLoop1.TDT.Transportstagecodequalifier_01 = "11"; tdtLoop1.TDT.MODEOFTRANSPORT_03 = new C220(); tdtLoop1.TDT.MODEOFTRANSPORT_03.Transportmodenamecode_01 = "03"; tdtLoop1.TDT.TRANSPORTMEANS_04 = new C001(); tdtLoop1.TDT.TRANSPORTMEANS_04.Transportmeansdescription_04 = "BT"; tdtLoop1.TDT.Transitdirectionindicatorcode_06 = "I"; tdtLoop1.TDT.TRANSPORTIDENTIFICATION_08 = new C222(); tdtLoop1.TDT.TRANSPORTIDENTIFICATION_08.Codelistidentificationcode_02 = "109"; tdtLoop1.TDT.TRANSPORTIDENTIFICATION_08.Transportmeansidentificationname_04 = "10000324"; // End TDT Group result.TDTLoop.Add(tdtLoop1); // Repeating EQD Groups result.EQDLoop = new List <Loop_EQD_CUSCAR>(); // Begin EQD Group var eqdLoop1 = new Loop_EQD_CUSCAR(); eqdLoop1.EQD = new EQD(); eqdLoop1.EQD.Equipmenttypecodequalifier_01 = "BI"; eqdLoop1.EQD.EQUIPMENTIDENTIFICATION_02 = new C237(); eqdLoop1.EQD.EQUIPMENTIDENTIFICATION_02.Equipmentidentifier_01 = "10000325"; eqdLoop1.EQD.EQUIPMENTIDENTIFICATION_02.Codelistidentificationcode_02 = "109"; // Repeating SEL eqdLoop1.SEL = new List <SEL>(); var selEqd = new SEL(); selEqd.Transportunitsealidentifier_01 = "SEALEQUNO001"; eqdLoop1.SEL.Add(selEqd); // Repeating EQD RFF Groups eqdLoop1.RFFLoop = new List <Loop_RFF_CUSCAR_4>(); // Begin RFF Group var rffEqdLoop1 = new Loop_RFF_CUSCAR_4(); rffEqdLoop1.RFF = new RFF(); rffEqdLoop1.RFF.REFERENCE_01 = new C506(); rffEqdLoop1.RFF.REFERENCE_01.Referencecodequalifier_01 = "ABZ"; rffEqdLoop1.RFF.REFERENCE_01.Referenceidentifier_02 = "EQU123"; // Repeating LOC rffEqdLoop1.LOC = new List <LOC>(); var locRff1 = new LOC(); locRff1.Locationfunctioncodequalifier_01 = "89"; locRff1.LOCATIONIDENTIFICATION_02 = new C517(); locRff1.LOCATIONIDENTIFICATION_02.Locationnamecode_01 = "VA"; locRff1.LOCATIONIDENTIFICATION_02.Codelistidentificationcode_02 = "163"; rffEqdLoop1.LOC.Add(locRff1); // End RFF Group eqdLoop1.RFFLoop.Add(rffEqdLoop1); // End EQD Group result.EQDLoop.Add(eqdLoop1); // Repeating CNI Groups result.CNILoop = new List <Loop_CNI_CUSCAR>(); // Begin CNI Group var cniLoop1 = new Loop_CNI_CUSCAR(); cniLoop1.CNI = new CNI(); cniLoop1.CNI.Consolidationitemnumber_01 = "3741"; cniLoop1.CNI.DOCUMENTMESSAGEDETAILS_02 = new C503(); cniLoop1.CNI.DOCUMENTMESSAGEDETAILS_02.Documentstatuscode_02 = "23"; // Repeating DOC cniLoop1.DOC = new List <DOC>(); var docCni1 = new DOC(); docCni1.DOCUMENTMESSAGENAME_01 = new C002(); docCni1.DOCUMENTMESSAGENAME_01.Documentnamecode_01 = "714"; docCni1.DOCUMENTMESSAGENAME_01.Documentname_04 = "61"; docCni1.DOCUMENTMESSAGEDETAILS_02 = new C503(); docCni1.DOCUMENTMESSAGEDETAILS_02.Documentidentifier_01 = "KH041122106"; docCni1.DOCUMENTMESSAGEDETAILS_02.Documentsourcedescription_03 = "LOCK"; cniLoop1.DOC.Add(docCni1); // Repeating RFF CNI Groups cniLoop1.RFFLoop = new List <Loop_RFF_CUSCAR_2>(); // Begin RFF CNI Group var rffCniLoop1 = new Loop_RFF_CUSCAR_2(); rffCniLoop1.RFF = new RFF(); rffCniLoop1.RFF.REFERENCE_01 = new C506(); rffCniLoop1.RFF.REFERENCE_01.Referencecodequalifier_01 = "AAM"; rffCniLoop1.RFF.REFERENCE_01.Referenceidentifier_02 = "LOCKKH041122106"; // Repeating CNT rffCniLoop1.CNT = new List <CNT>(); var cntRff1 = new CNT(); cntRff1.CONTROL_01 = new C270(); cntRff1.CONTROL_01.Controltotaltypecodequalifier_01 = "58"; cntRff1.CONTROL_01.Controltotalquantity_02 = "158"; rffCniLoop1.CNT.Add(cntRff1); // Repeating LOC rffCniLoop1.LOC = new List <LOC>(); var locRff2 = new LOC(); locRff2.Locationfunctioncodequalifier_01 = "9"; locRff2.LOCATIONIDENTIFICATION_02 = new C517(); locRff2.LOCATIONIDENTIFICATION_02.Locationnamecode_01 = "U0107"; locRff2.LOCATIONIDENTIFICATION_02.Codelistidentificationcode_02 = "78"; rffCniLoop1.LOC.Add(locRff2); // Repeating GEI rffCniLoop1.GEI = new List <GEI>(); var geiRff1 = new GEI(); geiRff1.Processinginformationcodequalifier_01 = "7"; geiRff1.PROCESSINGINDICATOR_02 = new C012(); geiRff1.PROCESSINGINDICATOR_02.Processingindicatordescriptioncode_01 = "135"; rffCniLoop1.GEI.Add(geiRff1); // Repeating TDT RFF Groups rffCniLoop1.TDTLoop = new List <Loop_TDT_CUSCAR_2>(); // Begin TDT RFF Group var tdtRffLoop1 = new Loop_TDT_CUSCAR_2(); tdtRffLoop1.TDT = new TDT(); tdtRffLoop1.TDT.Transportstagecodequalifier_01 = "11"; // Repeating DTM tdtRffLoop1.DTM = new List <DTM>(); var dtmRff1 = new DTM(); dtmRff1.DATETIMEPERIOD_01 = new C507(); dtmRff1.DATETIMEPERIOD_01.Dateortimeorperiodfunctioncodequalifier_01 = "133"; dtmRff1.DATETIMEPERIOD_01.Dateortimeorperiodtext_02 = "20041230"; dtmRff1.DATETIMEPERIOD_01.Dateortimeorperiodformatcode_03 = "102"; tdtRffLoop1.DTM.Add(dtmRff1); // Repeating RFF TDT Groups tdtRffLoop1.RFFLoop = new List <Loop_RFF_CUSCAR_3>(); // Begin RFF TDT Group var rffTdtLoop1 = new Loop_RFF_CUSCAR_3(); rffTdtLoop1.RFF = new RFF(); rffTdtLoop1.RFF.REFERENCE_01 = new C506(); rffTdtLoop1.RFF.REFERENCE_01.Referencecodequalifier_01 = "AWM"; // Repeating TSR rffTdtLoop1.TSR = new List <TSR>(); var tsrRff1 = new TSR(); tsrRff1.CONTRACTANDCARRIAGECONDITION_01 = new C536(); tsrRff1.CONTRACTANDCARRIAGECONDITION_01.Contractandcarriageconditioncode_01 = "9"; rffTdtLoop1.TSR.Add(tsrRff1); // End RFF TDTGroup tdtRffLoop1.RFFLoop.Add(rffTdtLoop1); // End TDT RFF Group rffCniLoop1.TDTLoop.Add(tdtRffLoop1); // Repeating NAD RFF Groups rffCniLoop1.NADLoop = new List <Loop_NAD_CUSCAR_2>(); // Begin NAD RFF Group 1 var nadRffLoop1 = new Loop_NAD_CUSCAR_2(); nadRffLoop1.NAD = new NAD(); nadRffLoop1.NAD.Partyfunctioncodequalifier_01 = "CN"; nadRffLoop1.NAD.PARTYIDENTIFICATIONDETAILS_02 = new C082(); nadRffLoop1.NAD.PARTYIDENTIFICATIONDETAILS_02.Partyidentifier_01 = "65424"; nadRffLoop1.NAD.PARTYIDENTIFICATIONDETAILS_02.Codelistidentificationcode_02 = "109"; nadRffLoop1.NAD.NAMEANDADDRESS_03 = new C058(); nadRffLoop1.NAD.NAMEANDADDRESS_03.Nameandaddressdescription_01 = "1234 MAIN STREET"; nadRffLoop1.NAD.PARTYNAME_04 = new C080(); nadRffLoop1.NAD.PARTYNAME_04.Partyname_01 = "KATHY SMITH"; nadRffLoop1.NAD.Cityname_06 = "BELTSVILLE"; nadRffLoop1.NAD.COUNTRYSUBENTITYDETAILS_07 = new C819(); nadRffLoop1.NAD.COUNTRYSUBENTITYDETAILS_07.Countrysubentitynamecode_01 = "MD"; nadRffLoop1.NAD.COUNTRYSUBENTITYDETAILS_07.Codelistidentificationcode_02 = "163"; nadRffLoop1.NAD.Postalidentificationcode_08 = "20708"; nadRffLoop1.NAD.Countrynamecode_09 = "US"; // Repeating CTA NAD Groups nadRffLoop1.CTALoop = new List <Loop_CTA_CUSCAR>(); // Begin CTA NAD Group var ctaNadLoop1 = new Loop_CTA_CUSCAR(); ctaNadLoop1.CTA = new CTA(); ctaNadLoop1.CTA.Contactfunctioncode_01 = "IC"; // Repeating COM ctaNadLoop1.COM = new List <COM>(); var comCta1 = new COM(); // Repeating C076 comCta1.COMMUNICATIONCONTACT_01 = new List <C076>(); var c076Com1 = new C076(); c076Com1.Communicationaddressidentifier_01 = "8005551212"; c076Com1.Communicationaddresscodequalifier_02 = "TE"; comCta1.COMMUNICATIONCONTACT_01.Add(c076Com1); ctaNadLoop1.COM.Add(comCta1); // End CTA NAD Group nadRffLoop1.CTALoop.Add(ctaNadLoop1); // End NAD RFF Group 1 rffCniLoop1.NADLoop.Add(nadRffLoop1); // Begin NAD RFF Group 2 var nadRffLoop2 = new Loop_NAD_CUSCAR_2(); nadRffLoop2.NAD = new NAD(); nadRffLoop2.NAD.Partyfunctioncodequalifier_01 = "IM"; nadRffLoop2.NAD.PARTYIDENTIFICATIONDETAILS_02 = new C082(); nadRffLoop2.NAD.PARTYIDENTIFICATIONDETAILS_02.Partyidentifier_01 = "00010"; nadRffLoop2.NAD.PARTYIDENTIFICATIONDETAILS_02.Codelistidentificationcode_02 = "109"; nadRffLoop2.NAD.NAMEANDADDRESS_03 = new C058(); nadRffLoop2.NAD.NAMEANDADDRESS_03.Nameandaddressdescription_01 = "1234 MAIN STREET"; nadRffLoop2.NAD.PARTYNAME_04 = new C080(); nadRffLoop2.NAD.PARTYNAME_04.Partyname_01 = "KATHY SMITH"; nadRffLoop2.NAD.Cityname_06 = "BELTSVILLE"; nadRffLoop2.NAD.COUNTRYSUBENTITYDETAILS_07 = new C819(); nadRffLoop2.NAD.COUNTRYSUBENTITYDETAILS_07.Countrysubentitynamecode_01 = "MD"; nadRffLoop2.NAD.COUNTRYSUBENTITYDETAILS_07.Codelistidentificationcode_02 = "163"; nadRffLoop2.NAD.Postalidentificationcode_08 = "20708"; nadRffLoop2.NAD.Countrynamecode_09 = "US"; // Repeating CTA NAD Groups nadRffLoop2.CTALoop = new List <Loop_CTA_CUSCAR>(); // Begin CTA NAD Group var ctaNadLoop2 = new Loop_CTA_CUSCAR(); ctaNadLoop2.CTA = new CTA(); ctaNadLoop2.CTA.Contactfunctioncode_01 = "IC"; // Repeating COM ctaNadLoop2.COM = new List <COM>(); var comCta2 = new COM(); // Repeating C076 comCta2.COMMUNICATIONCONTACT_01 = new List <C076>(); var c076Com2 = new C076(); c076Com2.Communicationaddressidentifier_01 = "8005551212"; c076Com2.Communicationaddresscodequalifier_02 = "TE"; comCta2.COMMUNICATIONCONTACT_01.Add(c076Com2); ctaNadLoop2.COM.Add(comCta2); // End CTA NAD Group nadRffLoop2.CTALoop.Add(ctaNadLoop2); // End NAD RFF Group 2 rffCniLoop1.NADLoop.Add(nadRffLoop2); // Begin NAD RFF Group 3 var nadRffLoop3 = new Loop_NAD_CUSCAR_2(); nadRffLoop3.NAD = new NAD(); nadRffLoop3.NAD.Partyfunctioncodequalifier_01 = "OS"; nadRffLoop3.NAD.PARTYIDENTIFICATIONDETAILS_02 = new C082(); nadRffLoop3.NAD.PARTYIDENTIFICATIONDETAILS_02.Partyidentifier_01 = "27190"; nadRffLoop3.NAD.PARTYIDENTIFICATIONDETAILS_02.Codelistidentificationcode_02 = "109"; nadRffLoop3.NAD.NAMEANDADDRESS_03 = new C058(); nadRffLoop3.NAD.NAMEANDADDRESS_03.Nameandaddressdescription_01 = "1234 MAIN STREET"; nadRffLoop3.NAD.PARTYNAME_04 = new C080(); nadRffLoop3.NAD.PARTYNAME_04.Partyname_01 = "KATHY SMITH"; nadRffLoop3.NAD.Cityname_06 = "BELTSVILLE"; nadRffLoop3.NAD.COUNTRYSUBENTITYDETAILS_07 = new C819(); nadRffLoop3.NAD.COUNTRYSUBENTITYDETAILS_07.Countrysubentitynamecode_01 = "MD"; nadRffLoop3.NAD.COUNTRYSUBENTITYDETAILS_07.Codelistidentificationcode_02 = "163"; nadRffLoop3.NAD.Postalidentificationcode_08 = "20708"; nadRffLoop3.NAD.Countrynamecode_09 = "US"; // Repeating CTA NAD Groups nadRffLoop3.CTALoop = new List <Loop_CTA_CUSCAR>(); // Begin CTA NAD Group var ctaNadLoop3 = new Loop_CTA_CUSCAR(); ctaNadLoop3.CTA = new CTA(); ctaNadLoop3.CTA.Contactfunctioncode_01 = "IC"; // Repeating COM ctaNadLoop3.COM = new List <COM>(); var comCta3 = new COM(); // Repeating C076 comCta3.COMMUNICATIONCONTACT_01 = new List <C076>(); var c076Com3 = new C076(); c076Com3.Communicationaddressidentifier_01 = "8005551212"; c076Com3.Communicationaddresscodequalifier_02 = "TE"; comCta3.COMMUNICATIONCONTACT_01.Add(c076Com2); ctaNadLoop3.COM.Add(comCta3); // End CTA NAD Group nadRffLoop3.CTALoop.Add(ctaNadLoop3); // End NAD RFF Group 3 rffCniLoop1.NADLoop.Add(nadRffLoop3); // Repeating GID RFF Groups rffCniLoop1.GIDLoop = new List <Loop_GID_CUSCAR>(); // Begin GID RFF Group var gidRffLoop1 = new Loop_GID_CUSCAR(); gidRffLoop1.GID = new GID(); gidRffLoop1.GID.Goodsitemnumber_01 = "1"; // Repeating PAC gidRffLoop1.PAC = new List <PAC>(); var pacGid1 = new PAC(); pacGid1.Packagequantity_01 = "158"; pacGid1.PACKAGETYPE_03 = new C202(); pacGid1.PACKAGETYPE_03.Packagetypedescriptioncode_01 = "COL"; gidRffLoop1.PAC.Add(pacGid1); // Repeating FTX gidRffLoop1.FTX = new List <FTX>(); var ftxGid1 = new FTX(); ftxGid1.Textsubjectcodequalifier_01 = "AAA"; ftxGid1.TEXTLITERAL_04 = new C108(); ftxGid1.TEXTLITERAL_04.Freetext_01 = "IRON COIL"; ftxGid1.TEXTLITERAL_04.Freetext_02 = "SHEET METAL"; gidRffLoop1.FTX.Add(ftxGid1); // Repeating MEA gidRffLoop1.MEA = new List <MEA>(); var meaGid1 = new MEA(); meaGid1.Measurementpurposecodequalifier_01 = "AAI"; meaGid1.VALUERANGE_03 = new C174(); meaGid1.VALUERANGE_03.Measurementunitcode_01 = "K"; meaGid1.VALUERANGE_03.Measure_02 = "750"; gidRffLoop1.MEA.Add(meaGid1); // Repeating SGP gidRffLoop1.SGP = new List <SGP>(); var sgpGid1 = new SGP(); sgpGid1.EQUIPMENTIDENTIFICATION_01 = new C237(); sgpGid1.EQUIPMENTIDENTIFICATION_01.Equipmentidentifier_01 = "10000325"; sgpGid1.EQUIPMENTIDENTIFICATION_01.Codelistidentificationcode_02 = "109"; gidRffLoop1.SGP.Add(sgpGid1); // End GID RFF Group rffCniLoop1.GIDLoop.Add(gidRffLoop1); // End RFF CNI Group cniLoop1.RFFLoop.Add(rffCniLoop1); // End CNI Group result.CNILoop.Add(cniLoop1); return(result); }
public string GenerateCommand() { switch (menu.SelectedIndex) { case 0: if (Set.IsChecked == true) { return("/time set " + Time1.Value); } else if (add.IsChecked == true) { return("/time add " + Time1.Value); } else if (c2.IsChecked == true) { switch (query.Text) { default: return(null); case "今天时间": return("/time quary daytime"); case "游戏总时间": return("/time quary gametime"); case "游戏天数": return("/time quary day"); } } else if (c3.IsChecked == true) { switch (weather.SelectedIndex) { default: return(null); case 0: return("/weather clear " + time.Value); case 1: return("/weather rain " + time.Value); case 2: return("/weather thunder " + time.Value); } } else if (c4.IsChecked == true) { return("/difficulty " + difficulty.SelectedIndex); } else { return("/setworldspawn " + LOC.GetLocation()); } case 1: if (c5.IsChecked == true) { return("/defaultgamemode " + gamemode.SelectedIndex); } string str = "/gamerule "; string TF = ""; switch (gamerules.SelectedIndex) { case 1: return(str + "randomTickSpeed " + RandomTick.Value); case 2: return(str + "spawnRadius " + Distance.Value); } if (isEnable.IsChecked == true) { TF = "true"; } else { TF = "false"; } switch (gamerules.SelectedIndex) { case 0: return(str + "commandBlockOutput " + TF); case 3: return(str + "disableElytraMovementCheck " + TF); case 4: return(str + "doDaylightCycle " + TF); case 5: return(str + "doEntityDrops " + TF); case 6: return(str + "doFireTick " + TF); case 7: return(str + "doMobLoot " + TF); case 8: return(str + "doMobSpawning " + TF); case 9: return(str + "doTileDrops " + TF); case 10: return(str + "keepInventory " + TF); case 11: return(str + "logAdminCommands " + TF); case 12: return(str + "mobGriefing " + TF); case 13: return(str + "naturalRegeneration " + TF); case 14: return(str + "reducedDebugInfo " + TF); case 15: return(str + "sendCommandFeedback " + TF); case 16: return(str + "showDeathMessages " + TF); case 17: return(str + "spectatorsGenerateChunks " + TF); } break; case 2: string ptl = ""; string mode = ""; if (particle_mode.SelectedIndex == 0) { mode = "normal"; } else { mode = "force"; } switch (particle.SelectedIndex) { case 0: ptl = "explode"; break; case 1: ptl = "largeexplode"; break; case 2: ptl = "hugeexplosion"; break; case 3: ptl = "fireworksSpark"; break; case 4: ptl = "bubble"; break; case 5: ptl = "splash"; break; case 6: ptl = "wake"; break; case 7: ptl = "suspended"; break; case 8: ptl = "depthsuspend"; break; case 9: ptl = "crit"; break; case 10: ptl = "magicCrit"; break; case 11: ptl = "smoke"; break; case 12: ptl = "largesmoke"; break; case 13: ptl = "spell"; break; case 14: ptl = "instantSpell"; break; case 15: ptl = "mobSpell"; break; case 16: ptl = "mobSpellAmbient"; break; case 17: ptl = "witchMagic"; break; case 18: ptl = "dripWater"; break; case 19: ptl = "dripLava"; break; case 20: ptl = "angryVillager"; break; case 21: ptl = "happyVillager"; break; case 22: ptl = "townaura"; break; case 23: ptl = "note"; break; case 24: ptl = "portal"; break; case 25: ptl = "enchantmenttable"; break; case 26: ptl = "flame"; break; case 27: ptl = "lava"; break; case 28: ptl = "footstep"; break; case 29: ptl = "reddust"; break; case 30: ptl = "snowballpoof"; break; case 31: ptl = "slime"; break; case 32: ptl = "heart"; break; case 33: ptl = "barrier"; break; case 34: ptl = "cloud"; break; case 35: ptl = "snowshovel"; break; case 36: ptl = "droplet"; break; case 37: ptl = "mobapperance"; break; case 38: ptl = "endRod"; break; case 39: ptl = "dragonbreath"; break; case 40: ptl = "damageIndicator"; break; case 41: ptl = "sweepAttack"; break; case 42: ptl = "fallingdust"; break; } return("/particle " + ptl + " " + loc.GetLocation() + " " + dloc.GetLocation() + " " + speed.Value + " " + amount.Value + " " + mode); case 3: string cmd = "/worldborder "; if (bordersize.IsChecked == true) { if (add_border.IsChecked == true) { return(cmd + "add " + size.Value + " " + change_time.Value); } else { return(cmd + "set " + size.Value + " " + change_time.Value); } } if (center.IsChecked == true) { string loc = ""; if (tilde.IsChecked == true) { loc = "~" + center_X.Value + " ~" + center_Z.Value; } else { loc = center_X.Value + " " + center_Z.Value; } return(cmd + "center " + loc); } if (damage.IsChecked == true) { string dmg_arg = ""; if (damage_amount.IsChecked == true) { dmg_arg = "damage amount "; } else { dmg_arg = "damage buffer "; } return(cmd + dmg_arg + damage_arg.Value); } if (warn.IsChecked == true) { string warn_arg = ""; if (warn_distance.IsChecked == true) { warn_arg = "warning distance "; } else { warn_arg = "warning time "; } return(cmd + warn_arg + warning_arg.Value); } break; case 4: if (page.IsChecked == true) { return("/help " + (Page.SelectedIndex + 1)); } if (command.IsChecked == true) { return("/help " + Command.Text); } break; } return(""); }
/// <summary> /// Build purchase order. /// Original from https://www.gs1.org/standards/edi-xml-gs1-eancom/eancom-orders-s4/syntax-4 /// </summary> public static TSORDERS BuildPurchaseOrder(string controlNumber) { var result = new TSORDERS(); // Message header result.UNH = new UNH(); result.UNH.MessageReferenceNumber_01 = controlNumber.PadLeft(14, '0'); result.UNH.MessageIdentifier_02 = new S009(); result.UNH.MessageIdentifier_02.MessageType_01 = "ORDERS"; result.UNH.MessageIdentifier_02.MessageVersionNumber_02 = "D"; result.UNH.MessageIdentifier_02.MessageReleaseNumber_03 = "96A"; result.UNH.MessageIdentifier_02.ControllingAgencyCoded_04 = "UN"; // Order number 128576 result.BGM = new BGM(); result.BGM.DOCUMENTMESSAGENAME_01 = new C002(); result.BGM.DOCUMENTMESSAGENAME_01.Documentmessagenamecoded_01 = "220"; result.BGM.Documentmessagenumber_02 = "128576"; result.BGM.Messagefunctioncoded_03 = "9"; // Repeating DTM result.DTM = new List <DTM>(); // Message date 30th of August 2002 var dtm = new DTM(); dtm.DATETIMEPERIOD_01 = new C507(); dtm.DATETIMEPERIOD_01.Datetimeperiodqualifier_01 = "137"; dtm.DATETIMEPERIOD_01.Datetimeperiod_02 = "20020830"; dtm.DATETIMEPERIOD_01.Datetimeperiodformatqualifier_03 = "102"; result.DTM.Add(dtm); // Instruction to pay in Bank Account result.PAI = new PAI(); result.PAI.PAYMENTINSTRUCTIONDETAILS_01 = new C534(); result.PAI.PAYMENTINSTRUCTIONDETAILS_01.Paymentmeanscoded_03 = "42"; // Repeating FTX result.FTX = new List <FTX>(); // Free text mutually defined var ftx = new FTX(); ftx.Textsubjectqualifier_01 = "ZZZ"; ftx.Textfunctioncoded_02 = "1"; ftx.TEXTREFERENCE_03 = new C107(); ftx.TEXTREFERENCE_03.Freetextcoded_01 = "001"; ftx.TEXTREFERENCE_03.Codelistresponsibleagencycoded_03 = "91"; result.FTX.Add(ftx); // Repeating RFF Groups result.RFFLoop = new List <Loop_RFF_ORDERS>(); // Begin RFF Group var rffLoop = new Loop_RFF_ORDERS(); // Order is based on contract number 652744 rffLoop.RFF = new RFF(); rffLoop.RFF.REFERENCE_01 = new C506(); rffLoop.RFF.REFERENCE_01.Referencequalifier_01 = "CT"; rffLoop.RFF.REFERENCE_01.Referencenumber_02 = "652744"; // Repeating DTM rffLoop.DTM = new List <DTM>(); // Date of contract 25th of August 2002 var rffDtm1 = new DTM(); rffDtm1.DATETIMEPERIOD_01 = new C507(); rffDtm1.DATETIMEPERIOD_01.Datetimeperiodqualifier_01 = "171"; rffDtm1.DATETIMEPERIOD_01.Datetimeperiod_02 = "20020825"; rffDtm1.DATETIMEPERIOD_01.Datetimeperiodformatqualifier_03 = "102"; rffLoop.DTM.Add(rffDtm1); // End RFF Group result.RFFLoop.Add(rffLoop); // Repeating NAD Groups result.NADLoop = new List <Loop_NAD_ORDERS>(); // Begin NAD Group 1 var nadLoop1 = new Loop_NAD_ORDERS(); // Buyer is identified by GLN 5412345000013 nadLoop1.NAD = new NAD(); nadLoop1.NAD.Partyqualifier_01 = "BY"; nadLoop1.NAD.PARTYIDENTIFICATIONDETAILS_02 = new C082(); nadLoop1.NAD.PARTYIDENTIFICATIONDETAILS_02.Partyididentification_01 = "5412345000013"; nadLoop1.NAD.PARTYIDENTIFICATIONDETAILS_02.Codelistresponsibleagencycoded_03 = "9"; // Repeating RFF Groups nadLoop1.RFFLoop = new List <Loop_RFF_ORDERS>(); // Begin RFF Group var rffLoopNad = new Loop_RFF_ORDERS(); // Buyer’s VAT number is 87765432 rffLoopNad.RFF = new RFF(); rffLoopNad.RFF.REFERENCE_01 = new C506(); rffLoopNad.RFF.REFERENCE_01.Referencequalifier_01 = "VA"; rffLoopNad.RFF.REFERENCE_01.Referencenumber_02 = "87765432"; // End RFF Group nadLoop1.RFFLoop.Add(rffLoopNad); // Repeating CTA Groups nadLoop1.CTALoop = new List <Loop_CTA_ORDERS>(); // Begin CTA Group var ctaLoop = new Loop_CTA_ORDERS(); // Order contact is PForget ctaLoop.CTA = new CTA(); ctaLoop.CTA.Contactfunctioncoded_01 = "OC"; ctaLoop.CTA.DEPARTMENTOREMPLOYEEDETAILS_02 = new C056(); ctaLoop.CTA.DEPARTMENTOREMPLOYEEDETAILS_02.Departmentoremployee_02 = "P FORGET"; // Repeating COM ctaLoop.COM = new List <COM>(); // Telephone number of order contact var com = new COM(); com.COMMUNICATIONCONTACT_01 = new C076(); com.COMMUNICATIONCONTACT_01.Communicationnumber_01 = "0044715632478"; com.COMMUNICATIONCONTACT_01.Communicationchannelqualifier_02 = "TE"; ctaLoop.COM.Add(com); // End CTA Group nadLoop1.CTALoop.Add(ctaLoop); // End NAD Group 1 result.NADLoop.Add(nadLoop1); // Begin NAD Group 2 var nadLoop2 = new Loop_NAD_ORDERS(); // Supplier is identified by GLN 4012345500004 nadLoop2.NAD = new NAD(); nadLoop2.NAD.Partyqualifier_01 = "SU"; nadLoop2.NAD.PARTYIDENTIFICATIONDETAILS_02 = new C082(); nadLoop2.NAD.PARTYIDENTIFICATIONDETAILS_02.Partyididentification_01 = "4012345500004"; nadLoop2.NAD.PARTYIDENTIFICATIONDETAILS_02.Codelistresponsibleagencycoded_03 = "9"; // Repeating RFF Groups nadLoop2.RFFLoop = new List <Loop_RFF_ORDERS>(); // Begin RFF Group var rffLoopNad2 = new Loop_RFF_ORDERS(); // Supplier’s VAT number is 56225432 rffLoopNad2.RFF = new RFF(); rffLoopNad2.RFF.REFERENCE_01 = new C506(); rffLoopNad2.RFF.REFERENCE_01.Referencequalifier_01 = "VA"; rffLoopNad2.RFF.REFERENCE_01.Referencenumber_02 = "56225432"; // End RFF Group nadLoop2.RFFLoop.Add(rffLoopNad2); // End NAD Group 2 result.NADLoop.Add(nadLoop2); // Repeating CUX Groups result.CUXLoop = new List <Loop_CUX_ORDERS>(); // Begin CUX Group var cuxLoop = new Loop_CUX_ORDERS(); // Ordering currency is Pounds Sterling with the invoicing currency identified as Euros // The exchange rate between them is 1 Pound Sterling equals 1.67 Euros cuxLoop.CUX = new CUX(); cuxLoop.CUX.CURRENCYDETAILS_01 = new C504(); cuxLoop.CUX.CURRENCYDETAILS_01.Currencydetailsqualifier_01 = "2"; cuxLoop.CUX.CURRENCYDETAILS_01.Currencycoded_02 = "GBP"; cuxLoop.CUX.CURRENCYDETAILS_01.Currencyqualifier_03 = "9"; cuxLoop.CUX.CURRENCYDETAILS_02 = new C504(); cuxLoop.CUX.CURRENCYDETAILS_02.Currencydetailsqualifier_01 = "3"; cuxLoop.CUX.CURRENCYDETAILS_02.Currencycoded_02 = "EUR"; cuxLoop.CUX.CURRENCYDETAILS_02.Currencyqualifier_03 = "4"; cuxLoop.CUX.Rateofexchange_03 = "1.67"; // Repeating DTM cuxLoop.DTM = new List <DTM>(); // Period on which rate of exchange date is based is the // 1st of August 2002 - 31st of August 2002 var dtmCux = new DTM(); dtmCux.DATETIMEPERIOD_01 = new C507(); dtmCux.DATETIMEPERIOD_01.Datetimeperiodqualifier_01 = "134"; dtmCux.DATETIMEPERIOD_01.Datetimeperiod_02 = "2002080120020831"; dtmCux.DATETIMEPERIOD_01.Datetimeperiodformatqualifier_03 = "718"; cuxLoop.DTM.Add(dtmCux); // End CUX Group result.CUXLoop.Add(cuxLoop); // Repeating TDT Groups result.TDTLoop = new List <Loop_TDT_ORDERS>(); // Begin TDT Group var tdtLoop = new Loop_TDT_ORDERS(); // Order requests that the main carriage transport used to deliver the goods is a truck tdtLoop.TDT = new TDT(); tdtLoop.TDT.Transportstagequalifier_01 = "20"; tdtLoop.TDT.MODEOFTRANSPORT_03 = new C220(); tdtLoop.TDT.MODEOFTRANSPORT_03.Modeoftransportcoded_01 = "30"; tdtLoop.TDT.TRANSPORTMEANS_04 = new C228(); tdtLoop.TDT.TRANSPORTMEANS_04.Typeofmeansoftransportidentification_01 = "31"; // End TDT Group result.TDTLoop.Add(tdtLoop); // Repeating TOD Groups result.TODLoop = new List <Loop_TOD_ORDERS>(); // Begin TOD Group var todLoop = new Loop_TOD_ORDERS(); // Terms of delivery are to be Cost, Insurance and Freight todLoop.TOD = new TOD(); todLoop.TOD.Termsofdeliveryortransportfunctioncoded_01 = "3"; todLoop.TOD.TERMSOFDELIVERYORTRANSPORT_03 = new C100(); todLoop.TOD.TERMSOFDELIVERYORTRANSPORT_03.Termsofdeliveryortransportcoded_01 = "CIF"; todLoop.TOD.TERMSOFDELIVERYORTRANSPORT_03.Codelistqualifier_02 = "23"; todLoop.TOD.TERMSOFDELIVERYORTRANSPORT_03.Codelistresponsibleagencycoded_03 = "9"; // Repeating LOC Group todLoop.LOC = new List <LOC>(); // The named port is Brussels var loc = new LOC(); loc.Placelocationqualifier_01 = "1"; loc.LOCATIONIDENTIFICATION_02 = new C517(); loc.LOCATIONIDENTIFICATION_02.Placelocationidentification_01 = "BE-BRU"; todLoop.LOC.Add(loc); // End TOD Group result.TODLoop.Add(todLoop); // Repeating LIN Groups result.LINLoop = new List <Loop_LIN_ORDERS>(); // Begin LIN Group 1 var linLoop1 = new Loop_LIN_ORDERS(); // First product order is identified by GTIN 4000862141404 linLoop1.LIN = new LIN(); linLoop1.LIN.Lineitemnumber_01 = "1"; linLoop1.LIN.ITEMNUMBERIDENTIFICATION_03 = new C212(); linLoop1.LIN.ITEMNUMBERIDENTIFICATION_03.Itemnumber_01 = "4000862141404"; linLoop1.LIN.ITEMNUMBERIDENTIFICATION_03.Itemnumbertypecoded_02 = "SRS"; // Repeating PIA linLoop1.PIA = new List <PIA>(); // In addition the buyer’s part number ABC1234 is provided var pia = new PIA(); pia.Productidfunctionqualifier_01 = "1"; pia.ITEMNUMBERIDENTIFICATION_02 = new C212(); pia.ITEMNUMBERIDENTIFICATION_02.Itemnumber_01 = "ABC1234"; pia.ITEMNUMBERIDENTIFICATION_02.Itemnumbertypecoded_02 = "IN"; linLoop1.PIA.Add(pia); // Repeating IMD linLoop1.IMD = new List <IMD>(); // The ordered item is a traded unit var imd = new IMD(); imd.Itemdescriptiontypecoded_01 = "C"; imd.ITEMDESCRIPTION_03 = new C273(); imd.ITEMDESCRIPTION_03.Itemdescriptionidentification_01 = "TU"; imd.ITEMDESCRIPTION_03.Codelistresponsibleagencycoded_03 = "9"; linLoop1.IMD.Add(imd); // Repeating QTY linLoop1.QTY = new List <QTY>(); // Ordered quantity is 48 units var qty = new QTY(); qty.QUANTITYDETAILS_01 = new C186(); qty.QUANTITYDETAILS_01.Quantityqualifier_01 = "21"; qty.QUANTITYDETAILS_01.Quantity_02 = "48"; linLoop1.QTY.Add(qty); // Repeating MOA linLoop1.MOA = new List <MOA>(); // Value of order line is 699.84 Pounds Sterling var moa = new MOA(); moa.MONETARYAMOUNT_01 = new C516(); moa.MONETARYAMOUNT_01.Monetaryamounttypequalifier_01 = "203"; moa.MONETARYAMOUNT_01.Monetaryamount_02 = "699.84"; linLoop1.MOA.Add(moa); // Repeating PRI Groups linLoop1.PRILoop = new List <Loop_PRI_ORDERS>(); // Begin PRI Group var priLoop = new Loop_PRI_ORDERS(); // Fixed net calculation price is 14.58 Pounds Sterling priLoop.PRI = new PRI(); priLoop.PRI.PRICEINFORMATION_01 = new C509(); priLoop.PRI.PRICEINFORMATION_01.Pricequalifier_01 = "AAA"; priLoop.PRI.PRICEINFORMATION_01.Price_02 = "14.58"; priLoop.PRI.PRICEINFORMATION_01.Pricetypecoded_03 = "CT"; priLoop.PRI.PRICEINFORMATION_01.Pricetypequalifier_04 = "AAE"; priLoop.PRI.PRICEINFORMATION_01.Unitpricebasis_05 = "1"; priLoop.PRI.PRICEINFORMATION_01.Measureunitqualifier_06 = "KGM"; // End PRI Group linLoop1.PRILoop.Add(priLoop); // Repeating RFF Groups linLoop1.RFFLoop = new List <Loop_RFF_ORDERS>(); // Begin RFF Group var rffLoopLin = new Loop_RFF_ORDERS(); // Price is taken from the price list AUG93RNG04 rffLoopLin.RFF = new RFF(); rffLoopLin.RFF.REFERENCE_01 = new C506(); rffLoopLin.RFF.REFERENCE_01.Referencequalifier_01 = "PL"; rffLoopLin.RFF.REFERENCE_01.Referencenumber_02 = "AUG93RNG04"; // Repeating DTM rffLoopLin.DTM = new List <DTM>(); // Price list date 1st of August 2002 var dtmRff = new DTM(); dtmRff.DATETIMEPERIOD_01 = new C507(); dtmRff.DATETIMEPERIOD_01.Datetimeperiodqualifier_01 = "171"; dtmRff.DATETIMEPERIOD_01.Datetimeperiod_02 = "20020801"; dtmRff.DATETIMEPERIOD_01.Datetimeperiodformatqualifier_03 = "102"; rffLoopLin.DTM.Add(dtmRff); // End RFF Group linLoop1.RFFLoop.Add(rffLoopLin); // Repeating PAC Groups linLoop1.PACLoop = new List <Loop_PAC_ORDERS_2>(); // Begin PAC Group var pacLoop = new Loop_PAC_ORDERS_2(); // Two packages (cases) barcoded with ITF14 pacLoop.PAC = new PAC(); pacLoop.PAC.Numberofpackages_01 = "2"; pacLoop.PAC.PACKAGINGDETAILS_02 = new C531(); pacLoop.PAC.PACKAGINGDETAILS_02.Packagingrelatedinformationcoded_02 = "51"; pacLoop.PAC.PACKAGETYPE_03 = new C202(); pacLoop.PAC.PACKAGETYPE_03.Typeofpackagesidentification_01 = "CS"; // Repeating PCI Groups pacLoop.PCILoop = new List <Loop_PCI_ORDERS>(); // Begin PCI Group var pciLoop = new Loop_PCI_ORDERS(); // The expiry date of the product is to be marked on it's packaging pciLoop.PCI = new PCI(); pciLoop.PCI.Markinginstructionscoded_01 = "14"; // End PCI Group pacLoop.PCILoop.Add(pciLoop); // End PAC Group linLoop1.PACLoop.Add(pacLoop); // Repeating LOC Groups linLoop1.LOCLoop = new List <Loop_LOC_ORDERS_2>(); // Begin LOC Group 1 var locLoop1 = new Loop_LOC_ORDERS_2(); // The second place to which the product is to be delivered is identified by GLN 3312345502000 locLoop1.LOC = new LOC(); locLoop1.LOC.Placelocationqualifier_01 = "7"; locLoop1.LOC.LOCATIONIDENTIFICATION_02 = new C517(); locLoop1.LOC.LOCATIONIDENTIFICATION_02.Placelocationidentification_01 = "3312345502000"; locLoop1.LOC.LOCATIONIDENTIFICATION_02.Codelistresponsibleagencycoded_03 = "9"; // The quantity to be delivered at this location is 24 locLoop1.QTY = new QTY(); locLoop1.QTY.QUANTITYDETAILS_01 = new C186(); locLoop1.QTY.QUANTITYDETAILS_01.Quantityqualifier_01 = "11"; locLoop1.QTY.QUANTITYDETAILS_01.Quantity_02 = "24"; // Repeating DTM locLoop1.DTM = new List <DTM>(); // The quantity should be delivered on the 15th of September 2002 var dtmLoc = new DTM(); dtmLoc.DATETIMEPERIOD_01 = new C507(); dtmLoc.DATETIMEPERIOD_01.Datetimeperiodqualifier_01 = "2"; dtmLoc.DATETIMEPERIOD_01.Datetimeperiod_02 = "20020915"; dtmLoc.DATETIMEPERIOD_01.Datetimeperiodformatqualifier_03 = "102"; locLoop1.DTM.Add(dtmLoc); // End LOC Group 1 linLoop1.LOCLoop.Add(locLoop1); // Begin LOC Group 2 var locLoop2 = new Loop_LOC_ORDERS_2(); // The first place to which the product is to be delivered is identified by GLN 3312345501003 locLoop2.LOC = new LOC(); locLoop2.LOC.Placelocationqualifier_01 = "7"; locLoop2.LOC.LOCATIONIDENTIFICATION_02 = new C517(); locLoop2.LOC.LOCATIONIDENTIFICATION_02.Placelocationidentification_01 = "3312345501003"; locLoop2.LOC.LOCATIONIDENTIFICATION_02.Codelistresponsibleagencycoded_03 = "9"; // The quantity to be delivered at this location is 24 locLoop2.QTY = new QTY(); locLoop2.QTY.QUANTITYDETAILS_01 = new C186(); locLoop2.QTY.QUANTITYDETAILS_01.Quantityqualifier_01 = "11"; locLoop2.QTY.QUANTITYDETAILS_01.Quantity_02 = "24"; // Repeating DTM locLoop2.DTM = new List <DTM>(); // The quantity should be delivered on the 13th of September 2002 var dtmLoc2 = new DTM(); dtmLoc2.DATETIMEPERIOD_01 = new C507(); dtmLoc2.DATETIMEPERIOD_01.Datetimeperiodqualifier_01 = "2"; dtmLoc2.DATETIMEPERIOD_01.Datetimeperiod_02 = "20020913"; dtmLoc2.DATETIMEPERIOD_01.Datetimeperiodformatqualifier_03 = "102"; locLoop2.DTM.Add(dtmLoc2); // End LOC Group 2 linLoop1.LOCLoop.Add(locLoop2); // Repeating TAX Groups linLoop1.TAXLoop = new List <Loop_TAX_ORDERS>(); // Begin TAX Group var taxLoop = new Loop_TAX_ORDERS(); // The product is subject to the standard VAT rate of 17.5% taxLoop.TAX = new TAX(); taxLoop.TAX.Dutytaxfeefunctionqualifier_01 = "7"; taxLoop.TAX.DUTYTAXFEETYPE_02 = new C241(); taxLoop.TAX.DUTYTAXFEETYPE_02.Dutytaxfeetypecoded_01 = "VAT"; taxLoop.TAX.DUTYTAXFEEDETAIL_05 = new C243(); taxLoop.TAX.DUTYTAXFEEDETAIL_05.Dutytaxfeerate_04 = "17.5"; taxLoop.TAX.Dutytaxfeecategorycoded_06 = "S"; // End TAX Group linLoop1.TAXLoop.Add(taxLoop); // End LIN Group 1 result.LINLoop.Add(linLoop1); // Message detail/summary separator result.UNS = new UNS(); result.UNS.Sectionidentification_01 = "S"; // Repeating CNT result.CNT = new List <CNT>(); // Count of the number of LIN segments in the message var cnt = new CNT(); cnt.CONTROL_01 = new C270(); cnt.CONTROL_01.Controlqualifier_01 = "2"; cnt.CONTROL_01.Controlvalue_02 = "1"; result.CNT.Add(cnt); return(result); }
///<summary> ///Removes the given LOC ///</summary> public void RemoveLOC(LOC toRemove) { this.RemoveStructure("LOC", toRemove); }
public UserStringsDocumentOptionsPage(RhinoDoc doc) : base(LOC.STR("Document Text")) { Document = doc; }