public bool AddBefore(ITask task, string name) { Class206 class2 = new Class206 { itask_0 = task }; if (class2.itask_0 == null) { throw new ArgumentNullException("task"); } if (name == null) { throw new ArgumentNullException("name"); } if (this.IsFrozen) { ilog_0.ErrorFormat("[AddBefore] This TaskManager is frozen.", Array.Empty<object>()); return false; } if (this.list_0.Any<ITask>(new Func<ITask, bool>(class2.method_0))) { ilog_0.ErrorFormat("[AddBefore] A task with the name of {0} has already been added. This one will be skipped.", class2.itask_0.Name); return false; } for (int i = 0; i < this.list_0.Count; i++) { if (this.list_0[i].Name == name) { this.list_0.Insert(i, class2.itask_0); return true; } } return false; }
public abstract void Visit(Class206 c);
public override void Visit(Class206 c) { }
internal void method_27(Paragraph A_0, float A_1, Class206 A_2) { Tab tab; int num = 12; float num2 = 20f; A_2.method_15().Clear(); A_2.list_1.Clear(); ParagraphFormat paragraphFormat = A_0.Format; if (!A_0.Document.Settings.method_5().method_0(CompatibilityOptions.NoTabForInd) && (paragraphFormat.FirstLineIndent < 0f)) { A_2.method_24(A_1 + paragraphFormat.LeftIndent, TabJustification.Left, TabLeader.NoLeader); } IParagraphStyle style = A_0.GetStyle(); if (style == null) { style = A_0.Document.Styles.FindByName(BookmarkStart.b("簱嬳䐵唷嬹倻", num), StyleType.ParagraphStyle) as IParagraphStyle; if (style == null) { style = (ParagraphStyle)Style.CreateBuiltinStyle(BuiltinStyle.Normal, A_0.Document); } } if (style.ParagraphFormat.Tabs.Count > 0) { paragraphFormat = A_0.GetStyle().ParagraphFormat; } int num3 = 0; int count = paragraphFormat.Tabs.Count; while (num3 < count) { tab = paragraphFormat.Tabs[num3]; if ((tab.Position != 0f) || (tab.DeletePosition == 0f)) { A_2.method_24(((tab.Position != 0f) ? tab.Position : (tab.DeletePosition / num2)) + A_1, (TabJustification)tab.Justification, (TabLeader)tab.TabLeader); } A_2.method_15().Add(tab); num3++; } paragraphFormat = A_0.Format; int num5 = 0; int num6 = paragraphFormat.Tabs.Count; while (num5 < num6) { int num10; tab = paragraphFormat.Tabs[num5]; bool flag = false; bool flag2 = false; int index = 0; double d = (tab.DeletePosition / num2) + A_1; double num9 = tab.Position + A_1; if (A_2.list_1.Count != 0) { num10 = 0; while (num10 < A_2.list_1.Count) { if (Math.Truncate((double)A_2.list_1[num10].method_4()) == Math.Truncate(num9)) { goto Label_0227; } if (((Math.Truncate((double)A_2.list_1[num10].method_4()) == Math.Truncate(d)) && (tab.DeletePosition != 0f)) && (tab.Position == 0f)) { goto Label_0230; } num10++; } } goto Label_0237; Label_0227: flag = true; index = num10; goto Label_0237; Label_0230: flag2 = true; index = num10; Label_0237: if (((tab.Position != 0f) || (tab.DeletePosition == 0f)) && (!flag2 && !flag)) { A_2.method_24(((tab.Position != 0f) ? tab.Position : (tab.DeletePosition / num2)) + A_1, (TabJustification)tab.Justification, (TabLeader)tab.TabLeader); A_2.method_15().Add(tab); } else if (flag2) { A_2.list_1.RemoveAt(index); } else if (flag) { A_2.list_1[index].method_1((TabJustification)tab.Justification); A_2.list_1[index].method_5(((tab.Position != 0f) ? tab.Position : (tab.DeletePosition / num2)) + A_1); A_2.list_1[index].method_3((TabLeader)tab.TabLeader); } num5++; } }