public List <NavObject> GetObjectNames() { List <NavObject> ret = new List <NavObject>(); List <ObjectType> types = new List <ObjectType> { ObjectType.Page, ObjectType.Report, ObjectType.Table, ObjectType.Codeunit, }; foreach (KeyValuePair <string, string> temp in data) { string[] t = temp.Key.Split('_'); try { int id = Int32.Parse(t[1]); ObjectType Typ = NavObjects.GetObj(t[0]); if (types.Contains(Typ)) { ret.Add(new NavObject(t[0], id, temp.Value.Split(SEPERATOR)[0], temp.Value.Split(SEPERATOR)[1])); } } catch { } } return(ret); }
public List <NavObject> GetFav(string group) { string section = "Fav"; if (!String.IsNullOrEmpty(group)) { section += "_" + group; } List <NavObject> ret = new List <NavObject>(); if (Data.Sections[section] is null) { return(ret); } foreach (KeyData key in Data.Sections[section]) { string[] keyVal = key.KeyName.Split('_'); if (keyVal.Length == 2) { int id = int.Parse(keyVal[1]); ret.Add(new NavObject(keyVal[0], id, handler.GetObjName(id, NavObjects.GetObj(keyVal[0])), handler.GetVersion(id, NavObjects.GetObj(keyVal[0])) ) ); } } return(ret); }
string GetStartParameter(StartTyp st) { string Navbase = "\"dynamicsnav://"; string ServerAdress = ini.GetServerAdress(cb_server.Text); string Mandant = "/" + cb_mandant.Text; ObjectType ob = NavObjects.GetObj(cb_objektTyp.Text); string Config = " -configure"; string Debug = " -debug"; string DisablePer = " -disablepersonalization"; string Profile = " -profile:"; string sessionlist = " -protocolhandler"; string checkedServer = ObjectHandler.CheckServerString(ServerAdress); string startstring = ""; //Serveradresse aktualisieren if (checkedServer != ServerAdress) { ini.AddServer(cb_server.Text, checkedServer); ServerAdress = ini.GetServerAdress(cb_server.Text); } string ObjectStart = "/"; startstring += Navbase + ServerAdress; if (st == StartTyp.Nav) { switch (ob) { case ObjectType.Page: ObjectStart += "runpage?page=" + tx_objId.Text; break; case ObjectType.Table: ObjectStart += "runtable?table=" + tx_objId.Text; break; case ObjectType.Report: ObjectStart += "runreport?report=" + tx_objId.Text; break; case ObjectType.Codeunit: ObjectStart += "runcodeunit?codeunit=" + tx_objId.Text; break; } startstring += Mandant + ObjectStart + "\""; if (cb_profil.Text != "<kein Profil>") { startstring += Profile + "\"" + cb_profil.Text + "\""; } if (cbo_config.IsChecked.Value) { startstring += Config; } if (cbo_debug.IsChecked.Value) { startstring += Debug; } if (cbo_disable_pers.IsChecked.Value) { startstring += DisablePer; } } else if (st == StartTyp.Session) { startstring += "//debug\"" + sessionlist; } return(startstring); }
/// <summary> /// Nav Objektnamen ermitteln /// </summary> /// <param name="objID">ID des Objectes</param> /// <param name="objName">Der Typ des Objectes</param> /// <returns>Objektname</returns> public string GetObjName(int objID, string objName) { return(GetObjName(objID, NavObjects.GetObj(objName))); }