### 2021-09-02更新
------ #### SuperDesign V2.0.2109.0202 - *.[改进]网页获取工具的地址下拉提示使用新版objectlistview控件。
This commit is contained in:
1 parent
d402952ed5
commit
36224cc16e
20 files changed
+261
-4773
No files matched your search
Binary file not shown.
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
||||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||
// 方法是按如下所示使用“*”: :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.0.2109.0201")]
|
||||
[assembly: AssemblyFileVersion("2.0.2109.0201")]
|
||||
[assembly: AssemblyVersion("2.0.2109.0202")]
|
||||
[assembly: AssemblyFileVersion("2.0.2109.0202")]
|
||||
+1
-1
@@ -19,7 +19,7 @@ namespace SuperDesign.Properties {
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ namespace SuperDesign.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.2.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>SuperDesign</RootNamespace>
|
||||
<AssemblyName>SuperDesign</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
@@ -54,7 +54,9 @@
|
||||
<Reference Include="ryControls">
|
||||
<HintPath>..\..\Bin\Debug\SupperDesign\ryControls.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System">
|
||||
<HintPath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
|
||||
+164
-164
@@ -1,165 +1,165 @@
|
||||
using _SCREEN_CAPTURE;
|
||||
using _SCREEN_CAPTURE;
|
||||
using ryCommon._SCREEN_CAPTURE;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
using ZXing;
|
||||
|
||||
namespace 开发辅助工具.Tools
|
||||
{
|
||||
public partial class FrmQrCode : DockContent
|
||||
{
|
||||
public FrmQrCode()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
/// <summary>
|
||||
/// 生成二维码图片
|
||||
/// </summary>
|
||||
/// <param name="strMessage">要生成二维码的字符串</param>
|
||||
/// <param name="width">二维码图片宽度</param>
|
||||
/// <param name="height">二维码图片高度</param>
|
||||
/// <returns></returns>
|
||||
private Bitmap CreateQrCode(String strMessage, Int32 width, Int32 height)
|
||||
{
|
||||
Bitmap result = null;
|
||||
try
|
||||
{
|
||||
BarcodeWriter barCodeWriter = new BarcodeWriter
|
||||
{
|
||||
Format = BarcodeFormat.QR_CODE
|
||||
};
|
||||
barCodeWriter.Options.Hints.Add(EncodeHintType.CHARACTER_SET, "UTF-8");
|
||||
barCodeWriter.Options.Hints.Add(EncodeHintType.ERROR_CORRECTION, ZXing.QrCode.Internal.ErrorCorrectionLevel.H);
|
||||
barCodeWriter.Options.Height = height;
|
||||
barCodeWriter.Options.Width = width;
|
||||
barCodeWriter.Options.Margin = 0;
|
||||
ZXing.Common.BitMatrix bm = barCodeWriter.Encode(strMessage);
|
||||
result = barCodeWriter.Write(bm);
|
||||
Bitmap qr_bg = (Bitmap)ryCommon.RyFiles.LoadPicFromFile(Application.StartupPath + "\\mod\\qr_bg.jpg");
|
||||
Graphics g = Graphics.FromImage(qr_bg);
|
||||
g.DrawImage(result, new Rectangle(25, 25, qr_bg.Width - 50, qr_bg.Height - 50));
|
||||
result = qr_bg;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//异常输出
|
||||
}
|
||||
return result;
|
||||
}
|
||||
private void BtnCreate_Click(object sender, EventArgs e)
|
||||
{
|
||||
pictureBox1.Image= CreateQrCode(TxtFromStr.Text, 256, 256);
|
||||
}
|
||||
|
||||
private void BtnBrowser_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(openFileDialog1.ShowDialog()==DialogResult.OK)
|
||||
{
|
||||
TxtQrCodePath.Text = openFileDialog1.FileName;
|
||||
BtnAnaly.PerformClick();
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnAnaly_Click(object sender, EventArgs e)
|
||||
{
|
||||
string path = TxtQrCodePath.Text;
|
||||
if (!System.IO.File.Exists(path)) { Init(); return; }
|
||||
var img = ryCommon.RyFiles.LoadPicFromFile(path);
|
||||
if (img == null) { Init(); return; }
|
||||
Bitmap bmap;
|
||||
try
|
||||
{
|
||||
bmap = new Bitmap(img);
|
||||
}
|
||||
catch (System.IO.IOException ioe)
|
||||
{
|
||||
MessageBox.Show(ioe.ToString(),"提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
if (bmap == null)
|
||||
{
|
||||
MessageBox.Show("不能解码图片","提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
BarcodeReader reader = new BarcodeReader();
|
||||
reader.Options.CharacterSet = "UTF-8";
|
||||
var result = reader.Decode(bmap);
|
||||
TxtToResult.Text = (result == null) ? "" : result.Text;
|
||||
pictureBox2.Image = img;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Init();
|
||||
MessageBox.Show("解析二维码失败。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
void Init()
|
||||
{
|
||||
pictureBox2.Image = null; TxtToResult.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
private void PictureBox1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(saveFileDialog1.ShowDialog()==DialogResult.OK)
|
||||
{
|
||||
try
|
||||
{
|
||||
pictureBox1.Image.Save(saveFileDialog1.FileName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnCapture_Click(object sender, EventArgs e)
|
||||
{
|
||||
ScreenCapture capture = new ScreenCapture();
|
||||
Bitmap m = capture.StartCapture(false);
|
||||
if (m != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
BarcodeReader reader = new BarcodeReader();
|
||||
reader.Options.CharacterSet = "UTF-8";
|
||||
var result = reader.Decode(m);
|
||||
TxtToResult.Text = (result == null) ? "" : result.Text;
|
||||
pictureBox2.Image = m;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Init();
|
||||
MessageBox.Show("解析二维码失败。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
void Init()
|
||||
{
|
||||
pictureBox2.Image = null; TxtToResult.Text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void TxtFromStr_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
ryControls.TextBoxEx2 txt = (ryControls.TextBoxEx2)sender;
|
||||
开发辅助工具.Controls.FrmText frm = new Controls.FrmText
|
||||
{
|
||||
Icon = Icon
|
||||
};
|
||||
frm.richTextBox1.Text = txt.Text;
|
||||
if (frm.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
txt.Text = frm.richTextBox1.Text;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
using ZXing;
|
||||
|
||||
namespace 开发辅助工具.Tools
|
||||
{
|
||||
public partial class FrmQrCode : DockContent
|
||||
{
|
||||
public FrmQrCode()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
/// <summary>
|
||||
/// 生成二维码图片
|
||||
/// </summary>
|
||||
/// <param name="strMessage">要生成二维码的字符串</param>
|
||||
/// <param name="width">二维码图片宽度</param>
|
||||
/// <param name="height">二维码图片高度</param>
|
||||
/// <returns></returns>
|
||||
private Bitmap CreateQrCode(String strMessage, Int32 width, Int32 height)
|
||||
{
|
||||
Bitmap result = null;
|
||||
try
|
||||
{
|
||||
BarcodeWriter barCodeWriter = new BarcodeWriter
|
||||
{
|
||||
Format = BarcodeFormat.QR_CODE
|
||||
};
|
||||
barCodeWriter.Options.Hints.Add(EncodeHintType.CHARACTER_SET, "UTF-8");
|
||||
barCodeWriter.Options.Hints.Add(EncodeHintType.ERROR_CORRECTION, ZXing.QrCode.Internal.ErrorCorrectionLevel.H);
|
||||
barCodeWriter.Options.Height = height;
|
||||
barCodeWriter.Options.Width = width;
|
||||
barCodeWriter.Options.Margin = 0;
|
||||
ZXing.Common.BitMatrix bm = barCodeWriter.Encode(strMessage);
|
||||
result = barCodeWriter.Write(bm);
|
||||
Bitmap qr_bg = (Bitmap)ryCommon.RyFiles.LoadPicFromFile(Application.StartupPath + "\\mod\\qr_bg.jpg");
|
||||
Graphics g = Graphics.FromImage(qr_bg);
|
||||
g.DrawImage(result, new Rectangle(25, 25, qr_bg.Width - 50, qr_bg.Height - 50));
|
||||
result = qr_bg;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//异常输出
|
||||
}
|
||||
return result;
|
||||
}
|
||||
private void BtnCreate_Click(object sender, EventArgs e)
|
||||
{
|
||||
pictureBox1.Image= CreateQrCode(TxtFromStr.Text, 256, 256);
|
||||
}
|
||||
|
||||
private void BtnBrowser_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(openFileDialog1.ShowDialog()==DialogResult.OK)
|
||||
{
|
||||
TxtQrCodePath.Text = openFileDialog1.FileName;
|
||||
BtnAnaly.PerformClick();
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnAnaly_Click(object sender, EventArgs e)
|
||||
{
|
||||
string path = TxtQrCodePath.Text;
|
||||
if (!System.IO.File.Exists(path)) { Init(); return; }
|
||||
var img = ryCommon.RyFiles.LoadPicFromFile(path);
|
||||
if (img == null) { Init(); return; }
|
||||
Bitmap bmap;
|
||||
try
|
||||
{
|
||||
bmap = new Bitmap(img);
|
||||
}
|
||||
catch (System.IO.IOException ioe)
|
||||
{
|
||||
MessageBox.Show(ioe.ToString(),"提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
if (bmap == null)
|
||||
{
|
||||
MessageBox.Show("不能解码图片","提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
BarcodeReader reader = new BarcodeReader();
|
||||
reader.Options.CharacterSet = "UTF-8";
|
||||
var result = reader.Decode(bmap);
|
||||
TxtToResult.Text = (result == null) ? "" : result.Text;
|
||||
pictureBox2.Image = img;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Init();
|
||||
MessageBox.Show("解析二维码失败。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
void Init()
|
||||
{
|
||||
pictureBox2.Image = null; TxtToResult.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
private void PictureBox1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(saveFileDialog1.ShowDialog()==DialogResult.OK)
|
||||
{
|
||||
try
|
||||
{
|
||||
pictureBox1.Image.Save(saveFileDialog1.FileName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnCapture_Click(object sender, EventArgs e)
|
||||
{
|
||||
ScreenCapture capture = new ScreenCapture();
|
||||
Bitmap m = capture.StartCapture(false);
|
||||
if (m != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
BarcodeReader reader = new BarcodeReader();
|
||||
reader.Options.CharacterSet = "UTF-8";
|
||||
var result = reader.Decode(m);
|
||||
TxtToResult.Text = (result == null) ? "" : result.Text;
|
||||
pictureBox2.Image = m;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Init();
|
||||
MessageBox.Show("解析二维码失败。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
void Init()
|
||||
{
|
||||
pictureBox2.Image = null; TxtToResult.Text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void TxtFromStr_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
ryControls.TextBoxEx2 txt = (ryControls.TextBoxEx2)sender;
|
||||
开发辅助工具.Controls.FrmText frm = new Controls.FrmText
|
||||
{
|
||||
Icon = Icon
|
||||
};
|
||||
frm.richTextBox1.Text = txt.Text;
|
||||
if (frm.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
txt.Text = frm.richTextBox1.Text;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+46
-37
@@ -82,12 +82,12 @@
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
|
||||
this.BtnCtreateCShape = new ryControls.ButtonEx();
|
||||
this.columnModel1 = new XPTable.Models.ColumnModel();
|
||||
this.ColUrl = new XPTable.Models.TextColumn();
|
||||
this.ColTitle = new XPTable.Models.TextColumn();
|
||||
this.tableModel1 = new XPTable.Models.TableModel();
|
||||
this.table1 = new XPTable.Models.Table();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.objectListView2 = new BrightIdeasSoftware.ObjectListView();
|
||||
this.OlvUrl = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
|
||||
this.OlvName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
|
||||
this.tabControl2.SuspendLayout();
|
||||
this.tabPage3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
@@ -103,7 +103,7 @@
|
||||
this.tabPage7.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.objectListView2)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// ChkUrlLower
|
||||
@@ -190,6 +190,7 @@
|
||||
this.Te_Format.ContextMenuStrip = this.contextMenuStripHighlightText1;
|
||||
this.Te_Format.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
this.Te_Format.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.Te_Format.ImeMode = System.Windows.Forms.ImeMode.On;
|
||||
this.Te_Format.Location = new System.Drawing.Point(3, 3);
|
||||
this.Te_Format.Name = "Te_Format";
|
||||
this.Te_Format.Size = new System.Drawing.Size(875, 274);
|
||||
@@ -346,6 +347,7 @@
|
||||
this.TxtPost.Size = new System.Drawing.Size(862, 83);
|
||||
this.TxtPost.TabIndex = 2;
|
||||
this.TxtPost.Text = "";
|
||||
this.TxtPost.WordWrap = false;
|
||||
this.TxtPost.TextChanged += new System.EventHandler(this.TxtPost_TextChanged);
|
||||
this.TxtPost.DoubleClick += new System.EventHandler(this.TxtPost_DoubleClick);
|
||||
//
|
||||
@@ -375,6 +377,7 @@
|
||||
this.TxtCookie.Size = new System.Drawing.Size(862, 83);
|
||||
this.TxtCookie.TabIndex = 6;
|
||||
this.TxtCookie.Text = "";
|
||||
this.TxtCookie.WordWrap = false;
|
||||
this.TxtCookie.TextChanged += new System.EventHandler(this.TxtCookie_TextChanged);
|
||||
this.TxtCookie.DoubleClick += new System.EventHandler(this.TxtPost_DoubleClick);
|
||||
//
|
||||
@@ -404,6 +407,7 @@
|
||||
this.TxtInputHeader.Size = new System.Drawing.Size(862, 83);
|
||||
this.TxtInputHeader.TabIndex = 7;
|
||||
this.TxtInputHeader.Text = "";
|
||||
this.TxtInputHeader.WordWrap = false;
|
||||
this.TxtInputHeader.TextChanged += new System.EventHandler(this.TxtInputHeader_TextChanged);
|
||||
this.TxtInputHeader.DoubleClick += new System.EventHandler(this.TxtPost_DoubleClick);
|
||||
//
|
||||
@@ -752,12 +756,6 @@
|
||||
this.BtnCtreateCShape.UseVisualStyleBackColor = true;
|
||||
this.BtnCtreateCShape.Click += new System.EventHandler(this.BtnCtreateCShape_Click);
|
||||
//
|
||||
// columnModel1
|
||||
//
|
||||
this.columnModel1.Columns.AddRange(new XPTable.Models.Column[] {
|
||||
this.ColUrl,
|
||||
this.ColTitle});
|
||||
//
|
||||
// ColUrl
|
||||
//
|
||||
this.ColUrl.Editable = false;
|
||||
@@ -772,38 +770,50 @@
|
||||
this.ColTitle.Text = "名称";
|
||||
this.ColTitle.Width = 200;
|
||||
//
|
||||
// table1
|
||||
//
|
||||
this.table1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.table1.ColumnModel = this.columnModel1;
|
||||
this.table1.EnableToolTips = true;
|
||||
this.table1.FullRowSelect = true;
|
||||
this.table1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
|
||||
this.table1.Location = new System.Drawing.Point(45, 30);
|
||||
this.table1.Name = "table1";
|
||||
this.table1.NoItemsText = "当前列表没有任何项";
|
||||
this.table1.Size = new System.Drawing.Size(657, 347);
|
||||
this.table1.TabIndex = 112;
|
||||
this.table1.TableModel = this.tableModel1;
|
||||
this.table1.Text = "table1";
|
||||
this.table1.Visible = false;
|
||||
this.table1.CellLostFocus += new XPTable.Events.CellFocusEventHandler(this.Table1_CellLostFocus);
|
||||
this.table1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Table1_KeyDown);
|
||||
this.table1.Leave += new System.EventHandler(this.Table1_Leave);
|
||||
this.table1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.table1_MouseClick);
|
||||
//
|
||||
// timer1
|
||||
//
|
||||
this.timer1.Interval = 1000;
|
||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
//
|
||||
// objectListView2
|
||||
//
|
||||
this.objectListView2.AllColumns.Add(this.OlvUrl);
|
||||
this.objectListView2.AllColumns.Add(this.OlvName);
|
||||
this.objectListView2.CellEditUseWholeCell = false;
|
||||
this.objectListView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.OlvUrl,
|
||||
this.OlvName});
|
||||
this.objectListView2.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.objectListView2.FullRowSelect = true;
|
||||
this.objectListView2.HideSelection = false;
|
||||
this.objectListView2.Location = new System.Drawing.Point(43, 30);
|
||||
this.objectListView2.Name = "objectListView2";
|
||||
this.objectListView2.RowHeight = 25;
|
||||
this.objectListView2.ShowGroups = false;
|
||||
this.objectListView2.Size = new System.Drawing.Size(653, 323);
|
||||
this.objectListView2.TabIndex = 113;
|
||||
this.objectListView2.UseCompatibleStateImageBehavior = false;
|
||||
this.objectListView2.View = System.Windows.Forms.View.Details;
|
||||
this.objectListView2.Visible = false;
|
||||
this.objectListView2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Table1_KeyDown);
|
||||
this.objectListView2.Leave += new System.EventHandler(this.Table1_Leave);
|
||||
//
|
||||
// OlvUrl
|
||||
//
|
||||
this.OlvUrl.Text = "网址";
|
||||
this.OlvUrl.Width = 430;
|
||||
//
|
||||
// OlvName
|
||||
//
|
||||
this.OlvName.Text = "名称";
|
||||
this.OlvName.Width = 200;
|
||||
//
|
||||
// FrmWebGet
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(909, 620);
|
||||
this.Controls.Add(this.objectListView2);
|
||||
this.Controls.Add(this.TxtUrl);
|
||||
this.Controls.Add(this.BtnCtreateCShape);
|
||||
this.Controls.Add(this.ChkUrlLower);
|
||||
@@ -815,7 +825,6 @@
|
||||
this.Controls.Add(this.RbPost);
|
||||
this.Controls.Add(this.RbGet);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.table1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "FrmWebGet";
|
||||
this.TabPageContextMenuStrip = this.menuRight1;
|
||||
@@ -839,7 +848,7 @@
|
||||
this.groupBox2.PerformLayout();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.table1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.objectListView2)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -887,9 +896,6 @@
|
||||
private ryProcessManager.hezuo.ContextMenuStripHighlightText contextMenuStripHighlightText1;
|
||||
private ryPaiban.Model.MenuRight menuRight1;
|
||||
private ryControls.ButtonEx BtnCtreateCShape;
|
||||
private XPTable.Models.ColumnModel columnModel1;
|
||||
private XPTable.Models.TableModel tableModel1;
|
||||
private XPTable.Models.Table table1;
|
||||
private XPTable.Models.TextColumn ColUrl;
|
||||
private XPTable.Models.TextColumn ColTitle;
|
||||
private System.Windows.Forms.Timer timer1;
|
||||
@@ -905,5 +911,8 @@
|
||||
private System.Windows.Forms.CheckBox ChkHtmlPreview;
|
||||
private System.Windows.Forms.CheckBox ChkNoPreview;
|
||||
private FastColoredTextBoxNS.FastColoredTextBox Te_Format;
|
||||
private BrightIdeasSoftware.ObjectListView objectListView2;
|
||||
private BrightIdeasSoftware.OLVColumn OlvUrl;
|
||||
private BrightIdeasSoftware.OLVColumn OlvName;
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,8 @@ namespace 开发辅助工具.Tools
|
||||
Te_Format.AutoIndentNeeded -= fctb_AutoIndentNeeded;
|
||||
Te_Format.Language = Language.JSON;
|
||||
Te_Format.OnSyntaxHighlight(new TextChangedEventArgs(Te_Format.Range));
|
||||
|
||||
OlvName.AspectGetter = delegate (object x) { return ((UrlInfo)x).Name; };
|
||||
OlvUrl.AspectGetter = delegate (object x) { return ((UrlInfo)x).Url; };
|
||||
}
|
||||
private void fctb_AutoIndentNeeded(object sender, AutoIndentEventArgs args)
|
||||
{
|
||||
@@ -447,11 +448,11 @@ namespace 开发辅助工具.Tools
|
||||
}
|
||||
else if (e.KeyCode == Keys.Down)
|
||||
{
|
||||
if (table1.Visible)
|
||||
if (objectListView2.Visible)
|
||||
{
|
||||
table1.TableModel.Selections.Clear();
|
||||
table1.TableModel.Selections.AddCells(0, 0, 0, columnModel1.Columns.Count - 1);
|
||||
table1.Focus();
|
||||
objectListView2.SelectedObject = null;
|
||||
objectListView2.SelectedIndex = 0;
|
||||
objectListView2.Focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -475,7 +476,7 @@ namespace 开发辅助工具.Tools
|
||||
|
||||
private void Gb_Click(object sender, EventArgs e)
|
||||
{
|
||||
table1.Visible = false;
|
||||
objectListView2.Visible = false;
|
||||
//RbGet.Focus();
|
||||
switch ((this.DockPanel.FindForm()))
|
||||
{
|
||||
@@ -654,12 +655,13 @@ namespace 开发辅助工具.Tools
|
||||
bool proc_use = false;
|
||||
private void ClickItem(bool run = false)
|
||||
{
|
||||
if (table1.SelectedItems.Length > 0)
|
||||
if (objectListView2.SelectedObject!=null)
|
||||
{
|
||||
table1.Visible = false;
|
||||
var item = (UrlInfo)objectListView2.SelectedObject;
|
||||
objectListView2.Visible = false;
|
||||
Application.DoEvents();
|
||||
proc_use = true;
|
||||
string url = table1.SelectedItems[0].Cells[ColUrl.Index].Text;
|
||||
string url = item.Url;
|
||||
DataProvider mydb = new DataProvider();
|
||||
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||
@@ -699,16 +701,17 @@ namespace 开发辅助工具.Tools
|
||||
{ BtnRunHtml.PerformClick(); }
|
||||
proc_use = false;
|
||||
}
|
||||
else { table1.Visible = false; }
|
||||
else { objectListView2.Visible = false; }
|
||||
}
|
||||
private void Table1_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Up)
|
||||
{
|
||||
if (table1.SelectedItems.Length > 0 && table1.SelectedItems[0].Index == 0)
|
||||
if (objectListView2.SelectedObject!=null && objectListView2.SelectedIndex==0)
|
||||
{
|
||||
table1.TableModel.Selections.Clear();
|
||||
objectListView2.SelectedObject = null;
|
||||
TxtUrl.Select();
|
||||
TxtUrl.Focus();
|
||||
//rySearch1.Select();
|
||||
}
|
||||
}
|
||||
@@ -724,8 +727,8 @@ namespace 开发辅助工具.Tools
|
||||
string sql_where = "";
|
||||
if (TxtUrl.Text != "") { sql_where = " where (Name like @SearchText or Url like @SearchText)"; }
|
||||
#region 重新载入数据
|
||||
tableModel1.Rows.Clear();
|
||||
tableModel1.Selections.Clear();
|
||||
objectListView2.ClearObjects();
|
||||
List<UrlInfo> list = new List<UrlInfo>();
|
||||
DataProvider mydb = new DataProvider();
|
||||
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
||||
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
||||
@@ -736,52 +739,47 @@ namespace 开发辅助工具.Tools
|
||||
{
|
||||
DataRow row = ds.Tables[0].Rows[i];
|
||||
DateTime editTime = row["editTime"].ToDateTime();
|
||||
XPTable.Models.Row itemList = new XPTable.Models.Row()
|
||||
{
|
||||
Tag = row["id"].ToString()
|
||||
};
|
||||
//需要修改此处
|
||||
itemList.Cells.Add(new XPTable.Models.Cell(row["Url"].ToString()));//示例
|
||||
itemList.Cells.Add(new XPTable.Models.Cell(row["Name"].ToString()));
|
||||
var item = new UrlInfo() { Id = row["id"].ToInt(), Name = row["Name"].ToString(), Url = row["Url"].ToString() };
|
||||
if (editTime >= DateTime.Now.AddMinutes(-10))
|
||||
{
|
||||
tableModel1.Rows.Insert(0,itemList);
|
||||
list.Insert(0,item);
|
||||
}
|
||||
else
|
||||
{
|
||||
tableModel1.Rows.Add(itemList);
|
||||
list.Add(item);
|
||||
}
|
||||
}
|
||||
db.Free();
|
||||
table1.Visible = tableModel1.Rows.Count != 0;
|
||||
table1.BringToFront();
|
||||
objectListView2.AddObjects(list);
|
||||
objectListView2.Visible = list.Count != 0;
|
||||
objectListView2.BringToFront();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
private void FrmWebGet_Click(object sender, EventArgs e)
|
||||
{
|
||||
table1.Visible = false;
|
||||
objectListView2.Visible = false;
|
||||
}
|
||||
|
||||
private void Table1_CellLostFocus(object sender, XPTable.Events.CellFocusEventArgs e)
|
||||
{
|
||||
if (e.Row == -1) { table1.Visible = false; }
|
||||
if (e.Row == -1) { objectListView2.Visible = false; }
|
||||
}
|
||||
|
||||
private void Table1_Leave(object sender, EventArgs e)
|
||||
{
|
||||
if(!TxtUrl.Focused)
|
||||
{
|
||||
table1.Visible = false;
|
||||
objectListView2.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void TxtUrl_Leave(object sender, EventArgs e)
|
||||
{
|
||||
if (!table1.Focused)
|
||||
if (!objectListView2.Focused)
|
||||
{
|
||||
table1.Visible = false;
|
||||
objectListView2.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -835,6 +833,12 @@ namespace 开发辅助工具.Tools
|
||||
ChkHtmlPreview.Enabled = !ChkNoPreview.Checked;
|
||||
}
|
||||
}
|
||||
public class UrlInfo
|
||||
{
|
||||
public int Id { get; set; }=0;
|
||||
public string Url { get; set; } = "";
|
||||
public string Name { get; set; } = "";
|
||||
}
|
||||
public class UserAgentInfo
|
||||
{
|
||||
public string name = "";
|
||||
|
||||
@@ -126,12 +126,6 @@
|
||||
<metadata name="menuRight1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>842, 25</value>
|
||||
</metadata>
|
||||
<metadata name="columnModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>269, 25</value>
|
||||
</metadata>
|
||||
<metadata name="tableModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>410, 25</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/></startup></configuration>
|
||||
Reference in new issue
Block a user