public static string GetVersionTitle(FixVersion vers) { string title; if (versionTitle.TryGetValue(vers, out title)) return title; return vers.ToString(); }
public static string GetVersionTitle(FixVersion vers) { string title; if (versionTitle.TryGetValue(vers, out title)) { return(title); } return(vers.ToString()); }
/// <summary> /// Creates a new Instance of this class /// </summary> /// <param name="package">The package you want to fix the Integrity in</param> /// <param name="ver">Fix Version that should be used</param> /// <param name="remndeftxt">Remove all Text Links that are not assigned to the Default Language</param> public FixObject(IPackageFile package, FixVersion ver, bool remndeftxt) : base(package) { this.ver = ver; this.rndtr = remndeftxt; if (types == null) { types = new ArrayList(); types.Add(Data.MetaData.TXMT); types.Add(Data.MetaData.TXTR); types.Add(Data.MetaData.LIFO); types.Add(Data.MetaData.GMND); //types.Add(Data.MetaData.MMAT); } }
public static void Fix(string package, string modelname, FixVersion ver) { if (System.IO.File.Exists(package)) { SimPe.Packages.GeneratableFile pkg = SimPe.Packages.GeneratableFile.LoadFromFile(package); System.Collections.Hashtable map = RenameForm.GetNames((modelname.Trim() != ""), pkg, null, modelname); FixObject fo = new FixObject(pkg, ver, false); fo.Fix(map, false); fo.CleanUp(); fo.FixGroup(); pkg.Save(); } }
public bool Parse(List <string> argv) { int i = ArgParser.Parse(argv, "-fix"); if (i < 0) { return(false); } string modelname = ""; string prefix = ""; string package = ""; string vertxt = ""; FixVersion ver = FixVersion.UniversityReady; while (argv.Count > i) { if (ArgParser.Parse(argv, i, "-package", ref package)) { continue; } if (ArgParser.Parse(argv, i, "-modelname", ref modelname)) { continue; } if (ArgParser.Parse(argv, i, "-prefix", ref prefix)) { continue; } if (ArgParser.Parse(argv, i, "-fixversion", ref vertxt)) { switch (vertxt.Trim().ToLower()) { case "uni1": ver = FixVersion.UniversityReady; break; case "uni2": ver = FixVersion.UniversityReady2; break; } continue; } SimPe.Message.Show(Help()[0]); return(true); } Fix(package, prefix + modelname, ver); return(true); }
private void QueryEnterOrder() { FixVersion v = QueryVersion(); Console.WriteLine("\nNewOrderSingle"); Message m = null; switch (v) { case FixVersion.FIX40: m = QueryNewOrderSingle40(); break; case FixVersion.FIX41: m = QueryNewOrderSingle41(); break; case FixVersion.FIX42: m = QueryNewOrderSingle42(); break; case FixVersion.FIX43: m = QueryNewOrderSingle43(); break; case FixVersion.FIX44: m = QueryNewOrderSingle44(); break; case FixVersion.FIX50: m = QueryNewOrderSingle50(); break; default: Console.WriteLine("not supported yet for version " + v.ToString()); return; } if (m != null && QueryConfirm("Send order")) { m.Header.GetField(Tags.BeginString); QuickFix.Session.SendToTarget(m); } }
private void QueryReplaceOrder() { FixVersion v = QueryVersion(); Console.WriteLine("\nCancelReplaceRequest"); Message m = null; switch (v) { case FixVersion.FIX40: m = QueryCancelReplaceRequest40(); break; case FixVersion.FIX41: m = QueryCancelReplaceRequest41(); break; case FixVersion.FIX42: m = QueryCancelReplaceRequest42(); break; case FixVersion.FIX43: m = QueryCancelReplaceRequest43(); break; case FixVersion.FIX44: m = QueryCancelReplaceRequest44(); break; case FixVersion.FIX50: m = QueryCancelReplaceRequest50(); break; default: Console.WriteLine("not supported yet for version " + v.ToString()); return; } if (m != null && QueryConfirm("Send replace")) { QuickFix.Session.SendToTarget(m); } }
private void QueryMarketDataRequest() { FixVersion v = QueryVersion(); Console.WriteLine("\nMarketDataRequest"); Message m = null; switch (v) { case FixVersion.FIX40: case FixVersion.FIX41: Console.WriteLine("FIX 4.0 and 4.1 don't have this message type."); break; case FixVersion.FIX42: m = QueryMarketDataRequest42(); break; case FixVersion.FIX43: m = QueryMarketDataRequest43(); break; case FixVersion.FIX44: m = QueryMarketDataRequest44(); break; case FixVersion.FIX50: m = QueryMarketDataRequest50(); break; default: Console.WriteLine("not supported yet for version " + v.ToString()); return; } if (m != null && QueryConfirm("Send market data request")) { QuickFix.Session.SendToTarget(m); } }
public static Hashtable Execute(SimPe.Interfaces.Files.IPackageFile package, bool uniquename, ref FixVersion ver) { RenameForm rf = new RenameForm(); rf.ok = false; rf.package = package; rf.cbv2.Checked = (ver == FixVersion.UniversityReady2); string old = Hashes.StripHashFromName(FindMainOldName(package).ToLower().Trim()); current_unique = GetUniqueName(); if (old.EndsWith("_cres")) { old = old.Substring(0, old.Length - 5); } if (uniquename) { string name = RenameForm.ReplaceOldUnique(old, current_unique, true); if (name == old) { name = old + current_unique; } rf.tbname.Text = name; } else { rf.tbname.Text = old; } GetNames(uniquename, package, rf.lv, rf.tbname.Text); rf.ShowDialog(); if (rf.ok) { if (rf.cbv2.Checked) { ver = FixVersion.UniversityReady2; } else { ver = FixVersion.UniversityReady; } return(rf.GetReplacementMap()); } else { return(null); } }