int Interface21.OffsetToIndex(Class196 dc, double offset, string text, string textSplit, float clientWidth, float clientActiveAreaWidth, bool bIsFirstSplit) { int num = 3; float num2 = this.method_41(dc, clientWidth); Class210 class2 = base.interface23_0 as Class210; bool flag2 = (class2 != null) ? class2.Interface23.imethod_26() : true; bool flag = (base.OwnerParagraph != null) && base.OwnerParagraph.method_46(); flag = (num2 <= 0f) || flag; int num4 = dc.method_401(text, this, textSplit, offset, !flag2, flag, num2, clientActiveAreaWidth); float width = dc.method_323(this, BookmarkStart.b("न", num)).Width; if ((num4 > 0) && (!flag || (num2 >= width))) { int num6 = Class203.smethod_4(textSplit, num4); if (num6 < 0) { if ((num4 + num6) <= 0) { string str = text.Substring(0, num4 + Math.Abs(num6)); if (dc.method_323(this, str).Width < num2) { num4 += num6; } } } else { num4 += num6; } } if ((num2 > width) && (num4 < textSplit.Length)) { int num7 = num4; if (((offset != num2) && (num4 < 1)) || flag) { num7++; } if (num7 > -1) { for (int i = num7; i < textSplit.Length; i++) { if ((textSplit[i] != ' ') && (textSplit[i] != '\x00a0')) { break; } num4++; } } } if (((num4 <= 0) && (Class59.smethod_5((double)num2, offset, 0.005) == 0)) && !flag) { num4 = -2147483648; } if (((num4 <= 0) && (Class59.smethod_5((double)num2, 0.0, 0.005) <= 0)) && flag) { num4 = -2147483648; } return(num4); }
internal static void smethod_0(Class398 A_0, Table A_1) { int num = 1; RowFormat tableFormat = A_1.TableFormat; List <float> tableGrid = A_1.TableGrid; ArrayList list2 = tableFormat.HasFormatRevision ? smethod_11(tableFormat) : null; A_0.method_4(BookmarkStart.b("倦ጨ弪伬䌮瘰䄲尴匶", num)); for (int i = 1; i < tableGrid.Count; i++) { int num4 = Class59.smethod_8(tableGrid[i] - tableGrid[i - 1], 0); A_0.method_33(BookmarkStart.b("倦ጨ䰪弬䘮唰瀲娴嬶", num), new object[] { BookmarkStart.b("倦ጨ尪", num), num4 }); } if (list2 != null) { A_0.method_4(BookmarkStart.b("倦ጨ弪伬䌮瘰䄲尴匶稸区尼儾♀♂", num)); A_0.method_4(BookmarkStart.b("倦ጨ弪伬䌮瘰䄲尴匶", num)); foreach (int num2 in list2) { A_0.method_33(BookmarkStart.b("倦ጨ䰪弬䘮唰瀲娴嬶", num), new object[] { BookmarkStart.b("倦ጨ尪", num), num2 }); } A_0.method_5(); A_0.method_5(); } A_0.method_5(); }
protected override void vmethod_3(Class615 A_0) { base.bool_3 = A_0.method_9(); if (base.bool_6) { bool flag; Class210 class2 = base.method_2() as Class210; if (((flag = (class2 != null) ? class2.method_39() : false) && (class2 != null)) && ((base.method_30() is ShapeObject) && ((base.method_30() as ShapeObject).TextWrappingStyle == TextWrappingStyle.Inline))) { Paragraph paragraph = (base.method_30() as ShapeObject).method_28(); if (((paragraph != null) && paragraph.IsInCell) && (base.method_5() != null)) { float num = base.method_5().method_69().Width + (base.method_30() as Interface2).imethod_3(base.method_4()).Width; if (Class59.smethod_5((double)num, base.method_3().method_2(), 0.00050000002374872565) > 0) { flag = false; } } } if (!flag) { base.interface1_0 = A_0.method_0(); base.layoutState_0 = LayoutState.Splitted; } else { base.layoutState_0 = LayoutState.NotFitted; } } else { base.layoutState_0 = LayoutState.NotFitted; } }
// Token: 0x060006BC RID: 1724 RVA: 0x0002C2A8 File Offset: 0x0002A4A8 public static void smethod_9(Assembly assembly_1) { if (!Class59.bool_0) { object obj = Class59.object_0; lock (obj) { if (!Class59.bool_0) { Class59.smethod_1(assembly_1); Type type = assembly_1.GetType("Microsoft.FSharp.Reflection.FSharpType"); MethodInfo methodBase_ = Class59.smethod_10(type, "IsUnion", BindingFlags.Static | BindingFlags.Public); Class59.IsUnion = Class124.smethod_19().vmethod_0 <object>(methodBase_); MethodInfo methodBase_2 = Class59.smethod_10(type, "GetUnionCases", BindingFlags.Static | BindingFlags.Public); Class59.GetUnionCases = Class124.smethod_19().vmethod_0 <object>(methodBase_2); Type type2 = assembly_1.GetType("Microsoft.FSharp.Reflection.FSharpValue"); Class59.PreComputeUnionTagReader = Class59.smethod_11(type2, "PreComputeUnionTagReader"); Class59.PreComputeUnionReader = Class59.smethod_11(type2, "PreComputeUnionReader"); Class59.PreComputeUnionConstructor = Class59.smethod_11(type2, "PreComputeUnionConstructor"); Type type3 = assembly_1.GetType("Microsoft.FSharp.Reflection.UnionCaseInfo"); Class59.smethod_5(Class124.smethod_19().vmethod_3 <object>(type3.GetProperty("Name"))); Class59.smethod_7(Class124.smethod_19().vmethod_3 <object>(type3.GetProperty("Tag"))); Class59.smethod_3(Class124.smethod_19().vmethod_3 <object>(type3.GetProperty("DeclaringType"))); Class59.smethod_8(Class124.smethod_19().vmethod_0 <object>(type3.GetMethod("GetFields"))); Class59.methodInfo_0 = assembly_1.GetType("Microsoft.FSharp.Collections.ListModule").GetMethod("OfSeq"); Class59.kXkxeOrhTr = assembly_1.GetType("Microsoft.FSharp.Collections.FSharpMap`2"); Thread.MemoryBarrier(); Class59.bool_0 = true; } } } }
internal double method_6() { if (Class59.smethod_5(this.method_7(), this.method_11(), 0.005) != 0) { return(this.method_4() + this.method_26()); } return(this.method_4()); }
// Token: 0x060006BE RID: 1726 RVA: 0x0002C46C File Offset: 0x0002A66C private static Delegate1 <object, object> smethod_11(Type type_0, string string_0) { Class59.Class60 @class = new Class59.Class60(); MethodInfo methodInfo = Class59.smethod_10(type_0, string_0, BindingFlags.Static | BindingFlags.Public); MethodInfo method = methodInfo.ReturnType.GetMethod("Invoke", BindingFlags.Instance | BindingFlags.Public); @class.delegate1_0 = Class124.smethod_19().vmethod_0 <object>(methodInfo); @class.delegate1_1 = Class124.smethod_19().vmethod_0 <object>(method); return(new Delegate1 <object, object>(@class.method_0)); }
internal byte[] method_0(Class40 class40_0) { d0 d = class40_0.method_7(this.string_0, Assembly.GetEntryAssembly().GetName().Version.ToString(), false); if (d.Success) { return(Class59.smethod_2(d.Data)); } this.string_1 = d.Body; return(null); }
private void method_88() { if (this.method_93().method_6(0x100e) || this.method_93().method_6(0x1018)) { int num = Class59.smethod_8(this.method_93().Height * 20f, 0); if ((this.method_93().HeightType == TableRowHeightType.Exactly) && (num > 0)) { num = -num; } base.class345_0.method_1(SprmCode.TDyaRowHeight, num); } }
static Class57() { int num2 = 0x55276e7c; int num3 = -437084894; class59_0 = new Class59(0x68b); int num4 = 2; StackTrace trace = new StackTrace(2, false); num4 = 0; StackFrame frame = trace.GetFrame(0); int num5 = 0; if (frame == null) { trace = new StackTrace(); num5 = 1; frame = trace.GetFrame(1); } int num = ~-~--~-~~-~((0x45dc2cf2 + num2) - num3) ^ ~--~-~~-~-~((0x5c7a7374 - num2) + num3); MethodBase method = frame?.GetMethod(); if (frame != null) { num ^= -~-~~--~~((0x5d93f35f ^ num2) ^ num3); } Type declaringType = method?.DeclaringType; if (declaringType == typeof(RuntimeMethodHandle)) { num ^= ((num2 + -1865731635) - num3) + num4; enum0_0 = ((Enum0)4) | enum0_0; } else if (declaringType == null) { if (smethod_4(trace, num5)) { num ^= -~~--~-~~((0x6f34adbb - num2) ^ num3) - num4; enum0_0 = ((Enum0)0x10) | enum0_0; } else { num ^= -~~-~--~~-~((num2 + -1865769490) - num3); enum0_0 = ((Enum0)1) | enum0_0; } } else { enum0_0 |= (Enum0)0x10; num ^= ~--~~-~-~((0x6f34adb7 - num2) ^ num3) - num4; } int_2 = num + int_2; }
internal static void smethod_1(TabCollection A_0, Class345 A_1) { if (A_0.Count != 0) { int num = 0; int num2 = 0; for (int i = 0; i < A_0.Count; i++) { if (!A_0[i].IsClear && ((A_0[i].Position != 0f) || (A_0[i].DeletePosition == 0f))) { num2++; } else { num++; } } A_1.method_5(SprmCode.PChgTabs); int num4 = ((((1 + (num * 2)) + 0) + 1) + (num2 * 2)) + num2; A_1.Write((byte)num4); A_1.Write((byte)num); for (int j = 0; j < A_0.Count; j++) { if (A_0[j].IsClear || ((A_0[j].Position == 0f) && (A_0[j].DeletePosition != 0f))) { A_1.Write((short)A_0[j].DeletePosition); } } A_1.Write((byte)num2); for (int k = 0; k < A_0.Count; k++) { if (!A_0[k].IsClear && ((A_0[k].Position != 0f) || (A_0[k].DeletePosition == 0f))) { A_1.Write((short)Class59.smethod_8(A_0[k].Position * 20f, 0)); } } for (int m = 0; m < A_0.Count; m++) { Tab tab = A_0[m]; if (!A_0[m].IsClear && ((A_0[m].Position != 0f) || (A_0[m].DeletePosition == 0f))) { int num8 = 0; num8 = (int)(TabJustification.Left | tab.Justification); num8 |= ((int)tab.TabLeader) << 3; num8 |= tab.Undocumented40 ? 0x40 : 0; A_1.Write((byte)num8); } } } }
internal static string smethod_0(int int_3) { Class59 class2 = class59_0; lock (class2) { string str = class59_0.method_2(int_3); if (str != null) { return(str); } return(smethod_1(int_3, true)); } }
public LogonResponse Initialize(string userID, string logonPassword, string serverIP, int serverPort, ICustomizeHandler customizeHandler) { if (this.emptyAgileLogger_0 == null) { if (this.string_1 == null) { this.emptyAgileLogger_0 = new EmptyAgileLogger(); } else { FileAgileLogger logger = new FileAgileLogger(this.string_1) { MaxLength4ChangeFile = 0x100000L }; this.emptyAgileLogger_0 = (EmptyAgileLogger)logger; } } this.eventSafeTrigger_0.AgileLogger = this.emptyAgileLogger_0; this.string_0 = logonPassword; Class16 class2 = new Class16(); MessageForbiddenHandler class3 = new MessageForbiddenHandler(); this.object_0 = Class157.CreateInterface26((Enum6)0); int num = (!this.advancedOptions_0.CheckResponseTTL4Query || !this.bool_4) ? 10 : 0; this.class72_0 = new Class72(num, this.int_1); this.class72_0.SetEngine((IEngine)this.object_0); Interface36 interface2 = new Class94((ICommitMessageToServer)this.object_0, class3, null); Class79 class4 = new Class79(this.class72_0, interface2); BasicMessageTypeRoom room = new BasicMessageTypeRoom(); room.Initialize(); CustomizeMessageTypeRoom room2 = new CustomizeMessageTypeRoom(); room2.Initialize(); FileMessageTypeRoom room3 = new FileMessageTypeRoom(); room3.Initialize(); P2PSessionMessageTypeRoom room4 = new P2PSessionMessageTypeRoom(); room4.Initialize(); FriendsMessageTypeRoom room5 = new FriendsMessageTypeRoom(); room5.Initialize(); GroupMessageTypeRoom room6 = new GroupMessageTypeRoom(); room6.Initialize(); ContactsMessageTypeRoom room7 = new ContactsMessageTypeRoom(); room7.Initialize(); this.class113_0 = new BasicOutter(); this.class113_0.SetBasicMessageTypeRoom(room); this.class113_0.SetActionType(class4); this.class113_0.SetStreamContract(class2); this.class113_0.SetICommitMessageToServer((ICommitMessageToServer)this.object_0); this.class113_0.NgadStsqsh += new CbGeneric(this.method_1); this.class113_0.method_2(userID); this.class71_0 = new Class71(this.class113_0, this.bool_4 ? 0 : this.int_0); Class78 class9 = new Class78(); class9.method_5(this.class113_0); class9.method_1(room); class9.method_2(class2); class9.method_4((ICommitMessageToServer)this.object_0); class9.method_3(class4); this.class43_0 = new Class43(); this.class43_0.method_5(class4); this.class43_0.method_4(class2); this.class43_0.method_3(room2); this.class43_0.method_1(userID); CustomizeProcess class10 = new CustomizeProcess(); class10.SetStreamContractHelper(class2); class10.SetCustomizeHandler(customizeHandler); class10.SetCustomizeMessageTypeRoom(room2); class10.SetActionType(class4); class10.Event_0 += new CbGeneric <string, int, byte[], string>(this.OnMessageReceived); Class75 class7 = new Class75(class4, class2, room4); class7.method_1(userID); Class24 class8 = new Class24(); class8.method_0(room4); class8.method_1(class2); class8.DaTyrcXefU(class7); this.class2_0 = new FileTransfering(); this.class2_0.method_0(this.emptyAgileLogger_0); this.class13_0 = new FileHandler(); this.class13_0.method_0(this.emptyAgileLogger_0); this.class2_0.TTL4ResumedFileItem = this.advancedOptions_0.TempFile4ResumedTTL; this.class13_0.method_1(class4); this.class13_0.method_3(class2); this.class13_0.imethod_1(0x100000); this.class13_0.method_7(this.advancedOptions_0.UseWorkThreadPool); this.class13_0.Initialize(userID, room3.FilePackageData); this.class28_0 = new Class28(); this.class28_0.method_2(this.advancedOptions_0.CheckFileZeroSpeedSpanInSecs); this.class28_0.method_0(this.emptyAgileLogger_0); this.class28_0.method_13(room3); this.class28_0.method_14(class2); this.class28_0.method_16(class4); this.class28_0.method_12(this.class2_0); this.class28_0.method_11(this.class13_0); this.class28_0.Initialize(userID); Class70 class11 = new Class70(); class11.method_0(room3); class11.method_1(class2); class11.method_3(this.class13_0); class11.method_2(this.class2_0); class11.method_4(this.class28_0); this.class126_0 = new FriendsOutter(); this.class126_0.method_4(class4); this.class126_0.method_3(class2); this.class126_0.method_2(room5); this.class126_0.FriendOffline += new CbGeneric <string>(this.method_6); this.class126_0.method_1(userID); Class59 class12 = new Class59(); class12.method_2(class2); class12.method_3(this.class126_0); class12.method_1(room5); this.class19_0 = new GroupOutter2(); this.class19_0.method_0(class4); this.class19_0.uBkeyEkxPJ(class2); this.class19_0.Iibebiqvn1(room6); this.class19_0.SetCommitMessageToServer((ICommitMessageToServer)this.object_0); this.class19_0.GroupmateOffline += new CbGeneric <string>(this.method_7); this.class19_0.method_4(userID); Class140 class13 = new Class140(); class13.method_0(room6); class13.method_2(this.class19_0); class13.method_1(class2); this.ContactsOutter_0 = new ContactsOutter(); this.ContactsOutter_0.method_2(class4); this.ContactsOutter_0.SetStreamContract(class2); this.ContactsOutter_0.SetMessageType(room7); this.ContactsOutter_0.SetCommitMessageToServer((ICommitMessageToServer)this.object_0); this.ContactsOutter_0.ContactsOffline += new CbGeneric <string>(this.method_8); this.ContactsOutter_0.method_5(userID); Class20 class14 = new Class20(); class14.SetMessageType(room7); class14.SetOutter(this.ContactsOutter_0); class14.SetStreamContract(class2); IProcess[] processers = new IProcess[] { class9, class10, class8, class11, class12, class13, class14 }; this.class141_0 = new Class141(processers, this.class72_0); this.class141_0.method_6(this.advancedOptions_0.AsynMessageQueueEnabled && !this.bool_4); this.class141_0.method_7(class4); this.class141_0.method_4(this.emptyAgileLogger_0); this.class141_0.method_8(); new Class40(new IMessageTypeRoom[] { room, room2, room3, room4, room5, room6, room7 }, this.class141_0).method_2(); MessageDispatcher class6 = new MessageDispatcher(new Class144(new Class115(this.class141_0)), class3); class6.imethod_0(this.emptyAgileLogger_0); this.object_0.SetAgileLogger(this.emptyAgileLogger_0); this.object_0.Sock5ProxyInfo = this.sock5ProxyInfo_0; this.object_0.SetAgileIPE(new AgileIPE(serverIP, serverPort)); this.object_0.SetStreamContract(class2); this.object_0.imethod_12(class6); this.object_0.imethod_10(GlobalUtil.MaxLengthOfMessage); this.object_0.AutoReconnect = false; this.object_0.imethod_23((this.advancedOptions_0.WriteTimeoutInSecs <= 0) ? -1 : (this.advancedOptions_0.WriteTimeoutInSecs * 0x3e8)); this.object_0.SocketSendBuffSize = this.advancedOptions_0.SocketSendBuffSize; this.object_0.UncompletedSendingCount4Busy = this.advancedOptions_0.UncompletedSendingCount4Busy; this.object_0.ConnectionInterrupted += new CbGeneric(this.method_5); this.object_0.imethod_25(new CbGeneric(this.method_4)); this.object_0.ConnectionRebuildStart += new CbGeneric(this.method_2); this.object_0.Initialize(); LogonFullResponse response = this.class113_0.method_7(this.systemToken, this.string_0); if (response.LogonResult != LogonResult.Succeed) { this.object_0.OnDispose(); return(response); } this.object_0.imethod_27(); this.bool_0 = response.Boolean_0; this.bool_3 = response.GroupRelationEnabled; if ((this.bool_0 && this.advancedOptions_0.Boolean_0) && !this.bool_4) { if (response.UseAsP2PServer && (this.agileIPE_0 == null)) { this.agileIPE_0 = new AgileIPE(this.object_0.GetAgileIPE().String_0, this.object_0.GetAgileIPE().Port + 1); } if (this.agileIPE_0 != null) { this.class58_0 = new P2PController(); this.class58_0.method_6(this.agileIPE_0); this.class58_0.method_5(this.emptyAgileLogger_0); this.class58_0.method_3((Interface26)this.object_0); this.class58_0.method_2(class7); this.class58_0.method_4(room4); this.class58_0.P2PChannelClosed += new CbGeneric <P2PChannelState>(this.method_3); this.class58_0.method_7(userID, this.bool_2); interface2.imethod_2(this.class58_0); class8.method_2(this.class58_0); this.class13_0.method_4(new Class56(this.class58_0)); this.class19_0.method_1(this.class58_0); } } if (this.bool_2) { this.class108_0 = new TcpPassiveEngine((Interface26)this.object_0, this.class113_0, this.emptyAgileLogger_0); this.class108_0.method_3(); } this.class71_0.method_0(); this.class113_0.SendHeartBeatMessage(); this.string_3 = userID; this.bool_1 = true; this.object_0.AutoReconnect = this.bool_5; return(response); }
public bool method_20(SizeF A_0) { return((Class59.smethod_2((double)A_0.Width, (double)this.method_0().Width) <= 0) && (Class59.smethod_1((double)A_0.Height, (double)this.method_0().Height, false) <= 0)); }
// Token: 0x0600020A RID: 522 RVA: 0x000129B4 File Offset: 0x00010BB4 public static byte[] smethod_0(string string_0) { if (string_0 == null) { throw new Exception(); } MemoryStream memoryStream = new MemoryStream(string_0.Length * 4 / 5); byte[] result; try { int num = 0; uint num2 = 0u; foreach (char c in string_0) { if (c == 'z' && num == 0) { Class59.smethod_1(memoryStream, num2, 0); } else { if (c < '!' || c > 'u') { throw new Exception(); } checked { num2 += (uint)(unchecked ((ulong)Class59.uint_0[num]) * (ulong)(unchecked ((long)(checked (c - '!'))))); } num++; if (num == 5) { Class59.smethod_1(memoryStream, num2, 0); num = 0; num2 = 0u; } } } if (num == 1) { throw new Exception(); } if (num > 1) { for (int j = num; j < 5; j++) { checked { num2 += 84u * Class59.uint_0[j]; } } Class59.smethod_1(memoryStream, num2, 5 - num); } result = memoryStream.ToArray(); } finally { ((IDisposable)memoryStream).Dispose(); } return(result); }
// Token: 0x0600145C RID: 5212 RVA: 0x00025160 File Offset: 0x00023360 public void ScriptCommand(string scType, string Param) { Class59 class59_ = new Class59(scType, Param); this.class24_0.method_40(this.class24_0, class59_); }
private static void smethod_3(Table A_0) { TableRow row = A_0.Rows[0]; int num = (int)row.RowFormat.method_31(0x13ee); foreach (TableRow row3 in A_0.Rows) { int num5 = (int)row3.RowFormat.method_31(0x13ee); if (num5 < num) { num = num5; row = row3; } } int num6 = (int)((((row.Cells[0] == null) || !row.Cells[0].CellFormat.HasKey(0xc12)) ? row.RowFormat.Paddings.Left : row.Cells[0].CellFormat.Paddings.Left) * 20f); int num2 = num6 + ((int)row.RowFormat.method_31(0x13ee)); foreach (TableRow row2 in A_0.Rows) { RowFormat rowFormat = row2.RowFormat; int num4 = ((int)rowFormat.method_31(0x13ee)) - num; if (num4 != 0) { rowFormat.GridBeforeWidth.method_50((float)num4); } int num3 = (int)Math.Round((double)(rowFormat.LeftIndent * 20f)); if (((num2 != 0) && (num != 0)) && (!rowFormat.method_6(0x10f4) || (rowFormat.method_6(0x13ee) && (Class59.smethod_4((float)num3, (float)num2, 0.001f) != 0)))) { rowFormat.LeftIndent = ((float)num2) / 20f; } rowFormat.Remove(0x13ee); } }