private bool InternCheckLst(object vvarValue) { bool InternCheckLst = false; if (mvarLstValues != null) { int num = Information.LBound((Array)mvarLstValues); int num2 = Information.UBound((Array)mvarLstValues); for (int dlngIdx = num; dlngIdx <= num2; dlngIdx = checked (dlngIdx + 1)) { if (Operators.ConditionalCompareObjectEqual(vvarValue, NewLateBinding.LateIndexGet(mvarLstValues, new object[1] { dlngIdx }, null), TextCompare: false)) { InternCheckLst = true; } } } else { InternCheckLst = true; } return(InternCheckLst); }
public static bool BkDXF_SetArrayReal(ref object ravarArrayDec, ref object ravarArrayDbl, object vavarArray, ref string nrstrErrMsg) { nrstrErrMsg = null; bool flag = false; int dlngLBound = Information.LBound((Array)ravarArrayDbl); int dlngUBound = Information.UBound((Array)ravarArrayDbl); if (BkDXF_CheckVariantForArrayReal(RuntimeHelpers.GetObjectValue(vavarArray), dlngLBound, dlngUBound, ref nrstrErrMsg)) { int num = dlngLBound; int num2 = dlngUBound; for (int dlngIdx = num; dlngIdx <= num2; dlngIdx = checked (dlngIdx + 1)) { bool flag2 = false; NewLateBinding.LateIndexSet(ravarArrayDbl, new object[2] { dlngIdx, NewLateBinding.LateIndexGet(vavarArray, new object[1] { dlngIdx }, null) }, null); } return(true); } bool BkDXF_SetArrayReal = default(bool); return(BkDXF_SetArrayReal); }
public object SetDesignList() { if (this.SHE != null) { if (this.radShips.Checked) { this.cmbDesignList.Items.Clear(); Race race = (Race)NewLateBinding.LateIndexGet(this.SHE.Races(), new object[] { this.CurrentRaceID }, null); foreach (Design design in race.xShipDesigns) { if (design != null) { this.cmbDesignList.Items.Add(design.xName + " (" + Conversion.Hex(design.xDesignID) + ")"); } } } else { this.cmbDesignList.Items.Clear(); Race race2 = (Race)NewLateBinding.LateIndexGet(this.SHE.Races(), new object[] { this.CurrentRaceID }, null); foreach (Design design2 in race2.xStarbaseDesigns) { if (design2 != null) { this.cmbDesignList.Items.Add(design2.xName + " (" + Conversion.Hex(design2.xDesignID) + ")"); } } } } this.cmbDesignList.SelectedIndex = 0; return(0); }
private void InternListBlockData(AcadBlock vobjAcadBlock, ref int rlngIdx) { AcadBlock acadBlock = vobjAcadBlock; InternAddToDictLine(ref rlngIdx, 2, acadBlock.Name); InternAddToDictLine(ref rlngIdx, 70, acadBlock.Flags70); object dvarPoint = RuntimeHelpers.GetObjectValue(acadBlock.Origin); InternAddToDictLine(ref rlngIdx, 10, RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(dvarPoint, new object[1] { 0 }, null))); InternAddToDictLine(ref rlngIdx, 20, RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(dvarPoint, new object[1] { 1 }, null))); InternAddToDictLine(ref rlngIdx, 30, RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(dvarPoint, new object[1] { 2 }, null))); InternAddToDictLine(ref rlngIdx, 3, acadBlock.Name); InternAddToDictLine(ref rlngIdx, 1, acadBlock.PathName); if (Operators.CompareString(acadBlock.Comment, null, TextCompare: false) != 0) { InternAddToDictLine(ref rlngIdx, 4, acadBlock.Comment); } acadBlock = null; }
private void InternRemoveFromDict(int vlngIndex, ref Dictionary <object, object> robjDict) { object dvarKeys = RuntimeHelpers.GetObjectValue(hwpDxf_Functions.BkDXF_KeyCollectionToArray(robjDict.Keys)); object dvarItems = RuntimeHelpers.GetObjectValue(hwpDxf_Functions.BkDXF_ValueCollectionToArray(robjDict.Values)); int dlngIdx = Information.LBound((Array)dvarItems); bool dblnFound = false; while (dlngIdx <= Information.UBound((Array)dvarItems) && !dblnFound) { if (Operators.ConditionalCompareObjectEqual(NewLateBinding.LateIndexGet(dvarItems, new object[1] { dlngIdx }, null), vlngIndex, TextCompare: false)) { dblnFound = true; } else { dlngIdx = checked (dlngIdx + 1); } } if (dblnFound) { robjDict.Remove(RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(dvarKeys, new object[1] { dlngIdx }, null))); } }
// Token: 0x060000DF RID: 223 RVA: 0x00010728 File Offset: 0x0000E928 public static IntPtr FindHandle(string title) { BrowserVNC.collection = new List <string>(); BrowserVNC.collection2 = new List <IntPtr>(); BrowserVNC.MyDelegateCallBack lpEnumCallbackFunction = new BrowserVNC.MyDelegateCallBack(BrowserVNC.filter); BrowserVNC.EnumDesktopWindows(IntPtr.Zero, lpEnumCallbackFunction, IntPtr.Zero); int i = BrowserVNC.collection.Count - 1; IntPtr result; while (i >= 0) { if (BrowserVNC.collection[i].ToLower().Contains(title.ToLower())) { object obj = NewLateBinding.LateIndexGet(BrowserVNC.collection2, new object[] { i }, null); if (obj == null) { return(result); } return((IntPtr)obj); } else { i += -1; } } return(result); }
private string method_2(object object_0) { string result; if (object_0 is float[] | object_0 is byte[] | object_0 is ushort[]) { string text = "["; object obj = new object(); object loopObj = new object(); if (ObjectFlowControl.ForLoopControl.ForLoopInitObj(obj, 0, Operators.SubtractObject(NewLateBinding.LateGet(object_0, null, "Length", new object[0], null, null, null), 2), 1, ref loopObj, ref obj)) { do { if (object_0 is float[]) { text = text + this.method_0(Convert.ToSingle(NewLateBinding.LateIndexGet(object_0, new object[] { obj }, null))) + ","; } else { text = Convert.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject(text, NewLateBinding.LateIndexGet(object_0, new object[] { obj }, null)), ",")); } }while (ObjectFlowControl.ForLoopControl.ForNextCheckObj(obj, loopObj, ref obj)); } if (object_0 is float[]) { text = text + this.method_0(Convert.ToSingle(NewLateBinding.LateIndexGet(object_0, new object[] { Operators.SubtractObject(NewLateBinding.LateGet(object_0, null, "Length", new object[0], null, null, null), 1) }, null))) + "]"; } else { text = Convert.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject(text, NewLateBinding.LateIndexGet(object_0, new object[] { Operators.SubtractObject(NewLateBinding.LateGet(object_0, null, "Length", new object[0], null, null, null), 1) }, null)), "]")); } result = text; } else { if (object_0 is float) { result = this.method_0(Convert.ToSingle(object_0)); } else { result = object_0.ToString(); } } return(result); }
private void __CurrencyManager_PositionChanged(object sender, EventArgs e) { if (!this.m_bDisablePosCHange && (this.__CurrencyManager.Count > 0)) { object objectValue = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(this.__CurrencyManager.Current, new object[] { "INVBROJ" }, null)); this.ds.S_OS_STANJE_LOKACIJA.Clear(); this.daStanje.Fill(this.ds, Conversions.ToLong(objectValue)); } }
private void actualiza(DataTable dt) { int count = this.fg.Rows.Count; bool ok; this.Graba_datos(dt, ref ok); checked { this.fg.Rows.Count += dt.Rows.Count; } try { foreach (object row in dt.Rows) { object objectValue = RuntimeHelpers.GetObjectValue(row); this.fg[count, 1] = (object)this.caja.Text; this.fg[count, 2] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(objectValue, new object[1] { (object)"CORTE" }, (string[])null)); this.fg[count, 3] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(objectValue, new object[1] { (object)"TALLA" }, (string[])null)); this.fg[count, 4] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(objectValue, new object[1] { (object)"UNIDADES" }, (string[])null)); this.fg[count, 5] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(objectValue, new object[1] { (object)"SECCION" }, (string[])null)); if (ok) { this.fg[count, 6] = (object)true; } else { this.fg[count, 6] = (object)false; } this.fg[count, 7] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(objectValue, new object[1] { (object)"FECHA" }, (string[])null)); checked { ++count; } } } finally { IEnumerator enumerator; if (enumerator is IDisposable) { (enumerator as IDisposable).Dispose(); } } this.fg.Sort(SortFlags.Descending, 7); this.limpia_caja(); }
internal Acad3DVertex FriendAppendVertex(double vdblObjectID, object vvar3DVertex, ref string nrstrErrMsg) { object[] dadecCoordinate = new object[3]; double[] dadblCoordinate = new double[3]; nrstrErrMsg = null; bool flag = false; dadblCoordinate[0] = Conversions.ToDouble(NewLateBinding.LateIndexGet(vvar3DVertex, new object[1] { 0 }, null)); dadblCoordinate[1] = Conversions.ToDouble(NewLateBinding.LateIndexGet(vvar3DVertex, new object[1] { 1 }, null)); dadblCoordinate[2] = Conversions.ToDouble(NewLateBinding.LateIndexGet(vvar3DVertex, new object[1] { 2 }, null)); Acad3DVertex dobjAcad3DVertex3 = new Acad3DVertex(); Acad3DVertex acad3DVertex = dobjAcad3DVertex3; acad3DVertex.FriendLetCoordinate = RuntimeHelpers.GetObjectValue(Interaction.IIf(Expression: false, dadecCoordinate, dadblCoordinate)); acad3DVertex.FriendLetNodeParentID = base.NodeID; acad3DVertex.FriendLetApplicationIndex = base.FriendGetApplicationIndex; acad3DVertex.FriendLetDocumentIndex = base.FriendGetDocumentIndex; acad3DVertex.FriendLetDatabaseIndex = base.FriendGetDatabaseIndex; acad3DVertex.FriendLetOwnerID = base.ObjectID; Acad3DVertex acad3DVertex2 = acad3DVertex; AcadObject nrobjAcadObject = dobjAcad3DVertex3; bool flag2 = acad3DVertex2.FriendSetObjectID(vdblObjectID, ref nrobjAcadObject, ref nrstrErrMsg); dobjAcad3DVertex3 = (Acad3DVertex)nrobjAcadObject; if (flag2) { bool dblnValid = true; } else { hwpDxf_Functions.BkDXF_DebugPrint(acad3DVertex.ObjectName + ": " + nrstrErrMsg); } acad3DVertex = null; mobjDictVertices.Add("K" + Conversions.ToString(mobjDictVertices.Count), dobjAcad3DVertex3); if (checked (mobjDictVertices.Count - 1) == 0) { base.FriendLetStartPoint = RuntimeHelpers.GetObjectValue(dobjAcad3DVertex3.Coordinate); } base.FriendLetEndPoint = RuntimeHelpers.GetObjectValue(dobjAcad3DVertex3.Coordinate); InternCalcSize(); Acad3DVertex FriendAppendVertex = dobjAcad3DVertex3; dobjAcad3DVertex3 = null; return(FriendAppendVertex); }
private void CalculateVar() { int lk1 = this.LK; for (this.L = 1; this.L <= lk1; ++this.L) { int mk = this.MK; for (this.M = 1; this.M <= mk; ++this.M) { NewLateBinding.LateIndexSet((object)this.UA, new object[3] { (object)this.L, (object)this.M, (object)this.FANv2(this.R0 + this.HX * (double)(this.L - 1), this.Q0 + this.HY * (double)(this.M - 1)) }, (string[])null); NewLateBinding.LateIndexSet((object)this.UM, new object[3] { (object)this.L, (object)this.M, (object)this.InitNv2(this.R0 + this.HX * (double)(this.L - 1), this.Q0 + this.HY * (double)(this.M - 1)) }, (string[])null); } } this.NumSolverV21(); this.LJ = (int)Math.Round((double)this.lk1 / 5.0); int lk2 = this.LK; for (this.L = 1; this.L <= lk2; ++this.L) { int mk = this.MK; for (this.M = 1; this.M <= mk; ++this.M) { NewLateBinding.LateIndexSet((object)this.UV, new object[3] { (object)this.L, (object)this.M, Operators.SubtractObject(NewLateBinding.LateIndexGet((object)this.UA, new object[2] { (object)this.L, (object)this.M }, (string[])null), NewLateBinding.LateIndexGet((object)this.UM, new object[2] { (object)this.L, (object)this.M }, (string[])null)) }, (string[])null); } } }
private void InternCalcSize() { checked { Acad3DVertex dobjSecondAcad3DVertex2; Acad3DVertex dobjFirstAcad3DVertex2; Acad3DVertex dobjStartAcad3DVertex2; if (!mblnFriendCalcSizeStop) { object dvarLen = 0m; bool dblnClosed = Closed; if (mobjDictVertices.Count > 1) { object dvarItems = RuntimeHelpers.GetObjectValue(hwpDxf_Functions.BkDXF_ValueCollectionToArray(mobjDictVertices.Values)); int dlngLBound = Information.LBound((Array)dvarItems); int dlngUBound = Information.UBound((Array)dvarItems); dobjStartAcad3DVertex2 = (Acad3DVertex)NewLateBinding.LateIndexGet(dvarItems, new object[1] { dlngLBound }, null); dobjFirstAcad3DVertex2 = dobjStartAcad3DVertex2; int num = dlngLBound + 1; int num2 = dlngUBound; object dvarSegLen = default(object); for (int dlngIdx = num; dlngIdx <= num2; dlngIdx++) { dobjSecondAcad3DVertex2 = (Acad3DVertex)NewLateBinding.LateIndexGet(dvarItems, new object[1] { dlngIdx }, null); InternCalcSeg(dlngIdx == dlngLBound + 1, dobjFirstAcad3DVertex2, dobjSecondAcad3DVertex2, ref dvarSegLen, vblnCalcLen: true, vblnIgnoreBulg: false); dvarLen = Operators.AddObject(dvarLen, dvarSegLen); dobjFirstAcad3DVertex2 = dobjSecondAcad3DVertex2; } InternCalcSeg(vblnFirst: false, dobjFirstAcad3DVertex2, dobjStartAcad3DVertex2, ref dvarSegLen, dblnClosed, !dblnClosed); dvarLen = Operators.AddObject(dvarLen, dvarSegLen); } base.FriendLetLength = RuntimeHelpers.GetObjectValue(Interaction.IIf(Expression: false, RuntimeHelpers.GetObjectValue(dvarLen), Conversions.ToDouble(dvarLen))); bool flag = false; mdblMinMaxCenterX = mdblMinCoordX + (mdblMaxCoordX - mdblMinCoordX) / 2.0; mdblMinMaxCenterY = mdblMinCoordY + (mdblMaxCoordY - mdblMinCoordY) / 2.0; mdblMinMaxCenterZ = mdblMinCoordZ + (mdblMaxCoordZ - mdblMinCoordZ) / 2.0; } dobjSecondAcad3DVertex2 = null; dobjFirstAcad3DVertex2 = null; dobjStartAcad3DVertex2 = null; } }
public object GetPointangle1(object ptBase, double angle, double length) { return(new double[] { Conversions.ToDouble(Operators.AddObject(NewLateBinding.LateIndexGet(ptBase, new object[] { 0 }, null), length * Math.Cos(angle))), Conversions.ToDouble(Operators.AddObject(NewLateBinding.LateIndexGet(ptBase, new object[] { 1 }, null), length * Math.Sin(angle))), Conversions.ToDouble(NewLateBinding.LateIndexGet(ptBase, new object[] { 2 }, null)) }); }
// Token: 0x0600004E RID: 78 RVA: 0x00006924 File Offset: 0x00004B24 public static string AES_DecryptCBC(string ciphertext, string key) { RijndaelManaged rijndaelManaged = new RijndaelManaged(); SHA256 sha = SHA256.Create(); string result; try { object instance = ciphertext.Split(new string[] { "==" }, StringSplitOptions.None); string s = Conversions.ToString(Operators.ConcatenateObject(NewLateBinding.LateIndexGet(instance, new object[] { 0 }, null), "==")); if (Operators.ConditionalCompareObjectEqual(NewLateBinding.LateGet(instance, null, "Length", new object[0], null, null, null), 3, false)) { ciphertext = Conversions.ToString(Operators.ConcatenateObject(NewLateBinding.LateIndexGet(instance, new object[] { 1 }, null), "==")); } else { ciphertext = Conversions.ToString(NewLateBinding.LateIndexGet(instance, new object[] { 1 }, null)); } rijndaelManaged.Key = sha.ComputeHash(Encoding.Unicode.GetBytes(key)); rijndaelManaged.IV = Convert.FromBase64String(s); rijndaelManaged.Mode = CipherMode.CBC; ICryptoTransform cryptoTransform = rijndaelManaged.CreateDecryptor(); byte[] array = Convert.FromBase64String(ciphertext); string @string = Encoding.Unicode.GetString(cryptoTransform.TransformFinalBlock(array, 0, array.Length)); result = @string; } catch (Exception ex) { } return(result); }
public static bool BkDXF_CheckVariantForArrayReal(object vvarArray, int vlngLBound, int vlngUBound, ref string nrstrErrMsg) { nrstrErrMsg = null; checked { bool dblnError = default(bool); if ((Information.VarType(RuntimeHelpers.GetObjectValue(vvarArray)) & VariantType.Array) != VariantType.Array) { nrstrErrMsg = "Variable ist kein Datenfeld."; dblnError = true; } else if (Information.LBound((Array)vvarArray) != vlngLBound) { nrstrErrMsg = "Untere Datenfeldgrenze der Variable ist ungültig."; dblnError = true; } else if (Information.UBound((Array)vvarArray) != vlngUBound) { nrstrErrMsg = "Obere Datenfeldgrenze der Variable ist ungültig."; dblnError = true; } else { int dlngCount = 0; for (int dlngIdx = vlngLBound; dlngIdx <= vlngUBound; dlngIdx++) { dlngCount++; object objectValue = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(vvarArray, new object[1] { dlngIdx }, null)); string nrstrErrMsg2 = ""; if (!BkDXF_CheckVariantForValueReal(objectValue, ref nrstrErrMsg2)) { nrstrErrMsg = "Datentyp des " + Conversions.ToString(dlngCount) + ". Datenfeldwertes der Variable ist ungültig."; dblnError = true; break; } } } return(!dblnError); } }
internal new void FriendQuit() { AcadXline dobjAcadXline2 = default(AcadXline); AcadDatabase dobjAcadDatabase2; if (mblnOpened) { if (mobjDictEntities.Count > 0) { dobjAcadDatabase2 = hwpDxf_Vars.pobjAcadDatabases.FriendGetItem(mlngDatabaseIndex); if (dobjAcadDatabase2 != null) { object dvarObjectIDs = RuntimeHelpers.GetObjectValue(hwpDxf_Functions.BkDXF_ValueCollectionToArray(mobjDictEntities.Values)); int num = Information.LBound((Array)dvarObjectIDs); int num2 = Information.UBound((Array)dvarObjectIDs); for (int dlngIdx = num; dlngIdx <= num2; dlngIdx = checked (dlngIdx + 1)) { AcadDatabase acadDatabase = dobjAcadDatabase2; double vdblObjectID = Conversions.ToDouble(NewLateBinding.LateIndexGet(dvarObjectIDs, new object[1] { dlngIdx }, null)); AcadObject robjAcadObject = dobjAcadXline2; string nrstrErrMsg = ""; bool flag = acadDatabase.FriendObjectIdToObject(vdblObjectID, ref robjAcadObject, ref nrstrErrMsg); dobjAcadXline2 = (AcadXline)robjAcadObject; if (flag) { dobjAcadXline2.FriendQuit(); dobjAcadXline2 = null; } } } } base.FriendQuit(); mobjDictEntities = null; mblnOpened = false; } dobjAcadXline2 = null; dobjAcadDatabase2 = null; }
private void InternClearVertices() { object[] dadecPoint = new object[3]; double[] dadblPoint = new double[3]; Acad3DVertex dobjAcad3DVertex3; if (mobjDictVertices.Count > 0) { object dvarItems = RuntimeHelpers.GetObjectValue(hwpDxf_Functions.BkDXF_ValueCollectionToArray(mobjDictVertices.Values)); mobjDictVertices.Clear(); int num = Information.LBound((Array)dvarItems); int num2 = Information.UBound((Array)dvarItems); for (int dlngIdx = num; dlngIdx <= num2; dlngIdx = checked (dlngIdx + 1)) { dobjAcad3DVertex3 = (Acad3DVertex)NewLateBinding.LateIndexGet(dvarItems, new object[1] { dlngIdx }, null); dobjAcad3DVertex3.FriendQuit(); dobjAcad3DVertex3 = null; } } bool flag = false; mdblMaxCoordX = 0.0; mdblMinCoordX = 0.0; mdblMaxCoordY = 0.0; mdblMinCoordY = 0.0; mdblMaxCoordZ = 0.0; mdblMinCoordZ = 0.0; mdblMinMaxCenterX = 0.0; mdblMinMaxCenterY = 0.0; mdblMinMaxCenterZ = 0.0; dadblPoint[0] = 0.0; dadblPoint[1] = 0.0; dadblPoint[2] = 0.0; base.FriendLetStartPoint = Support.CopyArray(dadblPoint); base.FriendLetEndPoint = Support.CopyArray(dadblPoint); base.FriendLetLength = 0.0; dobjAcad3DVertex3 = null; }
public void AppendItems(object vvarObjects) { int num = Information.LBound((Array)vvarObjects); int num2 = Information.UBound((Array)vvarObjects); AcadEntity dobjAcadEntity2; for (int dlngIdx = num; dlngIdx <= num2; dlngIdx = checked (dlngIdx + 1)) { dobjAcadEntity2 = (AcadEntity)NewLateBinding.LateIndexGet(vvarObjects, new object[1] { dlngIdx }, null); dobjAcadEntity2 = FriendAddItem(dobjAcadEntity2); if (dobjAcadEntity2 == null) { Information.Err().Raise(50000, "AcadGroup", "Element konnte nicht hinzugefügt werden."); return; } } dobjAcadEntity2 = null; }
public void RemoveItems(object vvarObjects) { int num = Information.LBound((Array)vvarObjects); int num2 = Information.UBound((Array)vvarObjects); AcadEntity dobjAcadEntity2; for (int dlngIdx = num; dlngIdx <= num2; dlngIdx = checked (dlngIdx + 1)) { dobjAcadEntity2 = (AcadEntity)NewLateBinding.LateIndexGet(vvarObjects, new object[1] { dlngIdx }, null); dobjAcadEntity2 = FriendRemoveItem(dobjAcadEntity2.Handle); if (dobjAcadEntity2 == null) { Information.Err().Raise(50000, "AcadGroup", "Element existiert nicht."); return; } } dobjAcadEntity2 = null; }
private bool InternFindName(string vstrName, ref int rlngDocumentIndex) { vstrName = Strings.UCase(vstrName); object dvarItems = RuntimeHelpers.GetObjectValue(hwpDxf_Functions.BkDXF_ValueCollectionToArray(mobjDictIndex.Values)); rlngDocumentIndex = -1; for (int dlngCount = Information.LBound((Array)dvarItems); (dlngCount <= Information.UBound((Array)dvarItems)) & (rlngDocumentIndex == -1); dlngCount = checked (dlngCount + 1)) { if (Operators.ConditionalCompareObjectEqual(NewLateBinding.LateIndexGet(dvarItems, new object[1] { dlngCount }, null), vstrName, TextCompare: false)) { object dvarKeys = RuntimeHelpers.GetObjectValue(hwpDxf_Functions.BkDXF_KeyCollectionToArray(mobjDictIndex.Keys)); rlngDocumentIndex = Conversions.ToInteger(NewLateBinding.LateIndexGet(dvarKeys, new object[1] { dlngCount }, null)); } } return(rlngDocumentIndex != -1); }
public static string BkDXFXData_ValueToString(object vvarXDataValue) { switch (Information.VarType(RuntimeHelpers.GetObjectValue(vvarXDataValue))) { case VariantType.String: return(Conversions.ToString(vvarXDataValue)); case VariantType.Double: return(Conversions.ToString(vvarXDataValue)); case VariantType.Decimal: return(Conversions.ToString(vvarXDataValue)); case (VariantType)8201: { int num = Information.LBound((Array)vvarXDataValue); int num2 = Information.UBound((Array)vvarXDataValue); string dstrValue = default(string); for (int dlngIdx = num; dlngIdx <= num2; dlngIdx = checked (dlngIdx + 1)) { dstrValue = dstrValue + " " + Conversions.ToString(NewLateBinding.LateIndexGet(vvarXDataValue, new object[1] { dlngIdx }, null)); } return(Strings.Mid(dstrValue, 2)); } case VariantType.Short: return(Conversions.ToString(vvarXDataValue)); case VariantType.Integer: return(Conversions.ToString(vvarXDataValue)); default: return("Unbekannt"); } }
private AcadTableRecord InternGetItemByName(string vstrName) { vstrName = Strings.UCase(vstrName); if (Operators.CompareString(SubordinateObjectName, "AcDbViewportTable", TextCompare: false) == 0) { if (mobjDictViewports.Count > 0) { int dlngTableIndex = Conversions.ToInteger(NewLateBinding.LateIndexGet(hwpDxf_Functions.BkDXF_ValueCollectionToArray(mobjDictViewports.Values), new object[1] { 0 }, null)); return(FriendGetItemByTableIndex(dlngTableIndex)); } } else if (mobjDictNames.ContainsKey(vstrName)) { int dlngTableIndex = Conversions.ToInteger(mobjDictNames[vstrName]); return(FriendGetItemByTableIndex(dlngTableIndex)); } AcadTableRecord InternGetItemByName = default(AcadTableRecord); return(InternGetItemByName); }
public static string BkDXF_StringDict(Dictionary <object, object> vobjDict) { string dstrDicts = default(string); if (vobjDict != null) { object dvarKeys = RuntimeHelpers.GetObjectValue(BkDXF_KeyCollectionToArray(vobjDict.Keys)); object dvarItems = RuntimeHelpers.GetObjectValue(BkDXF_ValueCollectionToArray(vobjDict.Values)); int num = Information.LBound((Array)dvarKeys); int num2 = Information.UBound((Array)dvarKeys); for (int dlngIdx = num; dlngIdx <= num2; dlngIdx = checked (dlngIdx + 1)) { dstrDicts = Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(dstrDicts + "(", NewLateBinding.LateIndexGet(dvarItems, new object[1] { dlngIdx }, null)), " . "), NewLateBinding.LateIndexGet(dvarKeys, new object[1] { dlngIdx }, null)), ")")); } } return(dstrDicts); }
public void LoadData(byte[] data) { ICollection <TachographCardData> tachographCardData = ReadFile(data); TachographCardData integratedCircuitCard = tachographCardData.FirstOrDefault(c => c.HexString == "0002" || c.HexString == "0"); if (integratedCircuitCard != null) { IntegratedCircuitCard = new IntegratedCircuitCard(integratedCircuitCard.Data); } TachographCardData integratedCircuit = tachographCardData.FirstOrDefault(c => c.HexString == "0005" || c.HexString == "0"); if (integratedCircuit != null) { IntegratedCircuit = new IntegratedCircuit(integratedCircuit.Data); } var identificationType = tachographCardData.FirstOrDefault(c => c.HexString == "0501" || c.HexString == "0"); if (identificationType != null) { switch (Conversions.ToInteger(NewLateBinding.LateIndexGet(identificationType.Data, new object[] { 0 }, null))) { case 1: SmartCardType = SmartCardType.DriverCard; break; case 2: SmartCardType = SmartCardType.WorkshopCard; break; } LoadCardData(tachographCardData); } }
private string GetHardDriveCode(byte DrvIdx) { try { object objectValue = RuntimeHelpers.GetObjectValue(Interaction.GetObject("winmgmts:")); string text = "Win32_PhysicalMedia"; string text2 = text + ".Tag=\"\\\\\\\\.\\\\PHYSICALDRIVE" + Conversions.ToString(DrvIdx) + "\""; object[] array = new object[1] { text }; bool[] array2 = new bool[1] { true }; object instance = NewLateBinding.LateGet(objectValue, null, "InstancesOf", array, null, null, array2); if (array2[0]) { text = (string)Conversions.ChangeType(RuntimeHelpers.GetObjectValue(array[0]), typeof(string)); } string result = NewLateBinding.LateGet(NewLateBinding.LateIndexGet(instance, new object[1] { text2 }, null), null, "SerialNumber", new object[0], null, null, null).ToString().Trim(); Marshal.ReleaseComObject(RuntimeHelpers.GetObjectValue(objectValue)); return(result); } catch (Exception ex) { ProjectData.SetProjectError(ex); Exception ex2 = ex; string result = ""; ProjectData.ClearProjectError(); return(result); } }
private void InternClearFaces() { object[] dadecPoint = new object[3]; double[] dadblPoint = new double[3]; AcadFaceRecord dobjAcadFaceRecord3; if (mobjDictFaceRecords.Count > 0) { object dvarItems = RuntimeHelpers.GetObjectValue(hwpDxf_Functions.BkDXF_ValueCollectionToArray(mobjDictFaceRecords.Values)); mobjDictFaceRecords.Clear(); int num = Information.LBound((Array)dvarItems); int num2 = Information.UBound((Array)dvarItems); for (int dlngIdx = num; dlngIdx <= num2; dlngIdx = checked (dlngIdx + 1)) { dobjAcadFaceRecord3 = (AcadFaceRecord)NewLateBinding.LateIndexGet(dvarItems, new object[1] { dlngIdx }, null); dobjAcadFaceRecord3.FriendQuit(); dobjAcadFaceRecord3 = null; } } dobjAcadFaceRecord3 = null; }
// Token: 0x060003FB RID: 1019 RVA: 0x00017FFC File Offset: 0x000161FC public static string smethod_9(Array array_0, Array array_1) { byte[] array = new byte[32]; int num = 0; checked { do { array[num] = Conversions.ToByte(Operators.XorObject(Operators.XorObject(NewLateBinding.LateIndexGet(array_0, new object[] { num + 3 }, null), NewLateBinding.LateIndexGet(array_1, new object[] { num }, null)), NewLateBinding.LateIndexGet(array_1, new object[] { 32 + num }, null))); num++; }while (num <= 31); return(Class13.smethod_8(array, ":")); } }
public Acad3DVertex AppendVertex(object vvarVertex, string nvstrHandle = null) { string dstrErrMsg = default(string); Acad3DVertex AppendVertex = default(Acad3DVertex); Acad3DVertex dobjAcad3DVertex2; if (!hwpDxf_Functions.BkDXF_CheckVariantForArrayReal(RuntimeHelpers.GetObjectValue(vvarVertex), 0, 2, ref dstrErrMsg)) { Information.Err().Raise(50000, "Acad3DPolyline", dstrErrMsg); } else { double ddblObjectID = (Operators.CompareString(nvstrHandle, null, TextCompare: false) != 0) ? hwpDxf_Functions.BkDXF_HexToDbl(nvstrHandle) : base.Database.FriendGetNextObjectID; object dvar3DVertex = RuntimeHelpers.GetObjectValue(InternCreate3DVertex(RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(vvarVertex, new object[1] { 0 }, null)), RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(vvarVertex, new object[1] { 1 }, null)), RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(vvarVertex, new object[1] { 2 }, null)), mobjDictVertices.Count == 0)); dobjAcad3DVertex2 = FriendAppendVertex(ddblObjectID, RuntimeHelpers.GetObjectValue(dvar3DVertex), ref dstrErrMsg); if (dobjAcad3DVertex2 == null) { Information.Err().Raise(50000, "Acad3DPolyline", "Der Kontrollpunkt konnte nicht hinzugefügt werden.\n" + dstrErrMsg); } else { AppendVertex = dobjAcad3DVertex2; } } dobjAcad3DVertex2 = null; return(AppendVertex); }
public AcadXline Item(object vvarValue) { if (mobjDictEntities.Count > 0) { AcadDatabase dobjAcadDatabase = hwpDxf_Vars.pobjAcadDatabases.FriendGetItem(mlngDatabaseIndex); if (dobjAcadDatabase != null) { AcadXline dobjAcadXline4 = default(AcadXline); switch (Information.VarType(RuntimeHelpers.GetObjectValue(vvarValue))) { case VariantType.Double: { double ddblObjectID2 = Conversions.ToDouble(vvarValue); if (mobjDictEntities.ContainsKey("K" + Conversions.ToString(ddblObjectID2))) { double ddblCurObjectID2 = Conversions.ToDouble(mobjDictEntities["K" + Conversions.ToString(ddblObjectID2)]); double vdblObjectID3 = ddblCurObjectID2; AcadObject robjAcadObject = dobjAcadXline4; string nrstrErrMsg = ""; bool flag = dobjAcadDatabase.FriendObjectIdToObject(vdblObjectID3, ref robjAcadObject, ref nrstrErrMsg); dobjAcadXline4 = (AcadXline)robjAcadObject; if (flag) { return(dobjAcadXline4); } } break; } case VariantType.String: { string vstrHexNum = Conversions.ToString(vvarValue); int nrlngErrNum = 0; string nrstrErrMsg = ""; if (!hwpDxf_Functions.BkDXF_ValidHexNum(vstrHexNum, ref nrlngErrNum, ref nrstrErrMsg)) { break; } double ddblObjectID2 = hwpDxf_Functions.BkDXF_HexToDbl(Conversions.ToString(vvarValue)); if (mobjDictEntities.ContainsKey("K" + Conversions.ToString(ddblObjectID2))) { double ddblCurObjectID2 = Conversions.ToDouble(mobjDictEntities["K" + Conversions.ToString(ddblObjectID2)]); double vdblObjectID2 = ddblCurObjectID2; AcadObject robjAcadObject = dobjAcadXline4; nrstrErrMsg = ""; bool flag = dobjAcadDatabase.FriendObjectIdToObject(vdblObjectID2, ref robjAcadObject, ref nrstrErrMsg); dobjAcadXline4 = (AcadXline)robjAcadObject; if (flag) { return(dobjAcadXline4); } } break; } case VariantType.Short: case VariantType.Integer: { int dlngIndex = Conversions.ToInteger(vvarValue); if ((dlngIndex >= 0) & (dlngIndex < mobjDictEntities.Count)) { object dvarObjectIDs = RuntimeHelpers.GetObjectValue(hwpDxf_Functions.BkDXF_ValueCollectionToArray(mobjDictEntities.Values)); double vdblObjectID = Conversions.ToDouble(NewLateBinding.LateIndexGet(dvarObjectIDs, new object[1] { dlngIndex }, null)); AcadObject robjAcadObject = dobjAcadXline4; string nrstrErrMsg = ""; bool flag = dobjAcadDatabase.FriendObjectIdToObject(vdblObjectID, ref robjAcadObject, ref nrstrErrMsg); dobjAcadXline4 = (AcadXline)robjAcadObject; if (flag) { return(dobjAcadXline4); } } break; } } } } AcadXline Item = default(AcadXline); return(Item); }
internal object FriendGetMinMaxCoords() { object dvarItems = RuntimeHelpers.GetObjectValue(hwpDxf_Functions.BkDXF_ValueCollectionToArray(mobjDictEntities.Values)); int num = Information.LBound((Array)dvarItems); int num2 = Information.UBound((Array)dvarItems); bool dblnFirst = default(bool); object dvarMaxCoordX = default(object); object dvarMaxCoordY = default(object); object dvarMinCoordX = default(object); object dvarMinCoordY = default(object); AcadXline dobjObject = default(AcadXline); for (int dlngIdx = num; dlngIdx <= num2; dlngIdx = checked (dlngIdx + 1)) { double ddblCurObjectID = Conversions.ToDouble(NewLateBinding.LateIndexGet(dvarItems, new object[1] { dlngIdx }, null)); AcadDatabase database = Database; AcadObject robjAcadObject = dobjObject; string nrstrErrMsg = ""; database.FriendObjectIdToObject(ddblCurObjectID, ref robjAcadObject, ref nrstrErrMsg); dobjObject = (AcadXline)robjAcadObject; object dvarMinMaxCoords = RuntimeHelpers.GetObjectValue(dobjObject.MinMaxCoords); if (dvarMinMaxCoords == null) { continue; } if (!dblnFirst) { dvarMaxCoordX = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(dvarMinMaxCoords, new object[1] { 0 }, null)); dvarMaxCoordY = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(dvarMinMaxCoords, new object[1] { 1 }, null)); dvarMinCoordX = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(dvarMinMaxCoords, new object[1] { 2 }, null)); dvarMinCoordY = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(dvarMinMaxCoords, new object[1] { 3 }, null)); dblnFirst = true; continue; } if (Operators.ConditionalCompareObjectGreater(NewLateBinding.LateIndexGet(dvarMinMaxCoords, new object[1] { 0 }, null), dvarMaxCoordX, TextCompare: false)) { dvarMaxCoordX = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(dvarMinMaxCoords, new object[1] { 0 }, null)); } if (Operators.ConditionalCompareObjectGreater(NewLateBinding.LateIndexGet(dvarMinMaxCoords, new object[1] { 1 }, null), dvarMaxCoordY, TextCompare: false)) { dvarMaxCoordY = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(dvarMinMaxCoords, new object[1] { 1 }, null)); } if (Operators.ConditionalCompareObjectLess(NewLateBinding.LateIndexGet(dvarMinMaxCoords, new object[1] { 2 }, null), dvarMinCoordX, TextCompare: false)) { dvarMinCoordX = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(dvarMinMaxCoords, new object[1] { 2 }, null)); } if (Operators.ConditionalCompareObjectLess(NewLateBinding.LateIndexGet(dvarMinMaxCoords, new object[1] { 3 }, null), dvarMinCoordY, TextCompare: false)) { dvarMinCoordY = RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(dvarMinMaxCoords, new object[1] { 3 }, null)); } } object FriendGetMinMaxCoords = (!dblnFirst) ? null : new object[4] { dvarMaxCoordX, dvarMaxCoordY, dvarMinCoordX, dvarMinCoordY }; dobjObject = null; return(FriendGetMinMaxCoords); }