同上一条
This commit is contained in:
1 parent
4eac19b37d
commit
c45254656b
17 files changed
+927
-363
No files matched your search
+57
@@ -32,6 +32,8 @@ namespace TemuKJD.KJDForms.ToolForms
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShowImgForm));
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.btnCopy = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnCopyUrl = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnSave = new DevComponents.DotNetBar.PanelEx();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
@@ -55,6 +57,8 @@ namespace TemuKJD.KJDForms.ToolForms
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnCopy);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnCopyUrl);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnSave);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(648, 686);
|
||||
this.splitContainer1.SplitterDistance = 648;
|
||||
@@ -71,6 +75,56 @@ namespace TemuKJD.KJDForms.ToolForms
|
||||
this.pictureBox1.TabIndex = 0;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// btnCopy
|
||||
//
|
||||
this.btnCopy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnCopy.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnCopy.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnCopy.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnCopy.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnCopy.Location = new System.Drawing.Point(338, 4);
|
||||
this.btnCopy.Name = "btnCopy";
|
||||
this.btnCopy.Size = new System.Drawing.Size(65, 26);
|
||||
this.btnCopy.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnCopy.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnCopy.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnCopy.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnCopy.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnCopy.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnCopy.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnCopy.Style.GradientAngle = 90;
|
||||
this.btnCopy.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnCopy.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnCopy.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnCopy.TabIndex = 492;
|
||||
this.btnCopy.Text = "复制图片";
|
||||
this.btnCopy.Click += new System.EventHandler(this.btnCopy_Click);
|
||||
//
|
||||
// btnCopyUrl
|
||||
//
|
||||
this.btnCopyUrl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnCopyUrl.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnCopyUrl.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnCopyUrl.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnCopyUrl.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnCopyUrl.Location = new System.Drawing.Point(237, 4);
|
||||
this.btnCopyUrl.Name = "btnCopyUrl";
|
||||
this.btnCopyUrl.Size = new System.Drawing.Size(94, 26);
|
||||
this.btnCopyUrl.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnCopyUrl.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnCopyUrl.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnCopyUrl.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnCopyUrl.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnCopyUrl.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnCopyUrl.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnCopyUrl.Style.GradientAngle = 90;
|
||||
this.btnCopyUrl.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnCopyUrl.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnCopyUrl.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnCopyUrl.TabIndex = 488;
|
||||
this.btnCopyUrl.Text = "复制图片地址";
|
||||
this.btnCopyUrl.Click += new System.EventHandler(this.btnCopyUrl_Click);
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
@@ -105,6 +159,7 @@ namespace TemuKJD.KJDForms.ToolForms
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.KeyPreview = true;
|
||||
this.Name = "ShowImgForm";
|
||||
this.ShowMaximizeBox = true;
|
||||
this.Text = "图片查看";
|
||||
this.TitleText = "图片查看";
|
||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ShowImgForm_KeyDown);
|
||||
@@ -123,5 +178,7 @@ namespace TemuKJD.KJDForms.ToolForms
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private DevComponents.DotNetBar.PanelEx btnSave;
|
||||
private DevComponents.DotNetBar.PanelEx btnCopy;
|
||||
private DevComponents.DotNetBar.PanelEx btnCopyUrl;
|
||||
}
|
||||
}
|
||||
@@ -44,5 +44,31 @@ namespace TemuKJD.KJDForms.ToolForms
|
||||
case Keys.Escape: this.Close(); break;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnCopyUrl_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Clipboard.SetText(currentImgUrl); // 设置剪贴板内容
|
||||
BaseMsgForm.ShowInfo("图片地址已复制到剪贴板");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgForm.ShowError("复制图片地址到剪贴板失败: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnCopy_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Clipboard.SetImage(this.pictureBox1.Image); // 设置剪贴板内容
|
||||
BaseMsgForm.ShowInfo("图片已复制到剪贴板");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgForm.ShowError("复制图片到剪贴板失败: " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user