// Token: 0x0600054D RID: 1357 RVA: 0x0002DC48 File Offset: 0x0002BE48 public static async Task <string> smethod_0(string string_0, string string_1, string string_2, CancellationToken cancellationToken_0) { MainWindow.mainWindow_0.Invoke(new MethodInvoker(CaptchaQueue.Class126.class126_0.method_0)); Class131 @class = new Class131 { int_0 = (int)Convert.ToInt16(string_2), string_1 = string_0, uri_0 = new Uri(string_1) }; CaptchaQueue.concurrentDictionary_0[@class.string_0] = @class; CaptchaQueue.smethod_1(null, null); Task <string> task = @class.taskCompletionSource_0.Task; Task task2 = await Task.WhenAny(new Task[] { task, cancellationToken_0.smethod_23() }); Class131 class2; CaptchaQueue.concurrentDictionary_0.TryRemove(@class.string_0, out class2); CaptchaQueue.smethod_5(@class.int_1); CaptchaQueue.smethod_1(null, null); return((task == task2) ? task.Result : null); }
private static NavigateMenuNode smethod_0(ArrayList arrayList_0) { NavigateMenuNode node = new NavigateMenuNode(); foreach (object obj2 in arrayList_0) { if (obj2 is TreeNodeCommand) { TreeNodeCommand command = obj2 as TreeNodeCommand; if (command != null) { Bitmap bitmap = ResourceUtil.GetBitmap(command.ImageKey); if (bitmap == null) { bitmap = Class131.smethod_38(); } NavigateMenuNode node2 = new NavigateMenuNode(command.Text, command.function_0.Id, bitmap, command) { ImageKey = command.ImageKey }; if (command.Nodes.Count > 0) { smethod_1(node2, command); } node.Node.Add(node2); } } } return(node); }
private Bitmap method_3(Enum12 enum12_0, int int_1) { Bitmap bitmap; Rectangle rectangle; switch (enum12_0) { case ((Enum12)0): bitmap = Class131.smethod_35(); rectangle = new Rectangle((int_1 * 0x15) + int_1, 0, 0x15, 0x52); break; case ((Enum12)1): bitmap = Class131.smethod_36(); rectangle = new Rectangle((int_1 * 0x15) + int_1, 0, 0x15, 0x52); break; case ((Enum12)3): bitmap = Class131.smethod_37(); rectangle = new Rectangle(0, (int_1 * 7) + int_1, 120, 7); break; case ((Enum12)4): bitmap = Class131.smethod_34(); rectangle = new Rectangle(0, (int_1 * 7) + int_1, 120, 7); break; default: bitmap = Class131.smethod_0(); rectangle = new Rectangle(0, 0, 5, 5); break; } return(bitmap.Clone(rectangle, PixelFormat.Format64bppPArgb)); }
private Bitmap method_0(int int_0, int int_1) { Bitmap bitmap; Rectangle rect = new Rectangle(int_1 * 0x19, 0, 0x19, 0x12); switch (int_0) { case 0: bitmap = Class131.smethod_1(); rect = new Rectangle(int_1 * 0x26, 0, 0x26, 0x12); break; case 1: bitmap = Class131.smethod_2(); break; case 2: bitmap = Class131.smethod_3(); break; case 3: bitmap = Class131.smethod_4(); break; default: bitmap = Class131.smethod_1(); break; } return(bitmap.Clone(rect, PixelFormat.Format64bppPArgb)); }
private void method_4(PaintEventArgs paintEventArgs_0) { Image image = null; if (this.bool_0) { image = Class131.smethod_28(); } else { image = Class131.smethod_25(); } int x = (this.int_0 - image.Width) / 2; int y = ((this.int_1 - 2) - image.Height) / 2; this.rectangle_1 = new Rectangle(0, 0, this.int_0, this.int_1); if (this.rectangle_1.Contains(this.point_0)) { paintEventArgs_0.Graphics.DrawImage(Class131.smethod_29(), new Rectangle(1, 1, this.int_0 - 2, this.int_1 - 2)); } else { paintEventArgs_0.Graphics.FillRectangle(new SolidBrush(this.menuColorTable_0.MenuDarkBackColor), new Rectangle(1, 1, this.int_0 - 2, this.int_1 - 2)); } paintEventArgs_0.Graphics.DrawImage(image, new Rectangle(x, y, image.Width, image.Height)); }
protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); Graphics graphics = e.Graphics; graphics.SmoothingMode = SmoothingMode.HighQuality; graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; switch (this.ctlState_0) { case CtlState.Focused: this.method_1(graphics); break; case CtlState.MouseEnter: if (this.Focused) { this.method_1(graphics); break; } graphics.DrawImage(Class131.smethod_44(), base.ClientRectangle); break; } this.method_2(graphics); this.method_3(graphics); }
// Token: 0x0600055A RID: 1370 RVA: 0x0002E0DC File Offset: 0x0002C2DC private void method_7(GClass1 gclass1_0) { CaptchaQueue.Class127 @class = new CaptchaQueue.Class127(); if (CaptchaQueue.dictionary_1.Count == 1) { return; } @class.short_0 = Convert.ToInt16(gclass1_0.bunifuThinButton2_0.ButtonText.Split(new char[] { ' ' }).Last <string>()); gclass1_0.method_1(); CaptchaQueue.dictionary_1[(int)@class.short_0].webView_0.Engine.Stop(true); CaptchaQueue.dictionary_1[(int)@class.short_0].webView_0.Dispose(); CaptchaQueue.dictionary_1.Remove((int)@class.short_0); Class131 class2 = CaptchaQueue.concurrentDictionary_0.Values.FirstOrDefault(new Func <Class131, bool>(@class.method_0)); if (class2 != null) { class2.int_1 = 0; class2.bool_0 = false; CaptchaQueue.smethod_1(null, null); } this.method_9(this.int_1); if (CaptchaQueue.int_0 == (int)@class.short_0 && !this.method_8()) { int num = this.dictionary_0.Values.ToList <GClass1>().IndexOf(gclass1_0); this.method_6(this.dictionary_0[(num > 0) ? num : 4]); } }
internal static string smethod_1(JsonSchemaType jsonSchemaType_0) { Class131 class2 = new Class131 { jsonSchemaType_0 = jsonSchemaType_0 }; return(Class132.idictionary_0.Single <KeyValuePair <string, JsonSchemaType> >(new Func <KeyValuePair <string, JsonSchemaType>, bool>(class2.method_0)).Key); }
// Token: 0x0600057A RID: 1402 RVA: 0x00030B0C File Offset: 0x0002ED0C void IAsyncStateMachine.MoveNext() { int num2; int num = num2; string result2; try { TaskAwaiter <Task> taskAwaiter; if (num != 0) { MainWindow.mainWindow_0.Invoke(new MethodInvoker(CaptchaQueue.Class126.class126_0.method_0)); @class = new Class131 { int_0 = (int)Convert.ToInt16(string_2), string_1 = string_0, uri_0 = new Uri(string_1) }; CaptchaQueue.concurrentDictionary_0[@class.string_0] = @class; CaptchaQueue.smethod_1(null, null); task = @class.taskCompletionSource_0.Task; taskAwaiter = Task.WhenAny(new Task[] { task, cancellationToken_0.smethod_23() }).GetAwaiter(); if (!taskAwaiter.IsCompleted) { num2 = 0; TaskAwaiter <Task> taskAwaiter2 = taskAwaiter; this.asyncTaskMethodBuilder_0.AwaitUnsafeOnCompleted <TaskAwaiter <Task>, CaptchaQueue.Struct81>(ref taskAwaiter, ref this); return; } } else { TaskAwaiter <Task> taskAwaiter2; taskAwaiter = taskAwaiter2; taskAwaiter2 = default(TaskAwaiter <Task>); num2 = -1; } Task result = taskAwaiter.GetResult(); Class131 class2; CaptchaQueue.concurrentDictionary_0.TryRemove(@class.string_0, out class2); CaptchaQueue.smethod_5(@class.int_1); CaptchaQueue.smethod_1(null, null); result2 = ((task == result) ? task.Result : null); } catch (Exception exception) { num2 = -2; this.asyncTaskMethodBuilder_0.SetException(exception); return; } num2 = -2; this.asyncTaskMethodBuilder_0.SetResult(result2); }
private void method_3(PaintEventArgs paintEventArgs_0) { this.rectangle_3 = new Rectangle((base.Width - 0x15) - 40, 10, 0x25, 0x25); if (this.rectangle_3.Contains(this.point_0)) { paintEventArgs_0.Graphics.FillPath(new SolidBrush(this.menuColorTable_0.MenuDarkBackColor), this.method_5(this.rectangle_3, 8)); } Bitmap image = Class131.smethod_33(); paintEventArgs_0.Graphics.DrawImage(image, (int)((this.rectangle_3.X + ((this.rectangle_3.Width - image.Width) / 2)) + 1), (int)((this.rectangle_3.Y + 1) + ((this.rectangle_3.Height - image.Height) / 2))); }
public MessageBaseForm() { this._IsMoveFlag = true; this._IsCloseVisble = true; this.InitializeComponent(); this.picClose.Image = this.method_0(0, 0); this.picLogo.BackgroundImage = Class131.smethod_16().ToBitmap(); this.pnlTitle.SizeChanged += new EventHandler(this.pnlTitle_SizeChanged); this.pnlLogo.SizeChanged += new EventHandler(this.pnlLogo_SizeChanged); base.Load += new EventHandler(this.MessageBaseForm_Load); }
// Token: 0x0600055F RID: 1375 RVA: 0x0002E458 File Offset: 0x0002C658 private void reloadCaptcha_Click(object sender, EventArgs e) { Class131 value = CaptchaQueue.concurrentDictionary_0.Where(new Func <KeyValuePair <string, Class131>, bool>(CaptchaQueue.Class126.class126_0.method_9)).FirstOrDefault <KeyValuePair <string, Class131> >().Value; if (value != null) { CaptchaQueue.dictionary_1[value.int_1].webView_0.LoadHtml(value.uri_0.ToString().Contains("supreme") ? CaptchaQueue.smethod_3(value.string_1, value.string_0) : CaptchaQueue.smethod_2(value.string_1, value.int_0, value.string_0, value.uri_0), value.uri_0.ToString()); return; } CaptchaQueue.smethod_5(CaptchaQueue.int_0); }
public TreeViewBtnBar() { this.color_0 = Color.WhiteSmoke; this.color_1 = Color.Bisque; this.image_0 = Class131.smethod_19(); this.font_0 = new Font(FontFamily.GenericSansSerif, 9f, FontStyle.Bold); this.font_1 = new Font(FontFamily.GenericSansSerif, 9f, FontStyle.Regular); this.int_0 = 5; this.int_1 = 1; this.method_0(); base.DrawNode += new DrawTreeNodeEventHandler(this.TreeViewBtnBar_DrawNode); }
protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); Graphics graphics = e.Graphics; graphics.SmoothingMode = SmoothingMode.HighQuality; graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; if (this.ctlState_0 == CtlState.MouseEnter) { graphics.DrawImage(Class131.smethod_44(), base.ClientRectangle); } this.method_1(graphics); }
private void expandClick_Click(object sender, EventArgs e) { if (this.bool_0) { base.Height = 10; this.expandClick.Bitmap = Class131.smethod_14(); this.bool_0 = false; } else { this.expandClick.Bitmap = Class131.smethod_18(); base.Height = 0x5c; this.bool_0 = true; } }
protected override void WndProc(ref Message m) { base.WndProc(ref m); if ((m.Msg == 15) || (m.Msg == 0x133)) { IntPtr dC = GetDC(m.HWnd); if (dC.ToInt32() != 0) { Graphics graphics = Graphics.FromHdc(dC); new Rectangle(0, 0, base.Width, base.Height); Rectangle rect = new Rectangle((base.Width - base.Height) + 2, 2, base.Height - 4, base.Height - 4); graphics.DrawImage(Class131.smethod_5(), rect); ReleaseDC(m.HWnd, dC); } } }
public void Load(string string_0, NavigateMenuNode navigateMenuNode_0) { if (File.Exists(string_0)) { this.navigateToolScripBody1.Items.Clear(); try { XmlDocument document = new XmlDocument(); document.Load(string_0); if ((document == null) || !document.HasChildNodes) { throw new Exception("XML文件格式不正确!"); } this.list_0.Clear(); this.method_5(navigateMenuNode_0.Node); XmlNodeList list = document.SelectNodes("root/ToolBarItemCollection/ToolBarItem"); if ((list == null) || (list.Count <= 0)) { throw new Exception("XML文件格式不正确!"); } foreach (XmlNode node in list) { XmlAttributeCollection attributes = node.Attributes; string str = attributes["text"].Value; string str2 = attributes["image"].Value; string item = attributes["menuID"].Value; string str4 = attributes["tooltip"].Value; Bitmap bitmap = ResourceUtil.GetBitmap(str2); if (bitmap == null) { bitmap = Class131.smethod_38(); } if (this.list_0.Contains(item)) { this.navigateToolScripBody1.Items.Add(new NavigateMenuNode(str, item, bitmap, str4)); } } return; } catch (Exception exception) { throw exception; } } throw new Exception("文件不存在!"); }
private Class1108(Class764 A_0, SubDocumentType A_1) { this.class985_0 = new Class985(); this.class132_0 = new Class132(); this.class136_0 = new Class136(); this.class135_0 = new Class135(); this.class133_0 = new Class133(); this.class131_0 = new Class131(); this.class134_0 = new Class134(); this.class130_0 = new Class130(); this.class130_1 = new Class130(); this.class129_0 = new Class129(); this.stack_0 = new Stack(); this.class764_0 = A_0; this.subDocumentType_0 = A_1; this.class263_0 = new Class263(this.class764_0.method_43()); }
// Token: 0x0600054E RID: 1358 RVA: 0x0002DCA8 File Offset: 0x0002BEA8 public static bool smethod_1(object object_0, EventArgs eventArgs_0) { Class131 value = CaptchaQueue.concurrentDictionary_0.FirstOrDefault(new Func <KeyValuePair <string, Class131>, bool>(CaptchaQueue.Class126.class126_0.method_1)).Value; GClass0 value2 = CaptchaQueue.dictionary_1.FirstOrDefault(new Func <KeyValuePair <int, GClass0>, bool>(CaptchaQueue.Class126.class126_0.method_2)).Value; if (value != null && value2 != null) { value.bool_0 = true; value.int_1 = value2.int_0; MainWindow.mainWindow_0.Invoke(new MethodInvoker(CaptchaQueue.Class126.class126_0.method_4)); value2.bool_0 = false; value2.webView_0.LoadHtml(value.uri_0.ToString().Contains("supreme") ? CaptchaQueue.smethod_3(value.string_1, value.string_0) : CaptchaQueue.smethod_2(value.string_1, value.int_0, value.string_0, value.uri_0), value.uri_0.ToString()); return(true); } MainWindow.mainWindow_0.Invoke(new MethodInvoker(CaptchaQueue.Class126.class126_0.method_3)); return(false); }
private void method_5(PaintEventArgs paintEventArgs_0, int int_6, ref int int_7, NavigateMenuNode navigateMenuNode_1, List <NavigateMenuNodeRect> nodeList) { for (int i = 0; i < navigateMenuNode_1.Node.Count; i++) { Rectangle rectangle = new Rectangle(this.int_0 + 1, int_7, (base.Width - this.int_0) - 3, this.int_3 - 1); nodeList.Add(new NavigateMenuNodeRect(navigateMenuNode_1.Node[i], rectangle)); Color menuBackColor = this.menuColorTable_0.MenuBackColor; if (rectangle.Contains(this.point_0)) { menuBackColor = this.menuColorTable_0.MenuMouseHover; if (this.bool_1 && this.rectangle_2.Contains(this.point_0)) { menuBackColor = this.menuColorTable_0.MenuBackColor; } if (this.bool_2 && this.rectangle_3.Contains(this.point_0)) { menuBackColor = this.menuColorTable_0.MenuBackColor; } } paintEventArgs_0.Graphics.FillRectangle(new SolidBrush(menuBackColor), rectangle); string text = this.method_6(paintEventArgs_0, navigateMenuNode_1.Node[i].SimpleText, base.Width - int_6); SizeF ef = paintEventArgs_0.Graphics.MeasureString(text, this.font_1); paintEventArgs_0.Graphics.DrawString(text, this.font_1, new SolidBrush(this.menuColorTable_0.MenuFont), new PointF((float)int_6, (((float)int_7) + ((this.int_3 - ef.Height) / 2f)) + 2f)); if ((navigateMenuNode_1.Node[i].Node != null) && (navigateMenuNode_1.Node[i].Node.Count > 0)) { Image image; int num2 = int_6 + ((int)ef.Width); if (navigateMenuNode_1.Node[i].IsExpand) { image = Class131.smethod_27(); } else { image = Class131.smethod_26(); } paintEventArgs_0.Graphics.DrawImage(image, new Point(num2 + ((this.int_3 - image.Width) / 2), int_7 + ((this.int_3 - image.Width) / 2))); } int_7 += this.int_3; if (navigateMenuNode_1.Node[i].IsExpand) { this.method_5(paintEventArgs_0, int_6 + this.int_2, ref int_7, navigateMenuNode_1.Node[i], nodeList); } } }
// Token: 0x0600055C RID: 1372 RVA: 0x0002E240 File Offset: 0x0002C440 private bool method_8() { if (CaptchaQueue.dictionary_1.ContainsKey(CaptchaQueue.int_0) && !CaptchaQueue.dictionary_1[CaptchaQueue.int_0].bool_0) { return(false); } Class131 @class = CaptchaQueue.concurrentDictionary_0.Values.Where(new Func <Class131, bool>(CaptchaQueue.Class126.class126_0.method_5)).FirstOrDefault <Class131>(); if (@class == null) { return(false); } int num = CaptchaQueue.dictionary_1.Values.OrderBy(new Func <GClass0, int>(CaptchaQueue.Class126.class126_0.method_6)).ToList <GClass0>().IndexOf(CaptchaQueue.dictionary_1[@class.int_1]); int key = num % 4 + 1; int num2 = num / 4; this.method_9(this.int_1); this.method_6(this.dictionary_0[key]); return(true); }
private static void smethod_1(NavigateMenuNode navigateMenuNode_0, TreeNode treeNode_0) { foreach (TreeNodeCommand command in treeNode_0.Nodes) { Bitmap bitmap = ResourceUtil.GetBitmap(command.ImageKey); if (bitmap == null) { bitmap = Class131.smethod_38(); } NavigateMenuNode node = new NavigateMenuNode(command.Text, command.function_0.Id, bitmap, command) { ImageKey = command.ImageKey }; if (command.Nodes.Count > 0) { smethod_1(node, command); } navigateMenuNode_0.Node.Add(node); } }
private static void smethod_1(Control control_0) { try { foreach (Control control in control_0.Controls) { if (control is ToolStrip) { ToolStrip strip = control as ToolStrip; strip.BackgroundImage = Class131.smethod_45(); } if (control.Controls.Count > 0) { smethod_1(control); } } } catch { } }
public void Load(string string_0) { if (File.Exists(string_0)) { try { XmlDocument document = new XmlDocument(); document.Load(string_0); if ((document == null) || !document.HasChildNodes) { throw new Exception("XML文件格式不正确!"); } XmlNodeList list = document.SelectNodes("root/ToolBarItemCollection/ToolBarItem"); if ((list == null) || (list.Count <= 0)) { throw new Exception("XML文件格式不正确!"); } this.method_2(); foreach (XmlNode node in list) { XmlAttributeCollection attributes = node.Attributes; string str = attributes["text"].Value; string str2 = attributes["image"].Value; string str3 = attributes["menuID"].Value; Bitmap bitmap = ResourceUtil.GetBitmap(str2); if (bitmap == null) { bitmap = Class131.smethod_38(); } this.NodeAdd(str, str3, bitmap); } return; } catch (Exception exception) { throw exception; } } throw new Exception("文件不存在!"); }
private void method_7(PaintEventArgs paintEventArgs_0, int int_8, int int_9, bool bool_2, bool bool_3, NavigateMenuNode navigateMenuNode_1) { Color menuBackColor = this.menuColorTable_0.MenuBackColor; Rectangle rect = new Rectangle(int_8, int_9, base.Width, this.int_0); if (!this.bool_1) { if (bool_3) { paintEventArgs_0.Graphics.DrawImage(Class131.smethod_30(), rect); } else if (bool_2) { paintEventArgs_0.Graphics.DrawImage(Class131.smethod_29(), rect); } else { paintEventArgs_0.Graphics.FillRectangle(new SolidBrush(menuBackColor), rect); } } else { paintEventArgs_0.Graphics.FillRectangle(new SolidBrush(menuBackColor), rect); } if (!bool_2 || this.bool_1) { paintEventArgs_0.Graphics.FillRectangle(new SolidBrush(this.menuColorTable_0.MenuDarkBackColor), new Rectangle(int_8, int_9, this.int_2, this.int_0)); } this.method_8(int_8, int_9, paintEventArgs_0); Bitmap icon = navigateMenuNode_1.Icon; icon = this.method_13(icon, 0x18, 0x18); paintEventArgs_0.Graphics.DrawImage(icon, (int)(((int_8 + this.int_2) - icon.Width) / 2), (int)(int_9 + ((this.int_0 - icon.Height) / 2))); if (base.Width > this.int_2) { paintEventArgs_0.Graphics.DrawString(navigateMenuNode_1.SimpleText, this.font_0, new SolidBrush(this.menuColorTable_0.MenuFont), new Rectangle((int_8 + this.int_2) + this.int_3, int_9 + 7, (base.Width - this.int_2) - this.int_3, (this.int_0 - 2) - 14)); } }
private void method_1() { this.int_0 = 0; this.int_6 = 0; this.leftClick.Name = "leftClick"; this.leftClick.Bitmap = Class131.smethod_15(); this.leftClick.Dock = DockStyle.Left; this.leftClick.Width = 10; this.leftClick.Click += new EventHandler(this.rightClick_Click); base.Controls.Add(this.leftClick); this.rightClick.Name = "rightClick"; this.rightClick.Bitmap = Class131.smethod_17(); this.rightClick.Dock = DockStyle.Right; this.rightClick.Width = 10; this.rightClick.Click += new EventHandler(this.rightClick_Click); base.Controls.Add(this.rightClick); this.expandClick.Name = "expandClick"; this.expandClick.Bitmap = Class131.smethod_18(); this.expandClick.Width = 100; this.expandClick.Height = 10; this.expandClick.Click += new EventHandler(this.expandClick_Click); base.Controls.Add(this.expandClick); }
private void method_2(Graphics graphics_0) { Bitmap image = null; int x = 0; int y = 0; if (this.menuDirection_0 == Aisino.Framework.Plugin.Core.Controls.OutlookBar.MenuDirection.down) { x = 10; y = (base.Height / 2) - 6; image = Class131.smethod_17(); } else if (this.menuDirection_0 == Aisino.Framework.Plugin.Core.Controls.OutlookBar.MenuDirection.right) { x = 10; y = (base.Height / 2) - 5; image = Class131.smethod_14(); } x += this.int_0; if (image != null) { graphics_0.DrawImage(image, new Point(x, y)); } }
private void method_1(Graphics graphics_0, Rectangle rectangle_0, TabPage tabPage_0, GraphicsPath graphicsPath_0) { if (tabPage_0 != null) { StringFormat format = new StringFormat { Trimming = StringTrimming.EllipsisCharacter, FormatFlags = StringFormatFlags.NoWrap }; Rectangle layoutRectangle = new Rectangle(rectangle_0.X + 5, rectangle_0.Y + 5, rectangle_0.Width - 10, tabPage_0.Font.Height); if (base.SelectedTab.Equals(tabPage_0)) { layoutRectangle = new Rectangle(rectangle_0.X + 5, rectangle_0.Y + 5, rectangle_0.Width - 0x19, rectangle_0.Height - 7); graphics_0.FillPath(new LinearGradientBrush(new Point(rectangle_0.X, rectangle_0.Y), new Point(rectangle_0.X, rectangle_0.Bottom + 1), this.color_3, this.color_4), graphicsPath_0); graphics_0.DrawString(tabPage_0.Text, tabPage_0.Font, new SolidBrush(tabPage_0.ForeColor), layoutRectangle, format); graphics_0.DrawPath(new Pen(this.color_0), graphicsPath_0); if (!"首页".Equals(tabPage_0.Text.Trim())) { Rectangle rect = smethod_0(rectangle_0); if (this.bool_0) { graphics_0.DrawImage(Class131.smethod_42(), rect); } else { graphics_0.DrawImage(Class131.smethod_41(), rect); } } } else { graphics_0.FillPath(new LinearGradientBrush(new Point(rectangle_0.X, rectangle_0.Y), new Point(rectangle_0.X, rectangle_0.Bottom + 1), this.color_1, this.color_2), graphicsPath_0); graphics_0.DrawString(tabPage_0.Text, tabPage_0.Font, new SolidBrush(tabPage_0.ForeColor), layoutRectangle, format); graphics_0.DrawPath(new Pen(this.color_0), graphicsPath_0); } } }
public override void Visit(Class131 c) { }
public byte[] PrintMethod(bool isyulan, string string_2, bool bool_2 = false) { this.bool_0 = bool_2; this.bool_1 = false; if (isyulan) { this.bool_1 = true; this.string_1 = string_2; } try { Image img = new Bitmap(this.canvas_0.PageSize.Width, this.canvas_0.PageSize.Height); Graphics graphics_0 = Graphics.FromImage(img); graphics_0.FillRectangle(Brushes.White, 0, 0, this.canvas_0.PageSize.Width, this.canvas_0.PageSize.Height); graphics_0.SmoothingMode = SmoothingMode.AntiAlias; graphics_0.SmoothingMode = SmoothingMode.HighQuality; graphics_0.InterpolationMode = InterpolationMode.HighQualityBilinear; graphics_0.PixelOffsetMode = PixelOffsetMode.HighQuality; if (this.bool_1) { Bitmap image = null; PointF empty = (PointF)Point.Empty; string str = this.string_1.ToUpper(); if (str != null) { if (str == "C") { image = Class131.smethod_39(); empty = new PointF(this.canvas_0.startPoint.X + 5f, this.canvas_0.startPoint.Y - 20f); } else if (str == "S") { image = Class131.smethod_47(); empty = new PointF(this.canvas_0.startPoint.X + 8f, this.canvas_0.startPoint.Y - 18f); } else if (str == "JO") { image = Class131.smethod_12(); empty = new PointF(this.canvas_0.startPoint.X, this.canvas_0.startPoint.Y - 18f); } else if (!(str == "JN")) { if (str == "F") { image = Class131.smethod_11(); empty = new PointF(this.canvas_0.startPoint.X - 25f, this.canvas_0.startPoint.Y - 13f); } } else { image = Class131.smethod_13(); empty = new PointF(this.canvas_0.startPoint.X - 15f, this.canvas_0.startPoint.Y - 18f); } } if (image != null) { if (this.string_1.ToUpper() == "F") { empty.X += 3f; } graphics_0.DrawImage(image, empty); } } this.canvas_0.Print(graphics_0, this.dataDict_0.Data(0), this.bool_0); using (MemoryStream ms = new MemoryStream()) { img.Save(ms, ImageFormat.Jpeg); byte[] bytes = new byte[ms.Length]; ms.Seek(0, SeekOrigin.Begin); ms.Read(bytes, 0, bytes.Length); return(bytes); } } catch (Exception ex) { MessageBox.Show(ex.Message); throw; } }
public abstract void Visit(Class131 c);
public byte[] PreviewImgMethod(string string_2, bool bool_2) { this.bool_0 = bool_2; this.bool_1 = true; this.string_1 = string_2; this.printPreviewDialogEx_0.Document = this.printDocument; try { Image img = new Bitmap(this.canvas_0.PageSize.Width, this.canvas_0.PageSize.Height); Graphics graphics_0 = Graphics.FromImage(img); graphics_0.SmoothingMode = SmoothingMode.AntiAlias; graphics_0.SmoothingMode = SmoothingMode.HighQuality; graphics_0.InterpolationMode = InterpolationMode.HighQualityBilinear; graphics_0.PixelOffsetMode = PixelOffsetMode.HighQuality; Bitmap image = null; PointF empty = (PointF)Point.Empty; string str = this.string_1.ToUpper(); if (str != null) { if (str == "C") { image = Class131.smethod_39(); empty = new PointF(this.canvas_0.startPoint.X + 5f, this.canvas_0.startPoint.Y - 20f); } else if (str == "S") { image = Class131.smethod_47(); empty = new PointF(this.canvas_0.startPoint.X + 8f, this.canvas_0.startPoint.Y - 18f); } else if (str == "JO") { image = Class131.smethod_12(); empty = new PointF(this.canvas_0.startPoint.X, this.canvas_0.startPoint.Y - 18f); } else if (!(str == "JN")) { if (str == "F") { image = Class131.smethod_11(); empty = new PointF(this.canvas_0.startPoint.X - 25f, this.canvas_0.startPoint.Y - 13f); } } else { image = Class131.smethod_13(); empty = new PointF(this.canvas_0.startPoint.X - 15f, this.canvas_0.startPoint.Y - 18f); } } if (image != null) { if (this.string_1.ToUpper() == "F") { empty.X += 3f; } Bitmap b = new Bitmap(Convert.ToInt32(image.Width * 1.5), Convert.ToInt32(image.Height * 1.5)); Graphics g = Graphics.FromImage(b); // 插值算法的质量 g.InterpolationMode = InterpolationMode.HighQualityBicubic; g.DrawImage(image, new Rectangle(0, 0, Convert.ToInt32(image.Width * 0.5), Convert.ToInt32(image.Height * 0.5)), new Rectangle(0, 0, image.Width, image.Height), GraphicsUnit.Pixel); g.Dispose(); graphics_0.DrawImage(b, empty); } this.canvas_0.Print(graphics_0, this.dataDict_0.Data(0), this.bool_0); using (MemoryStream ms = new MemoryStream()) { img.Save(ms, ImageFormat.Jpeg); byte[] bytes = new byte[ms.Length]; ms.Seek(0, SeekOrigin.Begin); ms.Read(bytes, 0, bytes.Length); return(bytes); } } catch (Exception) { throw; } }