internal AcadSysVar FriendGetItem(object vvarIdxKey) { AcadSysVar FriendGetItem = default(AcadSysVar); if (Information.VarType(RuntimeHelpers.GetObjectValue(vvarIdxKey)) == VariantType.String) { object[] array; bool[] array2; object value = NewLateBinding.LateGet(null, typeof(Strings), "UCase", array = new object[1] { vvarIdxKey }, null, null, array2 = new bool[1] { true }); if (array2[0]) { vvarIdxKey = RuntimeHelpers.GetObjectValue(array[0]); } string dstrName = Conversions.ToString(value); if (mobjDictNames.ContainsKey(dstrName)) { try { FriendGetItem = (AcadSysVar)mcolClass[dstrName]; return(FriendGetItem); } catch (Exception ex3) { ProjectData.SetProjectError(ex3); Exception ex2 = ex3; ProjectData.ClearProjectError(); return(FriendGetItem); } } return(FriendGetItem); } try { FriendGetItem = (AcadSysVar)mcolClass[checked (Conversions.ToInteger(vvarIdxKey) - 1)]; return(FriendGetItem); } catch (Exception ex4) { ProjectData.SetProjectError(ex4); Exception ex = ex4; ProjectData.ClearProjectError(); return(FriendGetItem); } }
private AcadSysVar InternAdd(SysVar dobjSysVar) { AcadSysVar dobjAcadSysVar2 = new AcadSysVar(); dobjAcadSysVar2.FriendInit(ref dobjSysVar); dobjAcadSysVar2.FriendLetNodeParentID = base.NodeID; dobjAcadSysVar2.FriendLetApplicationIndex = mlngApplicationIndex; dobjAcadSysVar2.FriendLetDocumentIndex = mlngDocumentIndex; string dstrName = Strings.UCase(dobjAcadSysVar2.Name); mcolClass.Add(dstrName, dobjAcadSysVar2); mobjDictNames.Add(dstrName, dstrName); AcadSysVar InternAdd = dobjAcadSysVar2; dobjAcadSysVar2 = null; return(InternAdd); }
public object GetVariable(string vstrName) { InternCheckOpened("GetVariable"); AcadSysVar dobjAcadSysVar2 = FriendFindVariable(vstrName); object GetVariable; if (dobjAcadSysVar2 == null) { GetVariable = null; Information.Err().Raise(50000, "AcadApplication", "Die Systemvariable existiert nicht."); } else { GetVariable = RuntimeHelpers.GetObjectValue(dobjAcadSysVar2.Value); dobjAcadSysVar2 = null; } return(GetVariable); }
private void InternSetVarsByDefault() { AcadSysVar acadSysVar = mobjAcadSysVars.FriendGetItem("CMDACTIVE"); object vvarAppDefault = 0; string rstrErrMsg = ""; acadSysVar.FriendSetAppDefault(vvarAppDefault, ref rstrErrMsg); AcadSysVar acadSysVar2 = mobjAcadSysVars.FriendGetItem("CMDNAMES"); rstrErrMsg = ""; acadSysVar2.FriendSetAppDefault(null, ref rstrErrMsg); AcadSysVar acadSysVar3 = mobjAcadSysVars.FriendGetItem("CPROFILE"); rstrErrMsg = ""; acadSysVar3.FriendSetAppDefault("<<Unbenanntes Profil>>", ref rstrErrMsg); AcadSysVar acadSysVar4 = mobjAcadSysVars.FriendGetItem("DCTMAIN"); rstrErrMsg = ""; acadSysVar4.FriendSetAppDefault("de", ref rstrErrMsg); AcadSysVar acadSysVar5 = mobjAcadSysVars.FriendGetItem("DIASTAT"); object vvarAppDefault2 = 1; rstrErrMsg = ""; acadSysVar5.FriendSetAppDefault(vvarAppDefault2, ref rstrErrMsg); AcadSysVar acadSysVar6 = mobjAcadSysVars.FriendGetItem("LOCALE"); rstrErrMsg = ""; acadSysVar6.FriendSetAppDefault("DEU", ref rstrErrMsg); AcadSysVar acadSysVar7 = mobjAcadSysVars.FriendGetItem("POPUPS"); object vvarAppDefault3 = 1; rstrErrMsg = ""; acadSysVar7.FriendSetAppDefault(vvarAppDefault3, ref rstrErrMsg); AcadSysVar acadSysVar8 = mobjAcadSysVars.FriendGetItem("SCREENBOXES"); object vvarAppDefault4 = 0; rstrErrMsg = ""; acadSysVar8.FriendSetAppDefault(vvarAppDefault4, ref rstrErrMsg); AcadSysVar acadSysVar9 = mobjAcadSysVars.FriendGetItem("SCREENMODE"); object vvarAppDefault5 = 1; rstrErrMsg = ""; acadSysVar9.FriendSetAppDefault(vvarAppDefault5, ref rstrErrMsg); }
public void SetVariable(string vstrName, object vvarValue) { InternCheckOpened("SetVariable"); AcadSysVar dobjAcadSysVar3 = FriendFindVariable(vstrName); string dstrErrMsg = default(string); if (dobjAcadSysVar3 == null) { Information.Err().Raise(50000, "AcadApplication", "Die Systemvariable existiert nicht."); } else if (!dobjAcadSysVar3.FriendSetValue(RuntimeHelpers.GetObjectValue(vvarValue), vblnRaiseEvent: true, ref dstrErrMsg)) { dobjAcadSysVar3 = null; Information.Err().Raise(50000, "AcadApplication", "Die Systemvariable konnte nicht gesetzt werden.\n" + dstrErrMsg); } else { dobjAcadSysVar3 = null; } }