### 2024-12-20 星期五更新

------
#### SuperDesign    V3.0.2412.2001
- *.[新增]新增程序更新日志设置和自动发布功能。
- *.[修复]修复Post数据格式不正确时双击文本框会导致软件闪退的BUG。
This commit is contained in:
zilinsoft committed 2024-12-20 08:15:19 +08:00
1 parent 03bcb8c5fd
commit 993f1ca1a9
349 files changed
+81977 -13873

No files matched your search

@@ -0,0 +1 @@
{"RootPath":"E:\\My Datas\\My Codes\\毕方项目\\CSharp\\SuperDesign\\Source\\开发辅助工具","ProjectFileName":"SuperDesign.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"Controls\\Highlight\\AutoComplete\\AutocompleteItem.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\AutocompleteItems.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\AutocompleteListView.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\AutocompleteMenu.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\AutocompleteMenuHost.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\Colors.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\EventArgs.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\IAutocompleteListView.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\ITextBoxWrapper.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\Range.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\ScintillaWrapper.cs"},{"SourceFile":"Controls\\Highlight\\AutoComplete\\TextBoxWrapper.cs"},{"SourceFile":"Controls\\Highlight\\CharacterRange.cs"},{"SourceFile":"Controls\\Highlight\\ContextMenuStripHighlightText2.cs"},{"SourceFile":"Controls\\Highlight\\ContextMenuStripHighlightText2.Designer.cs"},{"SourceFile":"Controls\\ContextMenuStripRichText.cs"},{"SourceFile":"Controls\\ContextMenuStripRichText.Designer.cs"},{"SourceFile":"Controls\\FrmInsertUnixTime.cs"},{"SourceFile":"Controls\\FrmInsertUnixTime.Designer.cs"},{"SourceFile":"Controls\\FrmText.cs"},{"SourceFile":"Controls\\FrmText.Designer.cs"},{"SourceFile":"Controls\\FrmTitle.cs"},{"SourceFile":"Controls\\FrmTitle.Designer.cs"},{"SourceFile":"Controls\\Highlight\\FindAllResults\\FindAllResultsPanel.cs"},{"SourceFile":"Controls\\Highlight\\FindAllResults\\FindAllResultsPanel.Designer.cs"},{"SourceFile":"Controls\\Highlight\\FindReplace\\FindConfig.cs"},{"SourceFile":"Controls\\Highlight\\FindReplace\\FindConfig.Designer.cs"},{"SourceFile":"Controls\\Highlight\\FindReplace\\FindOption.cs"},{"SourceFile":"Controls\\Highlight\\FindReplace\\FindReplace.cs"},{"SourceFile":"Controls\\Highlight\\FindReplace\\FindReplaceDialog.cs"},{"SourceFile":"Controls\\Highlight\\FindReplace\\FindReplaceDialog.Designer.cs"},{"SourceFile":"Controls\\Highlight\\FindReplace\\IncrementalSearcher.cs"},{"SourceFile":"Controls\\Highlight\\FindReplace\\IncrementalSearcher.Designer.cs"},{"SourceFile":"Controls\\Highlight\\FindReplace\\ToolStripIncrementalSearcher.cs"},{"SourceFile":"Controls\\Highlight\\GoTo\\GoTo.cs"},{"SourceFile":"Controls\\Highlight\\GoTo\\GoToDialog.cs"},{"SourceFile":"Controls\\Highlight\\GoTo\\GoToDialog.Designer.cs"},{"SourceFile":"Controls\\Highlight\\HighlightEditor.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerBatch.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerCommon.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerCpp.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerCs.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerCss.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerHtml.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerIni.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerInnoSetup.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerJava.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerJavaScript.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerJson.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerNsis.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerNull.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerPascal.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerPhp.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerPowerShell.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerPython.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerSql.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerVb.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerXml.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\CreateLexerYaml.cs"},{"SourceFile":"Controls\\Highlight\\VPKSoft.ScintillaLexers\\CreateSpecificLexer\\LexerFoldProperties.cs"},{"SLine truncated
@@ -15,7 +15,7 @@ namespace 开发辅助工具.Controls
{
InitializeComponent();
}
public bool IsJsTime { get; set; } = false;
private void BtnOK_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
+2 -2
View File
@@ -32,7 +32,7 @@
this.BtnSave = new ryControls.ButtonEx();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.contextMenuStripRichText1 = new ryProcessManager.hezuo.ContextMenuStripRichText();
this.highlightEditor1 = new ryControls.HighlightEditor();
this.highlightEditor1 = new ScintillaNETV2.Highlight.HighlightEditor();
this.panelEx1.SuspendLayout();
this.SuspendLayout();
//
@@ -114,6 +114,6 @@
private ryControls.ButtonEx BtnSave;
private ryProcessManager.hezuo.ContextMenuStripRichText contextMenuStripRichText1;
public System.Windows.Forms.RichTextBox richTextBox1;
public ryControls.HighlightEditor highlightEditor1;
public ScintillaNETV2.Highlight.HighlightEditor highlightEditor1;
}
}
@@ -34,6 +34,10 @@ namespace ScintillaNET_FindReplaceDialog
/// <summary>
/// 所在行文本
/// </summary>
public string LineText { get; set; } = "";
/// <summary>
/// 所在行文本
/// </summary>
public string RangeText { get; set; } ="";
/// <summary>
/// 选择区域是否是空
@@ -43,6 +47,21 @@ namespace ScintillaNET_FindReplaceDialog
{
return CpMin == CpMax;
}
public override bool Equals(object obj) {
if(obj == null) return false;
if(this == obj) return true;
if(obj is CharacterRange x2) {
if(x2.CpMin== CpMin && x2.CpMax==CpMax) {
return true;
}
else { return false; }
}
return false;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
/// <summary>
/// Specifies a range of characters. If the cpMin and cpMax members are equal, the range is empty.
/// The range includes everything if cpMin is 0 and cpMax is –1.
@@ -46,7 +46,6 @@
this.FindResultsScintilla.TabIndents = true;
this.FindResultsScintilla.TabIndex = 4;
this.FindResultsScintilla.Text = "搜索结果";
this.FindResultsScintilla.UseRightToLeftReadingLayout = false;
this.FindResultsScintilla.WrapMode = ScintillaNET.WrapMode.None;
this.FindResultsScintilla.KeyUp += new System.Windows.Forms.KeyEventHandler(this.FindResultsScintilla_KeyUp);
this.FindResultsScintilla.MouseClick += new System.Windows.Forms.MouseEventHandler(this.FindResultsScintilla_MouseClick);
@@ -96,7 +96,7 @@
//int LinePos = item_range.LinePos;
//int startPosInLine = item_range.CpMin - LinePos;
FindResultsScintilla.IndicatorCurrent = _indicator.Index;
FindResultsScintilla.IndicatorFillRange(lastLineStartPos + resultsLinePrefix.Length, item_file.Value.Result.CpMax - item_file.Value.Result.CpMin);
FindResultsScintilla.IndicatorFillRange(lastLineStartPos + resultsLinePrefix.Length+1, item_file.Value.Result.CpMax - item_file.Value.Result.CpMin);
}
}
FindResultsScintilla.ReadOnly = true;
@@ -158,4 +158,9 @@
#endregion Methods
}
public class FindResult
{
public string Path { get; set; } = "";
public ScintillaNET_FindReplaceDialog.CharacterRange Result { get; set; }
}
}
@@ -8,6 +8,7 @@ namespace ScintillaNET_FindReplaceDialog
using System.Drawing;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
[TypeConverterAttribute(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class FindReplace : Component
@@ -864,14 +865,24 @@ namespace ScintillaNET_FindReplaceDialog
}
}
if (_scintilla.LineFromPosition(_scintilla.Selections[0].Start) != _scintilla.LineFromPosition(_scintilla.Selections[0].End)) //selRange.IsMultiLine)
if (_scintilla.LineFromPosition(_scintilla.Selections[0].Start) != _scintilla.LineFromPosition(_scintilla.Selections[0].End)) //selRange.IsMultiLine)
{
_window.chkSearchSelectionF.Checked = true;
}
_window.chkSearchSelectionR.Checked = true;
}
else if (_scintilla.Selections[0].End > _scintilla.Selections[0].Start)
{
_window.txtFindR.Text = _scintilla.SelectedText;
_window.TxtFileSearchText.Text = _scintilla.SelectedText;
_window.txtFindF.Text = _scintilla.SelectedText;
}
_window.chkSearchSelectionF.Checked = false;
_window.chkSearchSelectionR.Checked = false;
}
else
{
_window.chkSearchSelectionF.Checked = false;
_window.chkSearchSelectionR.Checked = false;
}
if (showTab == 0)
{
_window.tabAll.SelectedTab = _window.tabAll.TabPages["tpgFind"];
@@ -63,6 +63,7 @@ namespace ScintillaNET_FindReplaceDialog
this.cmdRecentReplace = new System.Windows.Forms.Button();
this.cmdRecentFindR = new System.Windows.Forms.Button();
this.tpgFileFind = new System.Windows.Forms.TabPage();
this.BtnBrowser = new System.Windows.Forms.Button();
this.fcFile = new SuperDesign.Controls.Highlight.FindReplace.FindConfig();
this.label2 = new System.Windows.Forms.Label();
this.NumLimitFileSize = new System.Windows.Forms.NumericUpDown();
@@ -167,7 +168,6 @@ namespace ScintillaNET_FindReplaceDialog
this.toolStripMenuItem51 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem50 = new System.Windows.Forms.ToolStripMenuItem();
this.nameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.BtnBrowser = new System.Windows.Forms.Button();
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
this.tabAll.SuspendLayout();
this.tpgFind.SuspendLayout();
@@ -246,6 +246,7 @@ namespace ScintillaNET_FindReplaceDialog
this.txtFindF.Name = "txtFindF";
this.txtFindF.Size = new System.Drawing.Size(408, 21);
this.txtFindF.TabIndex = 15;
this.txtFindF.TextChanged += new System.EventHandler(this.txtFindF_TextChanged);
//
// cmdRecentFindF
//
@@ -436,6 +437,7 @@ namespace ScintillaNET_FindReplaceDialog
this.txtReplace.Name = "txtReplace";
this.txtReplace.Size = new System.Drawing.Size(411, 21);
this.txtReplace.TabIndex = 21;
this.txtReplace.TextChanged += new System.EventHandler(this.txtReplace_TextChanged);
//
// txtFindR
//
@@ -446,6 +448,8 @@ namespace ScintillaNET_FindReplaceDialog
this.txtFindR.Name = "txtFindR";
this.txtFindR.Size = new System.Drawing.Size(411, 21);
this.txtFindR.TabIndex = 20;
this.txtFindR.SelectedIndexChanged += new System.EventHandler(this.txtFindR_SelectedIndexChanged);
this.txtFindR.TextChanged += new System.EventHandler(this.txtFindR_TextChanged);
//
// btnFindNextR
//
@@ -626,6 +630,16 @@ namespace ScintillaNET_FindReplaceDialog
this.tpgFileFind.Text = "文件夹查找";
this.tpgFileFind.UseVisualStyleBackColor = true;
//
// BtnBrowser
//
this.BtnBrowser.Location = new System.Drawing.Point(359, 86);
this.BtnBrowser.Name = "BtnBrowser";
this.BtnBrowser.Size = new System.Drawing.Size(27, 23);
this.BtnBrowser.TabIndex = 40;
this.BtnBrowser.Text = "...";
this.BtnBrowser.UseVisualStyleBackColor = true;
this.BtnBrowser.Click += new System.EventHandler(this.BtnBrowser_Click);
//
// fcFile
//
this.fcFile.FileWholeWord = false;
@@ -761,6 +775,7 @@ namespace ScintillaNET_FindReplaceDialog
this.TxtFileReplaceText.Name = "TxtFileReplaceText";
this.TxtFileReplaceText.Size = new System.Drawing.Size(312, 21);
this.TxtFileReplaceText.TabIndex = 27;
this.TxtFileReplaceText.TextChanged += new System.EventHandler(this.txtFindR_TextChanged);
//
// TxtFileSearchText
//
@@ -771,6 +786,7 @@ namespace ScintillaNET_FindReplaceDialog
this.TxtFileSearchText.Name = "TxtFileSearchText";
this.TxtFileSearchText.Size = new System.Drawing.Size(312, 21);
this.TxtFileSearchText.TabIndex = 26;
this.TxtFileSearchText.TextChanged += new System.EventHandler(this.txtFindF_TextChanged);
//
// TxtSearchPath
//
@@ -791,6 +807,7 @@ namespace ScintillaNET_FindReplaceDialog
this.TxtFileType.Size = new System.Drawing.Size(312, 21);
this.TxtFileType.TabIndex = 24;
this.TxtFileType.Text = "*.*";
this.TxtFileType.SelectedIndexChanged += new System.EventHandler(this.TxtFileType_SelectedIndexChanged);
//
// label5
//
@@ -1498,16 +1515,6 @@ namespace ScintillaNET_FindReplaceDialog
this.nameToolStripMenuItem.Size = new System.Drawing.Size(141, 22);
this.nameToolStripMenuItem.Text = "$(Name) 命名组";
//
// BtnBrowser
//
this.BtnBrowser.Location = new System.Drawing.Point(359, 86);
this.BtnBrowser.Name = "BtnBrowser";
this.BtnBrowser.Size = new System.Drawing.Size(27, 23);
this.BtnBrowser.TabIndex = 40;
this.BtnBrowser.Text = "...";
this.BtnBrowser.UseVisualStyleBackColor = true;
this.BtnBrowser.Click += new System.EventHandler(this.BtnBrowser_Click);
//
// FindReplaceDialog
//
this.AcceptButton = this.btnFindNextF;
@@ -1530,6 +1537,7 @@ namespace ScintillaNET_FindReplaceDialog
this.Activated += new System.EventHandler(this.FindReplaceDialog_Activated);
this.Deactivate += new System.EventHandler(this.FindReplaceDialog_Deactivate);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FindReplaceDialog_FormClosing);
this.Load += new System.EventHandler(this.FindReplaceDialog_Load);
this.tabAll.ResumeLayout(false);
this.tpgFind.ResumeLayout(false);
this.tpgFind.PerformLayout();
@@ -9,6 +9,7 @@ namespace ScintillaNET_FindReplaceDialog
using System.Drawing;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using static ScintillaNET.Style;
public partial class FindReplaceDialog : Form
{
@@ -38,6 +39,16 @@ namespace ScintillaNET_FindReplaceDialog
_autoPosition = true;
_mruFind = new List<string>();
_mruReplace = new List<string>();
var lst1 = RyFiles.ReadAllLines(Application.StartupPath + "\\UserDb\\mruFind.lst");
if (lst1 != null)
{
_mruFind.AddRange(lst1);
}
var lst2 = RyFiles.ReadAllLines(Application.StartupPath + "\\UserDb\\mruReplace.lst");
if (lst2 != null)
{
_mruReplace.AddRange(lst2);
}
_bindingSourceFind.DataSource = _mruFind;
_bindingSourceReplace.DataSource = _mruReplace;
txtFindF.DataSource = _bindingSourceFind;
@@ -45,15 +56,21 @@ namespace ScintillaNET_FindReplaceDialog
TxtFileSearchText.DataSource = _bindingSourceFind;
txtReplace.DataSource = _bindingSourceReplace;
TxtFileReplaceText.DataSource = _bindingSourceReplace;
ryCommon.Ini ini = new ryCommon.Ini(Application.StartupPath + "\\UserDb\\FindReplace.ini");
TxtFileType.Text = ini.ReadIni("FileFind", "Exts","*.*");
ChkSkipDirName.Checked = ini.ReadIni("FileFind", "SkipDirName_On",true);
CbbSkipDirName.Text = ini.ReadIni("FileFind", "SkipDirName_Text",CbbSkipDirName.Text);
ChkSubDir.Checked = ini.ReadIni("FileFind", "SearchSubDir", false);
ChkIgnoreBinExt.Checked = ini.ReadIni("FileFind", "IgnoreBinExt", true);
ChkHiddenDir.Checked = ini.ReadIni("FileFind", "SearchHiddenDir", false);
ChkLimitFileSize.Checked = ini.ReadIni("FileFind", "LimitFileSize_On", true);
NumLimitFileSize.Value = ini.ReadIni("FileFind", "LimitFileSize_Value",1,1000,20);
if (!DesignMode)
{
try
{
ryCommon.Ini ini = new ryCommon.Ini(Application.StartupPath + "\\UserDb\\FindReplace.ini");
TxtFileType.Text = ini.ReadIni("FileFind", "Exts", "*.*");
ChkSkipDirName.Checked = ini.ReadIni("FileFind", "SkipDirName_On", true);
CbbSkipDirName.Text = ini.ReadIni("FileFind", "SkipDirName_Text", CbbSkipDirName.Text);
ChkSubDir.Checked = ini.ReadIni("FileFind", "SearchSubDir", false);
ChkIgnoreBinExt.Checked = ini.ReadIni("FileFind", "IgnoreBinExt", true);
ChkHiddenDir.Checked = ini.ReadIni("FileFind", "SearchHiddenDir", false);
ChkLimitFileSize.Checked = ini.ReadIni("FileFind", "LimitFileSize_On", true);
NumLimitFileSize.Value = ini.ReadIni("FileFind", "LimitFileSize_Value", 1, 1000, 20); }
catch { }
}
LastTab = tpgFind;
LastFingConfig = fcFind;
}
@@ -136,6 +153,8 @@ namespace ScintillaNET_FindReplaceDialog
e.Cancel = true;
Hide();
}
RyFiles.WriteAllLines(Application.StartupPath + "\\UserDb\\mruFind.lst",_mruFind.ToArray(), System.Text.Encoding.UTF8);
RyFiles.WriteAllLines(Application.StartupPath + "\\UserDb\\mruReplace.lst", _mruReplace.ToArray(), System.Text.Encoding.UTF8);
}
#endregion Form Event Handlers
@@ -334,8 +353,7 @@ namespace ScintillaNET_FindReplaceDialog
else
lblStatus.Text = "搜索匹配换行到文档开头";
}
_scintilla.SetSel(nextRange.CpMin, nextRange.CpMax);
SetSel(nextRange.CpMin, nextRange.CpMax);
MoveFormAwayFromSelection();
}
}
@@ -420,7 +438,6 @@ namespace ScintillaNET_FindReplaceDialog
{
if (tabAll.SelectedTab == tpgFind)
{
txtFindF.Text = txtFindR.Text;
fcFind.LoadConfig(LastFingConfig);
chkWrapF.Checked = chkWrapR.Checked;
chkSearchSelectionF.Checked = chkSearchSelectionR.Checked;
@@ -428,21 +445,19 @@ namespace ScintillaNET_FindReplaceDialog
}
else if (tabAll.SelectedTab == tpgReplace)
{
txtFindR.Text = txtFindF.Text;
fcReplace.LoadConfig(LastFingConfig);
chkWrapR.Checked = chkWrapF.Checked;
chkSearchSelectionR.Checked = chkSearchSelectionF.Checked;
AcceptButton = btnReplaceNext;
}
else if (tabAll.SelectedTab == tpgFileFind)
{
TxtFileSearchText.Text = LastTab==tpgReplace? txtFindR.Text:txtFindF.Text;
fcFile.LoadConfig(LastFingConfig);
chkWrapR.Checked = chkWrapF.Checked;
chkSearchSelectionR.Checked = chkSearchSelectionF.Checked;
AcceptButton = btnReplaceNext;
}
SyncTextUI();
LastTab = tabAll.SelectedTab;
if(tabAll.SelectedTab== tpgFind)
{
@@ -457,7 +472,44 @@ namespace ScintillaNET_FindReplaceDialog
LastFingConfig = fcFile;
}
}
private void SyncTextUI()
{
if(tabAll.SelectedTab==tpgFind)
{
if (LastTab == tpgReplace)
{
txtFindF.Text=txtFindR.Text;
}
else if (LastTab == tpgFileFind)
{
txtFindF.Text = TxtFileSearchText.Text;
}
}
else if (tabAll.SelectedTab == tpgReplace)
{
if (LastTab == tpgFind)
{
txtFindR.Text = txtFindF.Text;
}
else if (LastTab == tpgFileFind)
{
txtFindR.Text = TxtFileSearchText.Text;
txtReplace.Text = TxtFileReplaceText.Text;
}
}
else if (tabAll.SelectedTab == tpgFileFind)
{
if (LastTab == tpgFind)
{
TxtFileSearchText.Text = txtFindF.Text;
}
else if (LastTab == tpgReplace)
{
TxtFileSearchText.Text = txtFindR.Text;
TxtFileReplaceText.Text = txtReplace.Text;
}
}
}
#endregion Event Handlers
#region Methods
@@ -465,7 +517,6 @@ namespace ScintillaNET_FindReplaceDialog
public void FindNext()
{
if (Scintilla == null) { return; }
SyncSearchText();
if (txtFindF.Text == string.Empty)
return;
@@ -498,8 +549,7 @@ namespace ScintillaNET_FindReplaceDialog
else
lblStatus.Text = "搜索匹配换行到文档开头";
}
Scintilla.SetSel(foundRange.CpMin, foundRange.CpMax);
SetSel(foundRange.CpMin, foundRange.CpMax);
MoveFormAwayFromSelection();
}
}
@@ -507,7 +557,6 @@ namespace ScintillaNET_FindReplaceDialog
public void FindPrevious()
{
if (Scintilla == null) { return; }
SyncSearchText();
if (txtFindF.Text == string.Empty)
return;
@@ -538,8 +587,7 @@ namespace ScintillaNET_FindReplaceDialog
else
lblStatus.Text = "搜索匹配换行到文档的结尾";
}
Scintilla.SetSel(foundRange.CpMin, foundRange.CpMax);
SetSel(foundRange.CpMin, foundRange.CpMax);
MoveFormAwayFromSelection();
}
}
@@ -595,7 +643,7 @@ namespace ScintillaNET_FindReplaceDialog
new Point(Location.X, cursorPoint.Y - Height - (lineHeight * 2)));
}
newLocation = Scintilla.PointToScreen(newLocation);
Location = newLocation;
//Location = newLocation;
}
}
@@ -631,26 +679,45 @@ namespace ScintillaNET_FindReplaceDialog
else
lblStatus.Text = "搜索匹配换行到文档开头";
}
Scintilla.SetSel(nextRange.CpMin, nextRange.CpMax);
SetSel(nextRange.CpMin, nextRange.CpMax);
MoveFormAwayFromSelection();
}
}
protected override void OnActivated(EventArgs e)
private void SetSel(int CpMin, int CpMax)
{
if (Scintilla.Selections.Count > 0)
if (_scintilla.GetColumn(CpMin) < _scintilla.GetColumn(CpMax))
{
chkSearchSelectionF.Enabled = true;
chkSearchSelectionR.Enabled = true;
_scintilla.GotoPosition(CpMax);
}
else
{
chkSearchSelectionF.Enabled = false;
chkSearchSelectionR.Enabled = false;
chkSearchSelectionF.Checked = false;
chkSearchSelectionR.Checked = false;
_scintilla.GotoPosition(CpMin);
}
var line=_scintilla.LineFromPosition(CpMax);
//var first_line = _scintilla.FirstVisibleLine;
_scintilla.FirstVisibleLine = line - 2;
_scintilla.SetSel(CpMin, CpMax);
}
protected override void OnActivated(EventArgs e)
{
if(Scintilla==null)
{
base.OnActivated(e);
return;
}
//if (Scintilla.Selections.Count > 0)
//{
// chkSearchSelectionF.Enabled = true;
// chkSearchSelectionR.Enabled = true;
//}
//else
//{
// chkSearchSelectionF.Enabled = false;
// chkSearchSelectionR.Enabled = false;
// chkSearchSelectionF.Checked = false;
// chkSearchSelectionR.Checked = false;
//}
// if they leave the dialog and come back any "Search Selection"
// range they might have had is invalidated
@@ -690,20 +757,41 @@ namespace ScintillaNET_FindReplaceDialog
base.OnKeyDown(e);
}
private void SyncSearchText()
private ComboBox GetFindTextBox()
{
if (tabAll.SelectedTab == tpgFind)
txtFindR.Text = txtFindF.Text;
{
return txtFindF;
}
else if (tabAll.SelectedTab == tpgReplace)
txtFindF.Text = txtFindR.Text;
{
return txtFindR;
}
else if (tabAll.SelectedTab == tpgFileFind)
TxtFileSearchText.Text = txtFindF.Text;
{
return TxtFileSearchText;
}
return null;
}
private ComboBox GetReplaceTextBox()
{
if (tabAll.SelectedTab == tpgFind)
{
return null;
}
else if (tabAll.SelectedTab == tpgReplace)
{
return txtReplace;
}
else if (tabAll.SelectedTab == tpgFileFind)
{
return TxtFileReplaceText;
}
return null;
}
private void AddFindMru()
{
string find = txtFindF.Text;
string find = GetFindTextBox().Text;
_mruFind.Remove(find);
_mruFind.Insert(0, find);
if(_mruFind.Count> _mruMaxCount)
@@ -711,19 +799,21 @@ namespace ScintillaNET_FindReplaceDialog
_mruFind.RemoveAt(_mruFind.Count - 1);
}
_bindingSourceFind.ResetBindings(false);
txtFindF.Text = find;
txtFindR.Text = find;
TxtFileSearchText.Text = find;
}
private void AddReplaceMru()
{
string find = txtFindR.Text;
string find =GetFindTextBox().Text;
_mruFind.Remove(find);
_mruFind.Insert(0, find);
if (_mruFind.Count > _mruMaxCount)
_mruFind.RemoveAt(_mruFind.Count - 1);
string replace = txtReplace.Text;
string replace = GetReplaceTextBox().Text;
if (replace != string.Empty)
{
_mruReplace.Remove(replace);
@@ -733,9 +823,13 @@ namespace ScintillaNET_FindReplaceDialog
if (_mruReplace.Count > _mruMaxCount)
_mruReplace.RemoveAt(_mruReplace.Count - 1);
}
_bindingSourceFind.ResetBindings(false);
_bindingSourceReplace.ResetBindings(false);
TxtFileReplaceText.Text = replace;
txtReplace.Text = replace;
txtFindF.Text = find;
txtFindR.Text = find;
TxtFileSearchText.Text = find;
}
private void ContextMenuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
@@ -969,6 +1063,7 @@ namespace ScintillaNET_FindReplaceDialog
else
{
string textToFind = fcReplace.SearchMode==1 ? FindReplace.Transform(txtFindR.Text) : txtFindR.Text;
var aa = FindReplace.Find(selRange, textToFind, false);
if (selRange.Equals(FindReplace.Find(selRange, textToFind, false)))
{
// If searching up we do the replacement using the range object.
@@ -1026,39 +1121,7 @@ namespace ScintillaNET_FindReplaceDialog
private void BtnFileFindAll_Click(object sender, EventArgs e)
{
var folder = TxtSearchPath.Text;
if(!System.IO.Directory.Exists(folder))
{
MessageBox.Show("目录不存在。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
if(TxtFileSearchText.Text.Length==0)
{
MessageBox.Show("待查找文本为空。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
ryCommon.Ini ini = new ryCommon.Ini(Application.StartupPath+"\\UserDb\\FindReplace.ini");
ini.WriteIni("FileFind", "Exts", TxtFileType.Text);
ini.WriteIni("FileFind", "SkipDirName_On", ChkSkipDirName.Checked);
ini.WriteIni("FileFind", "SkipDirName_Text", CbbSkipDirName.Text);
ini.WriteIni("FileFind", "SearchSubDir", ChkSubDir.Checked);
ini.WriteIni("FileFind", "IgnoreBinExt", ChkIgnoreBinExt.Checked);
ini.WriteIni("FileFind", "SearchHiddenDir", ChkHiddenDir.Checked);
ini.WriteIni("FileFind", "LimitFileSize_On", ChkLimitFileSize.Checked);
ini.WriteIni("FileFind", "LimitFileSize_Value", NumLimitFileSize.Value);
FrmFinding frm = new FrmFinding();
frm.SearchConfig.FindText = TxtFileSearchText.Text;
frm.SearchConfig.ReplaceText = TxtFileReplaceText.Text;
frm.SearchConfig.SearchDir= folder;
frm.SearchConfig.Exts = TxtFileType.Text;
frm.SearchConfig.SkipDirName = ChkSkipDirName.Checked ? CbbSkipDirName.Text : "";
frm.SearchConfig.LimitFileSize = ChkLimitFileSize.Checked ? (NumLimitFileSize.Value.ToInt() * 1024 * 1024) : 0;
frm.SearchConfig.SearchSubDir = ChkSubDir.Checked;
frm.SearchConfig.IgnoreBinExt = ChkIgnoreBinExt.Checked;
frm.SearchConfig.SearchHiddenDir = ChkHiddenDir.Checked;
frm.SearchConfig.RegexOptions = fcFile.GetRegexOptions();
frm.SearchConfig.SearchFlags = fcFile.GetSearchFlags();
frm.ShowDialog();
MessageBox.Show("暂不支持。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
public string DefSearchDir { get; set; } = "";
private void ChkCurDir_CheckedChanged(object sender, EventArgs e)
@@ -1075,5 +1138,35 @@ namespace ScintillaNET_FindReplaceDialog
TxtSearchPath.Text = folderBrowserDialog1.SelectedPath;
}
}
private void txtFindF_TextChanged(object sender, EventArgs e)
{
//SyncTextUI();
}
private void txtFindR_TextChanged(object sender, EventArgs e)
{
//SyncTextUI();
}
private void txtReplace_TextChanged(object sender, EventArgs e)
{
//SyncTextUI();
}
private void FindReplaceDialog_Load(object sender, EventArgs e)
{
}
private void txtFindR_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void TxtFileType_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
}
@@ -1,7 +1,6 @@
using ryCommon;
using ryControls;
using ScintillaNET;
using SuperDesign.Tools.SmartEditor;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -14,7 +13,6 @@ using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using 开发辅助工具.Tools.SmartEditor;
using static ScintillaNET.Style;
using static System.Net.Mime.MediaTypeNames;
@@ -98,8 +96,8 @@ namespace ScintillaNET_FindReplaceDialog
return list;
int start = foundRange.CpMin + all_text.Substring(0, m.Index).Length;
int end = all_text.Substring(m.Index, m.Length).Length;
var LineNum = GetLineNum(start, out var LinePos);
list.Add(new CharacterRange(start, start + end) { LineNum=LineNum, LinePos=LinePos,RangeText=Text.Substring(start,end) });
var LineNum = GetLineNum(start, out var LinePos,out var LineText);
list.Add(new CharacterRange(start, start + end) {LineText= LineText, LineNum=LineNum, LinePos=LinePos,RangeText=Text.Substring(start,end) });
start_i = start+end + 1;
}
else
@@ -147,8 +145,8 @@ namespace ScintillaNET_FindReplaceDialog
}
if (Word_Start && Word_End)
{
var LineNum = GetLineNum(start, out var LinePos);
list.Add(new CharacterRange(start, start + end) { LineNum = LineNum, LinePos = LinePos, RangeText = Text.Substring(start, end) });
var LineNum = GetLineNum(start, out var LinePos, out var LineText);
list.Add(new CharacterRange(start, start + end) { LineText = LineText, LineNum = LineNum, LinePos = LinePos, RangeText = Text.Substring(start, end) });
}
start_i = start+ end + 1;
}
@@ -175,8 +173,8 @@ namespace ScintillaNET_FindReplaceDialog
}
if (Word_Start)
{
var LineNum = GetLineNum(start, out var LinePos);
list.Add(new CharacterRange(start, start + end) { LineNum = LineNum, LinePos = LinePos, RangeText = Text.Substring(start, end) });
var LineNum = GetLineNum(start, out var LinePos, out var LineText);
list.Add(new CharacterRange(start, start + end) { LineText = LineText, LineNum = LineNum, LinePos = LinePos, RangeText = Text.Substring(start, end) });
}
start_i = start+ end + 1;
}
@@ -187,8 +185,8 @@ namespace ScintillaNET_FindReplaceDialog
}
else
{
var LineNum = GetLineNum(start, out var LinePos);
list.Add(new CharacterRange(start, start + end) { LineNum = LineNum, LinePos = LinePos, RangeText = Text.Substring(start, end) });
var LineNum = GetLineNum(start, out var LinePos, out var LineText);
list.Add(new CharacterRange(start, start + end) { LineText = LineText, LineNum = LineNum, LinePos = LinePos, RangeText = Text.Substring(start, end) });
start_i = start+end + 1;
}
}
@@ -208,7 +206,7 @@ namespace ScintillaNET_FindReplaceDialog
}
}
//根据位置来获取该位置所在行
int GetLineNum(int pos,out int LinePos)
int GetLineNum(int pos,out int LinePos,out string LineText)
{
LinePos = -1;
var split_txt = Text.Split('\n');
@@ -218,6 +216,7 @@ namespace ScintillaNET_FindReplaceDialog
if (count+split_txt[i].Length+1>=pos)
{
LinePos = count;
LineText = split_txt[i];
return i;
}
else
@@ -225,6 +224,7 @@ namespace ScintillaNET_FindReplaceDialog
count += split_txt[i].Length+1;
}
}
LineText = "";
return -1;
}
return list;
@@ -227,7 +227,10 @@ namespace ScintillaNET_FindReplaceDialog
ScintillaNET_FindReplaceDialog.CharacterRange r = _findReplace.FindNext(txtFind.Text, true, _findReplace.Window.GetSearchFlags());
if (r.CpMin != r.CpMax)
_scintilla.SetSel(r.CpMin, r.CpMax);
{
_scintilla.GotoPosition(r.CpMin);
_scintilla.SetSel(r.CpMin, r.CpMax);
}
MoveFormAwayFromSelection();
}
@@ -241,7 +244,10 @@ namespace ScintillaNET_FindReplaceDialog
ScintillaNET_FindReplaceDialog.CharacterRange r = _findReplace.FindPrevious(txtFind.Text, true, _findReplace.Window.GetSearchFlags());
if (r.CpMin != r.CpMax)
{
_scintilla.GotoPosition(r.CpMin);
_scintilla.SetSel(r.CpMin, r.CpMax);
}
MoveFormAwayFromSelection();
}
@@ -282,7 +288,10 @@ namespace ScintillaNET_FindReplaceDialog
r = _findReplace.Find(0, pos, txtFind.Text, _findReplace.Window.GetSearchFlags());
if (r.CpMin != r.CpMax)
{
_scintilla.GotoPosition(r.CpMin);
_scintilla.SetSel(r.CpMin, r.CpMax);
}
else
txtFind.BackColor = Color.Tomato;
@@ -15,6 +15,7 @@ using System.Windows.Forms;
using ryCommon;
using static VPKSoft.ScintillaLexers.LexerEnumerations;
using Newtonsoft.Json.Linq;
using DiffPlex.Model;
namespace ryControls
{
@@ -35,6 +36,7 @@ namespace ryControls
Editor.CharAdded += HighlightEditor_CharAdded;
Editor.UpdateUI += HighlightEditor_UpdateUI;
Editor.EolMode = Eol.CrLf;
//Editor.AdditionalCaretForeColor=Color.Red;
//Editor
//base.HandleCreated += HighlightEditor_HandleCreated;
//base.InternalFocusFlag = true;
@@ -44,6 +46,11 @@ namespace ryControls
};
AutoComplete.TargetControlWrapper = new ScintillaWrapper(Editor);
Editor.DoubleClick += Editor_DoubleClick;
var ind_17= Editor.Indicators[17];
ind_17.ForeColor = Color.FromArgb(232, 232, 255);
ind_17.Alpha = 100;
ind_17.Style = IndicatorStyle.RoundBox;
ind_17.Under = true;
_indicator = Editor.Indicators[16];
_indicator.ForeColor = Color.Red;
//_indicator.ForeColor = Color.LawnGreen; //Smart highlight
@@ -53,13 +60,14 @@ namespace ryControls
Editor.IndicatorCurrent = _indicator.Index;
this.LostFocus += HighlightEditor_LostFocus;
Editor.LostFocus += HighlightEditor_LostFocus;
Editor.InternalFocusFlag = false;
//Editor.CaretLineVisibleAlways = false;
Editor.InternalFocusFlag = true;
Editor.CaretLineBackColorAlpha = 60;
Editor.CaretPeriod = 0;
}
private void HighlightEditor_LostFocus(object sender, EventArgs e)
{
//Editor.CaretLineVisibleAlways =false ;
//Editor.AdditionalCaretForeColor
}
#region 属性设置
/// <summary>
@@ -71,10 +79,10 @@ namespace ryControls
get { return Editor.ReadOnly; }
set { Editor.ReadOnly = value; }
}
[DefaultValue(BorderStyle.Fixed3D)]
[DefaultValue(ScintillaNET.BorderStyle.Fixed3D)]
[Category("Appearance")]
[Description("编辑器边框.")]
public BorderStyle BorderStyle
public ScintillaNET.BorderStyle BorderStyle
{
get { return Editor.BorderStyle; }
set { Editor.BorderStyle = value; }
@@ -112,7 +120,7 @@ namespace ryControls
[EditorBrowsable(EditorBrowsableState.Always)]
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[DefaultValue(typeof(Font), "Consolas, 12pt")]
[DefaultValue(typeof(Font), "Consolas, 14pt")]
public override Font Font
{
get => base.Font;
@@ -144,7 +152,11 @@ namespace ryControls
/// </summary>
public string SelectedText
{
get { return Editor.SelectedText; }
get {
var text= Editor.SelectedText.TrimEnd('\0');
if (text == "\0") { text = ""; }
return text;
}
set { Editor.ReplaceSelection(value); }
}
/// <summary>
@@ -219,42 +231,51 @@ namespace ryControls
}
return str;
}
private string last_selected = "";
private void HighlightEditor_UpdateUI(object sender, UpdateUIEventArgs e)
{
var selected_text = Editor.SelectedText;
if(selected_text.Length==0)
if (e.Change != UpdateChange.Content)
{
ClearAllMark();
var selected_text = SelectedText;
var sel_start = Editor.SelectionStart;
var a = Editor.BraceMatch(sel_start);
if (a >= 0)
var sel_id= sel_start + "|" + selected_text.Length;
if (sel_id != last_selected)
{
Editor.IndicatorFillRange(a, 1);
Editor.IndicatorFillRange(sel_start, 1);
}
else
{
if (sel_start - 1>=0)
ClearAllMark();
last_selected = sel_id;
if (AutoMark)
{
a = Editor.BraceMatch(sel_start - 1);
if (a >= 0)
MarkText(selected_text);
}
OnSelectedChanged?.Invoke(this, EventArgs.Empty);
}
if (selected_text.Length == 0)
{
var a = Editor.BraceMatch(sel_start);
if (a >= 0)
{
Editor.IndicatorCurrent = _indicator.Index;
Editor.IndicatorFillRange(a, 1);
Editor.IndicatorFillRange(sel_start, 1);
}
else
{
if (sel_start - 1 >= 0)
{
Editor.IndicatorFillRange(a, 1);
Editor.IndicatorFillRange(sel_start -1, 1);
a = Editor.BraceMatch(sel_start - 1);
if (a >= 0)
{
Editor.IndicatorCurrent = _indicator.Index;
Editor.IndicatorFillRange(a, 1);
Editor.IndicatorFillRange(sel_start - 1, 1);
}
}
}
}
}
if (selected_text != lastSelectedText)
{
lastSelectedText = selected_text;
if(AutoMark)
{
ClearAllMark();
MarkText(SelectedText);
}
OnSelectedChanged?.Invoke(this, EventArgs.Empty);
var pos = Editor.CurrentPosition;
var line = Editor.LineFromPosition(pos);
Editor.IndicatorCurrent = 17;
Editor.IndicatorFillRange(Editor.Lines[line].Position, Editor.Lines[line].Length);
}
if (LastProcessedChar != 0)
{
@@ -270,13 +291,44 @@ namespace ryControls
{
if ("{(<[".IndexOfEx(nPrevLineText.Substring(nPrevLineText.Length - 1, 1)) >= 0)
{
Editor.ReplaceSelection(Indent(Editor.Lines[line - 1].Indentation + 4));
if (Editor.Lines[line].Text.Trim().StartsWith("}")) {
Editor.ReplaceSelection(Indent(Editor.Lines[line - 1].Indentation));
}
else {
Editor.ReplaceSelection(Indent(Editor.Lines[line - 1].Indentation + 4));
}
}
else
{
Editor.ReplaceSelection(Indent(Editor.Lines[line - 1].Indentation));
}
}
else
{
for (int i = line - 2; i >0; i--)
{
nPrevLineText = Editor.Lines[i].Text.Trim();
if (nPrevLineText.Length >= 1)
{
if ("{(<[".IndexOfEx(nPrevLineText.Substring(nPrevLineText.Length - 1, 1)) >= 0)
{
if (Editor.Lines[line].Text.Trim().StartsWith("}"))
{
Editor.ReplaceSelection(Indent(Editor.Lines[i].Indentation));
}
else
{
Editor.ReplaceSelection(Indent(Editor.Lines[i].Indentation + 4));
}
}
else
{
Editor.ReplaceSelection(Indent(Editor.Lines[i].Indentation));
}
break;
}
}
}
}
}
LastProcessedChar = 0;
@@ -501,6 +553,7 @@ namespace ryControls
var a= Editor.BraceMatch(Editor.SelectionStart);
if (a >= 0)
{
Editor.IndicatorCurrent = _indicator.Index;
Editor.IndicatorFillRange(a, 1);
Editor.IndicatorFillRange(Editor.SelectionStart, 1);
}
@@ -537,6 +590,7 @@ namespace ryControls
}
}
find_count++;
Editor.IndicatorCurrent = _indicator.Index;
Editor.IndicatorFillRange(pos, search_len);
pos = _text.IndexOf(search_text, pos + search_len);
}
@@ -552,6 +606,8 @@ namespace ryControls
public void ClearAllMark()
{
int currentIndicator = Editor.IndicatorCurrent;
Editor.IndicatorCurrent = 17;
Editor.IndicatorClearRange(0, Editor.TextLength);
Editor.IndicatorCurrent = _indicator.Index;
Editor.IndicatorClearRange(0, Editor.TextLength);
Editor.IndicatorCurrent = currentIndicator;
@@ -559,6 +615,14 @@ namespace ryControls
/// <summary>
/// 设置高亮文本
/// </summary>
/// <param name="format"></param>
public void SetHightlightText(string format)
{
SetHightlightText(this.Text, format);
}
/// <summary>
/// 设置高亮文本
/// </summary>
/// <param name="text"></param>
/// <param name="format"></param>
public void SetHightlightText(string text, string format)
@@ -582,9 +646,10 @@ namespace ryControls
{
Editor.ReadOnly = true;
}
Editor.Font = this.Font;
for (int i = 0; i < Editor.Styles.Count; i++)
{
if (i != CallTip) SetStyleFont(i, Editor.Font);
if (i != CallTip) SetStyleFont(i, this.Font);
}
}
@@ -44,7 +44,7 @@ namespace VPKSoft.ScintillaLexers.CreateSpecificLexer
// DEFAULT, fontStyle = 0, styleId = 0
scintilla.Styles[Style.Css.Default].ForeColor = lexerColors[LexerType.Css, "DefaultFore"];
scintilla.Styles[Style.Css.Default].BackColor = lexerColors[LexerType.Css, "DefaultFore"];
scintilla.Styles[Style.Css.Default].BackColor = lexerColors[LexerType.Css, "DefaultBack"];
// TAG, fontStyle = 0, styleId = 1
scintilla.Styles[Style.Css.Tag].ForeColor = lexerColors[LexerType.Css, "TagFore"];
@@ -54,30 +54,30 @@ namespace VPKSoft.ScintillaLexers.HelperClasses
/// <summary>
/// A list of currently supported lexers by this library.
/// </summary>
public static readonly List<Tuple<LexerEnumerations.LexerType, string, Lexer,string>> LexerTypeNameList = new List<Tuple<LexerEnumerations.LexerType, string, Lexer,string>>(
public static readonly List<Tuple<LexerEnumerations.LexerType, string,string>> LexerTypeNameList = new List<Tuple<LexerEnumerations.LexerType, string,string>>(
new[]
{
Tuple.Create(LexerEnumerations.LexerType.Unknown, "text", Lexer.Null,"Text"),
Tuple.Create(LexerEnumerations.LexerType.Cs, "cs", Lexer.Cpp, "C#"),
Tuple.Create(LexerEnumerations.LexerType.Cpp, "cpp", Lexer.Cpp, "C++"),
Tuple.Create(LexerEnumerations.LexerType.Xml, "xml", Lexer.Xml, "XML"),
Tuple.Create(LexerEnumerations.LexerType.Text, "text", Lexer.Null, "Text"),
Tuple.Create(LexerEnumerations.LexerType.Nsis, "nsis", (Lexer)SCLEX_NSIS, "Nsis"),
Tuple.Create(LexerEnumerations.LexerType.InnoSetup, "inno", (Lexer)SCLEX_INNOSETUP, "InnoSetup"),
Tuple.Create(LexerEnumerations.LexerType.SQL, "sql", Lexer.Xml, "SQL"),
Tuple.Create(LexerEnumerations.LexerType.Batch, "batch", Lexer.Batch, "Batch"),
Tuple.Create(LexerEnumerations.LexerType.Pascal, "pascal", Lexer.Pascal, "Pascal"),
Tuple.Create(LexerEnumerations.LexerType.PHP, "php", Lexer.Html, "PHP"),
Tuple.Create(LexerEnumerations.LexerType.WindowsPowerShell, "powershell", Lexer.PowerShell, "PowerShell"),
Tuple.Create(LexerEnumerations.LexerType.INI, "ini", Lexer.Properties, "INI"),
Tuple.Create(LexerEnumerations.LexerType.Python, "python", Lexer.Python, "Python"),
Tuple.Create(LexerEnumerations.LexerType.YAML, "yaml", (Lexer)SCLEX_YAML, "YAML"),
Tuple.Create(LexerEnumerations.LexerType.Java, "java", Lexer.Cpp, "Java"),
Tuple.Create(LexerEnumerations.LexerType.Css, "css", Lexer.Css, "Css"),
Tuple.Create(LexerEnumerations.LexerType.VbDotNet, "vb", Lexer.Vb, "VB.Net"),
Tuple.Create(LexerEnumerations.LexerType.Json, "json", Lexer.Json, "Json"),
Tuple.Create(LexerEnumerations.LexerType.HTML, "html", Lexer.Html, "HTML"),
Tuple.Create(LexerEnumerations.LexerType.JavaScript, "javascript", Lexer.Cpp, "JavaScript"),
Tuple.Create(LexerEnumerations.LexerType.Unknown, "text","Text"),
Tuple.Create(LexerEnumerations.LexerType.Cs, "cs", "C#"),
Tuple.Create(LexerEnumerations.LexerType.Cpp, "cpp", "C++"),
Tuple.Create(LexerEnumerations.LexerType.Xml, "xml", "XML"),
Tuple.Create(LexerEnumerations.LexerType.Text, "text", "Text"),
Tuple.Create(LexerEnumerations.LexerType.Nsis, "nsis", "Nsis"),
Tuple.Create(LexerEnumerations.LexerType.InnoSetup, "inno", "InnoSetup"),
Tuple.Create(LexerEnumerations.LexerType.SQL, "sql", "SQL"),
Tuple.Create(LexerEnumerations.LexerType.Batch, "batch", "Batch"),
Tuple.Create(LexerEnumerations.LexerType.Pascal, "pascal", "Pascal"),
Tuple.Create(LexerEnumerations.LexerType.PHP, "php", "PHP"),
Tuple.Create(LexerEnumerations.LexerType.WindowsPowerShell, "powershell", "PowerShell"),
Tuple.Create(LexerEnumerations.LexerType.INI, "ini", "INI"),
Tuple.Create(LexerEnumerations.LexerType.Python, "python", "Python"),
Tuple.Create(LexerEnumerations.LexerType.YAML, "yaml", "YAML"),
Tuple.Create(LexerEnumerations.LexerType.Java, "java", "Java"),
Tuple.Create(LexerEnumerations.LexerType.Css, "css", "Css"),
Tuple.Create(LexerEnumerations.LexerType.VbDotNet, "vb", "VB.Net"),
Tuple.Create(LexerEnumerations.LexerType.Json, "json", "Json"),
Tuple.Create(LexerEnumerations.LexerType.HTML, "html", "HTML"),
Tuple.Create(LexerEnumerations.LexerType.JavaScript, "javascript", "JavaScript"),
});
/// <summary>
@@ -90,27 +90,5 @@ namespace VPKSoft.ScintillaLexers.HelperClasses
var result = LexerTypeNameList.FirstOrDefault(f => f.Item1 == lexerType);
return result == null ? "text" : result.Item2;
}
/// <summary>
/// Gets the name of the lexer XML used in Notepad++'s XML style files.
/// </summary>
/// <param name="lexer">The Scintilla lexer enumeration value.</param>
/// <returns>The name of the lexer used in Notepad++'s XML style files if successful; otherwise "text".</returns>
public static string GetLexerXmlName(Lexer lexer)
{
var result = LexerTypeNameList.FirstOrDefault(f => f.Item3 == lexer);
return result == null ? "text" : result.Item2;
}
/// <summary>
/// Gets the type of the lexer by a given <see cref="LexerEnumerations.LexerType"/> enumeration.
/// </summary>
/// <param name="lexerType">Type of the lexer.</param>
/// <returns>A <see cref="Lexer"/> matching the given <see cref="LexerEnumerations.LexerType"/> enumeration.</returns>
public static Lexer GetLexerByLexerType(LexerEnumerations.LexerType lexerType)
{
var result = LexerTypeNameList.FirstOrDefault(f => f.Item1 == lexerType);
return result?.Item3 ?? Lexer.Null;
}
}
}
@@ -156,16 +156,9 @@ namespace VPKSoft.ScintillaLexers
ScintillaNotepadPlusPlusStyles.LoadLexerStyleFromNotepadPlusXml(document, scintilla,
lexerType); // TODO::Font?
var lexerTypeDetected = LexerTypeName.GetLexerByLexerType(lexerType);
var lexerTypeDetected = LexerTypeName.GetLexerXmlName(lexerType);
//scintilla.Lexer = lexerTypeDetected;
if (NativeMethods.NameConstantMap.ContainsKey((int)lexerTypeDetected))
{
scintilla.LexerName = NativeMethods.NameConstantMap[(int)lexerTypeDetected];
}
else
{
scintilla.LexerName = "null";
}
scintilla.LexerName = lexerTypeDetected;
ScintillaKeyWords.SetKeywords(scintilla, lexerType);
LexerFoldProperties.SetFoldProperties(scintilla, lexerType);
@@ -69,6 +69,7 @@ namespace ryPaiban.Model
private void MenuRight_Opening(object sender, CancelEventArgs e)
{
if (SourceContent == null) { return; }
DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
@@ -54,12 +54,55 @@ namespace ScintillaDiff
public ScintillaDiffControl()
{
InitializeComponent();
if(!this.DesignMode)
{
//
// scintillaOne
//
scintillaOne = new ScrollSyncScintilla();
this.scintillaOne.AutoCMaxHeight = 9;
this.scintillaOne.BiDirectionality = ScintillaNET.BiDirectionalDisplayType.Disabled;
this.scintillaOne.CaretLineBackColor = System.Drawing.Color.White;
this.scintillaOne.CaretLineVisible = true;
this.scintillaOne.Dock = System.Windows.Forms.DockStyle.Fill;
this.scintillaOne.LexerName = null;
this.scintillaOne.Location = new System.Drawing.Point(0, 23);
this.scintillaOne.ScrollSync = this.scintillaTwo;
this.scintillaOne.ScrollWidth = 1;
this.scintillaOne.Size = new System.Drawing.Size(434, 431);
this.scintillaOne.TabIndents = true;
this.scintillaOne.TabIndex = 0;
this.scintillaOne.UseRightToLeftReadingLayout = false;
this.scintillaOne.WrapMode = ScintillaNET.WrapMode.None;
this.scintillaOne.TextChanged += new System.EventHandler(this.Scintilla_TextChanged);
//
// scintillaTwo
//
scintillaTwo = new ScrollSyncScintilla();
this.scintillaTwo.AutoCMaxHeight = 9;
this.scintillaTwo.BiDirectionality = ScintillaNET.BiDirectionalDisplayType.Disabled;
this.scintillaTwo.CaretLineBackColor = System.Drawing.Color.White;
this.scintillaTwo.CaretLineVisible = true;
this.scintillaTwo.Dock = System.Windows.Forms.DockStyle.Fill;
this.scintillaTwo.LexerName = null;
this.scintillaTwo.Location = new System.Drawing.Point(0, 23);
this.scintillaTwo.ScrollSync = this.scintillaOne;
this.scintillaTwo.ScrollWidth = 1;
this.scintillaTwo.Size = new System.Drawing.Size(480, 431);
this.scintillaTwo.TabIndents = true;
this.scintillaTwo.TabIndex = 0;
this.scintillaTwo.UseRightToLeftReadingLayout = false;
this.scintillaTwo.WrapMode = ScintillaNET.WrapMode.None;
this.scintillaTwo.TextChanged += new System.EventHandler(this.Scintilla_TextChanged);
this.scMain.Panel1.Controls.Add(scintillaOne);
this.scMain.Panel1.Controls.SetChildIndex(scintillaOne, 0);
this.scMain.Panel2.Controls.Add(scintillaTwo);
this.scMain.Panel2.Controls.SetChildIndex(scintillaTwo, 0);
scintillaOne.Tag = -1;
scintillaTwo.Tag = -1;
ReInit();
}
// this tag values are for line number length counting..
scintillaOne.Tag = -1;
scintillaTwo.Tag = -1;
ReInit();
}
public void ReInit()
{
@@ -106,9 +149,11 @@ namespace ScintillaDiff
#endregion
#region PrivateFields
private ScrollSyncScintilla scintillaOne;
private ScrollSyncScintilla scintillaTwo;
private string textLeft = string.Empty;
private string textRight = string.Empty;
private Bitmap imageRowAdded =SuperDesign.Properties.Resources.plus;
private Bitmap imageRowAdded = SuperDesign.Properties.Resources.plus;
private Bitmap imageRowDeleted = SuperDesign.Properties.Resources.minus;
private Bitmap imageRowOk = SuperDesign.Properties.Resources.ok;
private Bitmap imageRowDiff = SuperDesign.Properties.Resources.diff;
@@ -1598,5 +1643,11 @@ namespace ScintillaDiff
return JumpToLine(diffIndex, true);
}
#endregion
private void ScintillaDiffControl_Load(object sender, EventArgs e)
{
ryCommon.Auto.LeftClick(scintillaOne.Handle, 0, 0);
ryCommon.Auto.LeftClick(scintillaTwo.Handle, 0, 0);
}
}
}
@@ -31,11 +31,9 @@ namespace ScintillaDiff
private void InitializeComponent()
{
this.scMain = new System.Windows.Forms.SplitContainer();
this.scintillaOne = new ScintillaDiff.ScrollSyncScintilla();
this.scintillaTwo = new ScintillaDiff.ScrollSyncScintilla();
this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.label2 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.scMain)).BeginInit();
this.scMain.Panel1.SuspendLayout();
@@ -53,55 +51,15 @@ namespace ScintillaDiff
//
// scMain.Panel1
//
this.scMain.Panel1.Controls.Add(this.scintillaOne);
this.scMain.Panel1.Controls.Add(this.panel1);
//
// scMain.Panel2
//
this.scMain.Panel2.Controls.Add(this.scintillaTwo);
this.scMain.Panel2.Controls.Add(this.panel2);
this.scMain.Size = new System.Drawing.Size(918, 454);
this.scMain.SplitterDistance = 434;
this.scMain.TabIndex = 0;
//
// scintillaOne
//
this.scintillaOne.AutoCMaxHeight = 9;
this.scintillaOne.BiDirectionality = ScintillaNET.BiDirectionalDisplayType.Disabled;
this.scintillaOne.CaretLineBackColor = System.Drawing.Color.White;
this.scintillaOne.CaretLineVisible = true;
this.scintillaOne.Dock = System.Windows.Forms.DockStyle.Fill;
this.scintillaOne.LexerName = null;
this.scintillaOne.Location = new System.Drawing.Point(0, 23);
this.scintillaOne.Name = "scintillaOne";
this.scintillaOne.ScrollSync = this.scintillaTwo;
this.scintillaOne.ScrollWidth = 1;
this.scintillaOne.Size = new System.Drawing.Size(434, 431);
this.scintillaOne.TabIndents = true;
this.scintillaOne.TabIndex = 0;
this.scintillaOne.UseRightToLeftReadingLayout = false;
this.scintillaOne.WrapMode = ScintillaNET.WrapMode.None;
this.scintillaOne.TextChanged += new System.EventHandler(this.Scintilla_TextChanged);
//
// scintillaTwo
//
this.scintillaTwo.AutoCMaxHeight = 9;
this.scintillaTwo.BiDirectionality = ScintillaNET.BiDirectionalDisplayType.Disabled;
this.scintillaTwo.CaretLineBackColor = System.Drawing.Color.White;
this.scintillaTwo.CaretLineVisible = true;
this.scintillaTwo.Dock = System.Windows.Forms.DockStyle.Fill;
this.scintillaTwo.LexerName = null;
this.scintillaTwo.Location = new System.Drawing.Point(0, 23);
this.scintillaTwo.Name = "scintillaTwo";
this.scintillaTwo.ScrollSync = this.scintillaOne;
this.scintillaTwo.ScrollWidth = 1;
this.scintillaTwo.Size = new System.Drawing.Size(480, 431);
this.scintillaTwo.TabIndents = true;
this.scintillaTwo.TabIndex = 0;
this.scintillaTwo.UseRightToLeftReadingLayout = false;
this.scintillaTwo.WrapMode = ScintillaNET.WrapMode.None;
this.scintillaTwo.TextChanged += new System.EventHandler(this.Scintilla_TextChanged);
//
// panel1
//
this.panel1.Controls.Add(this.label1);
@@ -111,15 +69,6 @@ namespace ScintillaDiff
this.panel1.Size = new System.Drawing.Size(434, 23);
this.panel1.TabIndex = 1;
//
// panel2
//
this.panel2.Controls.Add(this.label2);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(480, 23);
this.panel2.TabIndex = 2;
//
// label1
//
this.label1.AutoSize = true;
@@ -129,6 +78,15 @@ namespace ScintillaDiff
this.label1.TabIndex = 0;
this.label1.Text = "文本1";
//
// panel2
//
this.panel2.Controls.Add(this.label2);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(480, 23);
this.panel2.TabIndex = 2;
//
// label2
//
this.label2.AutoSize = true;
@@ -145,6 +103,7 @@ namespace ScintillaDiff
this.Controls.Add(this.scMain);
this.Name = "ScintillaDiffControl";
this.Size = new System.Drawing.Size(918, 454);
this.Load += new System.EventHandler(this.ScintillaDiffControl_Load);
this.SizeChanged += new System.EventHandler(this.ScintillaDiffer_SizeChanged);
this.scMain.Panel1.ResumeLayout(false);
this.scMain.Panel2.ResumeLayout(false);
@@ -161,8 +120,6 @@ namespace ScintillaDiff
#endregion
private System.Windows.Forms.SplitContainer scMain;
private ScrollSyncScintilla scintillaOne;
private ScrollSyncScintilla scintillaTwo;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label1;
+30 -29
View File
@@ -31,9 +31,10 @@
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.panel1 = new System.Windows.Forms.Panel();
this.dockPanel1 = new WeifenLuo.WinFormsUI.Docking.DockPanel();
this.vS2015LightTheme1 = new WeifenLuo.WinFormsUI.ThemeVS2015.VS2015LightTheme();
this.panel1 = new System.Windows.Forms.Panel();
this.BtnEditor = new ryControls.ButtonEx();
this.BtnCreateProject = new ryControls.ButtonEx();
this.BtnSetting = new ryControls.ButtonEx();
this.BtnTools = new ryControls.ButtonEx();
@@ -43,11 +44,24 @@
this.textColumn4 = new XPTable.Models.TextColumn();
this.textColumn5 = new XPTable.Models.TextColumn();
this.tableModel1 = new XPTable.Models.TableModel();
this.BtnEditor = new ryControls.ButtonEx();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.BtnEditor);
this.panel1.Controls.Add(this.BtnCreateProject);
this.panel1.Controls.Add(this.BtnSetting);
this.panel1.Controls.Add(this.BtnTools);
this.panel1.Controls.Add(this.rySearch1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(964, 30);
this.panel1.TabIndex = 15;
this.panel1.Click += new System.EventHandler(this.Panel1_Click);
//
// dockPanel1
//
this.dockPanel1.BackColor = System.Drawing.Color.White;
@@ -64,19 +78,16 @@
this.dockPanel1.Theme = this.vS2015LightTheme1;
this.dockPanel1.Enter += new System.EventHandler(this.DockPanel1_Enter);
//
// panel1
// BtnEditor
//
this.panel1.Controls.Add(this.BtnEditor);
this.panel1.Controls.Add(this.BtnCreateProject);
this.panel1.Controls.Add(this.BtnSetting);
this.panel1.Controls.Add(this.BtnTools);
this.panel1.Controls.Add(this.rySearch1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(964, 30);
this.panel1.TabIndex = 15;
this.panel1.Click += new System.EventHandler(this.Panel1_Click);
this.BtnEditor.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnEditor.Location = new System.Drawing.Point(468, 3);
this.BtnEditor.Name = "BtnEditor";
this.BtnEditor.Size = new System.Drawing.Size(59, 25);
this.BtnEditor.TabIndex = 4;
this.BtnEditor.Text = "编辑器";
this.BtnEditor.UseVisualStyleBackColor = true;
this.BtnEditor.Click += new System.EventHandler(this.BtnEditor_Click);
//
// BtnCreateProject
//
@@ -123,8 +134,10 @@
this.rySearch1.Size = new System.Drawing.Size(388, 25);
this.rySearch1.TabIndex = 0;
this.rySearch1.OnTextChanged += new System.EventHandler(this.RySearch1_OnTextChanged);
this.rySearch1.Click += new System.EventHandler(this.rySearch1_Click);
this.rySearch1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.RySearch1_KeyDown);
this.rySearch1.Leave += new System.EventHandler(this.RySearch1_Leave);
this.rySearch1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.rySearch1_MouseClick);
//
// table1
//
@@ -138,13 +151,11 @@
this.table1.Name = "table1";
this.table1.NoItemsText = "当前列表没有任何项";
this.table1.Size = new System.Drawing.Size(442, 347);
this.table1.TabIndex = 19;
this.table1.TabIndex = 23;
this.table1.TableModel = this.tableModel1;
this.table1.Text = "table1";
this.table1.Visible = false;
this.table1.Click += new System.EventHandler(this.Table1_Click);
this.table1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Table1_KeyDown);
this.table1.Leave += new System.EventHandler(this.Table1_Leave);
//
// columnModel1
//
@@ -166,17 +177,6 @@
this.textColumn5.Text = "备注";
this.textColumn5.Width = 230;
//
// BtnEditor
//
this.BtnEditor.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnEditor.Location = new System.Drawing.Point(468, 3);
this.BtnEditor.Name = "BtnEditor";
this.BtnEditor.Size = new System.Drawing.Size(59, 25);
this.BtnEditor.TabIndex = 4;
this.BtnEditor.Text = "编辑器";
this.BtnEditor.UseVisualStyleBackColor = true;
this.BtnEditor.Click += new System.EventHandler(this.BtnEditor_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -192,6 +192,7 @@
this.Text = "睿元开发辅助工具";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
this.Load += new System.EventHandler(this.Form1_Load);
this.Shown += new System.EventHandler(this.Form1_Shown);
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.table1)).EndInit();
this.ResumeLayout(false);
@@ -204,7 +205,6 @@
private System.Windows.Forms.Panel panel1;
private ryControls.rySearch rySearch1;
private ryControls.ButtonEx BtnTools;
private XPTable.Models.Table table1;
private XPTable.Models.ColumnModel columnModel1;
private XPTable.Models.TextColumn textColumn4;
private XPTable.Models.TextColumn textColumn5;
@@ -213,6 +213,7 @@
private ryControls.ButtonEx BtnCreateProject;
private WeifenLuo.WinFormsUI.ThemeVS2015.VS2015LightTheme vS2015LightTheme1;
private ryControls.ButtonEx BtnEditor;
private XPTable.Models.Table table1;
}
}
+59 -16
View File
@@ -3,7 +3,6 @@ using HtmlAgilityPack;
using Microsoft.Win32;
using ryCommon;
using ryCommonDb;
using Sheng.Winform.Controls.PopupControl;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -19,7 +18,6 @@ using System.Xml;
using WeifenLuo.WinFormsUI.Docking;
using 开发辅助工具.Manager;
using 开发辅助工具.Tools;
using 开发辅助工具.Tools.SmartEditor;
namespace 开发辅助工具
{
@@ -43,7 +41,40 @@ namespace 开发辅助工具
}
Manager.Itrycn_Db.CreateDb();
LoadBaseTools();
}
private void DockPanel1_ActiveContentChanged(object sender, EventArgs e)
{
if(dockPanel1.ActiveContent is FrmWebGet frm)
{
var clip_text = Clipboard.GetText();
var ClipChanged = false;
if (clip_text != Itrycn_Db.last_clip_text)
{
ClipChanged = true;
Itrycn_Db.last_clip_text = clip_text;
}
if (ClipChanged)
{
if(Itrycn_Db.last_clip_text.IndexOfEx("qurl://") >= 0)
{
switch (MessageBox.Show("是否确定要导入配置?\r\n\r\n" + Itrycn_Db.last_clip_text, "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2))
{
case DialogResult.Yes:
Focus();
frm.导入当前设置ToolStripMenuItem.PerformClick();
Focus();
break;
default:
frm.BringToFront();
//Focus();
break;
}
}
}
}
}
public void HideDownList()
{
table1.Visible = false;
@@ -113,11 +144,10 @@ namespace 开发辅助工具
FrmToolsSearch frm = new FrmToolsSearch();
frm.ShowDialog();
}
private void RySearch1_OnTextChanged(object sender, EventArgs e)
private void Search()
{
string sql_where = "";
if (rySearch1.Text != ""){ sql_where = " where (Name like @SearchText or Des like @SearchText or Keys like @SearchText or PY like @SearchText)"; }
if (rySearch1.Text != "") { sql_where = " where (Name like @SearchText or Des like @SearchText or Keys like @SearchText or PY like @SearchText)"; }
#region 重新载入数据
tableModel1.Rows.Clear();
tableModel1.Selections.Clear();
@@ -125,7 +155,7 @@ namespace 开发辅助工具
if (db.ConnDb(Itrycn_Db.Sys_SQLConn) == 1)
{
db.AddParameter("SearchText", "%" + rySearch1.Text + "%");
DataSet ds = db.ReadData("select * from Tools"+ sql_where+ " order by sort desc, addTime desc", db.GetParameter());
DataSet ds = db.ReadData("select * from Tools" + sql_where + " order by sort desc, addTime desc", db.GetParameter());
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
DataRow row = ds.Tables[0].Rows[i];
@@ -143,11 +173,15 @@ namespace 开发辅助工具
tableModel1.Rows.Add(itemList);
}
db.Free();
textColumn4.Text = "工具名称("+ tableModel1.Rows.Count+ ")";
table1.Visible = tableModel1.Rows.Count!=0;
textColumn4.Text = "工具名称(" + tableModel1.Rows.Count + ")";
table1.Visible = tableModel1.Rows.Count != 0;
}
#endregion
}
private void RySearch1_OnTextChanged(object sender, EventArgs e)
{
Search();
}
private void RySearch1_KeyDown(object sender, KeyEventArgs e)
{
@@ -280,14 +314,23 @@ namespace 开发辅助工具
private void BtnEditor_Click(object sender, EventArgs e)
{
long mainHandle = QuickMsg.RyMemoryShare.ReadFromMemory("SmartEditor",0L);
if (mainHandle>0)
{
ryConfig.MsgManager.ShowEditorUI();
return;
}
FrmMainEditor frm = new FrmMainEditor("");
frm.Show();
RyFiles.OpenFile(Application.StartupPath+"\\RySmartEditor.exe");
}
private void Form1_Shown(object sender, EventArgs e)
{
dockPanel1.ActiveContentChanged += DockPanel1_ActiveContentChanged;
}
private void rySearch1_Click(object sender, EventArgs e)
{
}
private void rySearch1_MouseClick(object sender, MouseEventArgs e)
{
if (rySearch1.Text.Length == 0)
Search();
}
}
@@ -0,0 +1,68 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SuperDesign.Manager
{
public class APIManager
{
/// <summary>
/// 获取参数翻译名称
/// </summary>
/// <param name="ParamName"></param>
/// <returns></returns>
public static string GetParamTitle(string ParamName)
{
var title = "";
switch (ParamName.ToLower())
{
case "starttime":
title = "开始时间";
break;
case "endtime":
title = "结束时间";
break;
case "page":
title = "页码";
break;
case "pagesize":
title = "每页数量";
break;
case "title":
title = "标题";
break;
case "name":
title = "名称";
break;
case "id":
title = "id编号";
break;
case "modelid":
title = "资源类型";
break;
case "packagename":
case "pkgname":
title = "包名";
break;
case "filename":
title = "文件名";
break;
case "url":
title = "网址";
break;
case "username":
title = "用户名";
break;
case "realname":
title = "真实姓名";
break;
case "cooperid":
title = "合作包id";
break;
}
return title;
}
}
}
File diff suppressed because it is too large. Load diff
@@ -1,55 +0,0 @@
using FTPop;
using GameBackup3H3.DbOp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Net.WebRequestMethods;
namespace SuperDesign.Manager.FTP
{
public class FTPManger
{
public static Dictionary<int, IFTP> dict_ftp = new Dictionary<int, IFTP>();
/// <summary>
/// 文件传输事件
/// </summary>
public static event FileTransferProgressEventHandler FileTransferProgress;
public static IFTP GetFTP(FTPInfo ftpinfo,out int result)
{
var ftpid = ftpinfo.Id;
if (dict_ftp.ContainsKey(ftpid))
{
var ftp =dict_ftp[ftpid];
if (ftp.IsOpen)
{
result = 1;
return ftp;
}
else
{
ftp.Close();
var ftp2 = new FTPop.FTPWinSCP();
ftp2.FileTransferProgress += Ftp_FileTransferProgress;
result = ftp2.Open(ftpinfo);
dict_ftp[ftpid] = ftp2;
return ftp2;
}
}
else
{
var ftp = new FTPop.FTPWinSCP();
ftp.FileTransferProgress += Ftp_FileTransferProgress;
result =ftp.Open(ftpinfo);
dict_ftp[ftpid] = ftp;
return ftp;
}
}
private static void Ftp_FileTransferProgress(object sender, FileTransferProgressEventArgs e)
{
FileTransferProgress?.Invoke(sender, e);
}
}
}
@@ -1,312 +0,0 @@
using FluentFTP;
using FluentFTP.Client.BaseClient;
using GameBackup3H3.DbOp;
using ryCommon;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Net;
using System.Text;
#pragma warning disable CA1031 // 不捕获常规异常类型
namespace FTPop
{
/// <summary>
/// FTP管理
/// </summary>
public class FTPFluentFTP : IFTP, IDisposable
{
private bool disposed = false;
FtpClient conn;
public string CurRemoteFolder { get; private set; } = "";
FTPInfo _ftpinfo;
private Encoding GetEncoding()
{
if (_ftpinfo.Encoding == "UTF8")
{ return Encoding.UTF8; }
else
{ return Encoding.GetEncoding(_ftpinfo.Encoding); }
}
private void AppendText(string text, Color color)
{
}
/// <summary>
/// 打开FTP
/// </summary>
/// <param name="ftpinfo"></param>
public int Open(FTPInfo ftpinfo)
{
if(ftpinfo==null)
{
return -1;
}
_ftpinfo = ftpinfo;
conn = new FtpClient
{
Host = _ftpinfo.IP,
Port = _ftpinfo.Port,
Credentials = new NetworkCredential(_ftpinfo.UserName, _ftpinfo.Pwd)
};
conn.Config.ConnectTimeout = 35000;
conn.Config.DataConnectionConnectTimeout = 35000;
conn.Config.DataConnectionReadTimeout = 35000;
conn.Config.ReadTimeout = 35000;
conn.Config.DataConnectionType = FtpDataConnectionType.AutoPassive;
conn.Config.SslProtocols = System.Security.Authentication.SslProtocols.Tls12;
try
{
if (_ftpinfo.Encrypt > 0)
{
conn.Config.EncryptionMode = _ftpinfo.Encrypt == 2 ? FtpEncryptionMode.Explicit : FtpEncryptionMode.Implicit;
conn.Config.ValidateAnyCertificate = true;
conn.ValidateCertificate += new FtpSslValidation(OnValidateCertificate);
}
conn.Config.DataConnectionEncryption = true;
conn.Connect();
if (conn.IsConnected)
{
ChangeWorkingDirectory("");
//conn.DataConnectionType = FtpDataConnectionType.PASV;
//var ss= conn.GetListing();
}
}
catch(Exception ex)
{
return -2;
}
return conn.IsConnected?1:0;
}
private void AsyncMethod()
{
//var kk = await conn.GetListingAsync();
}
private static void OnValidateCertificate(BaseFtpClient control, FtpSslValidationEventArgs e)
{
if (e.PolicyErrors != System.Net.Security.SslPolicyErrors.None)
{
// invalid cert, do you want to accept it?
e.Accept = true;
}
else
{
e.Accept = true;
}
}
private bool ChangeWorkingDirectory(string Path)
{
if (Path == null || Path.Length == 0)
{
AppendText("Status : Directory Was Not Found\n", Color.Red);
return false;
}
conn.SetWorkingDirectory(Path);
CurRemoteFolder = Path;
AppendText("Status : Current Working Directory is " + CurRemoteFolder + "\n", Color.Red);
return true;
}
/// <summary>
/// 关闭FTP
/// </summary>
/// <returns></returns>
public int Close()
{
conn.Disconnect();
conn.Dispose();
return 1;
}
/// <summary>
/// 移除文件
/// </summary>
/// <param name="remotePath"></param>
/// <returns></returns>
public int RemoveFiles(string remotePath)
{
conn.DeleteFile(remotePath);
return 1;
}
/// <summary>
/// 移动文件
/// </summary>
/// <param name="fromPath"></param>
/// <param name="toPath"></param>
/// <returns></returns>
public int MoveFile(string fromPath, string toPath)
{
conn.Rename(fromPath, toPath);
return 1;
}
/// <summary>
/// 文件是否存在
/// </summary>
/// <param name="remotePath"></param>
/// <returns></returns>
public bool FileExists(string remotePath)
{
return conn.FileExists(remotePath);
}
/// <summary>
/// 文件大小
/// </summary>
/// <param name="remotePath"></param>
/// <returns></returns>
public Int64 FileSize(string remotePath)
{
try
{
return conn.GetFileSize(remotePath);
}
catch { return -1; }
}
/// <summary>
/// 文件最后修改时间
/// </summary>
/// <param name="remotePath"></param>
/// <returns></returns>
public DateTime FileLastWriteTime(string remotePath)
{
try
{
return conn.GetModifiedTime(remotePath);
}
catch { return new DateTime(2000,1,1); }
}
/// <summary>
/// 文件信息
/// </summary>
/// <param name="remotePath"></param>
/// <returns></returns>
public RemoteFileInfo GetFileInfo(string remotePath)
{
try
{
return new RemoteFileInfo()
{
LastWriteTime = conn.GetModifiedTime(remotePath),
Length = conn.GetFileSize(remotePath),
Name = System.IO.Path.GetFileName(remotePath),
IsDirectory = conn.DirectoryExists(remotePath)
};
}
catch
{
return new RemoteFileInfo();
}
}
/// <summary>
/// 显示文件夹列表
/// </summary>
/// <param name="CurFolder"></param>
/// <returns></returns>
public List<RemoteFileInfo> ListDirectory(string CurFolder)
{
//var aa = conn.GetNameListing(CurFolder) ;
List<RemoteFileInfo> list = new List<RemoteFileInfo>();
conn.Encoding = GetEncoding();
var list_conn= conn.GetListing(CurFolder.TrimEnd('/'));
//var list_conn2 = conn.GetNameListing();
for (int i = 0; i < list_conn.Length; i++)
{
var item = list_conn[i];
list.Add(new RemoteFileInfo()
{
FullName = item.FullName,
IsDirectory = item.Type== FtpObjectType.Directory,
Name = item.Name,
Length = item.Size,
LastWriteTime = item.Modified
});
}
return list;
}
/// <summary>
/// 上传
/// </summary>
/// <param name="localPath"></param>
/// <param name="remotePath"></param>
/// <returns></returns>
public int Upload(string localPath, string remotePath)
{
try
{
Action<FtpProgress> progress = delegate (FtpProgress p)
{
var progress2 = new FileTransferProgressEventArgs()
{
Cancel = false,
LocalPath = localPath,
FileProgress = p.Progress/100d,
IsComplete=p.Progress==100,
Speed=p.TransferSpeed
};
FileTransferProgress?.Invoke(this, progress2);
//if (progress2.Cancel) {p.=true ; }
if (p.Progress == 1)
{
// all done!
}
else
{
// percent done = (p.Progress * 100)
}
};
// upload a file with progress tracking
var result= conn.UploadFile(localPath, remotePath, FtpRemoteExists.Overwrite, true, FtpVerify.None, progress);
if (result == FtpStatus.Success)
{
if (FileSize(remotePath) != RyFiles.GetFileSize(localPath))
{
ErrorMsg = "文件上传不完整";
return -1;
}
else
{
return 1;
}
}
return -2;
}
catch (Exception ex)
{
ErrorMsg = ex.Message;
return -1;
}
}
public string ErrorMsg { get; set; } = "";
/// <summary>
/// 文件传输事件
/// </summary>
public event FileTransferProgressEventHandler FileTransferProgress;
~FTPFluentFTP()
{
Dispose(false);
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (!this.disposed)
{
Close();
// If disposing equals true, dispose all managed
// and unmanaged resources.
if (disposing)
{
// Dispose managed resources.
}
// Release unmanaged resources. If disposing is false,
// only the following code is executed.
// Note that this is not thread safe.
// Another thread could start disposing the object
// after the managed resources are disposed,
// but before the disposed flag is set to true.
// If thread safety is necessary, it must be
// implemented by the client.
}
disposed = true;
}
}
}
@@ -1,459 +0,0 @@
using GameBackup3H3.DbOp;
using ryCommon;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Security;
using System.Net.Sockets;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Text.RegularExpressions;
using WinSCP;
#pragma warning disable CA1031 // 不捕获常规异常类型
namespace FTPop
{
/// <summary>
/// FTP管理
/// </summary>
public class FTPFtpWeb : IFTP, IDisposable
{
private bool disposed = false;
string ftpURI;
public string CurRemoteFolder { get; private set; } = "";
FTPInfo _ftpinfo;
private Encoding GetEncoding()
{
if (_ftpinfo.Encoding == "UTF8")
{ return Encoding.UTF8; }
else
{ return Encoding.GetEncoding(_ftpinfo.Encoding); }
}
private static bool OnCertificateValidation(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
{
/* Console.WriteLine("Server Certificate Issued To: {0}", certificate.GetName());
Console.WriteLine("Server Certificate Issued By: {0}", certificate.GetIssuerName());
// Return true if there are no policy errors
// The certificate can also be manually verified to
//make sure it meets your specific // policies by
// interrogating the x509Certificate object.
if (errors != SslPolicyErrors.None)
{
Console.WriteLine("Server Certificate Validation Error");
Console.WriteLine(errors.ToString());
return false;
}
else
{
Console.WriteLine("No Certificate Validation Errors");
return true;
}*/
return true; //所有證書都合法
}
private void ShowCertificateInfo(X509Certificate remoteCertificate, bool verbose)
{
//Console.WriteLine("Certficate Information for:/n{0}/n", remoteCertificate.GetName());
//Console.WriteLine("Valid From: /n{0}", remoteCertificate.GetEffectiveDateString());
//Console.WriteLine("Valid To: /n{0}", remoteCertificate.GetExpirationDateString());
//Console.WriteLine("Certificate Format: /n{0}/n", remoteCertificate.GetFormat());
//Console.WriteLine("Issuer Name: /n{0}", remoteCertificate.GetIssuerName());
//if (verbose)
//{
// Console.WriteLine("Serial Number: /n{0}", remoteCertificate.GetSerialNumberString());
// Console.WriteLine("Hash: /n{0}", remoteCertificate.GetCertHashString());
// Console.WriteLine("Key Algorithm: /n{0}", remoteCertificate.GetKeyAlgorithm());
// Console.WriteLine("Key Algorithm Parameters: /n{0}", remoteCertificate.GetKeyAlgorithmParametersString());
// Console.WriteLine("Public Key: /n{0}", remoteCertificate.GetPublicKeyString());
//}
}
private void showSslInfo(string serverName, SslStream sslStream, bool verbose)
{
ShowCertificateInfo(sslStream.RemoteCertificate, verbose);
Console.WriteLine("/n/nSSL Connect Report for : {0}/n", serverName);
Console.WriteLine("Is Authenticated: {0}", sslStream.IsAuthenticated);
Console.WriteLine("Is Encrypted: {0}", sslStream.IsEncrypted);
Console.WriteLine("Is Signed: {0}", sslStream.IsSigned);
Console.WriteLine("Is Mutually Authenticated: {0}/n", sslStream.IsMutuallyAuthenticated);
Console.WriteLine("Hash Algorithm: {0}", sslStream.HashAlgorithm);
Console.WriteLine("Hash Strength: {0}", sslStream.HashStrength);
Console.WriteLine("Cipher Algorithm: {0}", sslStream.CipherAlgorithm);
Console.WriteLine("Cipher Strength: {0}/n", sslStream.CipherStrength);
Console.WriteLine("Key Exchange Algorithm: {0}", sslStream.KeyExchangeAlgorithm);
Console.WriteLine("Key Exchange Strength: {0}/n", sslStream.KeyExchangeStrength);
Console.WriteLine("SSL Protocol: {0}", sslStream.SslProtocol);
}
private X509CertificateCollection _clientCertificates = new X509CertificateCollection();
private void AppendText(string text, Color color)
{
}
/// <summary>
/// 打开FTP
/// </summary>
/// <param name="ftpinfo"></param>
public int Open(FTPInfo ftpinfo)
{
if(ftpinfo==null)
{
return -1;
}
_ftpinfo = ftpinfo;
AppendText("Status : Connected to " + ftpinfo.IP + "\n", Color.Red);
InitWorkingDirectory();
return 1;
}
private bool InitWorkingDirectory()
{
ftpURI = "ftp://" + _ftpinfo.IP+":"+_ftpinfo.Port + "/";
return true;
}
/// <summary>
/// 关闭FTP
/// </summary>
/// <returns></returns>
public int Close()
{
return 1;
}
int delCount = 0;
public int ReTryCount { get; set; } = 2;
/// <summary>
/// 移除文件
/// </summary>
/// <param name="remotePath"></param>
/// <returns></returns>
public int RemoveFiles(string remotePath)
{
InitWorkingDirectory();
try
{
string uri = ftpURI + remotePath;
FtpWebRequest reqFTP;
reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(uri));
reqFTP.Credentials = new NetworkCredential(_ftpinfo.UserName, _ftpinfo.Pwd);
reqFTP.KeepAlive = false;
reqFTP.Timeout = 3000;
reqFTP.Method = WebRequestMethods.Ftp.DeleteFile;
ServicePoint currentServicePoint = reqFTP.ServicePoint;
currentServicePoint.ConnectionLimit = 1024;
string result = String.Empty;
FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse();
long size = response.ContentLength;
Stream datastream = response.GetResponseStream();
StreamReader sr = new StreamReader(datastream);
result = sr.ReadToEnd();
sr.Close();
datastream.Close();
response.Close();
delCount = 0;
return 1;
}
catch (Exception ex)
{
delCount++;
if (delCount <= ReTryCount)
{
return RemoveFiles(remotePath);
}
else
{
delCount = 0;
}
AppendText("Delete Error --> " + ex.Message + " 文件名:" + remotePath, Color.Red);
//Insert_Standard_ErrorLog.Insert("FtpWeb", "Delete Error --> " + ex.Message + " 文件名:" + fileName);
return -1;
}
}
/// <summary>
/// 移动文件
/// </summary>
/// <param name="fromPath"></param>
/// <param name="toPath"></param>
/// <returns></returns>
public int MoveFile(string fromPath, string toPath)
{
FtpWebRequest reqFTP;
try
{
reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(ftpURI + fromPath));
reqFTP.Method = WebRequestMethods.Ftp.Rename;
reqFTP.RenameTo = toPath;
reqFTP.UseBinary = true;
reqFTP.KeepAlive = false;
reqFTP.Timeout = 10000;
reqFTP.Credentials = new NetworkCredential(_ftpinfo.UserName, _ftpinfo.Pwd);
ServicePoint currentServicePoint = reqFTP.ServicePoint;
currentServicePoint.ConnectionLimit = 1024;
FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse();
Stream ftpStream = response.GetResponseStream();
ftpStream.Close();
response.Close();
}
catch (Exception)
{
return -1;
}
return 1;
}
/// <summary>
/// 文件是否存在
/// </summary>
/// <param name="remotePath"></param>
/// <returns></returns>
public bool FileExists(string remotePath)
{
long Filesize = FileSize(remotePath);
return Filesize>0;
}
/// <summary>
/// 文件大小
/// </summary>
/// <param name="remotePath"></param>
/// <returns></returns>
public Int64 FileSize(string remotePath)
{
FtpWebRequest reqFTP;
long fileSize;
try
{
reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(ftpURI + remotePath));
reqFTP.Method = WebRequestMethods.Ftp.GetFileSize;
reqFTP.UseBinary = true;
reqFTP.KeepAlive = false;
reqFTP.Timeout = 10000;
reqFTP.Credentials = new NetworkCredential(_ftpinfo.UserName, _ftpinfo.Pwd);
ServicePoint currentServicePoint = reqFTP.ServicePoint;
currentServicePoint.ConnectionLimit = 1024;
FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse();
Stream ftpStream = response.GetResponseStream();
fileSize = response.ContentLength;
ftpStream.Close();
response.Close();
}
catch (Exception)
{
return -1;
}
return fileSize;
}
/// <summary>
/// 文件最后修改时间
/// </summary>
/// <param name="remotePath"></param>
/// <returns></returns>
public DateTime FileLastWriteTime(string remotePath)
{
return new DateTime(2000, 1, 1);
}
/// <summary>
/// 文件信息
/// </summary>
/// <param name="remotePath"></param>
/// <returns></returns>
public RemoteFileInfo GetFileInfo(string remotePath)
{
return new RemoteFileInfo();
}
/// <summary>
/// 显示文件夹列表
/// </summary>
/// <param name="CurFolder"></param>
/// <returns></returns>
public List<RemoteFileInfo> ListDirectory(string CurFolder)
{
InitWorkingDirectory();
var list = new List<RemoteFileInfo>();
try
{
string regex =
@"^" + //# Start of line
@"(?<dir>[\-ld])" + //# File size
@"(?<permission>[\-rwx]{9})" + //# Whitespace \n
@"\s+" + //# Whitespace \n
@"(?<filecode>\d+)" +
@"\s+" + //# Whitespace \n
@"(?<owner>\w+)" +
@"\s+" + //# Whitespace \n
@"(?<group>\w+)" +
@"\s+" + //# Whitespace \n
@"(?<size>\d+)" +
@"\s+" + //# Whitespace \n
@"(?<month>\w{3})" + //# Month (3 letters) \n
@"\s+" + //# Whitespace \n
@"(?<day>\d{1,2})" + //# Day (1 or 2 digits) \n
@"\s+" + //# Whitespace \n
@"(?<timeyear>[\d:]{4,5})" + //# Time or year \n
@"\s+" + //# Whitespace \n
@"(?<filename>(.*))" + //# Filename \n
@"$"; //# End of line
StringBuilder result = new StringBuilder();
FtpWebRequest ftp;
ftp = (FtpWebRequest)FtpWebRequest.Create(new Uri(ftpURI + CurFolder));
ftp.Credentials = new NetworkCredential(_ftpinfo.UserName, _ftpinfo.Pwd);
ftp.Method = WebRequestMethods.Ftp.ListDirectoryDetails;
ftp.KeepAlive = false;
ftp.Timeout = 10000;
if (_ftpinfo.Encrypt > 0)
{
ServicePointManager.ServerCertificateValidationCallback = new
System.Net.Security.RemoteCertificateValidationCallback(OnCertificateValidation);
ftp.ClientCertificates = new X509CertificateCollection();
ftp.AuthenticationLevel = AuthenticationLevel.MutualAuthRequested;
ftp.ImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Identification;
ftp.EnableSsl = true;
}
WebResponse response = ftp.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream(), GetEncoding());
string line = reader.ReadLine();
while (line != null)
{
var split = new Regex(regex).Match(line);
string dir = split.Groups["dir"].ToString();
string filename = split.Groups["filename"].ToString();
var size = split.Groups["size"].ToString();
bool isDirectory = !string.IsNullOrWhiteSpace(dir) && dir.Equals("d", StringComparison.OrdinalIgnoreCase);
list.Add(new RemoteFileInfo()
{
FullName = CurFolder.TrimEnd('/') +"/"+ filename,
IsDirectory = isDirectory,
Name = filename,
Length = size.ToInt64(),
LastWriteTime = (split.Groups["timeyear"].ToString() + " " + split.Groups["month"].ToString() + " " + split.Groups["day"].ToString()).ToDateTime()
}) ;
result.Append(line);
result.Append("\n");
line = reader.ReadLine();
}
result.Remove(result.ToString().LastIndexOf("\n", StringComparison.OrdinalIgnoreCase), 1);
reader.Close();
response.Close();
}
catch (Exception)
{
return list;
}
return list;
}
/// <summary>
/// 上传
/// </summary>
/// <param name="localPath"></param>
/// <param name="remotePath"></param>
/// <returns></returns>
public int Upload(string localPath, string remotePath)
{
FileInfo fileInf = new FileInfo(localPath);
string uri = ftpURI + remotePath;
FtpWebRequest reqFTP;
reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(uri));
reqFTP.Credentials = new NetworkCredential(_ftpinfo.UserName, _ftpinfo.Pwd);
reqFTP.KeepAlive = true;
reqFTP.Method = WebRequestMethods.Ftp.UploadFile;
reqFTP.UseBinary = true;
reqFTP.ContentLength = fileInf.Length;
reqFTP.EnableSsl = true;
ServicePoint currentServicePoint = reqFTP.ServicePoint;
currentServicePoint.ConnectionLimit = 1024;
int buffLength = 2048;
byte[] buff = new byte[buffLength];
int contentLen;
FileStream fs = fileInf.OpenRead();
Int64 upload_size = 0;
try
{
Stream strm = reqFTP.GetRequestStream();
contentLen = fs.Read(buff, 0, buffLength);
while (contentLen != 0)
{
double process = upload_size / (double)fileInf.Length;
if (process > 1) { process = 1; }
var progress = new FileTransferProgressEventArgs()
{
Cancel = false,
LocalPath = localPath,
FileProgress = process,
};
FileTransferProgress?.Invoke(this, progress);
if (progress.Cancel) { break; }
upload_size += buffLength;
strm.Write(buff, 0, contentLen);
contentLen = fs.Read(buff, 0, buffLength);
}
strm.Close();
fs.Close();
var progress2 = new FileTransferProgressEventArgs()
{
Cancel = false,
LocalPath = localPath,
FileProgress = 1,
IsComplete=true
};
FileTransferProgress?.Invoke(this, progress2);
return 1;
}
catch (Exception ex)
{
ErrorMsg = ex.Message;
return -1;
}
}
public string ErrorMsg { get; set; } = "";
/// <summary>
/// 文件传输事件
/// </summary>
public event FileTransferProgressEventHandler FileTransferProgress;
~FTPFtpWeb()
{
Dispose(false);
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (!this.disposed)
{
Close();
// If disposing equals true, dispose all managed
// and unmanaged resources.
if (disposing)
{
// Dispose managed resources.
}
// Release unmanaged resources. If disposing is false,
// only the following code is executed.
// Note that this is not thread safe.
// Another thread could start disposing the object
// after the managed resources are disposed,
// but before the disposed flag is set to true.
// If thread safety is necessary, it must be
// implemented by the client.
}
disposed = true;
}
}
}
@@ -1,10 +1,11 @@
using GameBackup3H3.DbOp;
using ExtendUI.FTPManager;
using ryCommon;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WinSCP;
using static System.Collections.Specialized.BitVector32;
namespace FTPop
{
@@ -14,8 +15,12 @@ namespace FTPop
public class FTPWinSCP : IFTP, IDisposable
{
private bool disposed = false;
readonly Session session = new Session();
readonly WinSCP.Session session = new WinSCP.Session();
public string CurRemoteFolder { get; private set; } = "";
/// <summary>
/// 当前ID
/// </summary>
public int Id { get; set; } = 0;
private FTPInfo _ftpinfo = null;
/// <summary>
/// 打开FTP
@@ -23,35 +28,33 @@ namespace FTPop
/// <param name="ftpinfo"></param>
public int Open(FTPInfo ftpinfo)
{
if(ftpinfo==null)
_ftpinfo= ftpinfo;
if (ftpinfo==null)
{
return -1;
}
_ftpinfo = ftpinfo;
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Ftp,
HostName = ftpinfo.IP,
PortNumber = ftpinfo.Port,
UserName = ftpinfo.UserName,
Password = ftpinfo.Pwd,
};
CurRemoteFolder = ftpinfo.RemoteDir;
if (ftpinfo.Encrypt > 0)
{
sessionOptions.FtpSecure = ftpinfo.Encrypt == 2 ? FtpSecure.Explicit : FtpSecure.Implicit;
sessionOptions.GiveUpSecurityAndAcceptAnyTlsHostCertificate = true;
}
else
{
sessionOptions.FtpSecure = FtpSecure.None;
}
if (FileTransferProgress != null)
{
session.FileTransferProgress += Session_FileTransferProgress; ;
}
try
{
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Ftp,
HostName = ftpinfo.IP,
PortNumber = ftpinfo.Port,
UserName = ftpinfo.UserName,
Password = ftpinfo.Pwd
};
if (ftpinfo.Encrypt == 0) { sessionOptions.FtpSecure = FtpSecure.None; }
else if (ftpinfo.Encrypt == 1) { sessionOptions.FtpSecure = FtpSecure.Implicit; }
else { sessionOptions.FtpSecure = FtpSecure.Explicit; }
//sessionOptions.
if (ftpinfo.Encrypt != 0)
{
sessionOptions.GiveUpSecurityAndAcceptAnyTlsHostCertificate = true;
}
if (FileTransferProgress != null)
{
session.FileTransferProgress += Session_FileTransferProgress; ;
}
session.Open(sessionOptions);
if (session.Opened)
{
@@ -62,36 +65,24 @@ namespace FTPop
return -1;
}
}
catch(Exception ex)
{
ErrorMsg = ex.Message;
return -2;
}
catch(Exception ex)
{ LastError = ex.Message; return -1; }
}
/// <summary>
/// ftp是否打开着
/// 最后一次错误
/// </summary>
public bool IsOpen
{
get {
return session.Opened;
}
}
/// <summary>
/// ftp是否打开着
/// </summary>
public int ReConnect
{
get { return Open(_ftpinfo); }
}
public string LastError { get; set; } = "";
private void Session_FileTransferProgress(object sender, WinSCP.FileTransferProgressEventArgs e)
{
var progress= new FileTransferProgressEventArgs()
var progress = new FileTransferProgressEventArgs()
{
Cancel = e.Cancel,
LocalPath = e.FileName,
FileProgress=e.FileProgress,
IsComplete=e.FileProgress==1
RemotePath = e.FileName,
FileProgress = e.FileProgress,
IsComplete = e.FileProgress == 1,
FTPInfo = _ftpinfo,
Speed = e.CPS
};
FileTransferProgress?.Invoke(this, progress);
if (progress.Cancel) { e.Cancel = progress.Cancel; }
@@ -102,14 +93,9 @@ namespace FTPop
/// <returns></returns>
public int Close()
{
try
{
if (session.Opened)
{ session.Close(); }
session?.Dispose();
return 1;
}
catch { return 0; }
if (session.Opened)
{ session.Close(); }
return 1;
}
/// <summary>
/// 移除文件
@@ -133,22 +119,9 @@ namespace FTPop
return 1;
}
/// <summary>
/// 移动文件
///
/// </summary>
/// <param name="DirPath"></param>
/// <returns></returns>
public int CreateDir(string DirPath)
{
try
{
session.CreateDirectory(DirPath);
return 1;
}
catch
{
return -1;
}
}
public object Tag { get; set; } = null;
/// <summary>
/// 文件是否存在
/// </summary>
@@ -156,12 +129,7 @@ namespace FTPop
/// <returns></returns>
public bool FileExists(string remotePath)
{
if(remotePath.Length==0 || remotePath == "/") { return true; }
try
{
return session.FileExists(remotePath);
}
catch { return false; }
return session.FileExists(remotePath);
}
/// <summary>
/// 文件大小
@@ -177,6 +145,20 @@ namespace FTPop
catch { return -1; }
}
/// <summary>
/// 创建文件夹
/// </summary>
/// <param name="remotePath"></param>
/// <returns></returns>
public bool CreateDir(string remotePath)
{
try
{
session.CreateDirectory(remotePath);
return FileExists(remotePath);
}
catch { return false; }
}
/// <summary>
/// 文件最后修改时间
/// </summary>
/// <param name="remotePath"></param>
@@ -187,50 +169,38 @@ namespace FTPop
{
return session.GetFileInfo(remotePath).LastWriteTime;
}
catch { return new DateTime(2000,1,1); }
catch(Exception ex) { LastError = ex.Message; return new DateTime(2000,1,1); }
}
/// <summary>
/// 文件信息
/// </summary>
/// <param name="remotePath"></param>
/// <returns></returns>
public RemoteFileInfo GetFileInfo(string remotePath)
public ExtendUI.FTPManager.RemoteFileInfo GetFileInfo(string remotePath)
{
try
{
var info = session.GetFileInfo(remotePath);
return new RemoteFileInfo() { LastWriteTime = info.LastWriteTime, Length = info.Length, Name = info.Name, IsDirectory = info.IsDirectory };
return new ExtendUI.FTPManager.RemoteFileInfo() { LastWriteTime = info.LastWriteTime, Length = info.Length, Name = info.Name, IsDirectory = info.IsDirectory };
}
catch { return new RemoteFileInfo(); }
catch (Exception ex) { LastError = ex.Message; return new ExtendUI.FTPManager.RemoteFileInfo(); }
}
/// <summary>
/// 显示文件夹列表
/// </summary>
/// <param name="CurFolder"></param>
/// <returns></returns>
public List<RemoteFileInfo> ListDirectory(string CurFolder, out string error)
public List<ExtendUI.FTPManager.RemoteFileInfo> ListDirectory(string CurFolder)
{
error = "";
var list = new List<RemoteFileInfo>();
try
var list = new List<ExtendUI.FTPManager.RemoteFileInfo>();
var result = session.ListDirectory(CurFolder);
for (int i = 0; i < result.Files.Count; i++)
{
var result = session.ListDirectory(CurFolder);
for (int i = 0; i < result.Files.Count; i++)
{
var file = result.Files[i];
list.Add(new RemoteFileInfo()
{
FullName = file.FullName,
IsDirectory = file.IsDirectory,
Name = file.Name,
Length = file.Length,
LastWriteTime = file.LastWriteTime
});
}
}
catch(Exception ex)
{
error = ex.Message;
var file = result.Files[i];
list.Add(new ExtendUI.FTPManager.RemoteFileInfo() { FullName=file.FullName,
IsDirectory=file.IsDirectory,
Name=file.Name, Length=file.Length, LastWriteTime=file.LastWriteTime});
}
return list;
}
@@ -244,40 +214,47 @@ namespace FTPop
{
try
{
var progress = new FileTransferProgressEventArgs()
{
LocalPath = localPath,
RemotePath= remotePath,
FileProgress = 0,
IsStart=true,
FTPInfo=_ftpinfo
};
FileTransferProgress?.Invoke(this, progress);
TransferOptions transferOptions = new TransferOptions
{
TransferMode = TransferMode.Binary,
OverwriteMode= OverwriteMode.Overwrite,
OverwriteMode= OverwriteMode.Overwrite
};
TransferOperationResult transferResult;
transferResult =
session.PutFiles(localPath, remotePath, false, transferOptions);
//Throw on any error
transferResult.Check();
if (transferResult.IsSuccess)
{
if (FileSize(remotePath) == RyFiles.GetFileSize(localPath))
{
return 1;
}
else
{
ErrorMsg = "文件不完整。";
return -3;
}
}
else
{
return -2;
}
return transferResult.IsSuccess ? 1 : -1;
}
catch(Exception ex)
{
ErrorMsg = ex.Message;
return -1;
LastError = ex.Message;
return -2;
}
}
/// <summary>
/// 文件传输事件
/// </summary>
public event FileTransferProgressEventHandler FileTransferProgress;
~FTPWinSCP()
{
Dispose(false);
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
/// <summary>
/// 下载
/// </summary>
/// <param name="remotePath"></param>
@@ -285,12 +262,16 @@ namespace FTPop
/// <returns></returns>
public int Download(string remotePath, string localPath)
{
if (!RyFiles.FileOrDirExist(System.IO.Path.GetDirectoryName(localPath)))
{
RyFiles.CreateDirectory(System.IO.Path.GetDirectoryName(localPath));
}
try
{
TransferOptions transferOptions = new TransferOptions
{
TransferMode = TransferMode.Binary,
OverwriteMode = OverwriteMode.Overwrite
OverwriteMode = OverwriteMode.Overwrite
};
TransferOperationResult transferResult;
transferResult =
@@ -321,19 +302,6 @@ namespace FTPop
}
}
public string ErrorMsg { get; set; } = "";
/// <summary>
/// 文件传输事件
/// </summary>
public event FileTransferProgressEventHandler FileTransferProgress;
~FTPWinSCP()
{
Dispose(false);
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (!this.disposed)
@@ -0,0 +1,42 @@
using ExtendUI.FTPManager;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FTPop
{
public delegate void FileTransferProgressEventHandler(object sender, FileTransferProgressEventArgs e);
public sealed class FileTransferProgressEventArgs : EventArgs
{
/// <summary>
/// 文件全路径
/// </summary>
public string LocalPath { get; internal set; }
/// <summary>
/// 远程文件全路径
/// </summary>
public string RemotePath { get; internal set; }
/// <summary>
/// 当前文件进度
/// </summary>
public double FileProgress { get; internal set; }
/// <summary>
/// 当前传输速度
/// </summary>
public double Speed { get; internal set; }
/// <summary>
/// 是否完成
/// </summary>
public bool IsComplete { get; internal set; } = false;
/// <summary>
/// 是否是开始
/// </summary>
public bool IsStart { get; internal set; } = false;
/// <summary>
/// 是否要取消
/// </summary>
public bool Cancel { get; set; }
public FTPInfo FTPInfo { get; internal set; } = null;
}
}
@@ -1,362 +0,0 @@
namespace GameBackup3H3.DbOp
{
partial class FrmAddFTP
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmAddFTP));
this.BtnCancel = new ryControls.ButtonEx();
this.BtnOK = new ryControls.ButtonEx();
this.CbbEncryption = new ryControls.RyComboBox();
this.label10 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.TxtRemoteDir = new ryControls.TextBoxEx2();
this.label5 = new System.Windows.Forms.Label();
this.TxtPort = new ryControls.TextBoxEx2();
this.label4 = new System.Windows.Forms.Label();
this.TxtPwd = new ryControls.TextBoxEx2();
this.label3 = new System.Windows.Forms.Label();
this.TxtUserName = new ryControls.TextBoxEx2();
this.label2 = new System.Windows.Forms.Label();
this.TxtHost = new ryControls.TextBoxEx2();
this.label1 = new System.Windows.Forms.Label();
this.TxtName = new ryControls.TextBoxEx2();
this.label7 = new System.Windows.Forms.Label();
this.TxtDes = new ryControls.TextBoxEx2();
this.SuspendLayout();
//
// BtnCancel
//
this.BtnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BtnCancel.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnCancel.Location = new System.Drawing.Point(358, 310);
this.BtnCancel.Name = "BtnCancel";
this.BtnCancel.Size = new System.Drawing.Size(65, 27);
this.BtnCancel.TabIndex = 5;
this.BtnCancel.Text = "取消";
this.BtnCancel.UseVisualStyleBackColor = true;
this.BtnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
//
// BtnOK
//
this.BtnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BtnOK.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnOK.Location = new System.Drawing.Point(287, 310);
this.BtnOK.Name = "BtnOK";
this.BtnOK.Size = new System.Drawing.Size(65, 27);
this.BtnOK.TabIndex = 4;
this.BtnOK.Text = "确定";
this.BtnOK.UseVisualStyleBackColor = true;
this.BtnOK.Click += new System.EventHandler(this.BtnOK_Click);
//
// CbbEncryption
//
this.CbbEncryption.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbEncryption.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CbbEncryption.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbEncryption.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbEncryption.FormattingEnabled = true;
this.CbbEncryption.Items.AddRange(new object[] {
"不加密",
"TLS/SSL Implicit 隐式加密",
"TLS/SSL Explicit 显式加密"});
this.CbbEncryption.Location = new System.Drawing.Point(76, 41);
this.CbbEncryption.Name = "CbbEncryption";
this.CbbEncryption.Size = new System.Drawing.Size(348, 24);
this.CbbEncryption.TabIndex = 44;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(13, 45);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(53, 12);
this.label10.TabIndex = 43;
this.label10.Text = "加密方式";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(17, 142);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(53, 12);
this.label6.TabIndex = 40;
this.label6.Text = "远程目录";
//
// TxtRemoteDir
//
this.TxtRemoteDir.BackColor = System.Drawing.Color.White;
this.TxtRemoteDir.EmptyText = "";
this.TxtRemoteDir.Location = new System.Drawing.Point(76, 134);
this.TxtRemoteDir.MaxLength = 999999999;
this.TxtRemoteDir.Multiline = false;
this.TxtRemoteDir.Name = "TxtRemoteDir";
this.TxtRemoteDir.OnlyNumeric = false;
this.TxtRemoteDir.PasswordChar = '\0';
this.TxtRemoteDir.ReadOnly = false;
this.TxtRemoteDir.SelectedText = "";
this.TxtRemoteDir.SelectionLength = 0;
this.TxtRemoteDir.SelectionStart = 0;
this.TxtRemoteDir.Size = new System.Drawing.Size(348, 25);
this.TxtRemoteDir.TabIndex = 39;
this.TxtRemoteDir.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtRemoteDir.ToolTip = "";
this.TxtRemoteDir.WordWrap = true;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(323, 80);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(29, 12);
this.label5.TabIndex = 38;
this.label5.Text = "端口";
//
// TxtPort
//
this.TxtPort.BackColor = System.Drawing.Color.White;
this.TxtPort.EmptyText = "";
this.TxtPort.Location = new System.Drawing.Point(358, 72);
this.TxtPort.MaxLength = 999999999;
this.TxtPort.Multiline = false;
this.TxtPort.Name = "TxtPort";
this.TxtPort.OnlyNumeric = false;
this.TxtPort.PasswordChar = '\0';
this.TxtPort.ReadOnly = false;
this.TxtPort.SelectedText = "";
this.TxtPort.SelectionLength = 0;
this.TxtPort.SelectionStart = 0;
this.TxtPort.Size = new System.Drawing.Size(66, 25);
this.TxtPort.TabIndex = 37;
this.TxtPort.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtPort.ToolTip = "";
this.TxtPort.WordWrap = true;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(242, 111);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(29, 12);
this.label4.TabIndex = 36;
this.label4.Text = "密码";
//
// TxtPwd
//
this.TxtPwd.BackColor = System.Drawing.Color.White;
this.TxtPwd.EmptyText = "";
this.TxtPwd.Location = new System.Drawing.Point(277, 103);
this.TxtPwd.MaxLength = 999999999;
this.TxtPwd.Multiline = false;
this.TxtPwd.Name = "TxtPwd";
this.TxtPwd.OnlyNumeric = false;
this.TxtPwd.PasswordChar = '*';
this.TxtPwd.ReadOnly = false;
this.TxtPwd.SelectedText = "";
this.TxtPwd.SelectionLength = 0;
this.TxtPwd.SelectionStart = 0;
this.TxtPwd.Size = new System.Drawing.Size(147, 25);
this.TxtPwd.TabIndex = 35;
this.TxtPwd.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtPwd.ToolTip = "";
this.TxtPwd.WordWrap = true;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(17, 111);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(41, 12);
this.label3.TabIndex = 34;
this.label3.Text = "用户名";
//
// TxtUserName
//
this.TxtUserName.BackColor = System.Drawing.Color.White;
this.TxtUserName.EmptyText = "";
this.TxtUserName.Location = new System.Drawing.Point(76, 103);
this.TxtUserName.MaxLength = 999999999;
this.TxtUserName.Multiline = false;
this.TxtUserName.Name = "TxtUserName";
this.TxtUserName.OnlyNumeric = false;
this.TxtUserName.PasswordChar = '\0';
this.TxtUserName.ReadOnly = false;
this.TxtUserName.SelectedText = "";
this.TxtUserName.SelectionLength = 0;
this.TxtUserName.SelectionStart = 0;
this.TxtUserName.Size = new System.Drawing.Size(160, 25);
this.TxtUserName.TabIndex = 33;
this.TxtUserName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtUserName.ToolTip = "";
this.TxtUserName.WordWrap = true;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(17, 80);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(47, 12);
this.label2.TabIndex = 32;
this.label2.Text = "IP/主机";
//
// TxtHost
//
this.TxtHost.BackColor = System.Drawing.Color.White;
this.TxtHost.EmptyText = "";
this.TxtHost.Location = new System.Drawing.Point(76, 72);
this.TxtHost.MaxLength = 999999999;
this.TxtHost.Multiline = false;
this.TxtHost.Name = "TxtHost";
this.TxtHost.OnlyNumeric = false;
this.TxtHost.PasswordChar = '\0';
this.TxtHost.ReadOnly = false;
this.TxtHost.SelectedText = "";
this.TxtHost.SelectionLength = 0;
this.TxtHost.SelectionStart = 0;
this.TxtHost.Size = new System.Drawing.Size(241, 25);
this.TxtHost.TabIndex = 31;
this.TxtHost.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtHost.ToolTip = "";
this.TxtHost.WordWrap = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(13, 17);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(29, 12);
this.label1.TabIndex = 30;
this.label1.Text = "名称";
//
// TxtName
//
this.TxtName.BackColor = System.Drawing.Color.White;
this.TxtName.EmptyText = "";
this.TxtName.Location = new System.Drawing.Point(76, 9);
this.TxtName.MaxLength = 999999999;
this.TxtName.Multiline = false;
this.TxtName.Name = "TxtName";
this.TxtName.OnlyNumeric = false;
this.TxtName.PasswordChar = '\0';
this.TxtName.ReadOnly = false;
this.TxtName.SelectedText = "";
this.TxtName.SelectionLength = 0;
this.TxtName.SelectionStart = 0;
this.TxtName.Size = new System.Drawing.Size(348, 25);
this.TxtName.TabIndex = 29;
this.TxtName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtName.ToolTip = "";
this.TxtName.WordWrap = true;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(17, 173);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(29, 12);
this.label7.TabIndex = 46;
this.label7.Text = "备注";
//
// TxtDes
//
this.TxtDes.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.TxtDes.BackColor = System.Drawing.Color.White;
this.TxtDes.EmptyText = "";
this.TxtDes.Location = new System.Drawing.Point(76, 165);
this.TxtDes.MaxLength = 999999999;
this.TxtDes.Multiline = true;
this.TxtDes.Name = "TxtDes";
this.TxtDes.OnlyNumeric = false;
this.TxtDes.PasswordChar = '\0';
this.TxtDes.ReadOnly = false;
this.TxtDes.SelectedText = "";
this.TxtDes.SelectionLength = 0;
this.TxtDes.SelectionStart = 0;
this.TxtDes.Size = new System.Drawing.Size(348, 139);
this.TxtDes.TabIndex = 45;
this.TxtDes.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtDes.ToolTip = "";
this.TxtDes.WordWrap = true;
//
// FrmAddFTP
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(438, 347);
this.Controls.Add(this.label7);
this.Controls.Add(this.TxtDes);
this.Controls.Add(this.CbbEncryption);
this.Controls.Add(this.label10);
this.Controls.Add(this.label6);
this.Controls.Add(this.TxtRemoteDir);
this.Controls.Add(this.label5);
this.Controls.Add(this.TxtPort);
this.Controls.Add(this.label4);
this.Controls.Add(this.TxtPwd);
this.Controls.Add(this.label3);
this.Controls.Add(this.TxtUserName);
this.Controls.Add(this.label2);
this.Controls.Add(this.TxtHost);
this.Controls.Add(this.label1);
this.Controls.Add(this.TxtName);
this.Controls.Add(this.BtnCancel);
this.Controls.Add(this.BtnOK);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "FrmAddFTP";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "新增";
this.Load += new System.EventHandler(this.FrmAddFTP_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private ryControls.ButtonEx BtnCancel;
private ryControls.ButtonEx BtnOK;
private ryControls.RyComboBox CbbEncryption;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label6;
private ryControls.TextBoxEx2 TxtRemoteDir;
private System.Windows.Forms.Label label5;
private ryControls.TextBoxEx2 TxtPort;
private System.Windows.Forms.Label label4;
private ryControls.TextBoxEx2 TxtPwd;
private System.Windows.Forms.Label label3;
private ryControls.TextBoxEx2 TxtUserName;
private System.Windows.Forms.Label label2;
private ryControls.TextBoxEx2 TxtHost;
private System.Windows.Forms.Label label1;
private ryControls.TextBoxEx2 TxtName;
private System.Windows.Forms.Label label7;
private ryControls.TextBoxEx2 TxtDes;
}
}
@@ -1,100 +0,0 @@
using ryCommon;
using ryCommonDb;
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 开发辅助工具.Manager;
namespace GameBackup3H3.DbOp
{
public partial class FrmAddFTP : Form
{
public ModalForm mr = null;
public string tableName = "FTP";
public int isAdd = 1;
public string selectId = "-1";
public FrmAddFTP()
{
InitializeComponent();
CbbEncryption.SelectedIndex = 0;
}
#region 需要修改
public void GetInfo(string id)
{
selectId = id;
DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
DataSet ds = db.ReadData(tableName, id);
if (mydb.HaveData(ds))
{
DataRow reader = ds.Tables[0].Rows[0];
#region 读取信息
TxtName.Text = reader["name"].ToString();
TxtHost.Text = reader["ip"].ToString();
TxtPort.Text = reader["port"].ToString();
TxtRemoteDir.Text = reader["remoteDir"].ToString();
TxtUserName.Text = reader["username"].ToString();
TxtPwd.Text = reader["pwd"].ToString();
CbbEncryption.SelectedIndex = reader["encrypt"].ToInt(0,2,0);
TxtDes.Text = reader["des"].ToString();
#endregion
}
}
db.Free();
}
private void BtnOK_Click(object sender, EventArgs e)
{
if (TxtName.Text == "")
{
MessageBox.Show("名称不能为空。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
RyQuickSQL mySQL = new RyQuickSQL(tableName);
mySQL.AddField("name", TxtName.Text);
mySQL.AddField("ip", TxtHost.Text);
mySQL.AddField("port", TxtPort.Text.ToInt());
mySQL.AddField("remoteDir", TxtRemoteDir.Text);
mySQL.AddField("username", TxtUserName.Text);
mySQL.AddField("pwd", TxtPwd.Text);
mySQL.AddField("encrypt", CbbEncryption.SelectedIndex);
mySQL.AddField("des", TxtDes.Text);
//DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
if (isAdd >= 1)
{
mySQL.AddField("addTime",DateTime.Now);
mySQL.AddField("editTime", DateTime.Now);
db.ExecuteNonQuery(mySQL.GetInsertSQL(), db.GetParameter(mySQL));
}
else
{
mySQL.AddField("editTime", DateTime.Now);
db.ExecuteNonQuery(mySQL.GetUpdateSQL() + " where id=" + selectId, db.GetParameter(mySQL));
}
}
db.Free();
ModalForm.SetDialogResult(this, mr, DialogResult.OK);
}
#endregion
private void BtnCancel_Click(object sender, EventArgs e)
{
ModalForm.SetDialogResult(this, mr, DialogResult.Cancel);
}
private void FrmAddFTP_Load(object sender, EventArgs e)
{
}
}
}
@@ -1,136 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<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>
AAABAAEAICAAAAAAIABKAgAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAgAAAAIAgGAAAAc3p69AAAAARn
QU1BAACxjwv8YQUAAAIBSURBVFhHxZexTsMwEIY7lJdgZS9CYmAAVAk23oChAwOvwNIJiU5MwMSMBCNs
ZSqVWJGanYGxlKEValloMf5cJ7qmbnCVhJz0S9H5fP+f2Hd2Sr72MVKrGsfdobp5H6pAo6+hLHgOGCOG
WDstvXW/1JZOfCfIvMAc5to0y1urpcq9kbp0JV8G5CCXTetnemJFoyMTpQS5KjZ9svU+1bYOHojJWWFA
bkvjNh3Em+dBHoLc7i/BOunBLD/7InSceyKLDecLuCzt1CgXV2CemClRWefXLxNVexgbNJ4nM2i+/qiT
+mmE3eqegfQ1zi+cfkkO4DTkdC05gIC1q28nEFAuryQCAXGfSwAwHZPWKZ2hgHpr+sZx3DefIqxvbBpI
XyjgsHYU+RCwU903z5ILbj4/vT1ytt9+jACESL8LJAXSB0n8rXnGFxcAN7XPwRI5Uwt4bHsL0AgQIE+1
aAkWbUIZ6xJwZpcgvgmBQ0AfATPOvzahjE0SIAG5jJGYE5DHEiRhbgn+WYBZgtw3YQKC7MtwCQGmDOON
CAEHt+NUAvD5CDCNiHYonZQKk/NAvAzhNucBB4MUwCfMA1IAnIYck8cxQXkiEhC/MRd6IcEKv5JherC4
S2lohV7LQ9PBxf2YhMY6ZbExybFwzX2McpF9whfMmSu1NEbXonXSvzVBRr/npdIvW6FdJBbwQIAAAAAA
SUVORK5CYII=
</value>
</data>
</root>
@@ -1,101 +0,0 @@
namespace 开发辅助工具.Manager.FTP
{
partial class FrmDownProg
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmDownProg));
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.label1 = new System.Windows.Forms.Label();
this.ProgAll = new System.Windows.Forms.ProgressBar();
this.label2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(12, 39);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(368, 32);
this.progressBar1.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(83, 12);
this.label1.TabIndex = 1;
this.label1.Text = "正在下载中...";
//
// ProgAll
//
this.ProgAll.Location = new System.Drawing.Point(12, 101);
this.ProgAll.Name = "ProgAll";
this.ProgAll.Size = new System.Drawing.Size(368, 32);
this.ProgAll.TabIndex = 2;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 86);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(53, 12);
this.label2.TabIndex = 3;
this.label2.Text = "全部进度";
//
// FrmDownProg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(392, 166);
this.Controls.Add(this.label2);
this.Controls.Add(this.ProgAll);
this.Controls.Add(this.label1);
this.Controls.Add(this.progressBar1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmDownProg";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "下载中...";
this.TopMost = true;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmDownProg_FormClosing);
this.Shown += new System.EventHandler(this.FrmDownProg_Shown);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ProgressBar ProgAll;
private System.Windows.Forms.Label label2;
}
}
@@ -1,151 +0,0 @@
using DiffPlex.Model;
using GameBackup3H3.DbOp;
using ryCommon;
using SuperDesign.Manager.FTP;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace 开发辅助工具.Manager.FTP
{
public partial class FrmDownProg : Form
{
public FrmDownProg()
{
InitializeComponent();
}
public List<UploadInfo> DownList { get; set; } = new List<UploadInfo>();
private void FrmDownProg_FormClosing(object sender, FormClosingEventArgs e)
{
if(e.CloseReason== CloseReason.UserClosing) { e.Cancel = true; }
}
private void FrmDownProg_Shown(object sender, EventArgs e)
{
ProgAll.Maximum = DownList.Count;
Thread th = new Thread(Start);
th.Start();
void Start()
{
var error = 0;
for (int i = 0; i < DownList.Count; i++)
{
var item = DownList[i];
FTPop.FTPWinSCP ftp = (FTPop.FTPWinSCP)FTPManger.GetFTP(item.FtpInfo, out var result);
FTPManger.FileTransferProgress += Ftp_FileTransferProgress;
this.Invoke(new Action(() =>
{
ProgAll.Value = i;
label1.Text = "正在登录FTP...";
}));
if (result == 1)
{
this.Invoke(new Action(() =>
{
label1.Text = "正在下载文件...";
}));
if (!ftp.FileExists(item.RemotePath))
{
error++;
this.Invoke(new Action(() =>
{
MessageBox.Show("远程文件不存在=>" + item.RemotePath, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}));
continue;
}
else
{
if (item.LocalPath.Length > 0)
{
var remote_fileinfo = ftp.GetFileInfo(item.RemotePath);
if (remote_fileinfo.LastWriteTime != DateTime.MinValue)
{
bool goto_next = false;
if (remote_fileinfo.LastWriteTime.ToInt64() < RyFiles.GetFileDate(item.LocalPath).LastWriteTime.ToInt64())
{
this.Invoke(new Action(() =>
{
switch (MessageBox.Show("当前本地文件的修改日期比远程服务器新,是否要替换?\r\n\r\n" + item.LocalPath, "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2))
{
case DialogResult.No:
error++;
goto_next = true;
break;
}
}));
}
else if (RyFiles.GetFileDate(item.LocalPath).LastWriteTime.ToInt64() == remote_fileinfo.LastWriteTime.ToInt64())
{
if (RyFiles.GetFileSize(item.LocalPath) != remote_fileinfo.Length)
{
this.Invoke(new Action(() =>
{
switch (MessageBox.Show("当前本地文件与服务器文件日期一致,但大小不一致,是否要替换?\r\n\r\n本地:" + RyFiles.GetFileSizeStr(item.LocalPath) + "=>服务器:" + RyFiles.GetFileSizeStr(remote_fileinfo.Length), "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2))
{
case DialogResult.No:
error++;
goto_next = true;
break;
}
}));
}
}
if (goto_next) { continue; }
}
}
}
if (ftp.Download(item.RemotePath, item.LocalPath) == 1)
{
}
else
{
this.Invoke(new Action(() =>
{
MessageBox.Show("下载失败=>" + item.RemotePath + "\r\n" + ftp.ErrorMsg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
error++;
}));
}
}
else
{
this.Invoke(new Action(() =>
{
MessageBox.Show("FTP登录失败=>"+item.LocalPath, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
error++;
}));
}
FTPManger.FileTransferProgress -= Ftp_FileTransferProgress;
}
this.Invoke(new Action(() =>
{
ProgAll.Value = ProgAll.Maximum;
if (error == 0)
{
DialogResult = DialogResult.OK;
}
else
{
DialogResult = DialogResult.No;
}
}));
}
}
private void Ftp_FileTransferProgress(object sender, FTPop.FileTransferProgressEventArgs e)
{
this.Invoke(new Action(() =>
{
progressBar1.Value = (e.FileProgress*100).ToInt();
}));
}
}
}
@@ -1,139 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<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>
AAABAAEAICAAAAAAIAD4AgAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAgAAAAIAgGAAAAc3p69AAAAARn
QU1BAACxjwv8YQUAAAKvSURBVFhH7VY9aBRBFN5CMLt7atRCbGzsJE20iKSy8w/EJpWNIAQba7Gy0cqf
QggasjubC2qRIp2BVAcSgogG/EELBREEj4SAYXf2LtX5vdk3m72925s7bsv74ONu33vz3jdvZnfGGmGE
QTG2EF6wRfzICeSaI2Qd3Mb/dTAA71u11gEOLRd2EM+gcA0FWwZuOJ68ysPKARXvUugvuIlZf83ZE1I3
yoAbRHdzyeedRXmO3QnmtirozrQjompb7LAicjP/4/jyMrsKAcGXEPdjaBEYeB0JtiiJ7csQ6zrJLgXa
jFmyWQHdmEI3dhIR+J2XJ9llBtTfckX0Np0B6IrGPXanoKLanxdAQJ5r6Xg/usnm3rD96IkelOE7drfB
JIAA3yr50ZHXbCoG1ntJJwQ/09rZYneK3R3oU8Asx+xAxOOiOCp+RydD4bWxauMUuwrRjwBCmpfpCrnM
rgSHvd1jmV37gc1G9C0AX0jM/ruOJbaJoFZnnLNsNqJfARro8nnEvtFjMOmHyoEH/fGoK0OfGFSABgrP
8bio4u1NkID3yoC155iuoCJ5ciIlIE8e1oGDi83TGJN8X3CoQUAcpQ8GQP0zXbSQvnzO4YVAzRUVS5PG
ny/0QK8h+3uCNlBaLE8/WuWwnshMpE4CXvDgT+w3whVx25eS+ZHdRmQEbNNbcFsn6bV2WRx59e8okuwf
OEL+PlRtHWe3EZklWLecqpzEQ4MM2Ac1jjGi4oUT6pASUoJn2WxEsgljGkPCfWV0vPABG2gTGY9cDVc0
Lw56+0GNTV0Lh9QNZRwPWuPYA99SEbh0oBvTylkSKmLvDFq+f3vK3xNguALHrzRAMQ5pWYYlcv0Em9nc
XLYd7kJ0Incqlk4SxOWKAREzuJQ8RQc2uiUZmHjF7SB62dH2EUawLOs/Afw6gsg7dkcAAAAASUVORK5C
YII=
</value>
</data>
</root>
@@ -1,431 +0,0 @@
namespace SuperDesign.Manager.FTP
{
partial class FrmFTPBrowser
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmFTPBrowser));
this.objectListView1 = new BrightIdeasSoftware.FastObjectListView();
this.OlvFileName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvFileSize = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvFileType = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvLastWriteTime = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.刷新列表ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
this.查看历史记录ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.打开同位置本地文件ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.imageListSmall = new System.Windows.Forms.ImageList(this.components);
this.CbbMatch = new ryControls.RyComboBox();
this.TxtSearch = new ryControls.TextBoxEx2();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.PnlState = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.TxtFtpPath = new ryControls.TextBoxEx2();
this.MenuForm = new System.Windows.Forms.ContextMenuStrip(this.components);
this.重命名ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.BtnMustUpdate = new ryControls.ButtonEx();
this.panel1 = new System.Windows.Forms.Panel();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new ryControls.Controls.LableX();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.BtnUp = new ryControls.ButtonEx();
((System.ComponentModel.ISupportInitialize)(this.objectListView1)).BeginInit();
this.contextMenuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.PnlState.SuspendLayout();
this.MenuForm.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// objectListView1
//
this.objectListView1.AllColumns.Add(this.OlvFileName);
this.objectListView1.AllColumns.Add(this.OlvFileSize);
this.objectListView1.AllColumns.Add(this.OlvFileType);
this.objectListView1.AllColumns.Add(this.OlvLastWriteTime);
this.objectListView1.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.objectListView1.CellEditUseWholeCell = false;
this.objectListView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.OlvFileName,
this.OlvFileSize,
this.OlvFileType,
this.OlvLastWriteTime});
this.objectListView1.ContextMenuStrip = this.contextMenuStrip1;
this.objectListView1.Cursor = System.Windows.Forms.Cursors.Default;
this.objectListView1.FullRowSelect = true;
this.objectListView1.HideSelection = false;
this.objectListView1.LargeImageList = this.imageListSmall;
this.objectListView1.Location = new System.Drawing.Point(1, 53);
this.objectListView1.MultiSelect = false;
this.objectListView1.Name = "objectListView1";
this.objectListView1.RowHeight = 25;
this.objectListView1.ShowGroups = false;
this.objectListView1.Size = new System.Drawing.Size(278, 455);
this.objectListView1.SmallImageList = this.imageListSmall;
this.objectListView1.TabIndex = 0;
this.objectListView1.UseCompatibleStateImageBehavior = false;
this.objectListView1.UseFiltering = true;
this.objectListView1.View = System.Windows.Forms.View.Details;
this.objectListView1.VirtualMode = true;
this.objectListView1.BeforeSorting += new System.EventHandler<BrightIdeasSoftware.BeforeSortingEventArgs>(this.ObjectListView1_BeforeSorting);
this.objectListView1.SelectionChanged += new System.EventHandler(this.ObjectListView1_SelectionChanged);
this.objectListView1.DoubleClick += new System.EventHandler(this.ObjectListView1_DoubleClick);
//
// OlvFileName
//
this.OlvFileName.Tag = "FileName";
this.OlvFileName.Text = "文件名";
this.OlvFileName.Width = 200;
//
// OlvFileSize
//
this.OlvFileSize.Tag = "FileSize";
this.OlvFileSize.Text = "文件大小";
this.OlvFileSize.Width = 90;
//
// OlvFileType
//
this.OlvFileType.Tag = "FileType";
this.OlvFileType.Text = "文件类型";
this.OlvFileType.Width = 90;
//
// OlvLastWriteTime
//
this.OlvLastWriteTime.Tag = "LastWriteTime";
this.OlvLastWriteTime.Text = "最后写入时间";
this.OlvLastWriteTime.Width = 200;
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.刷新列表ToolStripMenuItem,
this.toolStripMenuItem1,
this.查看历史记录ToolStripMenuItem,
this.打开同位置本地文件ToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(185, 76);
//
// 刷新列表ToolStripMenuItem
//
this.刷新列表ToolStripMenuItem.Name = "刷新列表ToolStripMenuItem";
this.刷新列表ToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.刷新列表ToolStripMenuItem.Text = "刷新列表";
this.刷新列表ToolStripMenuItem.Click += new System.EventHandler(this.刷新列表ToolStripMenuItem_Click);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(181, 6);
//
// 查看历史记录ToolStripMenuItem
//
this.查看历史记录ToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("查看历史记录ToolStripMenuItem.Image")));
this.查看历史记录ToolStripMenuItem.Name = "查看历史记录ToolStripMenuItem";
this.查看历史记录ToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.查看历史记录ToolStripMenuItem.Text = "查看历史记录";
this.查看历史记录ToolStripMenuItem.Click += new System.EventHandler(this.查看历史记录ToolStripMenuItem_Click);
//
// 打开同位置本地文件ToolStripMenuItem
//
this.打开同位置本地文件ToolStripMenuItem.Name = "打开同位置本地文件ToolStripMenuItem";
this.打开同位置本地文件ToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.打开同位置本地文件ToolStripMenuItem.Text = "打开同位置本地文件";
this.打开同位置本地文件ToolStripMenuItem.Click += new System.EventHandler(this.打开同位置本地文件ToolStripMenuItem_Click);
//
// imageListSmall
//
this.imageListSmall.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
this.imageListSmall.ImageSize = new System.Drawing.Size(16, 16);
this.imageListSmall.TransparentColor = System.Drawing.Color.Transparent;
//
// CbbMatch
//
this.CbbMatch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.CbbMatch.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbMatch.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CbbMatch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbMatch.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbMatch.FormattingEnabled = true;
this.CbbMatch.Items.AddRange(new object[] {
"任意文本",
"前缀",
"正则表达式"});
this.CbbMatch.Location = new System.Drawing.Point(185, 1);
this.CbbMatch.Name = "CbbMatch";
this.CbbMatch.Size = new System.Drawing.Size(94, 24);
this.CbbMatch.TabIndex = 12;
this.CbbMatch.SelectedIndexChanged += new System.EventHandler(this.CbbMatch_SelectedIndexChanged);
//
// TxtSearch
//
this.TxtSearch.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtSearch.BackColor = System.Drawing.Color.White;
this.TxtSearch.EmptyText = "请输入搜索内容";
this.TxtSearch.Location = new System.Drawing.Point(1, 1);
this.TxtSearch.MaxLength = 999999999;
this.TxtSearch.Multiline = false;
this.TxtSearch.Name = "TxtSearch";
this.TxtSearch.OnlyNumeric = false;
this.TxtSearch.PasswordChar = '\0';
this.TxtSearch.ReadOnly = false;
this.TxtSearch.SelectedText = "";
this.TxtSearch.SelectionLength = 0;
this.TxtSearch.SelectionStart = 0;
this.TxtSearch.Size = new System.Drawing.Size(178, 24);
this.TxtSearch.TabIndex = 11;
this.TxtSearch.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtSearch.ToolTip = "";
this.TxtSearch.WordWrap = true;
this.TxtSearch.TextChanged2 += new System.EventHandler(this.TxtSearch_TextChanged2);
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(121, 21);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(32, 32);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.pictureBox1.TabIndex = 13;
this.pictureBox1.TabStop = false;
//
// PnlState
//
this.PnlState.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.PnlState.BackColor = System.Drawing.Color.White;
this.PnlState.Controls.Add(this.label1);
this.PnlState.Controls.Add(this.pictureBox1);
this.PnlState.Location = new System.Drawing.Point(1, 216);
this.PnlState.Name = "PnlState";
this.PnlState.Size = new System.Drawing.Size(281, 98);
this.PnlState.TabIndex = 14;
this.PnlState.Visible = false;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(101, 67);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(77, 12);
this.label1.TabIndex = 14;
this.label1.Text = "正在加载....";
//
// TxtFtpPath
//
this.TxtFtpPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtFtpPath.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.TxtFtpPath.EmptyText = "";
this.TxtFtpPath.Location = new System.Drawing.Point(35, 28);
this.TxtFtpPath.MaxLength = 999999999;
this.TxtFtpPath.Multiline = false;
this.TxtFtpPath.Name = "TxtFtpPath";
this.TxtFtpPath.OnlyNumeric = false;
this.TxtFtpPath.PasswordChar = '\0';
this.TxtFtpPath.ReadOnly = true;
this.TxtFtpPath.SelectedText = "";
this.TxtFtpPath.SelectionLength = 0;
this.TxtFtpPath.SelectionStart = 0;
this.TxtFtpPath.Size = new System.Drawing.Size(244, 24);
this.TxtFtpPath.TabIndex = 15;
this.TxtFtpPath.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtFtpPath.ToolTip = "";
this.TxtFtpPath.WordWrap = true;
//
// MenuForm
//
this.MenuForm.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.重命名ToolStripMenuItem1});
this.MenuForm.Name = "MenuForm";
this.MenuForm.Size = new System.Drawing.Size(113, 26);
//
// 重命名ToolStripMenuItem1
//
this.重命名ToolStripMenuItem1.Name = "重命名ToolStripMenuItem1";
this.重命名ToolStripMenuItem1.Size = new System.Drawing.Size(112, 22);
this.重命名ToolStripMenuItem1.Text = "重命名";
this.重命名ToolStripMenuItem1.Click += new System.EventHandler(this.重命名ToolStripMenuItem1_Click);
//
// BtnMustUpdate
//
this.BtnMustUpdate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BtnMustUpdate.BaseColor = System.Drawing.Color.Green;
this.BtnMustUpdate.ColorGradient = true;
this.BtnMustUpdate.Location = new System.Drawing.Point(77, 320);
this.BtnMustUpdate.Name = "BtnMustUpdate";
this.BtnMustUpdate.Size = new System.Drawing.Size(115, 48);
this.BtnMustUpdate.TabIndex = 17;
this.BtnMustUpdate.Text = "必须刷新";
this.BtnMustUpdate.UseDefSkin = false;
this.BtnMustUpdate.UseVisualStyleBackColor = true;
this.BtnMustUpdate.Visible = false;
this.BtnMustUpdate.Click += new System.EventHandler(this.BtnMustUpdate_Click);
//
// panel1
//
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel1.Controls.Add(this.label7);
this.panel1.Controls.Add(this.label6);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.label3);
this.panel1.Location = new System.Drawing.Point(1, 509);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(278, 75);
this.panel1.TabIndex = 18;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(6, 58);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(89, 12);
this.label7.TabIndex = 5;
this.label7.Text = "本地文件比较新";
this.label7.Visible = false;
//
// label6
//
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label6.Location = new System.Drawing.Point(71, 27);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(204, 31);
this.label6.TabIndex = 4;
this.label6.Text = "无";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(71, 5);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(17, 12);
this.label5.TabIndex = 2;
this.label5.Text = "无";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(6, 27);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(59, 12);
this.label4.TabIndex = 1;
this.label4.Text = "修改时间:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(6, 5);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(59, 12);
this.label3.TabIndex = 0;
this.label3.Text = "文件大小:";
//
// BtnUp
//
this.BtnUp.BaseColor = System.Drawing.Color.Green;
this.BtnUp.ColorGradient = true;
this.BtnUp.Location = new System.Drawing.Point(2, 27);
this.BtnUp.Name = "BtnUp";
this.BtnUp.Size = new System.Drawing.Size(28, 24);
this.BtnUp.TabIndex = 19;
this.BtnUp.Text = "↑";
this.BtnUp.UseDefSkin = false;
this.BtnUp.UseVisualStyleBackColor = true;
this.BtnUp.Click += new System.EventHandler(this.BtnUp_Click);
//
// FrmFTPBrowser
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(282, 587);
this.Controls.Add(this.BtnUp);
this.Controls.Add(this.panel1);
this.Controls.Add(this.BtnMustUpdate);
this.Controls.Add(this.TxtFtpPath);
this.Controls.Add(this.PnlState);
this.Controls.Add(this.CbbMatch);
this.Controls.Add(this.TxtSearch);
this.Controls.Add(this.objectListView1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmFTPBrowser";
this.TabPageContextMenuStrip = this.MenuForm;
this.Text = "FTP浏览";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmFTPBrowser_FormClosing);
this.Load += new System.EventHandler(this.FTPBrowser_Load);
this.ResizeEnd += new System.EventHandler(this.FrmFTPBrowser_ResizeEnd);
this.SizeChanged += new System.EventHandler(this.FrmFTPBrowser_SizeChanged);
((System.ComponentModel.ISupportInitialize)(this.objectListView1)).EndInit();
this.contextMenuStrip1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.PnlState.ResumeLayout(false);
this.PnlState.PerformLayout();
this.MenuForm.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private ryControls.RyComboBox CbbMatch;
private ryControls.TextBoxEx2 TxtSearch;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Panel PnlState;
private System.Windows.Forms.Label label1;
private ryControls.TextBoxEx2 TxtFtpPath;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ContextMenuStrip MenuForm;
private System.Windows.Forms.ToolStripMenuItem 重命名ToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem 刷新列表ToolStripMenuItem;
public BrightIdeasSoftware.FastObjectListView objectListView1;
private ryControls.ButtonEx BtnMustUpdate;
private BrightIdeasSoftware.OLVColumn OlvFileName;
private BrightIdeasSoftware.OLVColumn OlvFileSize;
private BrightIdeasSoftware.OLVColumn OlvFileType;
private BrightIdeasSoftware.OLVColumn OlvLastWriteTime;
private System.Windows.Forms.ImageList imageListSmall;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label5;
private ryControls.Controls.LableX label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem 打开同位置本地文件ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 查看历史记录ToolStripMenuItem;
private ryControls.ButtonEx BtnUp;
}
}
@@ -1,678 +0,0 @@
using FTPop;
using GameBackup3H3.DbOp;
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using WinSCP;
using 开发辅助工具.Manager.FTP;
using 开发辅助工具.Manager;
using BrightIdeasSoftware;
using WeifenLuo.WinFormsUI.Docking;
using 开发辅助工具.Controls;
using 开发辅助工具.Tools.SmartEditor;
using SuperDesign.Tools.SmartEditor;
using ObjectListViewDemo;
using System.IO;
using ScintillaNET;
using DiffPlex.Model;
using ryControls.Interface;
using static System.Net.WebRequestMethods;
using ryControls;
using static VPKSoft.ScintillaLexers.LexerEnumerations;
using VPKSoft.ScintillaLexers;
namespace SuperDesign.Manager.FTP
{
public partial class FrmFTPBrowser : DockContent
{
public FrmFTPBrowser()
{
InitializeComponent();
OlvFileName.AspectGetter = (x) => { return ((FTPop.RemoteFileInfo)x)?.Name; };
OlvFileName.ImageGetter = delegate (object x) {
var item = (FTPop.RemoteFileInfo)x;
return GetImageIndex(item.IsDirectory,System.IO.Path.GetExtension(item.Name));
};
OlvFileSize.AspectGetter = (x) => { return ((FTPop.RemoteFileInfo)x).IsDirectory ? 0L : ((FTPop.RemoteFileInfo)x).Length; };
OlvFileSize.AspectToStringConverter = (rowdata, x) => { return ((long)x) == 0 ? "-" : RyFiles.GetFileSizeStr((long)x); };
OlvFileType.AspectGetter = (x) => { return ((FTPop.RemoteFileInfo)x).IsDirectory ? "文件夹" : "文件"; };
OlvLastWriteTime.AspectGetter = (x) => {
var item = (FTPop.RemoteFileInfo)x;
if(item.Name=="." || item.Name == "..") { return "-"; }
return item.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss");
};
procUse = true;
CbbMatch.SelectedIndex = 0;
procUse = false;
objectListView1.PrimarySortColumn = OlvFileType;
objectListView1.PrimarySortOrder = SortOrder.Descending;
objectListView1.SecondarySortColumn = OlvLastWriteTime;
objectListView1.SecondarySortOrder = SortOrder.Descending;
}
private int GetImageIndex(bool isDir,string ext)
{
string path;
if(isDir)
{
path = System.Environment.SystemDirectory;
if (imageListSmall.Images.ContainsKey("|folder"))
return imageListSmall.Images.IndexOfKey("|folder");
try
{
imageListSmall.Images.Add("|folder", ShellUtilities.GetFileIcon(path, true, true));
return imageListSmall.Images.IndexOfKey("|folder");
}
catch (ArgumentNullException)
{
return -1;
}
}
else
{
if (imageListSmall.Images.ContainsKey(ext))
return imageListSmall.Images.IndexOfKey(ext);
try
{
imageListSmall.Images.Add(ext, ShellUtilities.GetFileIcon(ext, true, true));
return imageListSmall.Images.IndexOfKey(ext);
}
catch (ArgumentNullException)
{
return -1;
}
}
}
public void TimedFilter(BrightIdeasSoftware.ObjectListView olv, string txt, int matchKind)
{
BrightIdeasSoftware.TextMatchFilter filter = null;
if (!String.IsNullOrEmpty(txt))
{
switch (matchKind)
{
case 0:
default:
filter = BrightIdeasSoftware.TextMatchFilter.Contains(olv, txt);
break;
case 1:
filter = BrightIdeasSoftware.TextMatchFilter.Prefix(olv, txt);
break;
case 2:
filter = BrightIdeasSoftware.TextMatchFilter.Regex(olv, txt);
break;
}
}
// Text highlighting requires at least a default renderer
if (olv.DefaultRenderer == null)
olv.DefaultRenderer = new BrightIdeasSoftware.HighlightTextRenderer(filter);
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
olv.AdditionalFilter = filter;
//olv.Invalidate();
stopWatch.Stop();
}
private void FTPBrowser_Load(object sender, EventArgs e)
{
Resizes();
}
private void TxtSearch_TextChanged2(object sender, EventArgs e)
{
TimedFilter(this.objectListView1, ((ryControls.TextBoxEx2)sender).Text, this.CbbMatch.SelectedIndex);
}
public int FTPId { get; set; } = 0;
private bool IsRunning { get; set; } = false;
public FTPInfo Cur_FTPInfo
{
get;private set;
}
private void LoadFTPInfo(bool noLoadFiles=false)
{
if (IsRunning) { return; }
IsRunning = true;
TaskStartState();
Thread th = new Thread(Start);
th.Start();
void Start()
{
#region 获取ftp信息
try
{
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
DataSet ds = db.ReadData("select * from Ftp where Id=" + FTPId);
if (ds.HaveData())
{
//DirectoryInfo fileSystemInfo =new DirectoryInfo("");
//fileSystemInfo.GetFileSystemInfos()
DataRow row = ds.Tables[0].Rows[0];
var FtpInfo = new GameBackup3H3.DbOp.FTPInfo()
{
Id = row["id"].ToInt(),
Name = row["name"].ToString(),
IP = row["ip"].ToString(),
Port = row["port"].ToInt(),
RemoteDir = row["remoteDir"].ToString(),
UserName = row["username"].ToString(),
Pwd = row["pwd"].ToString(),
Encrypt = row["encrypt"].ToInt(0, 2, 0),
AddTime = row["AddTime"].ToDateTime()
};
Cur_FTPInfo = FtpInfo;
if (!noLoadFiles)
{
CurFolder = FtpInfo.RemoteDir;
if (CurFolder.Length == 0) { CurFolder = "/"; }
this.Invoke(new Action(() =>
{
TxtFtpPath.Text = CurFolder;
}));
IFTP ftp = (FTPop.FTPWinSCP)FTPManger.GetFTP(FtpInfo, out var opened); ;
if (opened == 1)
{
var result = ftp.ListDirectory(CurFolder, out var error);
objectListView1.AddObjects(result);
if(error.Length>0)
{
this.Invoke(new Action(() =>
{
MessageBox.Show(error, "FTP错误", MessageBoxButtons.OK, MessageBoxIcon.Information);
}));
}
}
else
{
this.Invoke(new Action(() =>
{
MessageBox.Show("FTP打开失败。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}));
}
}
}
ds.Dispose();
}
db.Free();
}
catch (Exception ex)
{
}
#endregion
this.Invoke(new Action(() =>
{
TaskEndState();
IsRunning = false;
}));
}
}
/// <summary>
/// 初始化到指定目录
/// </summary>
/// <param name="CurFolder"></param>
public void Init(string CurFolder)
{
LoadFTPInfo(true);
if (CurFolder.Length == 0)
{
GotoDir("/");
}
else
{
GotoDir(CurFolder);
}
}
/// <summary>
/// 初始化到指定目录
/// </summary>
/// <param name="CurFolder"></param>
public void InitByNoFiles(string CurFolder)
{
LoadFTPInfo(true);
this.CurFolder = CurFolder.Length==0?"/": CurFolder;
TxtFtpPath.Text = this.CurFolder;
objectListView1.Enabled = false;
BtnUp.Enabled = false;
BtnMustUpdate.Visible = true;
}
/// <summary>
/// 初始化到默认目录
/// </summary>
public void Init()
{
LoadFTPInfo();
}
private void TaskStartState()
{
PnlState.Visible = true;
TxtSearch.Enabled = false;
CbbMatch.Enabled = false;
BtnUp.Enabled = false;
objectListView1.Enabled = false;
objectListView1.ClearObjects();
objectListView1.AllColumns[0].Text = "文件名(" + objectListView1.GetItemCount() + ")";
}
private void TaskEndState()
{
this.Invoke(new Action(() =>
{
objectListView1.AllColumns[0].Text = "文件名(" + objectListView1.GetItemCount() + ")";
PnlState.Visible = false;
objectListView1.Enabled = true;
BtnUp.Enabled = true;
TxtSearch.Enabled = true;
CbbMatch.Enabled = true;
}));
}
readonly bool procUse = false;
private void CbbMatch_SelectedIndexChanged(object sender, EventArgs e)
{
if (procUse) { return; }
TimedFilter(this.objectListView1, TxtSearch.Text, this.CbbMatch.SelectedIndex);
}
public string CurFolder { get; private set; } = "";
private void ObjectListView1_DoubleClick(object sender, EventArgs e)
{
var rfile = (FTPop.RemoteFileInfo)objectListView1.SelectedObjects[0];
if (rfile == null) { return; }
if (rfile.IsDirectory)
{
if (CurFolder.TrimEnd('/').Length == 0)
{
CurFolder = rfile.Name == ".." ? "/" : ("/" + rfile.Name);
}
else
{
if (rfile.Name == "..")
{
CurFolder = System.IO.Path.GetDirectoryName(CurFolder.TrimEnd('/')).Replace("\\", "/").Replace("//", "/");
}
else
{
CurFolder = CurFolder.TrimEnd('/').Replace("\\", "/").Replace("//", "/") + "/" + rfile.Name;
}
}
GotoDir(CurFolder);
}
else
{
if(rfile.Length>=1024*1024*10)
{
MessageBox.Show("大于10MB的FTP文件暂时不支持编辑。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
var siteinfo = new SiteInfo();
bool noedit = false;
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
DataSet ds_site = db.ReadData("select * from Site where FtpId=" + FTPId);
if (ds_site.HaveData())
{
for (int i = 0; i < ds_site.Tables[0].Rows.Count; i++)
{
DataRow reader = ds_site.Tables[0].Rows[i];
if(rfile.FullName.IndexOfEx(reader["ftpDir"].ToString())==0)
{
var local_file = reader["localPath"].ToString().Trim('\\')+"\\"+ rfile.FullName.Replace(reader["ftpDir"].ToString(), "", true).Trim('/');
if(System.IO.File.Exists(local_file))
{
if(RyFiles.GetFileDate(local_file).LastWriteTime.ToInt64() > rfile.LastWriteTime.ToInt64())
{
switch (MessageBox.Show("当前本地文件日期比服务器上的要新,是否要编辑服务器文件?", "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2))
{
case DialogResult.No:
noedit = true;
break;
}
}
else if (RyFiles.GetFileDate(local_file).LastWriteTime.ToInt64() == rfile.LastWriteTime.ToInt64())
{
if (RyFiles.GetFileSize(local_file) != rfile.Length)
{
switch (MessageBox.Show("当前本地文件与服务器文件日期一致,但大小不一致,是否要编辑服务器文件?\r\n\r\n本地:" + RyFiles.GetFileSizeStr(local_file) + "=>服务器:" + RyFiles.GetFileSizeStr(rfile.Length), "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2))
{
case DialogResult.No:
noedit = true;
break;
}
}
}
}
siteinfo.Name = reader["name"].ToString();
siteinfo.LocalPath = reader["localPath"].ToString();
siteinfo.FtpDir = reader["ftpDir"].ToString();
siteinfo.FtpId = reader["ftpId"].ToInt();
siteinfo.Id = reader["Id"].ToInt();
break;
}
}
}
ds_site.Dispose();
}
db.Free();
if(!noedit)
_ = FrmMainEditor.MainEditor.OpenFTPFileByNewForm(siteinfo, rfile.FullName);
}
}
private void GotoDir(string folder_path)
{
if (IsRunning) { return; }
IsRunning = true;
TaskStartState();
new Thread(Start).Start();
void Start()
{
IFTP ftp = (FTPop.FTPWinSCP)FTPManger.GetFTP(Cur_FTPInfo, out var opened); ;
if (opened == 1)
{
this.Invoke(new Action(() =>
{
TxtFtpPath.Text = folder_path;
}));
var result = ftp.ListDirectory(folder_path, out var error);
this.Invoke(new Action(() =>
{
objectListView1.AddObjects(result);
}));
if (error.Length > 0)
{
this.Invoke(new Action(() =>
{
MessageBox.Show(error, "FTP错误", MessageBoxButtons.OK, MessageBoxIcon.Information);
}));
}
}
else
{
this.Invoke(new Action(() =>
{
MessageBox.Show("FTP打开失败。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}));
}
TaskEndState();
IsRunning = false;
}
}
private void 重命名ToolStripMenuItem1_Click(object sender, EventArgs e)
{
FrmTitle frm = new FrmTitle();
frm.TxtTitle.Text = Text;
frm.Text = "请输入重命名的名称";
if (frm.ShowDialog() == DialogResult.OK)
{
Text = frm.TxtTitle.Text;
}
frm.Dispose();
}
private void 刷新列表ToolStripMenuItem_Click(object sender, EventArgs e)
{
GotoDir(CurFolder);
}
private void FrmFTPBrowser_FormClosing(object sender, FormClosingEventArgs e)
{
if (IsRunning) { e.Cancel = true; }
}
private void FrmFTPBrowser_ResizeEnd(object sender, EventArgs e)
{
}
private void Resizes()
{
BtnMustUpdate.Left = objectListView1.Left + (objectListView1.Width - BtnMustUpdate.Width) / 2;
BtnMustUpdate.Top = objectListView1.Top + (objectListView1.Height - BtnMustUpdate.Height) / 2;
PnlState.Left = objectListView1.Left;
PnlState.Width = objectListView1.Width;
}
private void BtnMustUpdate_Click(object sender, EventArgs e)
{
BtnUp.Enabled = true;
objectListView1.Enabled = true;
BtnMustUpdate.Visible = false;
刷新列表ToolStripMenuItem.PerformClick();
}
private void FrmFTPBrowser_SizeChanged(object sender, EventArgs e)
{
Resizes();
}
private void ObjectListView1_SelectionChanged(object sender, EventArgs e)
{
var rfile = (FTPop.RemoteFileInfo)objectListView1.SelectedObject;
label6.ForeColor = Color.Black;
label7.Visible = false;
if (rfile == null) { label5.Text = "无"; label6.Text = "无"; return; }
if (rfile.Name == "." || rfile.Name == "..") { label5.Text = "无"; label6.Text = "无"; return; }
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
DataSet ds_site = db.ReadData("select * from Site where FtpId=" + FTPId);
if (ds_site.HaveData())
{
for (int i = 0; i < ds_site.Tables[0].Rows.Count; i++)
{
DataRow reader = ds_site.Tables[0].Rows[i];
if (rfile.FullName.IndexOfEx(reader["ftpDir"].ToString()) == 0)
{
var local_file = reader["localPath"].ToString().Trim('\\') + "\\" + rfile.FullName.Replace(reader["ftpDir"].ToString(), "", true).Trim('/').Replace("/","\\");
string file_dt;
if (System.IO.Directory.Exists(local_file))
{
label5.Text = "不支持文件夹";
file_dt = "[本地]" + RyFiles.GetFileDate(local_file).LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss");
}
else if (System.IO.File.Exists(local_file))
{
var local_filesize = RyFiles.GetFileSize(local_file);
var local_filetime =RyFiles.GetFileDate(local_file).LastWriteTime;
if (local_filetime.ToInt64() > rfile.LastWriteTime.ToInt64()) {
label7.ForeColor = Color.Red;
label7.Text = "本地文件比较新";
label7.Visible = true;
label6.ForeColor = Color.Red;
}
else if (local_filetime.ToInt64() < rfile.LastWriteTime.ToInt64()) {
label7.ForeColor = Color.Blue;
label7.Text = "FTP文件比较新";
label7.Visible = true;
label6.ForeColor = Color.Blue;
}
else if (local_filetime.ToInt64() == rfile.LastWriteTime.ToInt64())
{
if(local_filesize!= rfile.Length)
{
label7.ForeColor = Color.Red;
label7.Text = "本地与FTP文件时间一致,但大小不一致";
}
else
{
label7.ForeColor = Color.Black;
label7.Text = "本地与FTP文件时间一致";
}
label7.Visible = true;
label6.ForeColor = Color.Black;
}
string start_size_str;
if(local_filesize>rfile.Length)
{ start_size_str = "本地大"; }
else if (local_filesize == rfile.Length)
{ start_size_str = "一样大"; }
else
{ start_size_str = "远程大"; }
label5.Text = "[本地]"+RyFiles.GetFileSizeStr(local_filesize) + "=>[远程]" + RyFiles.GetFileSizeStr(rfile.Length)+ "["+start_size_str+"]";
file_dt = "[本地]" + local_filetime.ToString("yyyy-MM-dd HH:mm:ss");
}
else
{
label5.Text = "[本地]无=>[远程]" + RyFiles.GetFileSizeStr(rfile.Length);
file_dt = "[本地]无";
}
label6.Text = file_dt +
"=>\r\n[远程]" + rfile.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss");
break;
}
}
}
ds_site.Dispose();
}
db.Free();
}
private void 打开同位置本地文件ToolStripMenuItem_Click(object sender, EventArgs e)
{
var rfile = (FTPop.RemoteFileInfo)objectListView1.SelectedObject;
if (rfile == null) { return; }
if (rfile.Name == "." || rfile.Name == "..") { return; }
bool noedit = false;
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
DataSet ds_site = db.ReadData("select * from Site where FtpId=" + FTPId);
if (ds_site.HaveData())
{
for (int i = 0; i < ds_site.Tables[0].Rows.Count; i++)
{
DataRow reader = ds_site.Tables[0].Rows[i];
if (rfile.FullName.IndexOfEx(reader["ftpDir"].ToString()) == 0)
{
var local_file = reader["localPath"].ToString().Trim('\\') + "\\" + rfile.FullName.Replace(reader["ftpDir"].ToString(), "", true).Trim('/');
if (System.IO.File.Exists(local_file))
{
if (RyFiles.GetFileDate(local_file).LastWriteTime.ToInt64() < rfile.LastWriteTime.ToInt64())
{
switch (MessageBox.Show("当前本地文件日期比服务器上的要老,是否要编辑本地文件?", "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2))
{
case DialogResult.No:
noedit = true;
break;
}
}
else if (RyFiles.GetFileDate(local_file).LastWriteTime.ToInt64() ==rfile.LastWriteTime.ToInt64())
{
if(RyFiles.GetFileSize(local_file)!=rfile.Length)
{
switch (MessageBox.Show("当前本地文件与服务器文件日期一致,但大小不一致,是否要编辑本地文件?\r\n\r\n本地:"+RyFiles.GetFileSizeStr(local_file)+"=>服务器:"+ RyFiles.GetFileSizeStr(rfile.Length), "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2))
{
case DialogResult.No:
noedit = true;
break;
}
}
}
if (!noedit) { FrmMainEditor.MainEditor.OpenFile(local_file); }
}
else if (System.IO.Directory.Exists(local_file))
{
RyFiles.OpenFile(local_file);
}
break;
}
}
}
ds_site.Dispose();
}
db.Free();
}
private void 查看历史记录ToolStripMenuItem_Click(object sender, EventArgs e)
{
var rfile = (FTPop.RemoteFileInfo)objectListView1.SelectedObject;
if (rfile == null) { return; }
if (rfile.Name == "." || rfile.Name == "..") { return; }
UploadInfo uploadinfo = null;
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
DataSet ds = db.ReadData("select * from Ftp where Id=" + FTPId);
if (ds.HaveData())
{
DataRow row = ds.Tables[0].Rows[0];
var FtpInfo = new GameBackup3H3.DbOp.FTPInfo()
{
Id = row["id"].ToInt(),
Name = row["name"].ToString(),
IP = row["ip"].ToString(),
Port = row["port"].ToInt(),
RemoteDir ="/",
UserName = row["username"].ToString(),
Pwd = row["pwd"].ToString(),
Encrypt = row["encrypt"].ToInt(0, 2, 0),
AddTime = row["AddTime"].ToDateTime()
};
uploadinfo = new UploadInfo()
{
FtpInfo = FtpInfo,
RemotePath = rfile.FullName,
LocalPath = Application.StartupPath + "\\UserDb\\tmp\\FTP\\" + rfile.Name
};
}
ds.Dispose();
}
db.Free();
if (uploadinfo == null) { return; }
RyFiles.DeleteFile(uploadinfo.LocalPath);
FrmDownProg frm = new FrmDownProg();
frm.DownList.Add(uploadinfo);
if (frm.ShowDialog() == DialogResult.OK)
{
LexerType CurHighliteLang;
try
{
var LexerType = VPKSoft.ScintillaLexers.HelperClasses.LexerFileExtensions.LexerTypeFromFileName(uploadinfo.LocalPath);
CurHighliteLang = LexerType;
}
catch { CurHighliteLang = LexerType.Unknown; }
FrmHistoryView frm2 = new FrmHistoryView
{
FilePath = "[FTP:"+FTPId+"]" +rfile.FullName,
Content =RyFiles.ReadAllText(uploadinfo.LocalPath),
CurHighliteLang = CurHighliteLang,
SelectModeOn = true,
TopMost = this.TopMost
};
frm2.ShowDialog();
frm2.Dispose();
RyFiles.DeleteFile(uploadinfo.LocalPath);
}
frm.Dispose();
}
private void ObjectListView1_BeforeSorting(object sender, BeforeSortingEventArgs e)
{
}
private void BtnUp_Click(object sender, EventArgs e)
{
if (BtnMustUpdate.Visible) { return; }
BtnUp.Enabled = false;
objectListView1.Enabled = false;
if (CurFolder.TrimEnd('/').Length == 0)
{
CurFolder = "/";
}
else
{
CurFolder = System.IO.Path.GetDirectoryName(CurFolder.TrimEnd('/')).Replace("\\", "/").Replace("//", "/");
}
GotoDir(CurFolder);
BtnUp.Enabled = true;
objectListView1.Enabled = true;
}
}
}
@@ -1,332 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="查看历史记录ToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAABFNJREFUWEft
l39sFEUUxy/xD+KP3t6eJUrVBOR291o5RZrYUG93D7FFio0/SEtRowVjNKDYEHNaQzh/hAQEW7327pqm
BFGixsQYBNveHqaJGg2B6D8GE1FJKnJ7LdEQ+Uf+Gd8b3p17u3PttZH/+CQvnZk3875v5mZmp76rzIea
1eEbZSMcCRrhZqk5tHRhrOEGcl05/FHtAdnQ9kqGmg8YKhPYD7KpvirpoRU05P/BH1WaJF39sCSkq78E
TPUDENsim6H2gKG8KRtKFnx/Up9/MNFgLHQrhZg/sq72loQNdTCohxrI5aXDd03QDK2EFfqC+v8aiIZi
5J07ECBBgc7CjB+h5qpwjGW4gtRcPZKpdVCAhN+oV4p/yc3BPmhUFQLjjmOcGVfOjRxTHiTx77GO4lRP
8A5EQFcm0KgqpK6x7jo+1lR/rNXrF1HzzAQM7XMcVLNK00Cgu9IKVJMA4tfVLtEEhMDOXoudJVOJ47JB
+VKlgdUmgEim+hHE+UOKRmRqEgNHLIkdsSzryh4oX5Rj9cu408VcEgia4ZUQi8EJ2UBNYqDTafwJfGtD
C2S4cOD87yKXh7kkgEDs82AjVPVSe69Wg1mCJSRDW4JlWdfuJLeHYgJ9v397bcbOdmUKuUTKzh1K562j
advalcpb3YPT46VbES6nbMBUTlLVS000rPIE4PLgBmVyCUHxm1sjJ0BsAowJrZC7BAm9zfvDxMD4zyvE
KVosS9FwI3cKWNrZfGbFc+vEwi7L2JY966SKKwDH5p7rm5bchOWArvWQu4yhwvhdKF5tAmj3v9H9FcSs
vALFPQCbbyvW4e/HsGtHudMFBPwGxbH/+oEeoaDbovFOtqht+c8UQgzeWBD0IJZlU9kIZc8dAJttPQZM
Th5l6/Y8y5OIPN3K4hNpoXDRFj/axMzejXkKIwaPHcz6J6oKSRes3c7AO48f4LPDRB5+Zxt7FxJz+tES
J97j/heO7L1IYcT49fAa7AiJPENNHlK2hTvfI7L18FsssrmVLdvUAkL7ynwtr29it7U3sr7fDsPJOHY7
hRLDz7ehTlPVAwT8yxncaalzWdY1HGd6fEOp7bGRV/js2/dt4fVBOzvz5xluws18FeBhQU1lpO3cZ8Xg
s1ny7BgXR8OfCttGLowHKVRlYMAADoKT0EZNJdJT1stuoUrW8NRqLt59KHG5LZ+dpDCzAwP5OwCu0CH8
rlOzL1WwWt1Cbuv9epgtbLmDi2+3kv/58tanFKY6HC+jc/hdp2bYiNn9TkGndaS2c2H1cZO9dvJgmS9z
/stbKET1uF7Fk2AW2MCT7+/8+8XRPtY59BJbteMJuAvWsLq2u1ntffV8w+0+9UmZ+EB+bP4PVAT3A7yS
h0F8mpIpM6VLZw/1P892fLe/TBjujQsp+9jM74C54vzPqGesv7f/zJFTZaKXbRK+hunk6dEFNOzKksmP
Lc5M5TrhbbAtNWUtp+arzILP9y8yNz1BYtUGSQAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="imageListSmall.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>316, 19</value>
</metadata>
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
R0lGODlhIAAgAOYAAP////39/f7+/vz8/Pr6+vf39/n5+fv7+/T09Pb29vHx8efn5/j4+OHh4fX19e3t
7eTk5PLy8re3t7q6uvDw8Orq6rS0tNTU1L29vcrKyuvr68TExO/v79fX193d3dDQ0PPz87Kysu7u7tra
2ujo6Ozs7M3Nzenp6bW1tbi4uOPj48fHx+Xl5bu7u9XV1d7e3tbW1r+/v9jY2NPT09HR0ebm5sDAwLa2
ts/Pz8LCwsjIyNzc3MbGxuDg4M7OzsXFxby8vMHBwd/f39vb28nJybOzs9LS0tnZ2cvLy8zMzOLi4rm5
ucPDw76+vgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQE
CgAAACwAAAAAIAAgAAAH/4AAgoOEhYaHiIcEBSAUHCIPDyIgBYmJAgQIIBEKjpAPJRoVFQgBloQDCQ6a
nJ6gohUnJCeVp4uqCAicCo+vsSQLCzUKlgcFBaqrm7yQobHBNSwQIogDBgzHuMu9orLC0hAqD4YBBAbX
2bmc3BXA0RDhSkoJhQcE5ui4CQQH9gUiwMCpUNKggRJTggL0u3cOWwGEhQhUgDewYI8eHAYNGLAQHwEB
iQKIINjgohAhDQQJ2Lix4ykAARaYfEHTQwQAAgLoZHkA5EsDQmp6GHoCp86jOl8OqjF0h9MhPXAKmJoz
gE+lEYZo1TpihFSqU5UOStC1bFdBSlaEWKFE7CAHMv/iypUBQEmRu0VQtHXroIPfvx0A6MBbxAIRFW45
wFi82C8ADBYiS17h9sWFCy4ywxgC4INkFKBvEHtZwMiMGZcvswCgAnToGxJ+EDg14AgNGqZPX8gIYAKK
G7AlpEhx4UCiAT1wfPhw24gRF4NGAJcgPMWSCTpAHHLgwoQJH8qZ0yAxiEAL6sOvtwCCAccCChQUVIBB
JEMS7+CXXxhAiET16xO0gAEGMdiQAxMb8LBCfUjc9x0OOFBgSAfWTRAge00UeGCCK+jAoIM+QIDIDBau
h6GGCP6goA4ZZNCgCVElIsOFAxZoYIor1ueiEC9VYMOJNgSxoYordEiECby9dMAdCzlkGOSGGxCJBAT8
uSXIAh3oICSCGyQxRAWWBAIAIfkEBAoAAAAsAAAAACAAIAAAB/+AAIKDhIICAAEDAQcCAwCHhZGSj4kE
DAwFCZkMBgeTnwKJBwaXmQ4ICBEgIAmQn4OhAwcEBKSmqCAKChwKnq+UA7K0tgmnqboUIg8Jr6EBicLE
pyARChQcIiIaEQGgz6K1mAmo1dbYDw/b3ZHMztGkCQnUFNfKJSUaGg6FNTQXO4KeyVKUKICBAiAe2MtX
4UQFR4heTAhxIwQNRs9cDUqE4J6GCg1PkFAgyEEOCyFShoAgQGOkAAk+nhBJYsGCbiQmFLFgoUgIGL8C
UiBB1OYCFggCuAjBk6eEGS4nHThhs4ZVFiUIZEDBlasFGgyCCuJQg4VZFhBICDh5oy2KEC7/IAZNgBaC
XRUsDHCVwFfCDQ1iBRFgoUKFksJKQLToKyHFhAqBAQxQ0aBy5R4ObKTYvGTJhAWRCQgR0qN0DyEBmKTo
PGHCkhGRFXh48WK0EBUAMjhu3aLFj8ACSngYTttDAwAjJEzoDQRIixNiEwgZsWO4hyGgFaRo0RwDhiY6
CkQldABChxEjhuzY8YJkAB4tvH+PEQOGg3WRDFSA0eEI+iFHeFCAIAvE1wR9NgSBwQclDBjQIwq80MEF
HchwhH8dACbIABm0cGCCOTBhgw7DIXCCAiUM4cIMM8DAnwwyuCCEL4JQwEMMCQaRwwY8bkBEBj4YYYIP
HxgxwwUu8FehgoMbqYABiExs8AMPK+igQwZA4vABDUcm6YIRJUzSAxAxRCklDzr8iMSQWtJg5AxGdMDS
JyWs0ASPVKaZARJJmKDllm4esQABvxDgQhM8MLHCCmr26cOjH1D4gAGBQYCDDzkQsUEGK6ypgw8wXEAC
ApGVVEENRhyRgRFceqCEBiB8EggAIfkEBAoAAAAsAAAAACAAIAAAB/+AAIKDhIMCAgGIhwKFjY6EhwED
AwQHBJcHAY+bgpGTB5YGDAwFBQaJnIMRpQCIkpQEBqIFCQimqQZGPxsXEQABr6GktA4IEQwDjwQ0IUUh
KDyeoLGkCcUIIBEJmo0wN0UWRc4Lv5OXw9bYEQoKDo01IRbyFvE7v5KhxOrrFCIEhARioBgorwgKcotc
ESgAIhs7Cv0UMBI0JMSNiwR9uGt0iCEFBRQ4cBBRooAgAzkkqMRoYQY3RwEYKBApQsSDm5oWSEihUiW0
BKkCJHhg82aJEu4u3FiSoilPBakEHeBwVEMJDRUUDMiQYsKSrxIyTEwlAEEFDVgrVBBRYEOLCXD/4TaI
OohBhRNqT+gtMKGFX78YTtAVROAEicOHTxSw0QKIYyATfA0OsKCy5QURmGDYvBkIi8EADNRgUaP06ABM
WjRpEiOGDSWgHUCYzaL2ggMXMLS2YQPIBQaDKyhRoWI2hBMDdrDmHSRHDnJRDTRooGS4CiUlAJSIEaR7
DiYxaIBIRQDCix7TqTfwNQAHEOdMNvxgMkKiIwGFPbwQ0gN9AxYHCKJADDlsIB8PG6zwAQXbtFKOAioc
sYN++/XwAgeEHNHEgTzooMMGSYzAQgUgYAWBDDCMMMSEL+wHwUsAtMXEDzysoAMRGSBBxAcmuPBBB0Z0
IMMRKk7owQ4INAIBghFMdIgjEkmYYMIHHxgxgwsddHDEEUOs+MIDjgygQhI/rPBklDh8QIMRF7gAg5BE
jjCCBsk4YoAGNuIYpQ9prjlDm1miKMMDYz3ygAcb5IiEDz6oaeUFF8DgwgUQGEDXISfIwCgROEyJgxE/
uuBBkqBJ9QAEDcAwBA07uMACCRhuEggAIfkEBAoAAAAsAAAAACAAIAAAB/+AAIKDhIWGh4iFAgpCFw0G
AAICAZQCiYgCCDsbKEUpSQ6RlAOkA5eEAgs2ISFFRSEpHgCUAQMHBLgBpwEyIRYoKBYWrxuztba4BgYH
locCMxYSNzfBwxY4xsgEygwFBIgyKSkS5NQWrErZt9vdBQnfhQsYS+LlKCExHQOTAesG7QkcIDA1iACP
JRPojbsR4saFAoMmsesWUKADXYKGtJjAMaG0DCQgFgpAoIA7BwIRRCBgicGKCS1iJpyAI0EiAQZQIkAA
AkSEiwBYNAFCFEiLFCYgXQrAoKfPCAoiGOC1BINVDC1saDgl6ACIqArCUkiQAEeLJmibTJjBVZCAAhT/
FFCYywEEAh5NYuiNEaRHW0EGRHAYPHgsBhuIEf+g8BcAgQciIks+gCGI5SA5NkRofOCB588lAGzIQZoJ
kxwPmnF9rEFDiddbM+RgsqF2EBIYuSKowLu1hgcAPmT+8YNHjh3wuFJYcOIE7xOMj+QozmMFjwzAuTIg
sYAEieYkNi/QUXyFDvIjRCYKUAJCjQXwv9tEMGODeSJEMmTwoPTQAA0qQMBCDe8toIEpAdSQgw75ZYAE
EiZ4wIEiAzhAQg9KBMjCgDVsJggDH6zgIBJJmGCiCw1U4EABCChwwgs79NBAhhAIWEFuAnDwg4Ml+oDD
B0DCcIQMHchwxA4vCNHAhYwqqMCCTaioQESJJvz4gREzXOBCkSMMsYMHL8jI5ISGDLBDjz/SgOUFMHDp
JZhCiKmBaoUQAMEHPn5AQ5YutGnkCF++IOgLItBpSAAidEADDntq6ecRXe4wxBAqhNLWACwccQGjbBZ5
BKQeQMABS40BcIAGNQgxwgUXyOBBAwtQwEAigQAAIfkEBAoAAAAsAAAAACAAIAAAB/+AAIKDhIIBASUF
JyQIhY6PhSALOCsxIRhANzIGkJ2CBTIrKBIhRSghpTcvAqyehSw/SxYpEhI3KBYWRSErDAACAQKuADBB
EilLtLa4uiE5v4eHnQYjExMt1snLzUU4ANEDAwGPB0LYQNgT2rchpBkg3wHhBwQDjjVMQBiY6SgoKSGa
GBESId48egTGDSqQAUOTJvswtJAQw0eDEgsQ2AM2j4BHAwSECVICJIbJGE1axNDxAJI8hAZiMjgwCEmT
IDZsxMDkooCnAB8NMGBQgIGwBE1y5AiCEwMNB8MICC1AtUACexAwMGGiNMgPCsO+EaWaoKwvHEE2qGUS
44K9sAb/yiZwQLeAgRU/8v7YYIOFwmEHEAge7EBBkh88Ev8gAjYsgAEgEEQWDEKBiR8rMvNA0jgs5Aig
QSM4sEKHaR1EeHBwDOBABAWwYYNI4AM1kQy4SYgcZkAEhd8UYAe4oAM3kuMyHAsA8UAEBw4UOEQQ8CLD
8STYaRSMKqJEc+cPfHIgksSEeR8mOrztNIBCBQ3emz+wx+ACEhM+fOD4QKMBJ0gDKEDCCe+VYOBqgiyA
Hw770WAEDUJctZswBWhAwgInEKjBhlAJcgAMJnzAnxEzXHDBCBBwkAACDkRQQQ0q1LDAgBXUKMJ6AFAg
ooMlugBDBy504EEDHvTQQwMQsCDjfoAnaOBTIZPQMEOPPx4xwhBDvHCkEiqwoOQCMyLwFyE1fGDEBT52
IIOVO3jwghANcJlkDTJGgCMhA5zQAZo/rjlCm28eqQIEhJLQWScc7DADDH4OAagQWyJ5QodRleCBCy7I
gOUOL3TaQA+G3hkWAQ80sMORHqhAQgUJ/PdIIAAh+QQECgAAACwAAAAAIAAgAAAH/4AAgoOEAoIgJA8U
DQ4UBoSQkYUACA8+Ojw/LRhEKUcXDA6SowARCysxRUBLITcSIUUWITwXJKSEByofQDdAQBPAKRISNxay
SxIPt4INNjFNTRhALcBLwjcoKLJFGQG3JBs2TTExGNLVw9jaRSE2j6MkNi1BQc7RLS0SRSkh2SEW7Igw
EGAIEoIMQZjkoGcDQ5N8QTKkaCHrRohWJAII0EiowAcMGzYozBHDRpAPQiKIaCCCSAYkQD6wEBSgZsEA
LHhs+BFyQzkXLAbQFERAkYMEGmsGGOBNEIwVPDLxZAKjwDJvNQdoHWAIwYqvX3nkuBBhGc2tAw4c8NZg
g463mP9WlDArSKtaAnjXXliRIQMRIitcCKUb4ADew3iNvOzbdyZdAAEIGJhMuYCRJJiRJDFR4TEAAQYY
iB5tgIaJ06dxiPAsgEGB17AHzPBBmzYOZY8FJNhdIMFrAS584Bj+4QMEzwMQOFh+VNQOHMU/0KAho6nZ
AhEQaFeeAAAJHNONGJkxg0PBWwcQRAABYjsDAAnEj59xwYWHgbcCNFKgYD17Ap+NMN4F9cFwgQoFWAfJ
AA48IAIF/EWQ3WAUEFhgBzK4oAQCVuGSAAgllCACBxRASEEBBQnQgwswwNBBB0eMIEMDEPBnQAIlaqBB
BQ84SCIFICjoQIsvyjDCCDuMIMSUDhDUwEINJCxAQgUalODgAxy8Q0iFMMgQ4xA7ePBCDz3Q2CQJJ1Bp
pYP4RRKBDB2MAKaYQjTQgAoQsLDAAmnqGGJ3pCQwRIxhvlDnnXnWIOUJaZaAgIKSGNCAECN44EGZiDa5
gKIVKACoWQM8UMEODexQZg8qsIDnCRwkQMB5ZglwAAgcLFCBCnySoEEEBRAA6SCBAAAh+QQECgAAACwA
AAAAIAAgAAAH/4AAgoOEgwkPCCQcCgUBhY+QhA9GOhlBGD8pSSYQCgSRoAsmLRg2QBgYE0AWExIbLhyg
hAEkRKU5QTYxTahALUspFiE8IwayAT0rGxtMuDa6GL4TE8ASIUszBZEBHjo/38zOMagt1CkpEjdFIRcO
kA0bKys8P8tMuafT5hLpKBYWM4xJykBEh4559XJgCGJrg4QlN9DdQOEvhIQdhAjQyEDQ4LwgK45o0EBB
gQoYTCxQ9GdhXZIBg5QQQYKEY0EdIxQccDToQAUXwv61DGHigKADLpIorZmBmAEBkRh8iHEjRIgiKSAM
euDDhNelMKDKAsHCR4oJIV4cENsgiY+3Xv9xKJAlCCqCEhDcARAgYMAIHIABm/BAtxBPAQESB6DxobHj
BYUHIVasuIAMGpgxf0AQeVCAAaBDM6Axo3RpIxE67x1w4EDoAQQ6zLhA+0KH1J0FECDQuneBHTNcCBcu
QmzhAQZ2KycwwAOM5x06XFABMzIBBgayEzBgdMGM6DLCH0FgHFSAAgUYqM9ulIFtGUeOjOhQQ5ssAQUS
JECfngFPJTDIN8IQQ3jAwifbJAACAg7oh95TgjjQwYBD7OCBBzucAEJ1denmQAQLMthgAgju1cARFV4o
xIoQaMAIA+iBwMEiICIgYgHlgSBEgS+8IEQPDTSgAgQnLFDCSCJwUFJ8jQxyWJcIQnjgI5BKDFlDDSSc
oEEJDyipQAQggiBQIQMoICWVQ7JQwwIkVLDlA0kuCQIDoAhAAQQvNFAlBGoucIKbXMZJQQQMlPdIAAhU
EKSVC/gJKJxwRlAiXQdQoAGfKixQwwl/HlmCpKrVNUABM5LwQAUlzIiAUaAEAgAh+QQECgAAACwAAAAA
IAAgAAAH/4AAgoOEhYaHiIcVQ0kbG0w5QTodC4mJAxBIKzw/jpBBNjFNOS8HloQcJkQ6K5udn6FNGEA2
FacAQkgZGauujzk2oRizLRMylj0mSboZrJy/sbNAxRMziBA+Jsq6vTzQosQTE0spHYYUODjZ27yb38PU
5CkSJIQDFx8f6tpJvDAVCihQWIAjnDwJEloQGESCBo18+0y4cHAIhI5xKeZJuHFjxCAXRow4hNhjQKID
FzIi5IhigiAOF2bIFEnjiElLBH5svIGiJwoVAFhcGBpzhpECtwAo4NnTgtMPAIbAcEF16IukglY43WoB
A4AOHWCIFcsBKwAVRCwUWVtEx1ewcP87UDSrBAXbIkoAyNjLV8ZcuitCrMgLYIThwyMSmAUgoLFjAYVH
DJk8OYJZAQECPIbcY8iOzx481DCbuXRmyCdCh37xQoiBpAIODJhdGnIED6xb9+ixIMAtAgQOyJ49ADKA
BkKE7G7QQIkI34gEEDBgALjw2YM4LG+uAgKECgsNBShQgAF16wegAwighLmS7hBYLCAhokDwAwQSIHCQ
oPz54IUkoMR73rFQw3wVaPCACBwoEAECCPTnX3XqDfIAfAbOd0KCCzYYAQj7SWjeTYaIEN+BC2yoQQkd
OgiiA/yRZ0oiCqBIgoosMqiAgxDGGJ4lBZxwYwUJ5sgBBS6GSOIdKQEgQOSKD3SI5IcIEGDcYgWAIEKU
DFIAgn2WBAIAIfkEBAoAAAAsAAAAACAAIAAAB/+AAIKDhIIGBwQlBiIEBQAChZGSgiAaSh4zNEYZR0Y1
FQ6ToggkFzA+OiZIKxkbRDk+OBCihQYPHRcfPrsmSUgZRCsrTDxNLgS0AAQLnTQ0Hx84vb9EOis8GxtN
KyWiAhAdRjMzRs84PqrAOjw/2UwxQD2TJUYuMC4XmdE+GRk61uw2MMkRxAYGFQEKFZDRocO9fEZ0mTDC
j0i2bAQLxuBBgdABIS5kMIQBY5yLISUUnEDgwYMOGwM1NmmRYcAgDR1GHDnC8EKHFwogJRRUoMQHDBpj
NMHQYgFRD0eGjNDpsIKBSQEcwIihFIPXFjwSKnixY4fUER0gHKAloICOpRj/gABpkUIBgAVDWnrYMUJI
gmSCTrSQ26LFBAkjCDTw8OKF3hKQAAP4UXiC5RQZCKgQwrmxB7uSAYxYYnnJkhRMDAjpwboHZ2ShF0ww
naK2jQI9GujWrcJm6AoTUkgYLqGFAyUqVCBXwQK2ZA03iEtAgYIACxUQskNg8VfyABchUNwYbyFHABLb
WaivwSE0AxoWqMvPAKAEixr4Fyw4sRawgBkSWCCgBSG4AAACLOi3AAkMUjBUMjCEUISARUxAAgAB6Mfg
CSdUoEECD0oiwDchlBhCeaEAoAAJHFbgYQklIDBAiIIIEEAAAhxAQwg3hDDBC0MNUEGHGmhQwgMiPABC
iAEGBDCjkwc8KcgOF9BQQyEOFAkjkhxQQEEEICSQAAMGGEBAlDdC0l0hAUSgwQNcUqCAAhEggEACBZB5
5pM4itKmBiKI0CWdICDgAJ56RslnZJMkgKScdNp5aJ5m7jkjo6IcoAAHcxZqKKKVookpWwmAAEKdn+ZJ
pqihDXKAAQzgiSgDBFwqSiAAIfkEBAoAAAAsAAAAACAAIAAAB/+AAIKDhIIBAwMIB4oDAYWPkIQcJCwu
OzRDMA0QDweRnwAIHi4dH0Y4HyY4RD4+MicCAqCDBhAXLjAXFzNGNB+tSEgZGx4PswIPMjAyHR0uu70f
OD4mSRlEOisaBpEDGiPgR8wwz9E41cJEKz9JKgOQDy87Q0NHR80uvB+p6Nc6PEyIQHiEYIcHD/NGiOtg
pJQLEx+IpMvG4weTDQUIBYAg5MULhENGLINQQQOICixGJNmg41/FDU2OSHrRo+PHHUdUKGgEQFaABBQ+
rNjwckOOGAoEHWDRoEGPmh9PEJD1SICCEUx+bGCSIwcQHO8iNFDS1OkLCARmgaARg2uQtzH/SgAooUSF
CiVkG3CbBWBB1yA2bMRosiPACQiI7SqpwFcQgwtAAseIgeECgQUsMiOG4KCxICWCBzdpwYQAixqoa5ze
25gFEAywYTMxsKC27QWOPEeYAKQ3kBY2GJwgQZy4VM8ATmBowZz5hAEnoleocKICA+QNJmjX3mJDABHT
S2qogIDqsQwSlqifkCJDAAUlS2goUYKDJ74KJKTYn2LJjQsAOEDfAwSK8EACuX2SAA8oSOCgfhIsAEAA
BD4ggggccKAAAwk+EsAMFqBwww0P5rBXASVgyAEFClAAQgGxQOKADyGKOGIIQwxilQgUsKhABCC8SEAA
AcQS4wIoFGFBiI0oxJDWIATw+COQCDiQQAEGEHBAI47sYEEISy4ZQg2POKDAjyBUeWUBDBBAACKOLBBC
EUoWcQMMkPxEpZpsZnnAlkUKwOCcIdDw5CMDMBABn31qCacjEVywwQ9GsBaJAQUgcCUDBmT5JpeyFFBA
BI0JEACmbHKq5ZaNxIjcIAEc4KaWnwYKSiAAIfkEBAoAAAAsAAAAACAAIAAAB/+AAIKDhIUAAwwFDIaM
jQAMFAsNHjIXFyNCNRoHjowCBBwQHiNHRzIdMBc0OBdHLAOdhA4qQ0M7Q6SnMC4XM6s0HSIBnQIiL8cv
Hju5qLy+Hzg+HxAEjQIaDQ09Qsm3I7q9RjTQPiZJO7CGHCpK2T3duKfORh/QJuZEKgKFCSwq7Nm47TDV
QcYRGPXImUOS4QeHfYICVGABAQLAHjtenFCAoICDCg1c3FvIcMWHRYIi1KjBgiK7HiQcDIA4iIMHE0gY
ZiCiI0eNYQM0LFiw0qWGdIwMeMiwk+eKDTMQAEhwgsRQohBKDOtUYMQPHTpW8Pi6QEAEEieqWiWBMtaD
DDz/xI7NcWQAhRMVKqRdQCHWIAI7coz9sSHHhwMPNCjOW0GqXwABSATZQJlJjgxBS2hW/KDaYwEPcjCx
nCPHhgAlHqhezekxgAiFg8gOggGAiNu4O7sGQOGHjd+/a1PgQJy4CAO7ewSJwTxGEx4AQHCgQF0BhQI0
Y82Y0KR7kxY4plJQQD6CAhCtY2mw0QKDewxLZAAwYD5CBBD4GWx1ZMBEihZABAhEEyxA5sB9ICCAgAMO
GJAdPzhMsMQELVQ4wQqLfBKBggwmUEABBOw3SAEkZHCDBBNOoGILQwwSgAMLOuAhAwwYECJNBVxwQwgn
ppDChEvw4JkgAyzooSI2EnBAhQABCDBABzGEgMKJEvi4BAYLGELAkTUSoOQATAKgRAghWDClBGj6KB8j
BCCZ5AFgDoODBUVYYOYNJ1oww4ODCHCAAW8OECcAG4RQp5koWBCCDCIyEoCXXzI5jAcpGFoEmTaU5Zqg
gjK5jwNJpFAEChvsgACfsQggqQD7GNDABUIogCoAgQAAIfkEBAoAAAAsAAAAACAAIAAAB/+AAIKDhIMC
BQMODgeFjY6FBgkVJCoeDT07DQ8Ej50AAxQkPQ0vpTtDQzIuLh4lnJ6DDicQDUqXQi8epyNHMjAzOxyw
AKEQxiq3uTu8Mh0wLhcdJwOPAxELNTUsECq2uLrMztBGHzWOAQgkC9gsLN2XL6i84hczMzQ4C40FGicn
6tpo9ehhyUMHF/RmGKHx4QMFQgNEVJj4D5uKGhUiOECQgAOEERfqLWxoAgYjQQ40qKzgbwEJDQUACDA0
IIEQGiNx4PBhQp8gDiWCamBJQgG1RwYaMNzJE8kFBp8eiHjwoMRQCkc7DehggqcJE0mICCvwgIOIqSVE
vIIVgUaSt0j/kGR4ASACBwoczD4AMXMYABlx5WbQcSGAAgUUElMQYcCvTBIZIhMhosPHARCHM0c46ZcD
D8o6Qq8YgCCCadMgsg6jgITHitc/TAQAgaA27dSOiRH5waP3jyQBNtYezhlWABY2NvxY/mMFgAKKHCSY
3tjvgAsxmGzYHgQHAAbTExQYzyCAXwo/guTIwYQJBgifxI8vwMDA2k4OaGCwEUR9jiYJyMQAffXZR4B5
nRTgAhAYxGADf00gMcgBBRp4wAAINvKADjG00EQMIMYAhBKGEGAgARdiOBNpC5TQgA8xSNACBjQ20QQG
GcQ0SAAEoJhiAOZFIIQRTYSQAgooTDBBeAsMYgAEE+YUMgCKA2BoHggZhCBBCCjcIEEKSyjJ5JJCFLdj
lUCah0MRIRRhQZdfhrmkkiNUd06aM+XQpgVvehlnChIEAcMwAgQwEwMr7NmnBF9asMQPLOQmwKQv3MAm
l2xKgMIKMuiYmyAGyHADgyHEsEI+IHQSCAAh+QQECgAAACwAAAAAIAAgAAAH/4AAgoOEAAIAAQYJBAUM
AAeFkZKCAYwRGiQnCyoVCxwgB4eTkQIECRwnECosKj0NPTsNOxUPA6OFCQqdNQs1EKoNrx4eI0INBreI
CCUVJyckvSzADUIvHjsjR0MJtwklJRoazQsL0irB1ddDIx0yEZICDCIPD+DNJL4Qrz3WO+tHMmBcoBDJ
AIcH8+xBw8fC1w4hI7CNkNGhAwwYDggFAEGBAod5DyqE65jAgAIF+mRkq3jRRQ9RAgpQUNDx4zcQCSAR
KoBAiQuKMFxcGEoQwAAEESKcpDDPgS1JAQqouBB06AwjIw4RAMFVKU0HAW7F8yB0xlUjRrgxQMC2KwKd
Yv85mEVLgwYOEgASOGDLNkKBZIMCyKj7oTCOHQEc6HXAGMFTwAAgGMaBw4eLAQUKJNCcIIEoyA8q+xjt
YwbmzKgZfAYsAoeJ169pBGBAu7aB1ckqmEiCJIlvIwIMCB9OICxkACwyKM+AJANwAtCjHzAOeICLFUSI
KF9x4ZH0AwMeJyuxgoeO8zo2NEB0AHz4AdRvRbiQg8eK+/cRGHoPP2x8SQXAwMQGP/zAg30wBNZfAAIE
oBcFDxBAiSADsOACBjFsoOEPG/DAgnENBmAcCx8A0RwRIjQgQgRCfBCEDTHkkMOAG2DwwV+DNNggCTeE
EEKPFrSQQgZBSNBCExjYEESPEDMGkYF+hQgQDxEhFGFBCCigEEIKRRjZAgZNxKBkEC3YgNckBthQpQVZ
3iCBBEtMMAEQGGAYQxM2bHDmJAFkUEQIbKLgZgpxTtACnU2EacN6yTwAJ6AWuClBCnLOCcQNQHygAly3
kHABD4D+KUGPSwBRRAwrLPDOcQA4wMAFR6RABAYtGKiDDw/oh5sggQAAIfkEBAoAAAAsAAAAACAAIAAA
B/+AAIKDhIMBBAEGBwMChY6PhQcIHBwlFQ8klAWMkJ0EESUalicnNQsqLBAaFAedhZ8iD7GhFScLCzUQ
Kg0NFQgBrgIMERQUHLMatbipKkoNLxAUjZAMIBEKxsgVJMu6zj0vHgoDjwYg1tfGD6EnJDW5zQ09QuFC
ItODAw4ICNbYxxpELTihi9e8F+GGCAFBSEABB/v6XaMEokABBgUUaIAgpKMHDzuGHGmAj0CCBBD5WXNA
QAA+AANAnNjxMeSQER0cCBJgwOLJfSASAINEgIWHITdHHIGhRFAABhh9Jijw8lGBGh2UHpHR4QIDAAcM
GIAadWgwBFtlcO0wYwFYAwT/xI4l4IrQABUXOnSAwdeDAAKAAxsgV3enCBeIEc/YIeCAY8eAq7qK0PWC
5RkdBAzYPMAxp8KCIhiZQZo0Dc2cN5sFjeADjdevZQgIQLt2AMmdFnzYzZsGgNrTVhf2YAKHceMjALgU
5ABCCQTKCyvAYcKEj+tJGuw88CLEhBQ+WDAMBgNJkiTVrT8YBCFFkRAhbsT48PURzxE8MmQwf95FK7Am
hFCEBQSGYIELFfzn1AEKjKCDDkTohwQSRDQlyABJCEggChxawAQMKmAT0BErBMHDCg9GmAENdA2ygwQG
cniDBCncsIQEG2BARBAY5LDBDyemmMF6hBgww4Yz0rjEeARMYgCEDUEwscGPJ66wgXaOOHCBgDOmkMKS
LWCAQQxQ5iDlD2jq4IFwgxQwwxIhKMlkC0CMaUOZUm6wQg9sFomfgV/SKWYTZAaRgw06ktCnIxy4sIEE
E1gAxARiPolBCya4BdogBCgAgQlJpPADBkFkoIMRREISCAA7
</value>
</data>
<metadata name="MenuForm.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>206, 17</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAAAAAAIABKAgAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAgAAAAIAgGAAAAc3p69AAAAARn
QU1BAACxjwv8YQUAAAIBSURBVFhHxZexTsMwEIY7lJdgZS9CYmAAVAk23oChAwOvwNIJiU5MwMSMBCNs
ZSqVWJGanYGxlKEValloMf5cJ7qmbnCVhJz0S9H5fP+f2Hd2Sr72MVKrGsfdobp5H6pAo6+hLHgOGCOG
WDstvXW/1JZOfCfIvMAc5to0y1urpcq9kbp0JV8G5CCXTetnemJFoyMTpQS5KjZ9svU+1bYOHojJWWFA
bkvjNh3Em+dBHoLc7i/BOunBLD/7InSceyKLDecLuCzt1CgXV2CemClRWefXLxNVexgbNJ4nM2i+/qiT
+mmE3eqegfQ1zi+cfkkO4DTkdC05gIC1q28nEFAuryQCAXGfSwAwHZPWKZ2hgHpr+sZx3DefIqxvbBpI
XyjgsHYU+RCwU903z5ILbj4/vT1ytt9+jACESL8LJAXSB0n8rXnGFxcAN7XPwRI5Uwt4bHsL0AgQIE+1
aAkWbUIZ6xJwZpcgvgmBQ0AfATPOvzahjE0SIAG5jJGYE5DHEiRhbgn+WYBZgtw3YQKC7MtwCQGmDOON
CAEHt+NUAvD5CDCNiHYonZQKk/NAvAzhNucBB4MUwCfMA1IAnIYck8cxQXkiEhC/MRd6IcEKv5JherC4
S2lohV7LQ9PBxf2YhMY6ZbExybFwzX2McpF9whfMmSu1NEbXonXSvzVBRr/npdIvW6FdJBbwQIAAAAAA
SUVORK5CYII=
</value>
</data>
</root>
@@ -1,82 +0,0 @@
namespace SuperDesign.Manager.Site
{
partial class FrmFTPSelect
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.objectListView1 = new BrightIdeasSoftware.ObjectListView();
this.OlvName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
((System.ComponentModel.ISupportInitialize)(this.objectListView1)).BeginInit();
this.SuspendLayout();
//
// objectListView1
//
this.objectListView1.AllColumns.Add(this.OlvName);
this.objectListView1.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.objectListView1.CellEditUseWholeCell = false;
this.objectListView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.OlvName});
this.objectListView1.Cursor = System.Windows.Forms.Cursors.Default;
this.objectListView1.FullRowSelect = true;
this.objectListView1.HideSelection = false;
this.objectListView1.Location = new System.Drawing.Point(12, 12);
this.objectListView1.Name = "objectListView1";
this.objectListView1.Size = new System.Drawing.Size(276, 228);
this.objectListView1.TabIndex = 0;
this.objectListView1.UseCompatibleStateImageBehavior = false;
this.objectListView1.View = System.Windows.Forms.View.Details;
this.objectListView1.DoubleClick += new System.EventHandler(this.ObjectListView1_DoubleClick);
//
// OlvName
//
this.OlvName.Text = "名称";
this.OlvName.Width = 250;
//
// FrmFTPSelect
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(300, 252);
this.Controls.Add(this.objectListView1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmFTPSelect";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "选择FTP";
((System.ComponentModel.ISupportInitialize)(this.objectListView1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private BrightIdeasSoftware.OLVColumn OlvName;
public BrightIdeasSoftware.ObjectListView objectListView1;
}
}
@@ -1,32 +0,0 @@
using GameBackup3H3.DbOp;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using 开发辅助工具.Manager;
namespace SuperDesign.Manager.Site
{
public partial class FrmFTPSelect : Form
{
public FrmFTPSelect()
{
InitializeComponent();
OlvName.AspectGetter = delegate (object x) { return ((FTPInfo)x).Name; };
}
public FTPInfo SelectedItem { get; set; } = null;
private void ObjectListView1_DoubleClick(object sender, EventArgs e)
{
var item = (FTPInfo)objectListView1.SelectedObject;
if (item == null) { return; }
SelectedItem = item;
DialogResult = DialogResult.OK;
}
}
}
@@ -1,258 +0,0 @@
namespace GameBackup3H3.DbOp
{
partial class FrmFTPView
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmFTPView));
this.rySearch1 = new ryControls.rySearch();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.复制并添加数据ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.添加数据ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.修改数据ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.删除数据ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ctlMyPage1 = new MyPage.ctlMyPage();
this.btnDel = new ryControls.ButtonEx();
this.btnEdit = new ryControls.ButtonEx();
this.btnAdd = new ryControls.ButtonEx();
this.LvCbResult = new BrightIdeasSoftware.FastObjectListView();
this.OlvName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvIP = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvPort = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvUserName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvAddTime = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.contextMenuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.LvCbResult)).BeginInit();
this.SuspendLayout();
//
// rySearch1
//
this.rySearch1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.rySearch1.ButtonRoundBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.rySearch1.EmptyText = "请输入搜索内容";
this.rySearch1.Location = new System.Drawing.Point(12, 5);
this.rySearch1.Name = "rySearch1";
this.rySearch1.Size = new System.Drawing.Size(329, 24);
this.rySearch1.TabIndex = 28;
this.rySearch1.OnSearch += new System.EventHandler(this.RySearch1_OnSearch);
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.复制并添加数据ToolStripMenuItem,
this.添加数据ToolStripMenuItem,
this.修改数据ToolStripMenuItem,
this.删除数据ToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(161, 92);
//
// 复制并添加数据ToolStripMenuItem
//
this.复制并添加数据ToolStripMenuItem.Name = "复制并添加数据ToolStripMenuItem";
this.复制并添加数据ToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
this.复制并添加数据ToolStripMenuItem.Text = "复制并添加数据";
this.复制并添加数据ToolStripMenuItem.Click += new System.EventHandler(this.复制并添加数据ToolStripMenuItem_Click);
//
// 添加数据ToolStripMenuItem
//
this.添加数据ToolStripMenuItem.Name = "添加数据ToolStripMenuItem";
this.添加数据ToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
this.添加数据ToolStripMenuItem.Text = "添加数据";
this.添加数据ToolStripMenuItem.Click += new System.EventHandler(this.添加数据ToolStripMenuItem_Click);
//
// 修改数据ToolStripMenuItem
//
this.修改数据ToolStripMenuItem.Name = "修改数据ToolStripMenuItem";
this.修改数据ToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
this.修改数据ToolStripMenuItem.Text = "修改数据";
this.修改数据ToolStripMenuItem.Click += new System.EventHandler(this.修改数据ToolStripMenuItem_Click);
//
// 删除数据ToolStripMenuItem
//
this.删除数据ToolStripMenuItem.Name = "删除数据ToolStripMenuItem";
this.删除数据ToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
this.删除数据ToolStripMenuItem.Text = "删除数据";
this.删除数据ToolStripMenuItem.Click += new System.EventHandler(this.删除数据ToolStripMenuItem_Click);
//
// ctlMyPage1
//
this.ctlMyPage1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.ctlMyPage1.Location = new System.Drawing.Point(12, 516);
this.ctlMyPage1.Name = "ctlMyPage1";
this.ctlMyPage1.PageSize = 50;
this.ctlMyPage1.RecordCount = 0;
this.ctlMyPage1.Size = new System.Drawing.Size(506, 26);
this.ctlMyPage1.SQLText = "";
this.ctlMyPage1.SQLText2 = "";
this.ctlMyPage1.T_FirstCaption = "首页";
this.ctlMyPage1.T_LastCaption = "末页";
this.ctlMyPage1.T_NextCaption = "下一页";
this.ctlMyPage1.T_Parameters = null;
this.ctlMyPage1.T_PreCaption = "上一页";
this.ctlMyPage1.T_SkipCaption = "跳到";
this.ctlMyPage1.T_TipCaption = "{pageindex}/{pagecount} 页,共 {recordcount} 条记录,每页 {pagesize} 条";
this.ctlMyPage1.TabIndex = 30;
this.ctlMyPage1.OnPageChange += new System.EventHandler(this.CtlMyPage1_OnPageChange);
//
// btnDel
//
this.btnDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnDel.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.btnDel.Location = new System.Drawing.Point(673, 5);
this.btnDel.Name = "btnDel";
this.btnDel.Size = new System.Drawing.Size(62, 24);
this.btnDel.TabIndex = 40;
this.btnDel.Text = "删除";
this.btnDel.UseVisualStyleBackColor = true;
this.btnDel.Click += new System.EventHandler(this.BtnDel_Click);
//
// btnEdit
//
this.btnEdit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnEdit.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.btnEdit.Location = new System.Drawing.Point(605, 5);
this.btnEdit.Name = "btnEdit";
this.btnEdit.Size = new System.Drawing.Size(62, 24);
this.btnEdit.TabIndex = 39;
this.btnEdit.Text = "修改";
this.btnEdit.UseVisualStyleBackColor = true;
this.btnEdit.Click += new System.EventHandler(this.BtnEdit_Click);
//
// btnAdd
//
this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnAdd.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.btnAdd.Location = new System.Drawing.Point(537, 5);
this.btnAdd.Name = "btnAdd";
this.btnAdd.Size = new System.Drawing.Size(62, 24);
this.btnAdd.TabIndex = 38;
this.btnAdd.Text = "添加";
this.btnAdd.UseVisualStyleBackColor = true;
this.btnAdd.Click += new System.EventHandler(this.BtnAdd_Click);
//
// LvCbResult
//
this.LvCbResult.AllColumns.Add(this.OlvName);
this.LvCbResult.AllColumns.Add(this.OlvIP);
this.LvCbResult.AllColumns.Add(this.OlvPort);
this.LvCbResult.AllColumns.Add(this.OlvUserName);
this.LvCbResult.AllColumns.Add(this.OlvAddTime);
this.LvCbResult.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.LvCbResult.CellEditUseWholeCell = false;
this.LvCbResult.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.OlvName,
this.OlvIP,
this.OlvPort,
this.OlvUserName,
this.OlvAddTime});
this.LvCbResult.ContextMenuStrip = this.contextMenuStrip1;
this.LvCbResult.Cursor = System.Windows.Forms.Cursors.Default;
this.LvCbResult.EmptyListMsg = "当前列表没有任何项";
this.LvCbResult.FullRowSelect = true;
this.LvCbResult.HideSelection = false;
this.LvCbResult.Location = new System.Drawing.Point(12, 35);
this.LvCbResult.Name = "LvCbResult";
this.LvCbResult.RowHeight = 25;
this.LvCbResult.ShowGroups = false;
this.LvCbResult.ShowItemToolTips = true;
this.LvCbResult.Size = new System.Drawing.Size(723, 479);
this.LvCbResult.TabIndex = 85;
this.LvCbResult.UseCompatibleStateImageBehavior = false;
this.LvCbResult.UseFiltering = true;
this.LvCbResult.View = System.Windows.Forms.View.Details;
this.LvCbResult.VirtualMode = true;
this.LvCbResult.DoubleClick += new System.EventHandler(this.LvCbResult_DoubleClick);
//
// OlvName
//
this.OlvName.Text = "名称";
this.OlvName.Width = 200;
//
// OlvIP
//
this.OlvIP.Text = "IP";
this.OlvIP.Width = 130;
//
// OlvPort
//
this.OlvPort.Text = "端口";
//
// OlvUserName
//
this.OlvUserName.Text = "用户名";
this.OlvUserName.Width = 100;
//
// OlvAddTime
//
this.OlvAddTime.Text = "时间";
this.OlvAddTime.Width = 200;
//
// FrmFTPView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(747, 546);
this.Controls.Add(this.LvCbResult);
this.Controls.Add(this.btnDel);
this.Controls.Add(this.btnEdit);
this.Controls.Add(this.btnAdd);
this.Controls.Add(this.ctlMyPage1);
this.Controls.Add(this.rySearch1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmFTPView";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "浏览";
this.Load += new System.EventHandler(this.FrmView_Load);
this.contextMenuStrip1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.LvCbResult)).EndInit();
this.ResumeLayout(false);
}
#endregion
private ryControls.rySearch rySearch1;
private MyPage.ctlMyPage ctlMyPage1;
private ryControls.ButtonEx btnDel;
private ryControls.ButtonEx btnEdit;
private ryControls.ButtonEx btnAdd;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem 添加数据ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 修改数据ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 删除数据ToolStripMenuItem;
private BrightIdeasSoftware.FastObjectListView LvCbResult;
private BrightIdeasSoftware.OLVColumn OlvName;
private BrightIdeasSoftware.OLVColumn OlvAddTime;
private BrightIdeasSoftware.OLVColumn OlvIP;
private BrightIdeasSoftware.OLVColumn OlvPort;
private BrightIdeasSoftware.OLVColumn OlvUserName;
private System.Windows.Forms.ToolStripMenuItem 复制并添加数据ToolStripMenuItem;
}
}
@@ -1,283 +0,0 @@
using ryCommon;
using ryCommonDb;
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 开发辅助工具.Manager;
namespace GameBackup3H3.DbOp
{
public partial class FrmFTPView : Form
{
readonly string orderSQL = "order by addTime desc";
readonly string tableName = "FTP";
readonly string titleName = "FTP管理";
public FrmFTPView()
{
InitializeComponent();
OlvName.AspectGetter = delegate (object x) { return ((FTPInfo)x).Name; };
OlvIP.AspectGetter = delegate (object x) { return ((FTPInfo)x).IP; };
OlvPort.AspectGetter = delegate (object x) { return ((FTPInfo)x).Port; };
OlvUserName.AspectGetter = delegate (object x) { return ((FTPInfo)x).UserName; };
OlvAddTime.AspectGetter = delegate (object x) { return ((FTPInfo)x).AddTimeStr; };
}
#region 需要修改的内容
private void RySearch1_OnSearch(object sender, EventArgs e)
{
//需要修改此处
LoadDb("(name like @SearchText or des like @SearchText)");
}
private void CtlMyPage1_OnPageChange(object sender, EventArgs e)
{
#region 重新载入数据
LvCbResult.ClearObjects();
List<FTPInfo> list = new List<FTPInfo>();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
DataSet ds = db.ReadData(ctlMyPage1.GetSQLText, ctlMyPage1.T_Parameters);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
DataRow row = ds.Tables[0].Rows[i];
list.Add(new FTPInfo()
{
Id=row["id"].ToInt(),
Name = row["name"].ToString(),
IP = row["ip"].ToString(),
Port = row["port"].ToInt(),
RemoteDir = row["remoteDir"].ToString(),
UserName = row["username"].ToString(),
Pwd = row["pwd"].ToString(),
Encrypt = row["encrypt"].ToInt(0,2,0),
AddTime = row["AddTime"].ToDateTime()
}) ;
}
}
db.Free();
LvCbResult.AddObjects(list);
#endregion
}
private void GetRow(int id, int index)
{
#region 重新载入数据
DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
DataSet ds = db.ReadData("select * from " + tableName + " where id=" + id);
if (mydb.HaveData(ds))
{
DataRow row = ds.Tables[0].Rows[0];
var item=(FTPInfo) LvCbResult.GetModelObject(index);
item.Name = row["name"].ToString();
item.IP = row["ip"].ToString();
item.Port = row["port"].ToInt();
item.RemoteDir = row["remoteDir"].ToString();
item.UserName = row["username"].ToString();
item.Pwd = row["pwd"].ToString();
item.Encrypt = row["encrypt"].ToInt(0, 2, 0);
//添加剩余的项目
//添加完毕
LvCbResult.UpdateObject(item);
}
}
db.Free();
#endregion
}
#endregion
public void LoadDb(string whereSQL)
{
string _whereSQL = whereSQL;
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
#region 重新载入数据
db.AddParameter("SearchText", "%" + rySearch1.Text + "%");
ctlMyPage1.RecordCount = db.GetCount(tableName, _whereSQL);
ctlMyPage1.T_Parameters = db.GetParameter();
ctlMyPage1.SQLText= db.GetPageSQL(tableName, _whereSQL, orderSQL);
ctlMyPage1.SQLText2 = db.GetPageSQL2(tableName, _whereSQL, orderSQL);
ctlMyPage1.GotoPageIndex(1);
#endregion
}
db.Free();
}
private void BtnAdd_Click(object sender, EventArgs e)
{
FrmAddFTP frm = new FrmAddFTP()
{
Text = "添加"+ titleName,
Icon = Icon,
isAdd = 1
};
frm.mr = new ModalForm(this, frm);
frm.mr.OnDialogResult += new ModalForm.DialogResultHandler((object t, DialogResult dg) => {
if (dg == DialogResult.OK)
{
rySearch1.PerformClick();
}
});
frm.mr.ShowModal();
}
private void BtnEdit_Click(object sender, EventArgs e)
{
if (LvCbResult.SelectedObject == null) { return; }
var item = (FTPInfo)LvCbResult.SelectedObject;
var selectId = item.Id;
FrmAddFTP frm = new FrmAddFTP()
{
Text = "修改"+ titleName,
Icon = Icon,
isAdd = 0
};
frm.GetInfo(selectId.ToString());
frm.mr = new ModalForm(this, frm);
frm.mr.OnDialogResult += new ModalForm.DialogResultHandler((object t, DialogResult dg) => {
if (dg == DialogResult.OK)
{
GetRow(selectId, LvCbResult.SelectedIndex);
}
});
frm.mr.ShowModal();
}
private void BtnDel_Click(object sender, EventArgs e)
{
if (LvCbResult.SelectedObject == null) { MessageBox.Show("请先选择要删除的项。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
var item = (FTPInfo)LvCbResult.SelectedObject;
var selectId = item.Id;
switch (MessageBox.Show("确定要删除该项吗?一旦删除将不可恢复。", "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2))
{
case DialogResult.No:
return;
}
//DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
var ds = db.ReadData("select * from Site where ftpId=" + selectId + " limit 1");
if (ds.HaveData())
{
ds.Dispose();
db.Free();
MessageBox.Show("当前FTP正在被使用,无法删除。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return;
}
ds?.Dispose();
db.DelById(tableName, selectId.ToString());
LvCbResult.RemoveObject(item);
}
}
private void FrmView_Load(object sender, EventArgs e)
{
Text = "浏览"+ titleName;
添加数据ToolStripMenuItem.Text = "添加"+ titleName;
修改数据ToolStripMenuItem.Text = "修改" + titleName;
删除数据ToolStripMenuItem.Text = "删除" + titleName;
rySearch1.PerformClick();
}
private void 添加数据ToolStripMenuItem_Click(object sender, EventArgs e)
{
btnAdd.PerformClick();
}
private void 修改数据ToolStripMenuItem_Click(object sender, EventArgs e)
{
btnEdit.PerformClick();
}
private void 删除数据ToolStripMenuItem_Click(object sender, EventArgs e)
{
btnDel.PerformClick();
}
private void 复制并添加数据ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (LvCbResult.SelectedObject == null) { return; }
var item = (FTPInfo)LvCbResult.SelectedObject;
var selectId = item.Id;
FrmAddFTP frm = new FrmAddFTP()
{
Text = "添加" + titleName,
Icon = Icon,
isAdd = 1
};
frm.GetInfo(selectId.ToString());
frm.mr = new ModalForm(this, frm);
frm.mr.OnDialogResult += new ModalForm.DialogResultHandler((object t, DialogResult dg) => {
if (dg == DialogResult.OK)
{
rySearch1.PerformClick();
}
});
frm.mr.ShowModal();
}
public bool SelectModeOn { get; set; } = false;
public FTPInfo SelectedItem { get; set; }
private void LvCbResult_DoubleClick(object sender, EventArgs e)
{
if(SelectModeOn)
{
if (LvCbResult.SelectedObject == null) { return; }
SelectedItem = (FTPInfo)LvCbResult.SelectedObject;
DialogResult=DialogResult.OK;
}
}
}
public class FTPInfo
{
/// <summary>
/// id
/// </summary>
public int Id{ get; set; }
/// <summary>
/// 名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// IP
/// </summary>
public string IP { get; set; }
/// <summary>
/// 端口
/// </summary>
public int Port { get; set; }
/// <summary>
/// 用户名
/// </summary>
public string UserName { get; set; }
/// <summary>
/// 密码
/// </summary>
public string Pwd { get; set; }
/// <summary>
/// 远程目录
/// </summary>
public string RemoteDir { get; set; }
/// <summary>
/// 加密方式
/// </summary>
public int Encrypt { get; set; }
/// <summary>
/// 添加时间
/// </summary>
public DateTime AddTime { get; set; }
public string Encoding { get; set; }= "UTF8";
/// <summary>
/// 添加时间字符串
/// </summary>
public string AddTimeStr
{
get { return AddTime.ToString("yyyy-MM-dd dddd HH:mm:ss"); }
}
}
}
@@ -1,139 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>35, 21</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>
AAABAAEAICAAAAAAIABKAgAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAgAAAAIAgGAAAAc3p69AAAAARn
QU1BAACxjwv8YQUAAAIBSURBVFhHxZexTsMwEIY7lJdgZS9CYmAAVAk23oChAwOvwNIJiU5MwMSMBCNs
ZSqVWJGanYGxlKEValloMf5cJ7qmbnCVhJz0S9H5fP+f2Hd2Sr72MVKrGsfdobp5H6pAo6+hLHgOGCOG
WDstvXW/1JZOfCfIvMAc5to0y1urpcq9kbp0JV8G5CCXTetnemJFoyMTpQS5KjZ9svU+1bYOHojJWWFA
bkvjNh3Em+dBHoLc7i/BOunBLD/7InSceyKLDecLuCzt1CgXV2CemClRWefXLxNVexgbNJ4nM2i+/qiT
+mmE3eqegfQ1zi+cfkkO4DTkdC05gIC1q28nEFAuryQCAXGfSwAwHZPWKZ2hgHpr+sZx3DefIqxvbBpI
XyjgsHYU+RCwU903z5ILbj4/vT1ytt9+jACESL8LJAXSB0n8rXnGFxcAN7XPwRI5Uwt4bHsL0AgQIE+1
aAkWbUIZ6xJwZpcgvgmBQ0AfATPOvzahjE0SIAG5jJGYE5DHEiRhbgn+WYBZgtw3YQKC7MtwCQGmDOON
CAEHt+NUAvD5CDCNiHYonZQKk/NAvAzhNucBB4MUwCfMA1IAnIYck8cxQXkiEhC/MRd6IcEKv5JherC4
S2lohV7LQ9PBxf2YhMY6ZbExybFwzX2McpF9whfMmSu1NEbXonXSvzVBRr/npdIvW6FdJBbwQIAAAAAA
SUVORK5CYII=
</value>
</data>
</root>
@@ -0,0 +1,103 @@
namespace SuperDesign.Manager.FTP
{
partial class FrmUploadFilesToFtp
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.BtnUpload = new ryControls.ButtonEx();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.ProgTotal = new System.Windows.Forms.ProgressBar();
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// BtnUpload
//
this.BtnUpload.BaseColor = System.Drawing.Color.Green;
this.BtnUpload.ColorGradient = true;
this.BtnUpload.Location = new System.Drawing.Point(151, 27);
this.BtnUpload.Name = "BtnUpload";
this.BtnUpload.Size = new System.Drawing.Size(149, 71);
this.BtnUpload.TabIndex = 27;
this.BtnUpload.Text = "上传";
this.BtnUpload.UseDefSkin = false;
this.BtnUpload.UseVisualStyleBackColor = true;
this.BtnUpload.Click += new System.EventHandler(this.BtnUpload_Click);
//
// progressBar1
//
this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.progressBar1.Location = new System.Drawing.Point(13, 125);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(427, 32);
this.progressBar1.TabIndex = 29;
//
// ProgTotal
//
this.ProgTotal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.ProgTotal.Location = new System.Drawing.Point(12, 178);
this.ProgTotal.Name = "ProgTotal";
this.ProgTotal.Size = new System.Drawing.Size(427, 32);
this.ProgTotal.TabIndex = 30;
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(11, 162);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(41, 12);
this.label1.TabIndex = 31;
this.label1.Text = "总进度";
//
// FrmUploadFilesToFtp
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(451, 222);
this.Controls.Add(this.label1);
this.Controls.Add(this.ProgTotal);
this.Controls.Add(this.progressBar1);
this.Controls.Add(this.BtnUpload);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.Name = "FrmUploadFilesToFtp";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "上传";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmUploadFilesToFtp_FormClosing);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private ryControls.ButtonEx BtnUpload;
private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.ProgressBar ProgTotal;
private System.Windows.Forms.Label label1;
}
}
@@ -0,0 +1,124 @@
using ExtendUI.FTPManager;
using FTPop;
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SuperDesign.Manager.FTP
{
public partial class FrmUploadFilesToFtp : Form
{
public FrmUploadFilesToFtp()
{
InitializeComponent();
}
public string EngName { get; set; } = "";
public int FTPId { get; set; } = 0;
public string RemoteDir { get; set; } = "";
public List<UploadInfo> UploadInfos { get; set; } = new List<UploadInfo>();
private void BtnUpload_Click(object sender, EventArgs e)
{
Upload();
}
private void Upload()
{
BtnUpload.Enabled = false;
ProgTotal.Value = 0;
ProgTotal.Maximum = UploadInfos.Count;
new Thread(Start).Start();
void Start()
{
var isUpload_ok = 0;
FTPUI ftp_ui = new FTPUI(new SQLiteDataProvider(), Application.StartupPath + "\\UserDb\\Ftp.dat");
for (int i = 0; i < UploadInfos.Count; i++)
{
if (IsExit) { break; }
this.Invoke(new Action(() =>
{
ProgTotal.Value = i;
}));
var upload=UploadInfos[i];
var ftp_info = ftp_ui.GetFTPInfo(upload.FtpName);
if (ftp_info.Id == 0) { continue; }
IFTP ftp = new FTPWinSCP();
ftp.FileTransferProgress += Session_FileTransferProgress;
var opened = ftp.Open(ftp_info);
if (opened == 1)
{
if (ftp.Upload(upload.FromPath, upload.RemotePath) != 1)
{
MessageBox.Show("本地目录:" + upload.FromPath + "\r\n远程目录:" + upload.RemotePath + "\r\n" + ftp.LastError, "出错", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else { isUpload_ok = 1; }
this.Invoke(new Action(() =>
{
ProgTotal.Value = i+1;
}));
}
else
{
MessageBox.Show("连接FTP出错=>" + ftp.LastError, "出错", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
ftp.FileTransferProgress -= Session_FileTransferProgress;
ftp.Close();
}
this.Invoke(new Action(() =>
{
BtnUpload.Enabled = true;
ProgTotal.Value = UploadInfos.Count;
if (isUpload_ok==1)
{
DialogResult = DialogResult.OK;
}
}));
}
}
private void Session_FileTransferProgress(object sender, FTPop.FileTransferProgressEventArgs e)
{
if (IsExit) {
e.Cancel = true; return; }
this.Invoke(new Action(() =>
{
progressBar1.Value = (e.FileProgress*100).ToInt(0, 100, 100);
}));
}
private bool IsExit { get; set; } = false;
private void FrmUploadFilesToFtp_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing && !BtnUpload.Enabled) { IsExit = true; e.Cancel = true; }
}
}
public class UploadInfo
{
public string FromPath { get; set; } = "";
public string ToPath { get; set; } = "";
public string FtpName
{
get
{
return ToPath.GetStr("<",">");
}
}
public string RemotePath
{
get
{
var iPos = ToPath.IndexOf(">");
if(iPos>0)
{
return ToPath.Substring(iPos+1);
}
return ToPath;
}
}
}
}
@@ -1,101 +0,0 @@
namespace 开发辅助工具.Manager.FTP
{
partial class FrmUploadProg
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmUploadProg));
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.label1 = new System.Windows.Forms.Label();
this.ProgAll = new System.Windows.Forms.ProgressBar();
this.label2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(12, 39);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(368, 32);
this.progressBar1.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(83, 12);
this.label1.TabIndex = 1;
this.label1.Text = "正在上传中...";
//
// ProgAll
//
this.ProgAll.Location = new System.Drawing.Point(12, 101);
this.ProgAll.Name = "ProgAll";
this.ProgAll.Size = new System.Drawing.Size(368, 32);
this.ProgAll.TabIndex = 2;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 86);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(53, 12);
this.label2.TabIndex = 3;
this.label2.Text = "全部进度";
//
// FrmTranProg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(392, 166);
this.Controls.Add(this.label2);
this.Controls.Add(this.ProgAll);
this.Controls.Add(this.label1);
this.Controls.Add(this.progressBar1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmTranProg";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "上传中...";
this.TopMost = true;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmTranProg_FormClosing);
this.Shown += new System.EventHandler(this.FrmTranProg_Shown);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ProgressBar ProgAll;
private System.Windows.Forms.Label label2;
}
}
@@ -1,174 +0,0 @@
using GameBackup3H3.DbOp;
using ryCommon;
using SuperDesign.Manager.FTP;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace 开发辅助工具.Manager.FTP
{
public partial class FrmUploadProg : Form
{
public FrmUploadProg()
{
InitializeComponent();
}
public List<UploadInfo> UploadList { get; set; } = new List<UploadInfo>();
private void FrmTranProg_FormClosing(object sender, FormClosingEventArgs e)
{
if(e.CloseReason== CloseReason.UserClosing) { e.Cancel = true; }
}
private void FrmTranProg_Shown(object sender, EventArgs e)
{
ProgAll.Maximum = UploadList.Count;
Thread th = new Thread(Start);
th.Start();
void Start()
{
var error = 0;
for (int i = 0; i < UploadList.Count; i++)
{
var item = UploadList[i];
FTPop.FTPWinSCP ftp = (FTPop.FTPWinSCP)FTPManger.GetFTP(item.FtpInfo,out var result);
FTPManger.FileTransferProgress += Ftp_FileTransferProgress;
this.Invoke(new Action(() =>
{
ProgAll.Value = i;
label1.Text = "正在登录FTP...";
}));
if (result == 1)
{
this.Invoke(new Action(() =>
{
label1.Text = "正在上传文件...";
}));
var remotedir = System.IO.Path.GetDirectoryName(item.RemotePath).Replace("\\", "/");
if (!ftp.FileExists(remotedir))
{
ftp.CreateDir(remotedir);
}
else
{
if (item.LocalPath.Length > 0)
{
var remote_fileinfo = ftp.GetFileInfo(item.RemotePath);
if (remote_fileinfo.LastWriteTime != DateTime.MinValue)
{
bool goto_next = false;
if (remote_fileinfo.LastWriteTime.ToInt64() >= RyFiles.GetFileDate(item.LocalPath).LastWriteTime.ToInt64())
{
this.Invoke(new Action(() =>
{
switch (MessageBox.Show("当前服务器上的文件日期比本地新,是否要替换?\r\n\r\n" + item.LocalPath, "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2))
{
case DialogResult.No:
error++;
goto_next = true;
break;
}
}));
}
else if (RyFiles.GetFileDate(item.LocalPath).LastWriteTime.ToInt64() == remote_fileinfo.LastWriteTime.ToInt64())
{
if (RyFiles.GetFileSize(item.LocalPath) != remote_fileinfo.Length)
{
this.Invoke(new Action(() =>
{
switch (MessageBox.Show("当前本地文件与服务器文件日期一致,但大小不一致,是否要替换?\r\n\r\n本地:" + RyFiles.GetFileSizeStr(item.LocalPath) + "=>服务器:" + RyFiles.GetFileSizeStr(remote_fileinfo.Length), "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2))
{
case DialogResult.No:
error++;
goto_next = true;
break;
}
}));
}
}
if (goto_next) { continue; }
}
}
}
var LocalPath = item.LocalPath;
var tmp_path = "";
if (LocalPath.Length == 0)
{
tmp_path = Application.StartupPath + "\\UserDb\\tmp\\FTP\\" + System.IO.Path.GetFileName(item.RemotePath);
RyFiles.WriteAllText(tmp_path, item.Content, item.Encoding);
LocalPath = tmp_path;
}
if (ftp.Upload(LocalPath, item.RemotePath) == 1)
{
}
else
{
this.Invoke(new Action(() =>
{
MessageBox.Show("上传失败=>" + (item.LocalPath.Length>0? item.LocalPath: item.RemotePath) + "\r\n" + ftp.ErrorMsg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
error++;
}));
if(ftp.ErrorMsg.IndexOfEx("already read to the end")>=0)
{
ftp.Close();
//ftp= (FTPop.FTPWinSCP)FTPManger.GetFTP(item.FtpInfo, out var _);
}
}
if(tmp_path.Length>0)
RyFiles.DeleteFile(tmp_path);
}
else
{
this.Invoke(new Action(() =>
{
MessageBox.Show("FTP登录失败=>"+item.LocalPath, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
error++;
}));
}
FTPManger.FileTransferProgress -= Ftp_FileTransferProgress;
}
this.Invoke(new Action(() =>
{
ProgAll.Value = ProgAll.Maximum;
if (error == 0)
{
DialogResult = DialogResult.OK;
}
else
{
DialogResult = DialogResult.No;
}
}));
}
}
private void Ftp_FileTransferProgress(object sender, FTPop.FileTransferProgressEventArgs e)
{
this.Invoke(new Action(() =>
{
progressBar1.Value = (e.FileProgress*100).ToInt();
}));
}
}
public class UploadInfo
{
public FTPInfo FtpInfo { get; set; } = new FTPInfo();
public string RemotePath { get; set; } = "";
public string LocalPath { get; set; } = "";
/// <summary>
/// 当LocalPath为空时生效
/// </summary>
public string Content { get; set; } = "";
/// <summary>
/// 当LocalPath为空时生效
/// </summary>
public Encoding Encoding { get; set; } = Encoding.UTF8;
}
}
@@ -1,137 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<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>
AAABAAEAICAAAAAAIACLAgAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAgAAAAIAgGAAAAc3p69AAAAARn
QU1BAACxjwv8YQUAAAJCSURBVFhH7VY9SxxRFN3aMkRmd7CwSwwIkRS2YmFlJQhRSRAS/QN+tFaJje7M
bBAR0TQBQUyhYJ1KQQmksRRSBQKm0h9wc+7kzPPOJ65sujlwYfacc++772PebKNGjRrdwg/lWSuQj81Q
9hGnzUhOvEB2vFA+qEbb/0EzkFUMeoOQkrhRD+29BYofZgbT+Im4znAah0zrDbSgKx7JL8Sa15Zhyg1/
Q54rF2u9bgKFVpKi2Oezp4G0KOWgGnzfEj9ihdLjgSKXLHaHBkZJl6I/kJfw3jLnkvTj4EXynoWkFco6
6RjNjryA/gXatj6TjoGD2EnyEG9JPxwF+yl2z3VAcFdGv7JN6EoZTc/NBZqdpVyNeHCbzKBcNHgSqSYK
dMHKLFMuBgzzqQQ004rkFeWqwZNIN6H+/ISmKecB0Z1gLPlr0jEKBv9tnku3Q4Gbcsbo56TTwOzHnCmS
PdIO4Lecrm+G9f97tk0sMc1BayZ64atsC+Kuf0PawWzPEX+nG8Cscfh+6G+dcZxkgK1cTPx2Wx0yDUyR
TsF2nm2AtPKDfEzBbgPqD5G+h78jfa5gKJ9Jl6KsgTLAd0D/H1J5QPxKk167lbdeNw3oqjhvKMek89DL
whi18HzZN/4hDWguDp9+wl1N75OMUy4Gii3bBMZ3rMgkLTGqGvDbMqE5Tmfg8O3SUg0ckjkkpC4c/ddD
OUZVA+Cy/x3uEN19GQfa8gSzfqcDIzn3bVddeQzewSvYT9qBeVuoseBvygjpGjVqZNBo/AWpD6xpQDoH
PQAAAABJRU5ErkJggg==
</value>
</data>
</root>
@@ -0,0 +1,92 @@
namespace SuperDesign.Manager.FTP
{
partial class FrmUploadUpdateZipToFtp
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.BtnUploadZSB = new ryControls.ButtonEx();
this.BtnUploadBeta = new ryControls.ButtonEx();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.SuspendLayout();
//
// BtnUploadZSB
//
this.BtnUploadZSB.BaseColor = System.Drawing.Color.Green;
this.BtnUploadZSB.ColorGradient = true;
this.BtnUploadZSB.Location = new System.Drawing.Point(62, 24);
this.BtnUploadZSB.Name = "BtnUploadZSB";
this.BtnUploadZSB.Size = new System.Drawing.Size(149, 71);
this.BtnUploadZSB.TabIndex = 27;
this.BtnUploadZSB.Text = "正式版";
this.BtnUploadZSB.UseDefSkin = false;
this.BtnUploadZSB.UseVisualStyleBackColor = true;
this.BtnUploadZSB.Click += new System.EventHandler(this.BtnUploadZSB_Click);
//
// BtnUploadBeta
//
this.BtnUploadBeta.BaseColor = System.Drawing.Color.Green;
this.BtnUploadBeta.ColorGradient = true;
this.BtnUploadBeta.Location = new System.Drawing.Point(236, 24);
this.BtnUploadBeta.Name = "BtnUploadBeta";
this.BtnUploadBeta.Size = new System.Drawing.Size(149, 71);
this.BtnUploadBeta.TabIndex = 28;
this.BtnUploadBeta.Text = "测试版";
this.BtnUploadBeta.UseDefSkin = false;
this.BtnUploadBeta.UseVisualStyleBackColor = true;
this.BtnUploadBeta.Click += new System.EventHandler(this.BtnUploadBeta_Click);
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(17, 134);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(422, 32);
this.progressBar1.TabIndex = 29;
//
// FrmUploadFtp
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(451, 178);
this.Controls.Add(this.progressBar1);
this.Controls.Add(this.BtnUploadBeta);
this.Controls.Add(this.BtnUploadZSB);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.Name = "FrmUploadFtp";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "上传";
this.ResumeLayout(false);
}
#endregion
private ryControls.ButtonEx BtnUploadZSB;
private ryControls.ButtonEx BtnUploadBeta;
private System.Windows.Forms.ProgressBar progressBar1;
}
}
@@ -0,0 +1,82 @@
using ExtendUI.FTPManager;
using FTPop;
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SuperDesign.Manager.FTP
{
public partial class FrmUploadUpdateZipToFtp : Form
{
public FrmUploadUpdateZipToFtp()
{
InitializeComponent();
}
public string LocalPath { get; set; } = "";
public string EngName { get; set; } = "";
public int FTPId { get; set; } = 0;
public string RemoteDir { get; set; } = "";
private void BtnUploadZSB_Click(object sender, EventArgs e)
{
Upload(EngName+".zip");
}
private void Upload(string filename)
{
BtnUploadZSB.Enabled = false;
BtnUploadBeta.Enabled = false;
new Thread(Start).Start();
void Start()
{
var isUpload_ok = 0;
FTPUI ftp_ui = new FTPUI(new SQLiteDataProvider(), Application.StartupPath + "\\UserDb\\Ftp.dat");
var ftp_info = ftp_ui.GetFTPInfo(FTPId);
IFTP ftp = new FTPWinSCP();
ftp.FileTransferProgress += Session_FileTransferProgress;
var opened = ftp.Open(ftp_info);
if (opened == 1)
{
if(ftp.Upload(LocalPath, RemoteDir + "/" + filename)!=1)
{
MessageBox.Show("本地目录:"+ LocalPath + "\r\n远程目录:"+ RemoteDir + "/" + filename+"\r\n"+ftp.LastError,"出错",MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else { isUpload_ok = 1; }
}
else
{
MessageBox.Show("连接FTP出错=>" + ftp.LastError, "出错", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
ftp.Close();
this.Invoke(new Action(() =>
{
BtnUploadZSB.Enabled = true;
BtnUploadBeta.Enabled = true;
if(isUpload_ok==1)
{
DialogResult = DialogResult.OK;
}
}));
}
}
private void Session_FileTransferProgress(object sender, FTPop.FileTransferProgressEventArgs e)
{
this.Invoke(new Action(() =>
{
progressBar1.Value = (e.FileProgress*100).ToInt(0, 100, 100);
}));
}
private void BtnUploadBeta_Click(object sender, EventArgs e)
{
Upload(EngName + "_beta.zip");
}
}
}
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
#pragma warning disable CA2227 // 集合属性应为只读
namespace FTPop
{
/// <summary>
/// 远程文件信息
/// </summary>
public class RemoteFileInfo
{
public string Name { get; set; }
public string FullName { get; set; }
public long Length { get; set; }
public DateTime LastWriteTime { get; set; }
public bool IsDirectory { get; set; }
public override string ToString()
{
return FullName;
}
}
}
+18 -44
View File
@@ -1,4 +1,4 @@
using GameBackup3H3.DbOp;
using ExtendUI.FTPManager;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -14,12 +14,7 @@ namespace FTPop
/// <param name="ftpinfo"></param>
int Open(FTPInfo ftpinfo);
/// <summary>
/// FTP是否打开着
/// </summary>
/// <param name="ftpinfo"></param>
bool IsOpen { get; }
/// <summary>
/// 关闭FTP。
/// 关闭FTP
/// </summary>
/// <returns></returns>
int Close();
@@ -28,7 +23,7 @@ namespace FTPop
/// </summary>
/// <param name="CurFolder"></param>
/// <returns></returns>
List<RemoteFileInfo> ListDirectory(string CurFolder,out string error);
List<ExtendUI.FTPManager.RemoteFileInfo> ListDirectory(string CurFolder);
/// <summary>
/// 上传
/// </summary>
@@ -39,10 +34,11 @@ namespace FTPop
/// <summary>
/// 下载
/// </summary>
/// <param name="remotePath"></param>
/// <param name="localPath"></param>
/// <param name="remotePath"></param>
/// <returns></returns>
int Download(string remotePath, string localPath);
string ErrorMsg { get; set; }
/// <summary>
/// 删除文件
/// </summary>
@@ -50,6 +46,12 @@ namespace FTPop
/// <returns></returns>
int RemoveFiles(string remotePath);
/// <summary>
/// 创建文件夹
/// </summary>
/// <param name="remotePath"></param>
/// <returns></returns>
bool CreateDir(string remotePath);
/// <summary>
/// 移动文件
/// </summary>
/// <param name="remotePath"></param>
@@ -78,50 +80,22 @@ namespace FTPop
/// </summary>
/// <param name="remotePath"></param>
/// <returns></returns>
RemoteFileInfo GetFileInfo(string remotePath);
ExtendUI.FTPManager.RemoteFileInfo GetFileInfo(string remotePath);
/// <summary>
/// 文件传输事件
/// </summary>
event FileTransferProgressEventHandler FileTransferProgress;
}
public delegate void FileTransferProgressEventHandler(object sender, FileTransferProgressEventArgs e);
public sealed class FileTransferProgressEventArgs : EventArgs
{
/// <summary>
/// 文件全路径
/// 当前ID
/// </summary>
public string LocalPath { get; internal set; }
int Id { get; set; }
/// <summary>
/// 当前文件进度
/// 当前Tag
/// </summary>
public double FileProgress { get; internal set; }
object Tag { get; set; }
/// <summary>
/// 当前传输速度
/// 最后一次错误
/// </summary>
public double Speed { get; internal set; }
/// <summary>
/// 是否完成
/// </summary>
public bool IsComplete { get; internal set; } = false;
/// <summary>
/// 是否要取消
/// </summary>
public bool Cancel { get; set; }
}
/// <summary>
/// 远程文件信息
/// </summary>
public class RemoteFileInfo
{
public string Name { get; set; }
public string FullName { get; set; }
public long Length { get; set; }
public DateTime LastWriteTime { get; set; } = DateTime.MinValue;
public bool IsDirectory { get; set; }
public override string ToString()
{
return FullName;
}
string LastError { get; set; }
}
}
+17 -6
View File
@@ -29,6 +29,7 @@ namespace 开发辅助工具.Manager
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.label1 = new System.Windows.Forms.Label();
this.TxtVar = new ryControls.TextBoxEx2();
this.label2 = new System.Windows.Forms.Label();
@@ -53,7 +54,9 @@ namespace 开发辅助工具.Manager
this.TxtVar.BackColor = System.Drawing.Color.White;
this.TxtVar.EmptyText = "";
this.TxtVar.Location = new System.Drawing.Point(59, 12);
this.TxtVar.LongTime = 2000;
this.TxtVar.MaxLength = 999999999;
this.TxtVar.MaxUndoRedoSteps = 50;
this.TxtVar.Multiline = false;
this.TxtVar.Name = "TxtVar";
this.TxtVar.OnlyNumeric = false;
@@ -62,7 +65,7 @@ namespace 开发辅助工具.Manager
this.TxtVar.SelectedText = "";
this.TxtVar.SelectionLength = 0;
this.TxtVar.SelectionStart = 0;
this.TxtVar.Size = new System.Drawing.Size(125, 25);
this.TxtVar.Size = new System.Drawing.Size(148, 25);
this.TxtVar.TabIndex = 8;
this.TxtVar.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtVar.ToolTip = "";
@@ -79,10 +82,14 @@ namespace 开发辅助工具.Manager
//
// TxtVarValue
//
this.TxtVarValue.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtVarValue.BackColor = System.Drawing.Color.White;
this.TxtVarValue.EmptyText = "";
this.TxtVarValue.Location = new System.Drawing.Point(59, 43);
this.TxtVarValue.LongTime = 2000;
this.TxtVarValue.MaxLength = 999999999;
this.TxtVarValue.MaxUndoRedoSteps = 50;
this.TxtVarValue.Multiline = false;
this.TxtVarValue.Name = "TxtVarValue";
this.TxtVarValue.OnlyNumeric = false;
@@ -91,7 +98,7 @@ namespace 开发辅助工具.Manager
this.TxtVarValue.SelectedText = "";
this.TxtVarValue.SelectionLength = 0;
this.TxtVarValue.SelectionStart = 0;
this.TxtVarValue.Size = new System.Drawing.Size(324, 25);
this.TxtVarValue.Size = new System.Drawing.Size(534, 25);
this.TxtVarValue.TabIndex = 10;
this.TxtVarValue.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtVarValue.ToolTip = "";
@@ -108,10 +115,14 @@ namespace 开发辅助工具.Manager
//
// TxtDes
//
this.TxtDes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtDes.BackColor = System.Drawing.Color.White;
this.TxtDes.EmptyText = "";
this.TxtDes.Location = new System.Drawing.Point(59, 74);
this.TxtDes.LongTime = 2000;
this.TxtDes.MaxLength = 999999999;
this.TxtDes.MaxUndoRedoSteps = 50;
this.TxtDes.Multiline = false;
this.TxtDes.Name = "TxtDes";
this.TxtDes.OnlyNumeric = false;
@@ -120,7 +131,7 @@ namespace 开发辅助工具.Manager
this.TxtDes.SelectedText = "";
this.TxtDes.SelectionLength = 0;
this.TxtDes.SelectionStart = 0;
this.TxtDes.Size = new System.Drawing.Size(324, 25);
this.TxtDes.Size = new System.Drawing.Size(534, 25);
this.TxtDes.TabIndex = 12;
this.TxtDes.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtDes.ToolTip = "";
@@ -130,7 +141,7 @@ namespace 开发辅助工具.Manager
//
this.BtnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BtnCancel.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnCancel.Location = new System.Drawing.Point(316, 105);
this.BtnCancel.Location = new System.Drawing.Point(528, 116);
this.BtnCancel.Name = "BtnCancel";
this.BtnCancel.Size = new System.Drawing.Size(65, 27);
this.BtnCancel.TabIndex = 15;
@@ -142,7 +153,7 @@ namespace 开发辅助工具.Manager
//
this.BtnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BtnOK.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnOK.Location = new System.Drawing.Point(245, 105);
this.BtnOK.Location = new System.Drawing.Point(457, 116);
this.BtnOK.Name = "BtnOK";
this.BtnOK.Size = new System.Drawing.Size(65, 27);
this.BtnOK.TabIndex = 14;
@@ -154,7 +165,7 @@ namespace 开发辅助工具.Manager
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(395, 141);
this.ClientSize = new System.Drawing.Size(607, 152);
this.Controls.Add(this.BtnCancel);
this.Controls.Add(this.BtnOK);
this.Controls.Add(this.label3);
+81 -165
View File
@@ -44,11 +44,6 @@
this.TxtCshapeBasePath = new ryControls.TextBoxEx2();
this.label1 = new System.Windows.Forms.Label();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.BtnNoSelect = new System.Windows.Forms.Button();
this.BtnSelectAll = new System.Windows.Forms.Button();
this.checkedListBox1 = new System.Windows.Forms.CheckedListBox();
this.ChkAss_File = new System.Windows.Forms.CheckBox();
this.ChkAss_Folder = new System.Windows.Forms.CheckBox();
this.ChkAss_Ryp = new System.Windows.Forms.CheckBox();
this.tabPage3 = new System.Windows.Forms.TabPage();
@@ -63,14 +58,10 @@
this.删除变量ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tableModel1 = new XPTable.Models.TableModel();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.LvSite = new BrightIdeasSoftware.ObjectListView();
this.OlvSiteName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvSitePath = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvSiteFTP = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.MenuSite = new System.Windows.Forms.ContextMenuStrip(this.components);
this.添加站点ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.修改站点ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.删除站点ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.TxtRemoteDir = new ryControls.TextBoxEx2();
this.label7 = new System.Windows.Forms.Label();
this.TxtRemoteFTP = new ryControls.TextBoxEx2();
this.label6 = new System.Windows.Forms.Label();
this.BtnOK = new ryControls.ButtonEx();
this.BtnCancel = new ryControls.ButtonEx();
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
@@ -78,13 +69,10 @@
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.tabPage3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
this.contextMenuStrip1.SuspendLayout();
this.tabPage4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.LvSite)).BeginInit();
this.MenuSite.SuspendLayout();
this.SuspendLayout();
//
// tabControl1
@@ -139,7 +127,9 @@
this.TxtWinRARPath.BackColor = System.Drawing.Color.White;
this.TxtWinRARPath.EmptyText = "";
this.TxtWinRARPath.Location = new System.Drawing.Point(14, 321);
this.TxtWinRARPath.LongTime = 2000;
this.TxtWinRARPath.MaxLength = 999999999;
this.TxtWinRARPath.MaxUndoRedoSteps = 50;
this.TxtWinRARPath.Multiline = false;
this.TxtWinRARPath.Name = "TxtWinRARPath";
this.TxtWinRARPath.OnlyNumeric = false;
@@ -180,7 +170,9 @@
this.TxtReactorPath.BackColor = System.Drawing.Color.White;
this.TxtReactorPath.EmptyText = "";
this.TxtReactorPath.Location = new System.Drawing.Point(14, 272);
this.TxtReactorPath.LongTime = 2000;
this.TxtReactorPath.MaxLength = 999999999;
this.TxtReactorPath.MaxUndoRedoSteps = 50;
this.TxtReactorPath.Multiline = false;
this.TxtReactorPath.Name = "TxtReactorPath";
this.TxtReactorPath.OnlyNumeric = false;
@@ -210,7 +202,9 @@
this.TxtReferenceDll.BackColor = System.Drawing.Color.White;
this.TxtReferenceDll.EmptyText = "";
this.TxtReferenceDll.Location = new System.Drawing.Point(14, 69);
this.TxtReferenceDll.LongTime = 2000;
this.TxtReferenceDll.MaxLength = 999999999;
this.TxtReferenceDll.MaxUndoRedoSteps = 50;
this.TxtReferenceDll.Multiline = true;
this.TxtReferenceDll.Name = "TxtReferenceDll";
this.TxtReferenceDll.OnlyNumeric = false;
@@ -251,7 +245,9 @@
this.TxtCshapeBasePath.BackColor = System.Drawing.Color.White;
this.TxtCshapeBasePath.EmptyText = "";
this.TxtCshapeBasePath.Location = new System.Drawing.Point(14, 22);
this.TxtCshapeBasePath.LongTime = 2000;
this.TxtCshapeBasePath.MaxLength = 999999999;
this.TxtCshapeBasePath.MaxUndoRedoSteps = 50;
this.TxtCshapeBasePath.Multiline = false;
this.TxtCshapeBasePath.Name = "TxtCshapeBasePath";
this.TxtCshapeBasePath.OnlyNumeric = false;
@@ -278,8 +274,6 @@
//
// tabPage2
//
this.tabPage2.Controls.Add(this.groupBox1);
this.tabPage2.Controls.Add(this.ChkAss_File);
this.tabPage2.Controls.Add(this.ChkAss_Folder);
this.tabPage2.Controls.Add(this.ChkAss_Ryp);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
@@ -290,79 +284,13 @@
this.tabPage2.Text = "文件关联";
this.tabPage2.UseVisualStyleBackColor = true;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.BtnNoSelect);
this.groupBox1.Controls.Add(this.BtnSelectAll);
this.groupBox1.Controls.Add(this.checkedListBox1);
this.groupBox1.Location = new System.Drawing.Point(19, 84);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(563, 128);
this.groupBox1.TabIndex = 4;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "关联常用文本文件用本编辑器打开";
//
// BtnNoSelect
//
this.BtnNoSelect.Location = new System.Drawing.Point(81, 94);
this.BtnNoSelect.Name = "BtnNoSelect";
this.BtnNoSelect.Size = new System.Drawing.Size(61, 23);
this.BtnNoSelect.TabIndex = 2;
this.BtnNoSelect.Text = "全不选";
this.BtnNoSelect.UseVisualStyleBackColor = true;
this.BtnNoSelect.Click += new System.EventHandler(this.BtnNoSelect_Click);
//
// BtnSelectAll
//
this.BtnSelectAll.Location = new System.Drawing.Point(12, 94);
this.BtnSelectAll.Name = "BtnSelectAll";
this.BtnSelectAll.Size = new System.Drawing.Size(61, 23);
this.BtnSelectAll.TabIndex = 1;
this.BtnSelectAll.Text = "全选";
this.BtnSelectAll.UseVisualStyleBackColor = true;
this.BtnSelectAll.Click += new System.EventHandler(this.BtnSelectAll_Click);
//
// checkedListBox1
//
this.checkedListBox1.FormattingEnabled = true;
this.checkedListBox1.Items.AddRange(new object[] {
"txt",
"log",
"ini",
"inf",
"xml",
"json",
"sql",
"js",
"html",
"htm",
"asp",
"css",
"config",
"php"});
this.checkedListBox1.Location = new System.Drawing.Point(11, 20);
this.checkedListBox1.MultiColumn = true;
this.checkedListBox1.Name = "checkedListBox1";
this.checkedListBox1.Size = new System.Drawing.Size(546, 68);
this.checkedListBox1.TabIndex = 0;
//
// ChkAss_File
//
this.ChkAss_File.AutoSize = true;
this.ChkAss_File.Location = new System.Drawing.Point(29, 62);
this.ChkAss_File.Name = "ChkAss_File";
this.ChkAss_File.Size = new System.Drawing.Size(204, 16);
this.ChkAss_File.TabIndex = 2;
this.ChkAss_File.Text = "关联文件右键菜单(用编辑器打开)";
this.ChkAss_File.UseVisualStyleBackColor = true;
//
// ChkAss_Folder
//
this.ChkAss_Folder.AutoSize = true;
this.ChkAss_Folder.Location = new System.Drawing.Point(29, 40);
this.ChkAss_Folder.Name = "ChkAss_Folder";
this.ChkAss_Folder.Size = new System.Drawing.Size(132, 16);
this.ChkAss_Folder.TabIndex = 1;
this.ChkAss_Folder.TabIndex = 2;
this.ChkAss_Folder.Text = "关联文件夹右键菜单";
this.ChkAss_Folder.UseVisualStyleBackColor = true;
//
@@ -402,6 +330,7 @@
this.table1.TabIndex = 0;
this.table1.TableModel = this.tableModel1;
this.table1.Text = "table1";
this.table1.DoubleClick += new System.EventHandler(this.Table1_DoubleClick);
//
// columnModel1
//
@@ -463,82 +392,80 @@
//
// tabPage4
//
this.tabPage4.Controls.Add(this.LvSite);
this.tabPage4.Controls.Add(this.TxtRemoteDir);
this.tabPage4.Controls.Add(this.label7);
this.tabPage4.Controls.Add(this.TxtRemoteFTP);
this.tabPage4.Controls.Add(this.label6);
this.tabPage4.Location = new System.Drawing.Point(4, 22);
this.tabPage4.Name = "tabPage4";
this.tabPage4.Padding = new System.Windows.Forms.Padding(3);
this.tabPage4.Size = new System.Drawing.Size(598, 373);
this.tabPage4.TabIndex = 3;
this.tabPage4.Text = "站点文件夹";
this.tabPage4.Text = "FTP";
this.tabPage4.UseVisualStyleBackColor = true;
//
// LvSite
// TxtRemoteDir
//
this.LvSite.AllColumns.Add(this.OlvSiteName);
this.LvSite.AllColumns.Add(this.OlvSitePath);
this.LvSite.AllColumns.Add(this.OlvSiteFTP);
this.LvSite.CellEditUseWholeCell = false;
this.LvSite.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.OlvSiteName,
this.OlvSitePath,
this.OlvSiteFTP});
this.LvSite.ContextMenuStrip = this.MenuSite;
this.LvSite.Cursor = System.Windows.Forms.Cursors.Default;
this.LvSite.FullRowSelect = true;
this.LvSite.HideSelection = false;
this.LvSite.Location = new System.Drawing.Point(5, 3);
this.LvSite.MultiSelect = false;
this.LvSite.Name = "LvSite";
this.LvSite.RowHeight = 25;
this.LvSite.Size = new System.Drawing.Size(589, 367);
this.LvSite.TabIndex = 0;
this.LvSite.UseCompatibleStateImageBehavior = false;
this.LvSite.View = System.Windows.Forms.View.Details;
this.TxtRemoteDir.BackColor = System.Drawing.Color.White;
this.TxtRemoteDir.EmptyText = "";
this.TxtRemoteDir.Location = new System.Drawing.Point(325, 6);
this.TxtRemoteDir.LongTime = 2000;
this.TxtRemoteDir.MaxLength = 999999999;
this.TxtRemoteDir.MaxUndoRedoSteps = 50;
this.TxtRemoteDir.Multiline = false;
this.TxtRemoteDir.Name = "TxtRemoteDir";
this.TxtRemoteDir.OnlyNumeric = false;
this.TxtRemoteDir.PasswordChar = '\0';
this.TxtRemoteDir.ReadOnly = false;
this.TxtRemoteDir.SelectedText = "";
this.TxtRemoteDir.SelectionLength = 0;
this.TxtRemoteDir.SelectionStart = 0;
this.TxtRemoteDir.Size = new System.Drawing.Size(216, 28);
this.TxtRemoteDir.TabIndex = 37;
this.TxtRemoteDir.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtRemoteDir.ToolTip = "";
this.TxtRemoteDir.WordWrap = true;
//
// OlvSiteName
// label7
//
this.OlvSiteName.Text = "站点名称";
this.OlvSiteName.Width = 120;
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(266, 14);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(53, 12);
this.label7.TabIndex = 36;
this.label7.Text = "远程目录";
//
// OlvSitePath
// TxtRemoteFTP
//
this.OlvSitePath.Text = "站点根路径";
this.OlvSitePath.Width = 300;
this.TxtRemoteFTP.BackColor = System.Drawing.Color.White;
this.TxtRemoteFTP.EmptyText = "";
this.TxtRemoteFTP.Location = new System.Drawing.Point(66, 6);
this.TxtRemoteFTP.LongTime = 2000;
this.TxtRemoteFTP.MaxLength = 999999999;
this.TxtRemoteFTP.MaxUndoRedoSteps = 50;
this.TxtRemoteFTP.Multiline = false;
this.TxtRemoteFTP.Name = "TxtRemoteFTP";
this.TxtRemoteFTP.OnlyNumeric = false;
this.TxtRemoteFTP.PasswordChar = '\0';
this.TxtRemoteFTP.ReadOnly = true;
this.TxtRemoteFTP.SelectedText = "";
this.TxtRemoteFTP.SelectionLength = 0;
this.TxtRemoteFTP.SelectionStart = 0;
this.TxtRemoteFTP.Size = new System.Drawing.Size(193, 28);
this.TxtRemoteFTP.TabIndex = 35;
this.TxtRemoteFTP.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtRemoteFTP.ToolTip = "";
this.TxtRemoteFTP.WordWrap = true;
this.TxtRemoteFTP.DoubleClick += new System.EventHandler(this.TxtRemoteFTP_DoubleClick);
//
// OlvSiteFTP
// label6
//
this.OlvSiteFTP.Text = "站点FTP";
this.OlvSiteFTP.Width = 100;
//
// MenuSite
//
this.MenuSite.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.添加站点ToolStripMenuItem,
this.修改站点ToolStripMenuItem,
this.删除站点ToolStripMenuItem});
this.MenuSite.Name = "MenuSite";
this.MenuSite.Size = new System.Drawing.Size(125, 70);
//
// 添加站点ToolStripMenuItem
//
this.添加站点ToolStripMenuItem.Name = "添加站点ToolStripMenuItem";
this.添加站点ToolStripMenuItem.Size = new System.Drawing.Size(124, 22);
this.添加站点ToolStripMenuItem.Text = "添加站点";
this.添加站点ToolStripMenuItem.Click += new System.EventHandler(this.添加站点ToolStripMenuItem_Click);
//
// 修改站点ToolStripMenuItem
//
this.修改站点ToolStripMenuItem.Name = "修改站点ToolStripMenuItem";
this.修改站点ToolStripMenuItem.Size = new System.Drawing.Size(124, 22);
this.修改站点ToolStripMenuItem.Text = "修改站点";
this.修改站点ToolStripMenuItem.Click += new System.EventHandler(this.修改站点ToolStripMenuItem_Click);
//
// 删除站点ToolStripMenuItem
//
this.删除站点ToolStripMenuItem.Name = "删除站点ToolStripMenuItem";
this.删除站点ToolStripMenuItem.Size = new System.Drawing.Size(124, 22);
this.删除站点ToolStripMenuItem.Text = "删除站点";
this.删除站点ToolStripMenuItem.Click += new System.EventHandler(this.删除站点ToolStripMenuItem_Click);
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(7, 14);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(59, 12);
this.label6.TabIndex = 34;
this.label6.Text = "升级包FTP";
//
// BtnOK
//
@@ -585,13 +512,11 @@
this.tabPage1.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.tabPage2.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.tabPage3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.table1)).EndInit();
this.contextMenuStrip1.ResumeLayout(false);
this.tabPage4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.LvSite)).EndInit();
this.MenuSite.ResumeLayout(false);
this.tabPage4.PerformLayout();
this.ResumeLayout(false);
}
@@ -613,7 +538,6 @@
private ryControls.ButtonEx BtnWinRARPath;
private ryControls.TextBoxEx2 TxtWinRARPath;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.CheckBox ChkAss_Folder;
private System.Windows.Forms.CheckBox ChkAss_Ryp;
private System.Windows.Forms.TabPage tabPage3;
private XPTable.Models.Table table1;
@@ -626,21 +550,13 @@
private System.Windows.Forms.ToolStripMenuItem 新增变量ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 修改变量ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 删除变量ToolStripMenuItem;
private BrightIdeasSoftware.ObjectListView LvSite;
private BrightIdeasSoftware.OLVColumn OlvSiteName;
private BrightIdeasSoftware.OLVColumn OlvSitePath;
private BrightIdeasSoftware.OLVColumn OlvSiteFTP;
private System.Windows.Forms.ContextMenuStrip MenuSite;
private System.Windows.Forms.ToolStripMenuItem 添加站点ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 修改站点ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 删除站点ToolStripMenuItem;
private System.Windows.Forms.CheckBox ChkAss_File;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.CheckedListBox checkedListBox1;
private System.Windows.Forms.Button BtnNoSelect;
private System.Windows.Forms.Button BtnSelectAll;
public System.Windows.Forms.TabControl tabControl1;
public System.Windows.Forms.TabPage tabPage2;
public System.Windows.Forms.TabPage tabPage4;
private System.Windows.Forms.CheckBox ChkAss_Folder;
private System.Windows.Forms.TabPage tabPage4;
private ryControls.TextBoxEx2 TxtRemoteDir;
private System.Windows.Forms.Label label7;
private ryControls.TextBoxEx2 TxtRemoteFTP;
private System.Windows.Forms.Label label6;
}
}
+46 -145
View File
@@ -1,10 +1,8 @@
using GameBackup3H3.DbOp;
using Microsoft.Win32;
using Microsoft.Win32;
using MyPage;
using ryCommon;
using ryCommonDb;
using ryControls;
using 开发辅助工具.Manager.Site;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -15,6 +13,8 @@ using System.Text;
using System.Windows.Forms;
using static System.Net.WebRequestMethods;
using System.Xml.Linq;
using ExtendUI.FTPManager;
using FTPop;
namespace 开发辅助工具.Manager
{
@@ -23,9 +23,6 @@ namespace 开发辅助工具.Manager
public FrmSetting()
{
InitializeComponent();
OlvSiteName.AspectGetter = delegate (object x) { return ((SiteInfo)x).Name; };
OlvSitePath.AspectGetter = delegate (object x) { return ((SiteInfo)x).LocalPath; };
OlvSiteFTP.AspectGetter = delegate (object x) { return ((SiteInfo)x).FtpName; };
}
private void BtnChapeBasePath_Click(object sender, EventArgs e)
@@ -44,57 +41,16 @@ namespace 开发辅助工具.Manager
private void BtnOK_Click(object sender, EventArgs e)
{
if(ChkAss_Ryp.Checked)
{
SetFileAssociation(".ryp", "ryUSQ", "用睿元开发助手打开", Application.ExecutablePath, "open \"%1\"");
}
else { DelFileAssociation(".ryp", "ryUSQ"); }
if(ChkAss_Folder.Checked)
if (ChkAss_Folder.Checked)
{
SetFileAssociation("folder", "ryUSQ", "用睿元开发助手打开", Application.ExecutablePath, "open \"%1\"");
}
else { DelFileAssociation("folder", "ryUSQ"); }
if (ChkAss_File.Checked)
if (ChkAss_Ryp.Checked)
{
SetFileAssociation("*", "ryUSQ", "用睿元编辑器打开", Application.ExecutablePath, "\"%1\"");
}
else { DelFileAssociation("*", "ryUSQ"); }
for (int i = 0; i < checkedListBox1.Items.Count; i++)
{
var item = checkedListBox1.Items[i].ToString();
var check=checkedListBox1.GetItemChecked(i);
if (check)
{
SetFileAssociation("ryUSQ_" + item, "open", "", Application.ExecutablePath, "\"%1\"");
SetDefFileAssociation("." + item, "ryUSQ_" + item);
}
else
{
try
{
var ExtName = "." + item;
RegistryKey LRoot = RegistryKey.OpenBaseKey(RegistryHive.ClassesRoot, RegistryView.Registry32);
RegistryKey def_key = LRoot.OpenSubKey(ExtName, true);
var bak_value = def_key.GetValue("bak_value");
if(bak_value!=null)
{
def_key.SetValue("", bak_value, RegistryValueKind.String);
def_key.DeleteValue("bak_value");
}
def_key.Close();
RegistryKey file_key = LRoot.OpenSubKey("ryUSQ_" + item, true);
if(file_key!=null)
{
file_key.Close();
LRoot.DeleteSubKeyTree("ryUSQ_" + item);
}
LRoot.Close();
}
catch
{
}
}
SetFileAssociation(".ryp", "ryUSQ", "用睿元开发助手打开", Application.ExecutablePath, "open \"%1\"");
}
else { DelFileAssociation(".ryp", "ryUSQ"); }
ryCommon.Storage mStor = new ryCommon.Storage();
mStor.SelectNodeBySet();
mStor.SetAttrValue("CshapeBasePath", TxtCshapeBasePath.Text);
@@ -104,6 +60,8 @@ namespace 开发辅助工具.Manager
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
mStor.SetAttrValue("ftpid", RemoteFTPId);
mStor.SetAttrValue("ftp_remote_dir", TxtRemoteDir.Text);
RyQuickSQL mySQL = new RyQuickSQL("Settings");
mySQL.AddField("name","Setting");
mySQL.AddField("value", mStor.XMLText);
@@ -252,19 +210,11 @@ namespace 开发辅助工具.Manager
return false;
}
}
private int RemoteFTPId { get; set; } = 0;
private void FrmSetting_Load(object sender, EventArgs e)
{
ChkAss_Ryp.Checked = GetFileAssociation(".ryp", "ryUSQ");
ChkAss_Folder.Checked = GetFileAssociation("folder", "ryUSQ");
ChkAss_File.Checked = GetFileAssociation("*", "ryUSQ");
for (int i = 0; i < checkedListBox1.Items.Count; i++)
{
var item = checkedListBox1.Items[i].ToString();
if(GetFileAssociation("ryUSQ_"+item))
{
checkedListBox1.SetItemChecked(i, true);
}
}
ChkAss_Ryp.Checked = GetFileAssociation(".ryp", "ryUSQ");
DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
@@ -279,7 +229,15 @@ namespace 开发辅助工具.Manager
TxtReferenceDll.Text = mStor.GetAttrValue("ReferenceDll");
TxtReactorPath.Text = mStor.GetAttrValue("ReactorPath");
TxtWinRARPath.Text = mStor.GetAttrValue("WinRARPath");
if(TxtWinRARPath.Text=="")
var ftpid = mStor.GetAttrValue("ftpid",0);
if (ftpid > 0)
{
FTPUI ftp_ui = new FTPUI(new SQLiteDataProvider(), Application.StartupPath + "\\UserDb\\Ftp.dat");
TxtRemoteFTP.Text = ftp_ui.GetFTPInfo(ftpid).Name;
TxtRemoteDir.Text = mStor.GetAttrValue("ftp_remote_dir");
RemoteFTPId = ftpid;
}
if (TxtWinRARPath.Text=="")
{
if(System.IO.File.Exists(@"C:\Program Files\WinRAR\WinRAR.exe"))
{
@@ -290,14 +248,12 @@ namespace 开发辅助工具.Manager
}
db.Free();
LoadVarData();
LoadSite();
}
private void LoadVarData()
{
#region 重新载入数据
tableModel1.Rows.Clear();
tableModel1.Selections.Clear();
DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
@@ -427,97 +383,42 @@ namespace 开发辅助工具.Manager
tableModel1.Rows.RemoveAt(table1.SelectedItems[0].Index);
}
}
private void LoadSite()
private void TxtRemoteFTP_DoubleClick(object sender, EventArgs e)
{
List<SiteInfo> list = new List<SiteInfo>();
LvSite.ClearObjects();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
var db = new SQLiteDataProvider();
FTPUI ftp_ui = new FTPUI(db, Application.StartupPath + "\\UserDb\\Ftp.dat");
ftp_ui.OnTestFTP += Ftp_ui_OnTestFTP;
if (ftp_ui.ShowFTPManager(out var ftp))
{
var ds = db.ReadData("select * from Site");
if(ds.HaveData())
TxtRemoteFTP.Text = ftp.Name;
RemoteFTPId = ftp.Id;
}
}
private void Ftp_ui_OnTestFTP(FTPInfo e)
{
IFTP ftp = new FTPWinSCP();
var opened = ftp.Open(e);
if (opened == 1)
{
if (ftp.FileExists(e.RemoteDir))
{
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
var row = ds.GetRow(i);
var ftp_ds = db.ReadData("Ftp", row["ftpId"].ToString());
var ftpname = "";
if (ftp_ds.HaveData()) { ftpname = ftp_ds.GetRow(0)["name"].ToString(); }
list.Add(new SiteInfo() {
Id = row["id"].ToInt(),
Name = row["name"].ToString(),
LocalPath = row["localPath"].ToString(),
FtpId = row["ftpId"].ToInt(),
FtpName= ftpname
});
}
MessageBox.Show("连接成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("连接成功,但是远程目录不存在。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
ds.Dispose();
}
db.Free();
LvSite.AddObjects(list);
}
private void 添加站点ToolStripMenuItem_Click(object sender, EventArgs e)
{
FrmAddSite frm = new FrmAddSite();
if(frm.ShowDialog()==DialogResult.OK)
else
{
LoadSite();
}
frm.Dispose();
}
private void 修改站点ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (LvSite.SelectedObject == null) { return; }
var item = (SiteInfo)LvSite.SelectedObject;
var selectId = item.Id;
FrmAddSite frm = new FrmAddSite()
{
Icon = Icon,
isAdd = 0
};
frm.GetInfo(selectId.ToString());
if (frm.ShowDialog() == DialogResult.OK)
{
LoadSite();
}
frm.Dispose();
}
private void 删除站点ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (LvSite.SelectedObject == null) { MessageBox.Show("请先选择要删除的项。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
var item = (SiteInfo)LvSite.SelectedObject;
var selectId = item.Id;
switch (MessageBox.Show("确定要删除该项吗?一旦删除将不可恢复。", "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2))
{
case DialogResult.No:
return;
}
//DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
db.DelById("Site", selectId.ToString());
LvSite.RemoveObject(item);
MessageBox.Show(ftp.LastError, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void BtnSelectAll_Click(object sender, EventArgs e)
private void Table1_DoubleClick(object sender, EventArgs e)
{
for (int i = 0; i < checkedListBox1.Items.Count; i++)
{
checkedListBox1.SetItemChecked(i,true);
}
}
private void BtnNoSelect_Click(object sender, EventArgs e)
{
for (int i = 0; i < checkedListBox1.Items.Count; i++)
{
checkedListBox1.SetItemChecked(i, false);
}
修改变量ToolStripMenuItem.PerformClick();
}
}
public class SiteInfo
@@ -129,9 +129,6 @@
<metadata name="tableModel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>439, 17</value>
</metadata>
<metadata name="MenuSite.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>731, 17</value>
</metadata>
<metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
@@ -522,6 +522,7 @@ namespace IndentLibrary
var endTagLang = String.Empty;
while (!splitOpen[loopIndex++].ToString().ToLower().Contains(tag))
{
if (splitOpen.Count == loopIndex) { break; }
if (splitOpen[loopIndex].ToString().ToLower().Contains("</" + tag + ">"))
{
endTagLang = "</" + tag + ">";
+135
View File
@@ -0,0 +1,135 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace HttpUpload.Core
{
class ImgExt
{
public static FileExtension CheckImgFile(string fileName)
{
FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);
System.IO.BinaryReader br = new System.IO.BinaryReader(fs);
string fileType = string.Empty;
FileExtension extension;
try
{
byte data = br.ReadByte();
fileType += data.ToString();
data = br.ReadByte();
fileType += data.ToString();
try
{
extension = (FileExtension)Enum.Parse(typeof(FileExtension), fileType);
}
catch
{
extension = FileExtension.VALIDFILE;
}
}
catch
{
extension = FileExtension.VALIDFILE;
}
finally
{
if (fs != null)
{
fs.Close();
br.Close();
}
}
return extension;
}
public static Stream FileToStream(string fileName)
{
// 打开文件
FileStream fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read);
// 读取文件的 byte[]
byte[] bytes = new byte[fileStream.Length];
fileStream.Read(bytes, 0, bytes.Length);
fileStream.Close();
// 把 byte[] 转换成 Stream
Stream stream = new MemoryStream(bytes);
return stream;
}
public static FileExtension CheckImgFile(byte[] bytes)
{
string fileType = string.Empty;
FileExtension extension;
try
{
if (bytes.Length <= 2) { return FileExtension.VALIDFILE; }
byte data = bytes[0];
fileType += data.ToString();
data = bytes[1];
fileType += data.ToString();
try
{
extension = (FileExtension)Enum.Parse(typeof(FileExtension), fileType);
}
catch
{
extension = FileExtension.VALIDFILE;
}
}
catch
{
extension = FileExtension.VALIDFILE;
}
finally
{
}
return extension;
}
}
public enum FileExtension
{
JPG = 255216,
GIF = 7173,
PNG = 13780,
SWF = 6787,
RAR = 8297,
ZIP = 8075,
_7Z = 55122,
WebP = 8273,
BMP = 6677,
VALIDFILE = 9999999
// 255216 jpg;
// 7173 gif;
// 6677 bmp,
// 13780 png;
// 6787 swf
// 7790 exe dll,
// 8297 rar
// 8075 zip
// 55122 7z
// 6063 xml
// 6033 html
// 239187 aspx
// 117115 cs
// 119105 js
// 102100 txt
// 255254 sql
}
}
+2 -36
View File
@@ -1,5 +1,4 @@
using 开发辅助工具.Tools.SmartEditor;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -29,22 +28,10 @@ namespace 开发辅助工具
string ProjectPath = args[1];
Application.Run(new Form1(ProjectPath, "open"));
}
else if (args[0] == "edit")
{
string ProjectPath = args[1];
OpenEditor(ProjectPath);
}
}
else if(args.Length == 1)
{
if (args[0] == "edit" || System.IO.File.Exists(args[0]))
{
OpenEditor(args[0]);
}
else
{
Application.Run(new Form1("", ""));
}
Application.Run(new Form1("", ""));
}
else
{
@@ -52,26 +39,5 @@ namespace 开发辅助工具
//Application.Run(new FrmMainEditor());
}
}
static void OpenEditor(string path)
{
object mainHandle = QuickMsg.RyMemoryShare.ReadFromMemory(1024, typeof(Int64), "SmartEditor");
if (mainHandle != null && (long)mainHandle != 0)
{
var handle = new IntPtr((long)mainHandle);
if (path == "edit")
{
ryControls.Win32.SendMessage(handle, 17189, 100, 100);//让界面显示
}
else
{
ryConfig.MsgManager.SendMsg(handle, 1666, path);
}
return;
}
else
{
Application.Run(new FrmMainEditor(path == "edit" ? "" : path));
}
}
}
}
@@ -2,6 +2,7 @@
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
@@ -16,6 +17,7 @@ namespace 开发辅助工具.Manager
public static string Sys_SQLConn = "<app>\\SysDb\\Tools.dat|";
public static string User_SQLConn = "<app>\\UserDb\\MyDb.dat|";
public static string History_SQLConn = "<app>\\UserDb\\history.dat|";
public static string last_clip_text = "";
public static ryCommonDb.DataProvider.DataProviderType dataType = ryCommonDb.DataProvider.DataProviderType.SQLiteDataProvider;
public static IDbInterface CreateDataProvider(DataProviderType dataProviderType)
{
@@ -33,6 +35,32 @@ namespace 开发辅助工具.Manager
return null;
}
}
/// <summary>
/// 判断WinSCP是否在运行
/// </summary>
/// <returns></returns>
public static bool WinSCP_IsRunning() {
var exist = false;
try {
var proc_list = Process.GetProcessesByName("WinSCP");
for (int i = 0; i < proc_list.Length; i++) {
var path = proc_list[i].GetPath();
if (path.Length > 0) {
if (path.IndexOfEx(Application.StartupPath) < 0) {
exist = true; break;
}
}
}
}
catch {
}
if (!exist) {
//RyForm.get
}
return exist;
}
public static void DeleteFiles(string dir, string filter)
{
var files = System.IO.Directory.GetFiles(dir, filter);
@@ -173,6 +201,7 @@ namespace 开发辅助工具.Manager
mySQL.AddField("Postdata", "");
mySQL.AddField("desc", "");
mySQL.AddField("ClickCount", 0);//点击次数
mySQL.AddField("AddUser", "");
mySQL.AddField("editTime", DateTime.Now);
mySQL.AddField("addTime", DateTime.Now);
if (db.CreateDb(mySQL) == 1)
@@ -254,6 +283,30 @@ namespace 开发辅助工具.Manager
mySQL.AddField("addTime", DateTime.Now);
db.CreateDb(mySQL);
#endregion
#region 历史记录表
mySQL.Clear();
mySQL.TableName = "HistoryUrl"; ;
mySQL.AddField("Name", "");
mySQL.AddField("Url", "");
mySQL.AddField("Cookie", "");
mySQL.AddField("Postdata", "");
mySQL.AddField("Method", "");
mySQL.AddField("Header", "");
mySQL.AddField("Referer", "");
mySQL.AddField("ContentType", "");
mySQL.AddField("Encoding", "");
mySQL.AddField("IsFav", 0);
mySQL.AddField("Des", "");
mySQL.AddField("MD5", "");
mySQL.AddField("ClickCount", 0);//点击次数
mySQL.AddField("editTime", DateTime.Now);
mySQL.AddField("addTime", DateTime.Now);
if (db.CreateDb(mySQL) == 1)
{
db.ExecuteNonQuery("CREATE INDEX index_H_Url ON HistoryUrl(Url); ");
db.ExecuteNonQuery("CREATE INDEX index_H_MD5 ON HistoryUrl(MD5); ");
}
#endregion
#region 设置表
mySQL.Clear();
mySQL.TableName = "Settings";
+71 -12
View File
@@ -1,4 +1,5 @@
using ryCommon;
using ExtendUI.FTPManager;
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
@@ -449,7 +450,7 @@ namespace 开发辅助工具.Manager
string item = AssemblyInfo_list[i];
if (item.IndexOf("[assembly: AssemblyVersion(\"") == 0)
{
ver.Version= item.GetStr("[assembly: AssemblyVersion(\"", "\")]", 0, out _, "");
ver.Version= item.GetStr("[assembly: AssemblyVersion(\"", "\")]", 0, out _, "").Trim();
}
else if (item.IndexOf("[assembly: AssemblyFileVersion(\"") == 0)
{
@@ -510,7 +511,8 @@ namespace 开发辅助工具.Manager
/// 进行打包
/// </summary>
/// <param name="project_folder">项目根目录</param>
public void Pack(string project_folder)
/// <param name="PackByLite">最简化打包</param>
public void Pack(string project_folder,bool PackByLite=false)
{
var com_mode = "Debug";
DataProvider mydb = new DataProvider();
@@ -532,6 +534,8 @@ namespace 开发辅助工具.Manager
WinRARPath = @"C:\Program Files\WinRAR\WinRAR.exe";
}
}
var ftpid = mStor.GetAttrValue("ftpid", 0);
var ftp_remote_dir = mStor.GetAttrValue("ftp_remote_dir");
var bf_folder = project_folder;
if (bf_folder != "")
{
@@ -539,6 +543,8 @@ namespace 开发辅助工具.Manager
var eng_name = ini.ReadIni("project", "engname");
var proglang = ini.ReadIni("project", "proglang");
var confuse = ini.ReadIni("project", "confuse",1);
var upload_name = ini.ReadIni("project", "UploadName");
if (upload_name.Trim().Length == 0) { upload_name = eng_name; }
var ouput_folder = bf_folder + "\\Bin\\" + com_mode + "\\" + eng_name;
if(!System.IO.Directory.Exists(ouput_folder))
{
@@ -561,7 +567,7 @@ namespace 开发辅助工具.Manager
ShowState("正在清理不重要的缓存...");
ryCommon.RyFiles.DeleteFile(ouput_folder + "\\Secure\\*.pdb");
ShowState("复制混淆文件到底包目录...");
ryCommon.RyFiles.CopyFileOrFolder(ouput_folder + "\\Secure\\", bf_folder + "\\Publish\\OriginalFiles\\");
ryCommon.RyFiles.CopyFileOrFolder(ouput_folder + "\\Secure\\", bf_folder + "\\Publish\\OriginalFiles"+(PackByLite?"_Lite":"")+"\\");
}
#region 复制自定义规则文件到底包目录
ShowState("复制自定义规则文件到底包目录...");
@@ -572,12 +578,33 @@ namespace 开发辅助工具.Manager
if (line == "" || line.IndexOf("#") == 0) { continue; }
if (line.IndexOfEx("del:") == 0)
{
ryCommon.RyFiles.DeleteFile(bf_folder + "\\Publish\\OriginalFiles\\" + line.Substring(4));
ryCommon.RyFiles.DeleteFile(bf_folder + "\\Publish\\OriginalFiles"+ (PackByLite ? "_Lite" : "") + "\\" + line.Substring(4));
}
else if (line.IndexOfEx("copy:") == 0)
{
var item = line.Substring(5);
if(item.Contains("<") && item.Contains(">"))
if(item.StartsWith("lite=>")) { //精简版才生效
if (PackByLite)
{
item = item.Substring(6);
}
else
{
continue;
}
}
if (item.StartsWith("!lite=>")) //非精简版才生效
{
if (PackByLite)
{
continue;
}
else
{
item = item.Substring(7);
}
}
if (item.Contains("<") && item.Contains(">"))
{
DataSet ds_var = db.ReadData("select * from VarInfo");
if (mydb.HaveData(ds_var))
@@ -598,17 +625,33 @@ namespace 开发辅助工具.Manager
{
var from_path = from_to[0];
var to_path = from_to[1];
if(from_path.IndexOfEx(":")<0)
if(from_path.IndexOfEx(":")<0 && from_path.IndexOfEx("<") < 0)
{
from_path= ouput_folder + "\\" + from_path;
}
if (System.IO.Directory.Exists(from_path))
var from_filename = System.IO.Path.GetFileName(from_path);
if (from_filename.IndexOfEx("*") >= 0)
{
ryCommon.RyFiles.CopyFolder(from_path, bf_folder + "\\Publish\\OriginalFiles\\" + to_path);
var file_list = System.IO.Directory.GetFiles(System.IO.Path.GetDirectoryName(from_path),from_filename);
if (file_list != null)
{
for (int i = 0; i < file_list.Length; i++)
{
ryCommon.RyFiles.CopyFileOrFolder(file_list[i], bf_folder + "\\Publish\\OriginalFiles"+ (PackByLite ? "_Lite" : "") + "\\" + to_path);
}
}
var dir_list = System.IO.Directory.GetDirectories(System.IO.Path.GetDirectoryName(from_path), from_filename);
if (file_list != null)
{
for (int i = 0; i < dir_list.Length; i++)
{
ryCommon.RyFiles.CopyFileOrFolder(dir_list[i], bf_folder + "\\Publish\\OriginalFiles"+ (PackByLite ? "_Lite" : "") + "\\" + to_path);
}
}
}
else if (System.IO.File.Exists(from_path))
else
{
ryCommon.RyFiles.CopyBigFile(from_path, bf_folder + "\\Publish\\OriginalFiles\\" + to_path);
ryCommon.RyFiles.CopyFileOrFolder(from_path, bf_folder + "\\Publish\\OriginalFiles"+ (PackByLite ? "_Lite" : "") + "\\" + to_path);
}
}
}
@@ -617,9 +660,25 @@ namespace 开发辅助工具.Manager
ShowState("正在打包...");
if (System.IO.File.Exists(bf_folder + "\\Publish\\Green\\" + eng_name + ".zip"))
{ RyFiles.DeleteFile(bf_folder + "\\Publish\\Green\\" + eng_name + ".zip"); }
var cmd2 = Read_Prog(WinRARPath, "-r -ep1 a \"" + bf_folder + "\\Publish\\Green\\" + eng_name + ".zip\" \"" + bf_folder + "\\Publish\\OriginalFiles\\\"");
var cmd2 = Read_Prog(WinRARPath, "-r -ep1 a \"" + bf_folder + "\\Publish\\Green\\" + eng_name + ".zip\" \"" + bf_folder + "\\Publish\\OriginalFiles"+ (PackByLite ? "_Lite" : "") + "\\\"");
RyFiles.CopyBigFile(bf_folder + "\\Publish\\Green\\" + eng_name + ".zip", bf_folder + "\\Publish\\Green\\HistoryVer\\" + eng_name + "_" + file_ver + ".zip");
ShowState("打包完成...");
if (ftpid > 0)
{
Application.OpenForms[0].Invoke(new Action(() =>
{
SuperDesign.Manager.FTP.FrmUploadUpdateZipToFtp frm = new SuperDesign.Manager.FTP.FrmUploadUpdateZipToFtp();
frm.LocalPath = bf_folder + "\\Publish\\Green\\" + eng_name + ".zip";
frm.EngName = upload_name;
frm.FTPId = ftpid;
frm.RemoteDir = ftp_remote_dir;
if (frm.ShowDialog() == DialogResult.OK)
{
ShowState("上传完成...");
}
frm.Dispose();
}));
}
}
}
}
@@ -1,247 +0,0 @@
namespace 开发辅助工具.Manager.Site
{
partial class FrmAddSite
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.TxtName = new ryControls.TextBoxEx2();
this.label2 = new System.Windows.Forms.Label();
this.TxtLocalPath = new ryControls.TextBoxEx2();
this.label3 = new System.Windows.Forms.Label();
this.DtFtp = new ryControls.DoubleText();
this.BtnBrowserFolder = new ryControls.ButtonEx();
this.label4 = new System.Windows.Forms.Label();
this.TxtFtpDir = new ryControls.TextBoxEx2();
this.BtnCancel = new ryControls.ButtonEx();
this.BtnOK = new ryControls.ButtonEx();
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
this.BtnClearFtp = new ryControls.ButtonEx();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(9, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(29, 12);
this.label1.TabIndex = 32;
this.label1.Text = "名称";
//
// TxtName
//
this.TxtName.BackColor = System.Drawing.Color.White;
this.TxtName.EmptyText = "";
this.TxtName.Location = new System.Drawing.Point(11, 24);
this.TxtName.MaxLength = 999999999;
this.TxtName.Multiline = false;
this.TxtName.Name = "TxtName";
this.TxtName.OnlyNumeric = false;
this.TxtName.PasswordChar = '\0';
this.TxtName.ReadOnly = false;
this.TxtName.SelectedText = "";
this.TxtName.SelectionLength = 0;
this.TxtName.SelectionStart = 0;
this.TxtName.Size = new System.Drawing.Size(264, 25);
this.TxtName.TabIndex = 31;
this.TxtName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtName.ToolTip = "";
this.TxtName.WordWrap = true;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(9, 56);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 12);
this.label2.TabIndex = 34;
this.label2.Text = "路径";
//
// TxtLocalPath
//
this.TxtLocalPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtLocalPath.BackColor = System.Drawing.Color.White;
this.TxtLocalPath.EmptyText = "";
this.TxtLocalPath.Location = new System.Drawing.Point(11, 75);
this.TxtLocalPath.MaxLength = 999999999;
this.TxtLocalPath.Multiline = false;
this.TxtLocalPath.Name = "TxtLocalPath";
this.TxtLocalPath.OnlyNumeric = false;
this.TxtLocalPath.PasswordChar = '\0';
this.TxtLocalPath.ReadOnly = false;
this.TxtLocalPath.SelectedText = "";
this.TxtLocalPath.SelectionLength = 0;
this.TxtLocalPath.SelectionStart = 0;
this.TxtLocalPath.Size = new System.Drawing.Size(379, 25);
this.TxtLocalPath.TabIndex = 33;
this.TxtLocalPath.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtLocalPath.ToolTip = "";
this.TxtLocalPath.WordWrap = true;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(9, 107);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(47, 12);
this.label3.TabIndex = 35;
this.label3.Text = "对应FTP";
//
// DtFtp
//
this.DtFtp.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.DtFtp.Location = new System.Drawing.Point(11, 126);
this.DtFtp.Name = "DtFtp";
this.DtFtp.SelectName = "无";
this.DtFtp.Size = new System.Drawing.Size(164, 25);
this.DtFtp.TabIndex = 36;
this.DtFtp.OnSelected += new System.EventHandler(this.DtFtp_OnSelected);
//
// BtnBrowserFolder
//
this.BtnBrowserFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnBrowserFolder.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnBrowserFolder.Location = new System.Drawing.Point(396, 75);
this.BtnBrowserFolder.Name = "BtnBrowserFolder";
this.BtnBrowserFolder.Size = new System.Drawing.Size(34, 25);
this.BtnBrowserFolder.TabIndex = 37;
this.BtnBrowserFolder.Text = "...";
this.BtnBrowserFolder.UseVisualStyleBackColor = true;
this.BtnBrowserFolder.Click += new System.EventHandler(this.BtnBrowserFolder_Click);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(219, 107);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(83, 12);
this.label4.TabIndex = 38;
this.label4.Text = "FTP站点根路径";
//
// TxtFtpDir
//
this.TxtFtpDir.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtFtpDir.BackColor = System.Drawing.Color.White;
this.TxtFtpDir.EmptyText = "";
this.TxtFtpDir.Location = new System.Drawing.Point(221, 126);
this.TxtFtpDir.MaxLength = 999999999;
this.TxtFtpDir.Multiline = false;
this.TxtFtpDir.Name = "TxtFtpDir";
this.TxtFtpDir.OnlyNumeric = false;
this.TxtFtpDir.PasswordChar = '\0';
this.TxtFtpDir.ReadOnly = false;
this.TxtFtpDir.SelectedText = "";
this.TxtFtpDir.SelectionLength = 0;
this.TxtFtpDir.SelectionStart = 0;
this.TxtFtpDir.Size = new System.Drawing.Size(209, 25);
this.TxtFtpDir.TabIndex = 39;
this.TxtFtpDir.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtFtpDir.ToolTip = "";
this.TxtFtpDir.WordWrap = true;
//
// BtnCancel
//
this.BtnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BtnCancel.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnCancel.Location = new System.Drawing.Point(364, 164);
this.BtnCancel.Name = "BtnCancel";
this.BtnCancel.Size = new System.Drawing.Size(65, 27);
this.BtnCancel.TabIndex = 41;
this.BtnCancel.Text = "取消";
this.BtnCancel.UseVisualStyleBackColor = true;
this.BtnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
//
// BtnOK
//
this.BtnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BtnOK.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnOK.Location = new System.Drawing.Point(293, 164);
this.BtnOK.Name = "BtnOK";
this.BtnOK.Size = new System.Drawing.Size(65, 27);
this.BtnOK.TabIndex = 40;
this.BtnOK.Text = "确定";
this.BtnOK.UseVisualStyleBackColor = true;
this.BtnOK.Click += new System.EventHandler(this.BtnOK_Click);
//
// BtnClearFtp
//
this.BtnClearFtp.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnClearFtp.Location = new System.Drawing.Point(181, 126);
this.BtnClearFtp.Name = "BtnClearFtp";
this.BtnClearFtp.Size = new System.Drawing.Size(36, 25);
this.BtnClearFtp.TabIndex = 42;
this.BtnClearFtp.Text = "清除";
this.BtnClearFtp.UseVisualStyleBackColor = true;
this.BtnClearFtp.Click += new System.EventHandler(this.BtnClearFtp_Click);
//
// FrmAddSite
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(442, 203);
this.Controls.Add(this.BtnClearFtp);
this.Controls.Add(this.BtnCancel);
this.Controls.Add(this.BtnOK);
this.Controls.Add(this.TxtFtpDir);
this.Controls.Add(this.label4);
this.Controls.Add(this.BtnBrowserFolder);
this.Controls.Add(this.DtFtp);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.TxtLocalPath);
this.Controls.Add(this.label1);
this.Controls.Add(this.TxtName);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmAddSite";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "添加站点";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private ryControls.TextBoxEx2 TxtName;
private System.Windows.Forms.Label label2;
private ryControls.TextBoxEx2 TxtLocalPath;
private System.Windows.Forms.Label label3;
private ryControls.DoubleText DtFtp;
private ryControls.ButtonEx BtnBrowserFolder;
private System.Windows.Forms.Label label4;
private ryControls.TextBoxEx2 TxtFtpDir;
private ryControls.ButtonEx BtnCancel;
private ryControls.ButtonEx BtnOK;
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
private ryControls.ButtonEx BtnClearFtp;
}
}
@@ -1,125 +0,0 @@
using GameBackup3H3.DbOp;
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using 开发辅助工具.Manager;
namespace 开发辅助工具.Manager.Site
{
public partial class FrmAddSite : Form
{
public string tableName = "Site";
public int isAdd = 1;
public string selectId = "-1";
public FrmAddSite()
{
InitializeComponent();
}
public void GetInfo(string id)
{
selectId = id;
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
DataSet ds = db.ReadData(tableName, id);
if (ds.HaveData())
{
DataRow reader = ds.Tables[0].Rows[0];
#region 读取信息
var ftpid = reader["ftpId"].ToInt();
var ds_ftp = db.ReadData("select * from Ftp where id="+ftpid);
if (ds_ftp.HaveData()) { DtFtp.Text = ds_ftp.GetRow(0)["name"].ToString(); }
else
{
DtFtp.Text = "无";
}
TxtName.Text = reader["name"].ToString();
TxtLocalPath.Text = reader["localPath"].ToString();
DtFtp.selectId = reader["ftpId"].ToString();
TxtFtpDir.Text = reader["ftpDir"].ToString();
#endregion
}
ds.Dispose();
}
db.Free();
}
private void BtnOK_Click(object sender, EventArgs e)
{
if (TxtName.Text == "")
{
MessageBox.Show("名称不能为空。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
if (!System.IO.Directory.Exists(TxtLocalPath.Text))
{
MessageBox.Show("本地路径不存在。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
RyQuickSQL mySQL = new RyQuickSQL(tableName);
mySQL.AddField("name", TxtName.Text);
mySQL.AddField("localPath", TxtLocalPath.Text.Trim('\\'));
mySQL.AddField("ftpId",DtFtp.selectId.ToInt());
mySQL.AddField("ftpDir", TxtFtpDir.Text);
//DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
if (isAdd >= 1)
{
mySQL.AddField("addTime", DateTime.Now);
mySQL.AddField("editTime", DateTime.Now);
db.ExecuteNonQuery(mySQL.GetInsertSQL(), db.GetParameter(mySQL));
}
else
{
mySQL.AddField("editTime", DateTime.Now);
db.ExecuteNonQuery(mySQL.GetUpdateSQL() + " where id=" + selectId, db.GetParameter(mySQL));
}
}
db.Free();
DialogResult = DialogResult.OK;
}
private void BtnCancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
}
private void BtnBrowserFolder_Click(object sender, EventArgs e)
{
if(folderBrowserDialog1.ShowDialog()==DialogResult.OK)
{
TxtLocalPath.Text = folderBrowserDialog1.SelectedPath;
}
}
private void DtFtp_OnSelected(object sender, EventArgs e)
{
FrmFTPView frm = new FrmFTPView
{
SelectModeOn = true
};
if (frm.ShowDialog()==DialogResult.OK)
{
DtFtp.selectId = frm.SelectedItem.Id.ToString();
DtFtp.Text = frm.SelectedItem.Name;
}
}
private void BtnClearFtp_Click(object sender, EventArgs e)
{
DtFtp.selectId = "-1";
DtFtp.Text ="无";
}
}
}
@@ -1,123 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
@@ -1,100 +0,0 @@
namespace SuperDesign.Manager.Site
{
partial class FrmSiteSelect
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.objectListView1 = new BrightIdeasSoftware.ObjectListView();
this.OlvName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.BtnOK = new ryControls.ButtonEx();
((System.ComponentModel.ISupportInitialize)(this.objectListView1)).BeginInit();
this.SuspendLayout();
//
// objectListView1
//
this.objectListView1.AllColumns.Add(this.OlvName);
this.objectListView1.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.objectListView1.CellEditUseWholeCell = false;
this.objectListView1.CheckBoxes = true;
this.objectListView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.OlvName});
this.objectListView1.Cursor = System.Windows.Forms.Cursors.Default;
this.objectListView1.FullRowSelect = true;
this.objectListView1.HideSelection = false;
this.objectListView1.Location = new System.Drawing.Point(12, 12);
this.objectListView1.Name = "objectListView1";
this.objectListView1.Size = new System.Drawing.Size(276, 199);
this.objectListView1.TabIndex = 0;
this.objectListView1.UseCompatibleStateImageBehavior = false;
this.objectListView1.View = System.Windows.Forms.View.Details;
this.objectListView1.SelectionChanged += new System.EventHandler(this.ObjectListView1_SelectionChanged);
this.objectListView1.Click += new System.EventHandler(this.ObjectListView1_Click);
this.objectListView1.DoubleClick += new System.EventHandler(this.ObjectListView1_DoubleClick);
//
// OlvName
//
this.OlvName.Text = "名称";
this.OlvName.Width = 250;
//
// BtnOK
//
this.BtnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BtnOK.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnOK.Location = new System.Drawing.Point(213, 217);
this.BtnOK.Name = "BtnOK";
this.BtnOK.Size = new System.Drawing.Size(75, 30);
this.BtnOK.TabIndex = 1;
this.BtnOK.Text = "选择";
this.BtnOK.UseVisualStyleBackColor = true;
this.BtnOK.Click += new System.EventHandler(this.BtnOK_Click);
//
// FrmSiteSelect
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(300, 252);
this.Controls.Add(this.BtnOK);
this.Controls.Add(this.objectListView1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmSiteSelect";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "选择站点";
((System.ComponentModel.ISupportInitialize)(this.objectListView1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private BrightIdeasSoftware.OLVColumn OlvName;
private ryControls.ButtonEx BtnOK;
public BrightIdeasSoftware.ObjectListView objectListView1;
}
}
@@ -1,58 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using 开发辅助工具.Manager;
namespace SuperDesign.Manager.Site
{
public partial class FrmSiteSelect : Form
{
public FrmSiteSelect()
{
InitializeComponent();
OlvName.AspectGetter = delegate (object x) { return ((SiteInfo)x).Name; };
}
private void BtnOK_Click(object sender, EventArgs e)
{
if(objectListView1.CheckedObjects.Count==0)
{
MessageBox.Show("请选择站点。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
SelectedList = objectListView1.CheckedObjects;
DialogResult = DialogResult.OK;
}
public IList SelectedList { get; set; }
private void ObjectListView1_SelectionChanged(object sender, EventArgs e)
{
}
private void ObjectListView1_Click(object sender, EventArgs e)
{
var item = (SiteInfo)objectListView1.SelectedObject;
if (item == null) { return; }
if (objectListView1.IsChecked(item)) { objectListView1.UncheckObject(item); }
else { objectListView1.CheckObject(item); }
}
private void ObjectListView1_DoubleClick(object sender, EventArgs e)
{
var item = (SiteInfo)objectListView1.SelectedObject;
if (item == null) { return; }
SelectedList = new List<SiteInfo>
{
item
};
DialogResult = DialogResult.OK;
}
}
}
@@ -1,48 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace 开发辅助工具.Manager
{
class TotalCount
{
/// <summary>
/// 返回字节数
/// </summary>
/// <param name="s"></param>
/// <returns></returns>
public int GetByteLength(string s, out int HanziCount, out int engCount, out int NumCount)
{
int l = 0;
char[] q = s.ToCharArray();
HanziCount = 0;
engCount = 0;
NumCount = 0;
for (int i = 0; i < q.Length; i++)
{
int qInt = (int)q[i];
if (qInt >= 0x4E00 && qInt <= 0x9FA5) // 汉字
{
l += 2;
HanziCount++;
}
else if ((qInt >= 97 && qInt <= 122) || (qInt >= 65 && qInt <= 90)) // 英文
{
l += 1;
engCount++;
}
else if ((qInt >= 48 && qInt <= 57)) // 数字
{
l += 1;
NumCount++;
}
else
{
l += 1;
}
}
return l;
}
}
}
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.0.2302.2101")]
[assembly: AssemblyFileVersion("3.0.2302.2101")]
[assembly: AssemblyVersion("3.0.2412.2001")]
[assembly: AssemblyFileVersion("3.0.2412.2001")]
+53 -314
View File
@@ -61,14 +61,15 @@
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Bin\Debug\SupperDesign\Newtonsoft.Json.dll</HintPath>
<HintPath>..\..\Bin\Debug\SuperDesign\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="OpenXmlPowerTools">
<HintPath>..\..\..\ryProcessManager\Bin\Debug\OpenXmlPowerTools.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="RaUI">
<HintPath>..\..\..\睿元公用控件组\Bin\Release\CommonControls\.NET4\RaUI.dll</HintPath>
</Reference>
<Reference Include="Scintilla.NET, Version=5.3.2.1, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Bin\Debug\SuperDesign\Scintilla.NET.dll</HintPath>
<HintPath>..\..\Bin\Debug\SuperDesign\RaUI.dll</HintPath>
</Reference>
<Reference Include="System">
<HintPath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.dll</HintPath>
@@ -78,6 +79,7 @@
<Reference Include="System.DirectoryServices" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Web" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
@@ -86,42 +88,20 @@
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="UIAutomationProvider" />
<Reference Include="WindowsBase" />
<Reference Include="WindowsFormsIntegration" />
<Reference Include="WinSCPnet, Version=1.12.0.12963, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf, processorArchitecture=MSIL">
<HintPath>..\packages\WinSCP.5.21.7\lib\net40\WinSCPnet.dll</HintPath>
</Reference>
<Reference Include="XPTable">
<HintPath>..\..\Bin\Debug\SupperDesign\XPTable.dll</HintPath>
<HintPath>..\..\Bin\Debug\SuperDesign\XPTable.dll</HintPath>
</Reference>
<Reference Include="zxing">
<HintPath>..\..\Bin\Debug\SupperDesign\zxing.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Controls\Highlight\AutoComplete\AutocompleteItem.cs" />
<Compile Include="Controls\Highlight\AutoComplete\AutocompleteItems.cs" />
<Compile Include="Controls\Highlight\AutoComplete\AutocompleteListView.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\Highlight\AutoComplete\AutocompleteMenu.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\Highlight\AutoComplete\AutocompleteMenuHost.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\Highlight\AutoComplete\Colors.cs" />
<Compile Include="Controls\Highlight\AutoComplete\EventArgs.cs" />
<Compile Include="Controls\Highlight\AutoComplete\IAutocompleteListView.cs" />
<Compile Include="Controls\Highlight\AutoComplete\ITextBoxWrapper.cs" />
<Compile Include="Controls\Highlight\AutoComplete\Range.cs" />
<Compile Include="Controls\Highlight\AutoComplete\ScintillaWrapper.cs" />
<Compile Include="Controls\Highlight\AutoComplete\TextBoxWrapper.cs" />
<Compile Include="Controls\Highlight\CharacterRange.cs" />
<Compile Include="Controls\Highlight\ContextMenuStripHighlightText2.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\Highlight\ContextMenuStripHighlightText2.Designer.cs">
<DependentUpon>ContextMenuStripHighlightText2.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ContextMenuStripRichText.cs">
<SubType>Component</SubType>
</Compile>
@@ -146,106 +126,12 @@
<Compile Include="Controls\FrmTitle.Designer.cs">
<DependentUpon>FrmTitle.cs</DependentUpon>
</Compile>
<Compile Include="Controls\Highlight\FindAllResults\FindAllResultsPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\Highlight\FindAllResults\FindAllResultsPanel.Designer.cs">
<DependentUpon>FindAllResultsPanel.cs</DependentUpon>
</Compile>
<Compile Include="Controls\Highlight\FindReplace\FindConfig.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\Highlight\FindReplace\FindConfig.Designer.cs">
<DependentUpon>FindConfig.cs</DependentUpon>
</Compile>
<Compile Include="Controls\Highlight\FindReplace\FindOption.cs" />
<Compile Include="Controls\Highlight\FindReplace\FindReplace.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\Highlight\FindReplace\FindReplaceDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Controls\Highlight\FindReplace\FindReplaceDialog.Designer.cs">
<DependentUpon>FindReplaceDialog.cs</DependentUpon>
</Compile>
<Compile Include="Controls\Highlight\FindReplace\FrmFinding.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Controls\Highlight\FindReplace\FrmFinding.Designer.cs">
<DependentUpon>FrmFinding.cs</DependentUpon>
</Compile>
<Compile Include="Controls\Highlight\FindReplace\IncrementalSearcher.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\Highlight\FindReplace\IncrementalSearcher.Designer.cs">
<DependentUpon>IncrementalSearcher.cs</DependentUpon>
</Compile>
<Compile Include="Controls\Highlight\FindReplace\ToolStripIncrementalSearcher.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\Highlight\GoTo\GoTo.cs" />
<Compile Include="Controls\Highlight\GoTo\GoToDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Controls\Highlight\GoTo\GoToDialog.Designer.cs">
<DependentUpon>GoToDialog.cs</DependentUpon>
</Compile>
<Compile Include="Controls\Highlight\HighlightEditor.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerBatch.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerCommon.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerCpp.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerCs.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerCss.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerHtml.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerIni.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerInnoSetup.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerJava.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerJavaScript.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerJson.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerNsis.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerNull.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerPascal.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerPhp.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerPowerShell.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerPython.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerSql.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerVb.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerXml.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\CreateLexerYaml.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\CreateSpecificLexer\LexerFoldProperties.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\GlobalScintillaFont.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\HelperClasses\LexerFileExtensions.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\HelperClasses\LexerTypeName.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\HelperClasses\ScintillaKeyWords.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\LexerColors\LexerColors.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\LexerEnumerations.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\ScintillaLexers.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\ScintillaNotepadPlusPlus\MarkColors.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\ScintillaNotepadPlusPlus\ScintillaNotepadPlusPlusStyles.cs" />
<Compile Include="Controls\Highlight\VPKSoft.ScintillaLexers\ScintillaNotepadPlusPlus\XmlStyleNotepadPlusPlusHelper.cs" />
<Compile Include="Controls\MenuRight.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\MenuRight.Designer.cs">
<DependentUpon>MenuRight.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ScintillaDiffer\Enumerations\CharChangedType.cs" />
<Compile Include="Controls\ScintillaDiffer\HighLight.cs" />
<Compile Include="Controls\ScintillaDiffer\ScintillaDiffControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ScintillaDiffer\ScintillaDiffControl.designer.cs">
<DependentUpon>ScintillaDiffControl.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ScintillaDiffer\ScintillaDiffStyles.cs" />
<Compile Include="Controls\ScintillaDiffer\ScrollSyncScintilla.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\ScintillaDiffer\StyleRefreshEventArgs.cs" />
<Compile Include="Controls\ScintillaDiffer\UtilityClasses\CharacterChangeType.cs" />
<Compile Include="Controls\ScintillaDiffer\UtilityClasses\Pair.cs" />
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
@@ -259,6 +145,7 @@
<DependentUpon>FrmMessageBox.cs</DependentUpon>
</Compile>
<Compile Include="Globals.cs" />
<Compile Include="Manager\APIManager.cs" />
<Compile Include="Manager\FrmAddVar.cs">
<SubType>Form</SubType>
</Compile>
@@ -271,47 +158,25 @@
<Compile Include="Manager\FrmSetting.Designer.cs">
<DependentUpon>FrmSetting.cs</DependentUpon>
</Compile>
<Compile Include="Manager\FTP\FrmAddFTP.cs">
<Compile Include="Manager\FTP\FileTransferProgressEventArgs.cs" />
<Compile Include="Manager\FTP\FrmUploadFilesToFtp.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Manager\FTP\FrmAddFTP.Designer.cs">
<DependentUpon>FrmAddFTP.cs</DependentUpon>
<Compile Include="Manager\FTP\FrmUploadFilesToFtp.Designer.cs">
<DependentUpon>FrmUploadFilesToFtp.cs</DependentUpon>
</Compile>
<Compile Include="Manager\FTP\FrmFTPView.cs">
<Compile Include="Manager\FTP\FrmUploadUpdateZipToFtp.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Manager\FTP\FrmFTPView.Designer.cs">
<DependentUpon>FrmFTPView.cs</DependentUpon>
<Compile Include="Manager\FTP\FrmUploadUpdateZipToFtp.Designer.cs">
<DependentUpon>FrmUploadUpdateZipToFtp.cs</DependentUpon>
</Compile>
<Compile Include="Manager\FTP\FrmDownProg.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Manager\FTP\FrmDownProg.Designer.cs">
<DependentUpon>FrmDownProg.cs</DependentUpon>
</Compile>
<Compile Include="Manager\FTP\FrmFTPSelect.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Manager\FTP\FrmFTPSelect.Designer.cs">
<DependentUpon>FrmFTPSelect.cs</DependentUpon>
</Compile>
<Compile Include="Manager\FTP\FrmUploadProg.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Manager\FTP\FrmUploadProg.Designer.cs">
<DependentUpon>FrmUploadProg.cs</DependentUpon>
</Compile>
<Compile Include="Manager\FTP\FrmFTPBrowser.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Manager\FTP\FrmFTPBrowser.Designer.cs">
<DependentUpon>FrmFTPBrowser.cs</DependentUpon>
</Compile>
<Compile Include="Manager\FTP\FTPManger.cs" />
<Compile Include="Manager\FTP\FtpInfo.cs" />
<Compile Include="Manager\FTP\FTP_WinSCP.cs" />
<Compile Include="Manager\FTP\IFTP.cs" />
<Compile Include="Manager\HtmlFormater.cs" />
<Compile Include="Manager\HtmlIndent.cs" />
<Compile Include="Manager\ImgExt.cs" />
<Compile Include="Manager\Init.cs" />
<Compile Include="Manager\JsonSplit.cs" />
<Compile Include="Manager\ClsPY.cs" />
@@ -326,19 +191,6 @@
<Compile Include="Manager\MsgManager.cs" />
<Compile Include="Manager\ReactorXML.cs" />
<Compile Include="Manager\RyProject.cs" />
<Compile Include="Manager\Site\FrmAddSite.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Manager\Site\FrmAddSite.Designer.cs">
<DependentUpon>FrmAddSite.cs</DependentUpon>
</Compile>
<Compile Include="Manager\Site\FrmSiteSelect.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Manager\Site\FrmSiteSelect.Designer.cs">
<DependentUpon>FrmSiteSelect.cs</DependentUpon>
</Compile>
<Compile Include="Manager\TotalCount.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Tools\API\APIEditor.cs">
@@ -371,6 +223,18 @@
<Compile Include="Tools\FrmEncode.Designer.cs">
<DependentUpon>FrmEncode.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmFileTime.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\FrmFileTime.Designer.cs">
<DependentUpon>FrmFileTime.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmHistoryUrls.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\FrmHistoryUrls.Designer.cs">
<DependentUpon>FrmHistoryUrls.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmImageToIcon.cs">
<SubType>Form</SubType>
</Compile>
@@ -419,6 +283,12 @@
<Compile Include="Tools\FrmSetup.Designer.cs">
<DependentUpon>FrmSetup.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmKeyBroad.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\FrmKeyBroad.Designer.cs">
<DependentUpon>FrmKeyBroad.cs</DependentUpon>
</Compile>
<Compile Include="Tools\FrmStrCount.cs">
<SubType>Form</SubType>
</Compile>
@@ -461,74 +331,6 @@
<Compile Include="Tools\FrmXpath.Designer.cs">
<DependentUpon>FrmXpath.cs</DependentUpon>
</Compile>
<Compile Include="Tools\SmartEditor\FrmFavFile.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\SmartEditor\FrmFavFile.Designer.cs">
<DependentUpon>FrmFavFile.cs</DependentUpon>
</Compile>
<Compile Include="Tools\SmartEditor\FrmCompare.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\SmartEditor\FrmCompare.Designer.cs">
<DependentUpon>FrmCompare.cs</DependentUpon>
</Compile>
<Compile Include="Tools\SmartEditor\FrmHistoryView.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\SmartEditor\FrmHistoryView.Designer.cs">
<DependentUpon>FrmHistoryView.cs</DependentUpon>
</Compile>
<Compile Include="Tools\SmartEditor\FrmFileBrowser.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\SmartEditor\FrmFileBrowser.Designer.cs">
<DependentUpon>FrmFileBrowser.cs</DependentUpon>
</Compile>
<Compile Include="Tools\SmartEditor\FrmFileEditor.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\SmartEditor\FrmFileEditor.Designer.cs">
<DependentUpon>FrmFileEditor.cs</DependentUpon>
</Compile>
<Compile Include="Tools\SmartEditor\FrmFavView.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\SmartEditor\FrmFavView.Designer.cs">
<DependentUpon>FrmFavView.cs</DependentUpon>
</Compile>
<Compile Include="Tools\SmartEditor\FrmFileInfo.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\SmartEditor\FrmFileInfo.Designer.cs">
<DependentUpon>FrmFileInfo.cs</DependentUpon>
</Compile>
<Compile Include="Tools\SmartEditor\FrmMainEditor.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\SmartEditor\FrmMainEditor.Designer.cs">
<DependentUpon>FrmMainEditor.cs</DependentUpon>
</Compile>
<Compile Include="Tools\SmartEditor\FrmResultText.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\SmartEditor\FrmResultText.Designer.cs">
<DependentUpon>FrmResultText.cs</DependentUpon>
</Compile>
<Compile Include="Tools\SmartEditor\FrmSaveMsg.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tools\SmartEditor\FrmSaveMsg.Designer.cs">
<DependentUpon>FrmSaveMsg.cs</DependentUpon>
</Compile>
<Compile Include="Tools\SmartEditor\MyFileSystemInfo.cs" />
<Compile Include="Tools\SmartEditor\ShellUtilities.cs" />
<EmbeddedResource Include="Controls\Highlight\AutoComplete\AutocompleteMenu.resx">
<DependentUpon>AutocompleteMenu.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\Highlight\ContextMenuStripHighlightText2.resx">
<DependentUpon>ContextMenuStripHighlightText2.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ContextMenuStripRichText.resx">
<DependentUpon>ContextMenuStripRichText.cs</DependentUpon>
</EmbeddedResource>
@@ -541,30 +343,6 @@
<EmbeddedResource Include="Controls\FrmTitle.resx">
<DependentUpon>FrmTitle.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\Highlight\FindAllResults\FindAllResultsPanel.resx">
<DependentUpon>FindAllResultsPanel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\Highlight\FindReplace\FindConfig.resx">
<DependentUpon>FindConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\Highlight\FindReplace\FindReplaceDialog.resx">
<DependentUpon>FindReplaceDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\Highlight\FindReplace\FrmFinding.resx">
<DependentUpon>FrmFinding.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\Highlight\FindReplace\IncrementalSearcher.resx">
<DependentUpon>IncrementalSearcher.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\Highlight\GoTo\GoToDialog.resx">
<DependentUpon>GoToDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\Highlight\HighlightEditor.resx">
<DependentUpon>HighlightEditor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ScintillaDiffer\ScintillaDiffControl.resx">
<DependentUpon>ScintillaDiffControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
@@ -580,29 +358,11 @@
<EmbeddedResource Include="Manager\FrmSetting.resx">
<DependentUpon>FrmSetting.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Manager\FTP\FrmAddFTP.resx">
<DependentUpon>FrmAddFTP.cs</DependentUpon>
<EmbeddedResource Include="Manager\FTP\FrmUploadFilesToFtp.resx">
<DependentUpon>FrmUploadFilesToFtp.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Manager\FTP\FrmFTPView.resx">
<DependentUpon>FrmFTPView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Manager\FTP\FrmDownProg.resx">
<DependentUpon>FrmDownProg.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Manager\FTP\FrmFTPSelect.resx">
<DependentUpon>FrmFTPSelect.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Manager\FTP\FrmUploadProg.resx">
<DependentUpon>FrmUploadProg.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Manager\FTP\FrmFTPBrowser.resx">
<DependentUpon>FrmFTPBrowser.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Manager\Site\FrmAddSite.resx">
<DependentUpon>FrmAddSite.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Manager\Site\FrmSiteSelect.resx">
<DependentUpon>FrmSiteSelect.cs</DependentUpon>
<EmbeddedResource Include="Manager\FTP\FrmUploadUpdateZipToFtp.resx">
<DependentUpon>FrmUploadUpdateZipToFtp.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
@@ -629,6 +389,12 @@
<EmbeddedResource Include="Tools\FrmEncode.resx">
<DependentUpon>FrmEncode.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmFileTime.resx">
<DependentUpon>FrmFileTime.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmHistoryUrls.resx">
<DependentUpon>FrmHistoryUrls.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmImageToIcon.resx">
<DependentUpon>FrmImageToIcon.cs</DependentUpon>
</EmbeddedResource>
@@ -653,6 +419,9 @@
<EmbeddedResource Include="Tools\FrmSetup.resx">
<DependentUpon>FrmSetup.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmKeyBroad.resx">
<DependentUpon>FrmKeyBroad.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\FrmStrCount.resx">
<DependentUpon>FrmStrCount.cs</DependentUpon>
</EmbeddedResource>
@@ -674,36 +443,6 @@
<EmbeddedResource Include="Tools\FrmXpath.resx">
<DependentUpon>FrmXpath.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\SmartEditor\FrmFavFile.resx">
<DependentUpon>FrmFavFile.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\SmartEditor\FrmCompare.resx">
<DependentUpon>FrmCompare.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\SmartEditor\FrmHistoryView.resx">
<DependentUpon>FrmHistoryView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\SmartEditor\FrmFileBrowser.resx">
<DependentUpon>FrmFileBrowser.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\SmartEditor\FrmFileEditor.resx">
<DependentUpon>FrmFileEditor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\SmartEditor\FrmFavView.resx">
<DependentUpon>FrmFavView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\SmartEditor\FrmFileInfo.resx">
<DependentUpon>FrmFileInfo.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\SmartEditor\FrmMainEditor.resx">
<DependentUpon>FrmMainEditor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\SmartEditor\FrmResultText.resx">
<DependentUpon>FrmResultText.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Tools\SmartEditor\FrmSaveMsg.resx">
<DependentUpon>FrmSaveMsg.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartArguments>
</StartArguments>
<StartArguments>get "E:\My Datas\My Codes\毕方项目\CSharp\HttpServer\Source\HttpServer\DyAPI_Web\DyWebAPI.csproj"</StartArguments>
</PropertyGroup>
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
+28 -6
View File
@@ -42,9 +42,11 @@
this.OlvDesc = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.设置时间戳ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.设置jsonToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
this.添加参数ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.删除参数ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.复制参数名ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.BtnCancel = new ryControls.ButtonEx();
this.BtnOK = new ryControls.ButtonEx();
this.BtnAddPost = new ryControls.ButtonEx();
@@ -160,9 +162,11 @@
this.LvPostData.UseCompatibleStateImageBehavior = false;
this.LvPostData.View = System.Windows.Forms.View.Details;
this.LvPostData.CellEditFinishing += new BrightIdeasSoftware.CellEditEventHandler(this.LvPostData_CellEditFinishing);
this.LvPostData.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.LvPostData_MouseDoubleClick);
//
// OlvParamName
//
this.OlvParamName.IsEditable = true;
this.OlvParamName.Text = "参数名";
this.OlvParamName.Width = 120;
//
@@ -188,38 +192,54 @@
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.设置时间戳ToolStripMenuItem,
this.设置jsonToolStripMenuItem,
this.toolStripMenuItem1,
this.添加参数ToolStripMenuItem,
this.删除参数ToolStripMenuItem});
this.删除参数ToolStripMenuItem,
this.复制参数名ToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(137, 76);
this.contextMenuStrip1.Size = new System.Drawing.Size(149, 120);
//
// 设置时间戳ToolStripMenuItem
//
this.设置时间戳ToolStripMenuItem.Name = "设置时间戳ToolStripMenuItem";
this.设置时间戳ToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
this.设置时间戳ToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.设置时间戳ToolStripMenuItem.Text = "设置时间戳";
this.设置时间戳ToolStripMenuItem.Click += new System.EventHandler(this.设置时间戳ToolStripMenuItem_Click);
//
// 设置jsonToolStripMenuItem
//
this.设置jsonToolStripMenuItem.Name = "设置jsonToolStripMenuItem";
this.设置jsonToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.设置jsonToolStripMenuItem.Text = "设置json文本";
this.设置jsonToolStripMenuItem.Click += new System.EventHandler(this.设置jsonToolStripMenuItem_Click);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(133, 6);
this.toolStripMenuItem1.Size = new System.Drawing.Size(145, 6);
//
// 添加参数ToolStripMenuItem
//
this.添加参数ToolStripMenuItem.Name = "添加参数ToolStripMenuItem";
this.添加参数ToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
this.添加参数ToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.添加参数ToolStripMenuItem.Text = "添加参数";
this.添加参数ToolStripMenuItem.Click += new System.EventHandler(this.添加参数ToolStripMenuItem_Click);
//
// 删除参数ToolStripMenuItem
//
this.删除参数ToolStripMenuItem.Name = "删除参数ToolStripMenuItem";
this.删除参数ToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
this.删除参数ToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.删除参数ToolStripMenuItem.Text = "删除参数";
this.删除参数ToolStripMenuItem.Click += new System.EventHandler(this.删除参数ToolStripMenuItem_Click);
//
// 复制参数名ToolStripMenuItem
//
this.复制参数名ToolStripMenuItem.Name = "复制参数名ToolStripMenuItem";
this.复制参数名ToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.复制参数名ToolStripMenuItem.Text = "复制参数名";
this.复制参数名ToolStripMenuItem.Click += new System.EventHandler(this.复制参数名ToolStripMenuItem_Click);
//
// BtnCancel
//
this.BtnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
@@ -386,5 +406,7 @@
private System.Windows.Forms.ToolStripMenuItem 设置时间戳ToolStripMenuItem;
private System.Windows.Forms.Label label5;
private ryControls.TextBoxEx2 TxtDesc;
private System.Windows.Forms.ToolStripMenuItem 设置jsonToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 复制参数名ToolStripMenuItem;
}
}
@@ -15,6 +15,8 @@ using System.Threading.Tasks;
using System.Windows.Forms;
using 开发辅助工具.Manager;
using 开发辅助工具.Tools;
using SuperDesign.Manager;
using Newtonsoft.Json;
namespace 开发辅助工具.Tools
{
@@ -32,7 +34,15 @@ namespace 开发辅助工具.Tools
{
long time = row.ParamValue.ToInt64();
if (time <= 100000) { return row.ParamValue; }
var dt = time.ToDateTime();
var dt = DateTime.MinValue;
if (row.ParamValue.Length == 13)
{
dt =RyDate.JSTimeToDateTime(time);
}
else
{
dt = time.ToDateTime();
}
if (dt == DateTime.MinValue || dt<=new DateTime(2000,1,1) || dt >= new DateTime(2100, 1, 1)) { return row.ParamValue; }
if (dt == dt.Date) {return dt.ToString("yyyy-MM-dd"); }
return dt.ToString("yyyy-MM-dd HH:mm:ss");
@@ -153,52 +163,7 @@ namespace 开发辅助工具.Tools
}
else
{
switch(item.Key.ToLower())
{
case "starttime":
title = "开始时间";
break;
case "endtime":
title = "结束时间";
break;
case "page":
title = "页码";
break;
case "pagesize":
title = "每页数量";
break;
case "title":
title = "标题";
break;
case "name":
title = "名称";
break;
case "id":
title = "id编号";
break;
case "modelid":
title = "资源类型";
break;
case "packagename":
case "pkgname":
title = "包名";
break;
case "filename":
title = "文件名";
break;
case "url":
title = "网址";
break;
case "username":
title = "用户名";
break;
case "realname":
title = "真实姓名";
break;
case "cooperid":
title = "合作包id";
break;
}
title= APIManager.GetParamTitle(item.Key);
}
list.Add(new PostInfo() { ParamName = item.Key, ParamValue = item.Value,Title=title,Desc=desc });
}
@@ -270,7 +235,7 @@ namespace 开发辅助工具.Tools
}
else
{
post += item.ParamName + "=" +RyWeb.WebDecode.UrlEncode(item.ParamValue);
post += item.ParamName + "=" +RyWeb.WebDecode.UrlEncode(item.ParamValue,Encoding.UTF8);
}
if(dict_post.ContainsKey(item.ParamName))
{
@@ -318,6 +283,10 @@ namespace 开发辅助工具.Tools
{
row.Title = e.NewValue.ToString();
}
else if (e.Column == OlvParamName)
{
row.ParamName = e.NewValue.ToString();
}
else if (e.Column == OlvParamValue)
{
row.ParamValue = e.NewValue.ToString();
@@ -426,15 +395,85 @@ namespace 开发辅助工具.Tools
var text = item.ParamValue;
if (text.Length > 4 && text.IsInt())
{
frm.dateTimePickerEX1.Value = RyDate.UnixTimeToDateTime(text);
if (text.Length == 13)
{
frm.IsJsTime = true;
frm.dateTimePickerEX1.Value = RyDate.JSTimeToDateTime(text);
}
else
{
frm.dateTimePickerEX1.Value = RyDate.UnixTimeToDateTime(text);
}
}
if (frm.ShowDialog() == DialogResult.OK)
{
item.ParamValue= RyDate.DateTimeToUnixTime(frm.dateTimePickerEX1.Value).ToString();
{
if (frm.IsJsTime)
{
item.ParamValue = RyDate.DateTimeToJSTime(frm.dateTimePickerEX1.Value).ToString();
}
else
{
item.ParamValue = RyDate.DateTimeToUnixTime(frm.dateTimePickerEX1.Value).ToString();
}
LvPostData.RefreshObject(item);
}
frm.Dispose();
}
private void LvPostData_MouseDoubleClick(object sender, MouseEventArgs e)
{
设置jsonToolStripMenuItem.PerformClick();
}
private void 设置jsonToolStripMenuItem_Click(object sender, EventArgs e)
{
if (LvPostData.SelectedObject == null) { return; }
var item = (PostInfo)LvPostData.SelectedObject;
try
{
if (item.ParamValue.StartsWith("{") || item.ParamValue.StartsWith("["))
{
JObject jo2 = JObject.Parse(item.ParamValue);
开发辅助工具.Controls.FrmText frm = new Controls.FrmText
{
Icon = Icon
};
frm.highlightEditor1.Visible = true;
frm.richTextBox1.Visible = false;
try
{
frm.highlightEditor1.SetHightlightText(Manager.Json.ConvertJsonString(item.ParamValue), "json");
}
catch
{
frm.highlightEditor1.SetHightlightText(item.ParamValue, "txt");
}
if (frm.ShowDialog() == DialogResult.OK)
{
try
{
JObject jo = (JObject)JsonConvert.DeserializeObject(frm.highlightEditor1.Text);
var aa = Newtonsoft.Json.JsonConvert.SerializeObject(jo, new Newtonsoft.Json.JsonSerializerSettings() { StringEscapeHandling = Newtonsoft.Json.StringEscapeHandling.EscapeNonAscii });
item.ParamValue = aa;
LvPostData.RefreshObject(item);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "出错", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
}
catch { }
}
private void 复制参数名ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (LvPostData.SelectedObject == null) { return; }
var row = (PostInfo)LvPostData.SelectedObject;
RyFiles.CopyToClip(row.ParamName);
}
}
public class PostInfo
{
@@ -28,15 +28,19 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmAddPostParam));
this.LvPostData = new BrightIdeasSoftware.ObjectListView();
this.OlvParamName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvTitle = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvParamValue = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvDesc = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.删除该参数ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.BtnCancel = new ryControls.ButtonEx();
this.BtnOK = new ryControls.ButtonEx();
((System.ComponentModel.ISupportInitialize)(this.LvPostData)).BeginInit();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// LvPostData
@@ -55,6 +59,7 @@
this.OlvTitle,
this.OlvParamValue,
this.OlvDesc});
this.LvPostData.ContextMenuStrip = this.contextMenuStrip1;
this.LvPostData.Cursor = System.Windows.Forms.Cursors.Default;
this.LvPostData.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.LvPostData.FullRowSelect = true;
@@ -76,7 +81,7 @@
// OlvParamName
//
this.OlvParamName.Text = "参数名";
this.OlvParamName.Width = 100;
this.OlvParamName.Width = 120;
//
// OlvTitle
//
@@ -96,6 +101,20 @@
this.OlvDesc.Text = "备注";
this.OlvDesc.Width = 200;
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.删除该参数ToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(181, 48);
//
// 删除该参数ToolStripMenuItem
//
this.删除该参数ToolStripMenuItem.Name = "删除该参数ToolStripMenuItem";
this.删除该参数ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.删除该参数ToolStripMenuItem.Text = "删除该参数";
this.删除该参数ToolStripMenuItem.Click += new System.EventHandler(this.删除该参数ToolStripMenuItem_Click);
//
// BtnCancel
//
this.BtnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
@@ -133,6 +152,7 @@
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "添加参数";
((System.ComponentModel.ISupportInitialize)(this.LvPostData)).EndInit();
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -145,5 +165,7 @@
private ryControls.ButtonEx BtnOK;
public BrightIdeasSoftware.ObjectListView LvPostData;
private BrightIdeasSoftware.OLVColumn OlvParamValue;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem 删除该参数ToolStripMenuItem;
}
}
@@ -131,5 +131,44 @@ namespace 开发辅助工具.Tools.API
BtnOK.PerformClick();
}
}
private void 删除该参数ToolStripMenuItem_Click(object sender, EventArgs e)
{
var row = (PostInfo)LvPostData.SelectedObject;
if (row == null) { return; }
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
RyQuickSQL mySQL = new RyQuickSQL("api");
mySQL.AddField("Url", Url);
DataSet ds = db.ReadData("select * from api where Url=@Url", mySQL);
var json_post = "";
if (ds.HaveData())
{
json_post = ds.GetFirstRowData()["Postdata"].ToString();
}
JObject jo;
if (json_post.Length == 0) { jo = new JObject(); }
else { jo = JObject.Parse(json_post); }
if (jo.ContainsKey("list"))
{
JArray jarr = JArray.Parse(jo["list"].ToString());
for (int i = 0; i < jarr.Count; i++)
{
var item = jarr[i];
var param_name = item["paramname"].ToString("");
if(param_name==row.ParamName)
{
jarr.Remove(item);
break;
}
}
jo["list"] = jarr;
}
mySQL.AddField("Postdata", jo.ToString());
db.ExecuteNonQuery(mySQL.GetUpdateSQL() + " where Url=@Url", mySQL);
}
db.Free();
}
}
}
@@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>15, 21</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>
+8 -2
View File
@@ -69,7 +69,7 @@
// menuRight1
//
this.menuRight1.Name = "menuRight1";
this.menuRight1.Size = new System.Drawing.Size(185, 70);
this.menuRight1.Size = new System.Drawing.Size(185, 92);
this.menuRight1.SourceContent = this;
//
// table1
@@ -87,6 +87,7 @@
this.table1.TabIndex = 16;
this.table1.TableModel = this.tableModel1;
this.table1.Text = "table1";
this.table1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.table1_KeyDown);
//
// columnModel1
//
@@ -118,7 +119,6 @@
//
// tableModel1
//
this.tableModel1.RowHeight = 25;
this.tableModel1.SelectionChanged += new XPTable.Events.SelectionEventHandler(this.TableModel1_SelectionChanged);
//
// label2
@@ -135,7 +135,9 @@
this.TxtType.BackColor = System.Drawing.Color.White;
this.TxtType.EmptyText = "";
this.TxtType.Location = new System.Drawing.Point(47, 397);
this.TxtType.LongTime = 2000;
this.TxtType.MaxLength = 999999999;
this.TxtType.MaxUndoRedoSteps = 50;
this.TxtType.Multiline = false;
this.TxtType.Name = "TxtType";
this.TxtType.OnlyNumeric = false;
@@ -148,6 +150,7 @@
this.TxtType.TabIndex = 18;
this.TxtType.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtType.ToolTip = "";
this.TxtType.WordWrap = true;
//
// label3
//
@@ -163,7 +166,9 @@
this.TxtValue.BackColor = System.Drawing.Color.White;
this.TxtValue.EmptyText = "";
this.TxtValue.Location = new System.Drawing.Point(223, 397);
this.TxtValue.LongTime = 2000;
this.TxtValue.MaxLength = 999999999;
this.TxtValue.MaxUndoRedoSteps = 50;
this.TxtValue.Multiline = false;
this.TxtValue.Name = "TxtValue";
this.TxtValue.OnlyNumeric = false;
@@ -176,6 +181,7 @@
this.TxtValue.TabIndex = 20;
this.TxtValue.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtValue.ToolTip = "";
this.TxtValue.WordWrap = true;
//
// FrmColor
//
+13 -1
View File
@@ -39,7 +39,7 @@ namespace 开发辅助工具.Tools
AddList("RGB颜色值", "rgb(" + color.R + "," + color.G + "," + color.B + ")","");
AddList("RGBA颜色值", "rgba(" + color.R + "," + color.G + "," + color.B + "," + color.A + ")", "HTML5、CSS3常用");
AddList("ARGB颜色值", String.Format("#{0:X2}{1:X2}{2:X2}{3:X2}", color.A, color.R, color.G, color.B), "android常用");
AddList("16进制颜色值", String.Format("#{0:X2}{1:X2}{2:X2}", color.R, color.G, color.B), "");
AddList("16进制颜色值", String.Format("#{0:X2}{1:X2}{2:X2}", color.R, color.G, color.B), "HTML5、CSS3常用");
AddList("Delphi颜色值", CSharpColorToDelphiColor(color), "");
AddList("HSL颜色值", "hsl(" + color.GetHue().ToString("0.00") + "," + color.GetSaturation().ToString("0.00%") + "," + (hsl.L / 255m).ToString("0.00%") + ")", "");
AddList("HSV颜色值", "hsv(" + color.GetHue().ToString("0.00") + "," + (hsv.S / 255m).ToString("0.00") + "," + (hsv.V / 255m).ToString("0.00") + ")", "");
@@ -77,5 +77,17 @@ namespace 开发辅助工具.Tools
TxtType.Text = table1.TableModel.Rows[row].Cells[ColTitle.Index].Text;
TxtValue.Text = table1.TableModel.Rows[row].Cells[ColValue.Index].Text;
}
private void table1_KeyDown(object sender, KeyEventArgs e)
{
if(e.KeyCode==Keys.C && e.Control)
{
if (table1.SelectedItems.Length > 0)
{
int row = table1.SelectedItems[0].Index;
RyFiles.CopyToClip(table1.TableModel.Rows[row].Cells[ColValue.Index].Text);
}
}
}
}
}
+2 -4
View File
@@ -238,7 +238,6 @@
this.TxtFromCode.Size = new System.Drawing.Size(926, 174);
this.TxtFromCode.TabIndex = 29;
this.TxtFromCode.Text = "";
this.TxtFromCode.WordWrap = false;
this.TxtFromCode.TextChanged += new System.EventHandler(this.TxtFromCode_TextChanged);
this.TxtFromCode.DoubleClick += new System.EventHandler(this.TxtFromCode_DoubleClick_1);
//
@@ -268,10 +267,9 @@
this.TxtResultCode.Name = "TxtResultCode";
this.TxtResultCode.OnlyInputText = true;
this.TxtResultCode.ReadOnly = true;
this.TxtResultCode.Size = new System.Drawing.Size(926, 204);
this.TxtResultCode.Size = new System.Drawing.Size(926, 273);
this.TxtResultCode.TabIndex = 31;
this.TxtResultCode.Text = "";
this.TxtResultCode.WordWrap = false;
//
// RbBigToSmall
//
@@ -299,7 +297,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(950, 450);
this.ClientSize = new System.Drawing.Size(950, 519);
this.Controls.Add(this.RbSmallToBig);
this.Controls.Add(this.RbBigToSmall);
this.Controls.Add(this.TxtResultCode);
@@ -120,6 +120,9 @@
<metadata name="menuRight1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>43</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>
+155
View File
@@ -0,0 +1,155 @@
namespace 开发辅助工具.Tools
{
partial class FrmFileTime
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmFileTime));
this.TxtPath = new ryControls.TextBoxEx2();
this.BtnConvert = new ryControls.ButtonEx();
this.BtnBrowser = new ryControls.ButtonEx();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// TxtPath
//
this.TxtPath.BackColor = System.Drawing.Color.White;
this.TxtPath.EmptyText = "";
this.TxtPath.Location = new System.Drawing.Point(45, 117);
this.TxtPath.MaxLength = 999999999;
this.TxtPath.Multiline = false;
this.TxtPath.Name = "TxtPath";
this.TxtPath.OnlyNumeric = false;
this.TxtPath.PasswordChar = '\0';
this.TxtPath.ReadOnly = true;
this.TxtPath.SelectedText = "";
this.TxtPath.SelectionLength = 0;
this.TxtPath.SelectionStart = 0;
this.TxtPath.Size = new System.Drawing.Size(594, 32);
this.TxtPath.TabIndex = 0;
this.TxtPath.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtPath.ToolTip = "";
this.TxtPath.WordWrap = true;
//
// BtnConvert
//
this.BtnConvert.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnConvert.Location = new System.Drawing.Point(247, 291);
this.BtnConvert.Name = "BtnConvert";
this.BtnConvert.Size = new System.Drawing.Size(195, 61);
this.BtnConvert.TabIndex = 1;
this.BtnConvert.Text = "立即修改";
this.BtnConvert.UseVisualStyleBackColor = true;
this.BtnConvert.Click += new System.EventHandler(this.BtnConvert_Click);
//
// BtnBrowser
//
this.BtnBrowser.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnBrowser.Location = new System.Drawing.Point(645, 117);
this.BtnBrowser.Name = "BtnBrowser";
this.BtnBrowser.Size = new System.Drawing.Size(41, 32);
this.BtnBrowser.TabIndex = 3;
this.BtnBrowser.Text = "...";
this.BtnBrowser.UseVisualStyleBackColor = true;
this.BtnBrowser.Click += new System.EventHandler(this.BtnBrowser_Click);
//
// openFileDialog1
//
this.openFileDialog1.Filter = "所有文件|*.*";
//
// dateTimePicker1
//
this.dateTimePicker1.CustomFormat = "yyyy年MM月dd日 HH:mm:ss";
this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dateTimePicker1.Location = new System.Drawing.Point(137, 166);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(200, 21);
this.dateTimePicker1.TabIndex = 4;
//
// dateTimePicker2
//
this.dateTimePicker2.CustomFormat = "yyyy年MM月dd日 HH:mm:ss";
this.dateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dateTimePicker2.Location = new System.Drawing.Point(137, 193);
this.dateTimePicker2.Name = "dateTimePicker2";
this.dateTimePicker2.Size = new System.Drawing.Size(200, 21);
this.dateTimePicker2.TabIndex = 5;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(69, 172);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 6;
this.label1.Text = "创建时间";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(69, 199);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(53, 12);
this.label2.TabIndex = 7;
this.label2.Text = "修改时间";
//
// FrmFileTime
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(744, 533);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.dateTimePicker2);
this.Controls.Add(this.dateTimePicker1);
this.Controls.Add(this.BtnBrowser);
this.Controls.Add(this.BtnConvert);
this.Controls.Add(this.TxtPath);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmFileTime";
this.Text = "文件时间修改";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private ryControls.TextBoxEx2 TxtPath;
private ryControls.ButtonEx BtnConvert;
private ryControls.ButtonEx BtnBrowser;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.DateTimePicker dateTimePicker1;
private System.Windows.Forms.DateTimePicker dateTimePicker2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
}
}
@@ -0,0 +1,77 @@
using ryCommon;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
namespace 开发辅助工具.Tools
{
public partial class FrmFileTime : DockContent
{
public FrmFileTime()
{
InitializeComponent();
RyFiles.AddDropDrag(TxtPath.Handle).ElevatedDragDrop += FrmImageToIcon_ElevatedDragDrop; ;
}
private void FrmImageToIcon_ElevatedDragDrop(object sender, ElevatedDragDropArgs e)
{
LoadFile(e.Files[0]);
}
private void LoadFile(string path)
{
var dt = RyFiles.GetFileDate(path);
dateTimePicker1.Value = dt.CreateTime;
dateTimePicker2.Value=dt.LastWriteTime;
TxtPath.Text = path;
BtnConvert.Text = "立即修改";
}
private void BtnBrowser_Click(object sender, EventArgs e)
{
if(openFileDialog1.ShowDialog()==DialogResult.OK)
{
LoadFile(openFileDialog1.FileName);
}
}
private void BtnConvert_Click(object sender, EventArgs e)
{
var path = TxtPath.Text;
if (!RyFiles.FileOrDirExist(path)) {
MessageBox.Show("文件不存在", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
BtnConvert.Enabled = false;
//superPictureBox1.Image = icon.ToBitmap();
BtnConvert.Text = "修改成功";
try
{
if(System.IO.File.Exists(path)) {
FileInfo fileInfo = new FileInfo(path);
fileInfo.CreationTime = dateTimePicker1.Value;
fileInfo.LastWriteTime = dateTimePicker2.Value;
}
else if(System.IO.Directory.Exists(path))
{
DirectoryInfo directoryInfo = new DirectoryInfo(path);
directoryInfo.CreationTime = dateTimePicker1.Value;
directoryInfo.LastWriteTime = dateTimePicker2.Value;
}
}
catch
{
BtnConvert.Text = "修改失败";
}
LoadFile(path);
BtnConvert.Enabled = true;
}
}
}
@@ -117,17 +117,21 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</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>
AAABAAEAICAAAAAAIADCAQAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAgAAAAIAgGAAAAc3p69AAAAARn
QU1BAACxjwv8YQUAAAF5SURBVFhHYxgFhMCEkz9DScUTT313hmqnHEw49fM/KXjZ1d//J576+Z1qjsBm
CT68+sav/zvu/wE64hfQEb/Jc4TT0m+rYBibJfgwyAEPv/4DOwLI/0GWIyCWf/0PwugWEMIwB1DkCGo5
ANkR/cd/uECNJwwodcCx539RMNgRp3+ughpPGFDiAJx4WDogY92b/27TH/43774NpnM2vMOqDoyp7YC8
Te/+S5ZdAlsOwiC2RsP1/51HvmFVT3UH+Mx8BLa0aMt7MD96yQswP3vDWwy1YEzrNBCy4BnYAQkrXmKV
p6kDavZ+/q/bchPsgMLNkBDBwLRyQNfR7/9NOiFpAJQosakBY1o5IHb5S7DloCjAJg/HtHKAw6T7YAdU
7vqIVR6OaZ0ICWJaOSB51av/njMeYZVDwbRyAKw8aNj3Bas8HNMyCloO4Sj9kPGwTQNE4yHrgLJ9PyjC
IIthGGo8YYDsAEox1EjSwCBwwOdQamGokaMAB2BgAABfGBs0y2lIZwAAAABJRU5ErkJggg==
AAABAAEAICAAAAAAIAD+AQAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAgAAAAIAgGAAAAc3p69AAAAARn
QU1BAACxjwv8YQUAAAG1SURBVFhH7VexSgNBEJ3OylYUbLWwMlraCH5DQBBBGxtL01hZG0jWTZSAnVUg
IHYqWASsbCQI6dNbKChqYbG+3Ux0M3fmLibnCWbgsbtv3u28u50LFxrFnwqjaQXYBPYSwropUYbLdYcT
HJD5BbwYRctcth0gs0KUPEo0x+WdgbuAIHlUuLwzECZIGnUuH8tAPYQbFLEMtMwhzTqNpkWsGyI/CGIY
ULTBEhfgVEDzc8R6AqcscYH1ucj7qMHwmtmncVOmJayrIi8RswcU5Zym9+9EzWnwfmNed1pFUxhXhc5H
X03YE7zHieCb9l23xyj4DoZmIM93HswpunL7a7oIyQ/FQIOvvxS8jyJrWoKPNPAKNHEXT4L/QvuMdwK8
hD0G5RrT53saKOL8pjltH+E2uEehqZoKTWB8F3wQmh64H3Ie/62BLMRjGI94XTMFyuDieczPmLOdPoPx
htfR0HTNtY6ZCzWQRaEFm/Q4i2dssOu0eZpkg2WhiYamAvbvNGyIAU1bGO8/10E0Aftkbj2uP2h643lk
EyaNkYEuA6l/EaX7TWgD3ZneV3EnYCK9/wWj+KdB9AE8n+bbcJtXxQAAAABJRU5ErkJggg==
</value>
</data>
</root>
+103
View File
@@ -0,0 +1,103 @@
namespace SuperDesign.Tools
{
partial class FrmHistoryUrls
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.objectListView2 = new BrightIdeasSoftware.ObjectListView();
this.OlvPostData = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvEditTime = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvClickCount = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
((System.ComponentModel.ISupportInitialize)(this.objectListView2)).BeginInit();
this.SuspendLayout();
//
// objectListView2
//
this.objectListView2.AllColumns.Add(this.OlvPostData);
this.objectListView2.AllColumns.Add(this.OlvEditTime);
this.objectListView2.AllColumns.Add(this.OlvClickCount);
this.objectListView2.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.objectListView2.CellEditUseWholeCell = false;
this.objectListView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.OlvPostData,
this.OlvEditTime,
this.OlvClickCount});
this.objectListView2.Cursor = System.Windows.Forms.Cursors.Default;
this.objectListView2.FullRowSelect = true;
this.objectListView2.HideSelection = false;
this.objectListView2.Location = new System.Drawing.Point(12, 12);
this.objectListView2.MultiSelect = false;
this.objectListView2.Name = "objectListView2";
this.objectListView2.ShowItemToolTips = true;
this.objectListView2.Size = new System.Drawing.Size(765, 542);
this.objectListView2.TabIndex = 114;
this.objectListView2.UseCompatibleStateImageBehavior = false;
this.objectListView2.UseHotItem = true;
this.objectListView2.View = System.Windows.Forms.View.Details;
this.objectListView2.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.objectListView2_MouseDoubleClick);
//
// OlvPostData
//
this.OlvPostData.FillsFreeSpace = true;
this.OlvPostData.Text = "名称";
this.OlvPostData.Width = 200;
//
// OlvEditTime
//
this.OlvEditTime.Text = "更新时间";
this.OlvEditTime.Width = 180;
//
// OlvClickCount
//
this.OlvClickCount.Text = "点击量";
this.OlvClickCount.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// FrmHistoryUrls
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(789, 566);
this.Controls.Add(this.objectListView2);
this.Name = "FrmHistoryUrls";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "历史记录";
this.Load += new System.EventHandler(this.FrmHistoryUrls_Load);
((System.ComponentModel.ISupportInitialize)(this.objectListView2)).EndInit();
this.ResumeLayout(false);
}
#endregion
private BrightIdeasSoftware.ObjectListView objectListView2;
private BrightIdeasSoftware.OLVColumn OlvPostData;
private BrightIdeasSoftware.OLVColumn OlvEditTime;
private BrightIdeasSoftware.OLVColumn OlvClickCount;
}
}
@@ -0,0 +1,77 @@
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using 开发辅助工具.Manager;
namespace SuperDesign.Tools
{
public partial class FrmHistoryUrls : Form
{
public FrmHistoryUrls()
{
InitializeComponent();
OlvPostData.AspectGetter = delegate (object x) { return ((HistoryUrl)x).PostData; };
OlvEditTime.AspectGetter = delegate (object x) {
return ((HistoryUrl)x).EditTimeStr;
};
OlvClickCount.AspectGetter = delegate (object x) { return ((HistoryUrl)x).ClickCount; };
OlvClickCount.AspectToStringConverter = delegate (object row, object x) { return ((HistoryUrl)row).ClickCount+"次"; };
}
class HistoryUrl
{
public int Id { get; set; } = 0;
public string PostData { get; set; } = "";
public string EditTimeStr { get; set; } = "";
public int ClickCount { get; set; } = 0;
}
public void LoadDb(string Url)
{
List<HistoryUrl> list = new List<HistoryUrl>();
IDbInterface db2 = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db2.ConnDb(Itrycn_Db.History_SQLConn) == 1)
{
RyQuickSQL mySQL =new RyQuickSQL("HistoryUrl");
mySQL.AddField("Url", Url);
DataSet ds_his = db2.ReadData("select * from HistoryUrl where Url=@Url order by EditTime desc", mySQL);
if (ds_his.HaveData())
{
for (int i = 0; i < ds_his.RowCount(); i++)
{
var row = ds_his.Tables[0].Rows[i];
list.Add(new HistoryUrl()
{
Id = row["Id"].ToInt(),
EditTimeStr = row["editTime"].ToInt64().ToDateTime().ToString(),
PostData = row["Postdata"].ToString(),
ClickCount = row["ClickCount"].ToInt(),
}) ;
}
}
ds_his?.Dispose();
}
db2.Free();
objectListView2.AddObjects(list);
}
private void FrmHistoryUrls_Load(object sender, EventArgs e)
{
}
public int SelectedId { get; set; } = 0;
private void objectListView2_MouseDoubleClick(object sender, MouseEventArgs e)
{
var row = (HistoryUrl)objectListView2.SelectedObject;
if (row == null) { return; }
SelectedId = row.Id;
DialogResult = DialogResult.OK;
}
}
}
@@ -34,6 +34,10 @@
this.superPictureBox1 = new ryControls.SuperPictureBox();
this.BtnBrowser = new ryControls.ButtonEx();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.RbSize32 = new System.Windows.Forms.RadioButton();
this.RbSize128 = new System.Windows.Forms.RadioButton();
this.RbSize256 = new System.Windows.Forms.RadioButton();
((System.ComponentModel.ISupportInitialize)(this.superPictureBox1)).BeginInit();
this.SuspendLayout();
//
@@ -94,11 +98,57 @@
//
this.openFileDialog1.Filter = "图片文件|*.png;*.jpg;*.bmp;*.jpeg";
//
// radioButton1
//
this.radioButton1.AutoSize = true;
this.radioButton1.Checked = true;
this.radioButton1.Location = new System.Drawing.Point(43, 164);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(47, 16);
this.radioButton1.TabIndex = 4;
this.radioButton1.TabStop = true;
this.radioButton1.Text = "原图";
this.radioButton1.UseVisualStyleBackColor = true;
//
// RbSize32
//
this.RbSize32.AutoSize = true;
this.RbSize32.Location = new System.Drawing.Point(112, 164);
this.RbSize32.Name = "RbSize32";
this.RbSize32.Size = new System.Drawing.Size(53, 16);
this.RbSize32.TabIndex = 5;
this.RbSize32.Text = "32*32";
this.RbSize32.UseVisualStyleBackColor = true;
//
// RbSize128
//
this.RbSize128.AutoSize = true;
this.RbSize128.Location = new System.Drawing.Point(187, 164);
this.RbSize128.Name = "RbSize128";
this.RbSize128.Size = new System.Drawing.Size(65, 16);
this.RbSize128.TabIndex = 6;
this.RbSize128.Text = "128*128";
this.RbSize128.UseVisualStyleBackColor = true;
//
// RbSize256
//
this.RbSize256.AutoSize = true;
this.RbSize256.Location = new System.Drawing.Point(274, 164);
this.RbSize256.Name = "RbSize256";
this.RbSize256.Size = new System.Drawing.Size(65, 16);
this.RbSize256.TabIndex = 7;
this.RbSize256.Text = "256*256";
this.RbSize256.UseVisualStyleBackColor = true;
//
// FrmImageToIcon
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(744, 533);
this.Controls.Add(this.RbSize256);
this.Controls.Add(this.RbSize128);
this.Controls.Add(this.RbSize32);
this.Controls.Add(this.radioButton1);
this.Controls.Add(this.BtnBrowser);
this.Controls.Add(this.superPictureBox1);
this.Controls.Add(this.BtnConvert);
@@ -108,6 +158,7 @@
this.Text = "图片转Icon";
((System.ComponentModel.ISupportInitialize)(this.superPictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
@@ -118,5 +169,9 @@
private ryControls.SuperPictureBox superPictureBox1;
private ryControls.ButtonEx BtnBrowser;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.RadioButton radioButton1;
private System.Windows.Forms.RadioButton RbSize32;
private System.Windows.Forms.RadioButton RbSize128;
private System.Windows.Forms.RadioButton RbSize256;
}
}
@@ -1,4 +1,5 @@
using ryCommon;
using HttpUpload.Core;
using ryCommon;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -28,7 +29,30 @@ namespace 开发辅助工具.Tools
private void LoadImage(string path)
{
superPictureBox1.Image = RyImage.LoadPic(path);
var ext = HttpUpload.Core.ImgExt.CheckImgFile(path);
Image img = null;
if (ext == HttpUpload.Core.FileExtension.WebP)
{
try
{
var stream = HttpUpload.Core.ImgExt.FileToStream(path);
byte[] array = new byte[stream.Length];
stream.Seek(0L, SeekOrigin.Begin);
stream.Read(array, 0, array.Length);
if (array.Length > 3)
{
using (WebPWrapper.WebP webP = new WebPWrapper.WebP())
{
var bitmap = webP.Decode(array);
img = bitmap;
}
}
}
catch { img = null; }
}
else
{ img = RyImage.LoadPic(path); }
superPictureBox1.Image = img;
TxtImagePath.Text = path;
BtnConvert.Text = "立即转换";
}
@@ -43,14 +67,52 @@ namespace 开发辅助工具.Tools
private void BtnConvert_Click(object sender, EventArgs e)
{
var path = TxtImagePath.Text;
var icon= RyImage.ConvertToIcon(RyImage.LoadPic(path), true);
var ext = HttpUpload.Core.ImgExt.CheckImgFile(path);
Image img = RyImage.LoadPic(path);
if(ext== HttpUpload.Core.FileExtension.WebP)
{
try
{
var stream = HttpUpload.Core.ImgExt.FileToStream(path);
byte[] array = new byte[stream.Length];
stream.Seek(0L, SeekOrigin.Begin);
stream.Read(array, 0, array.Length);
if (array.Length > 3)
{
using (WebPWrapper.WebP webP = new WebPWrapper.WebP())
{
var bitmap = webP.Decode(array);
img = bitmap;
}
}
}
catch { img = null; }
}
if (img == null) {
MessageBox.Show("无效的图片", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
if (RbSize32.Checked)
{
img = img.ReSize(32,32, ResizeMode.HeightFirst);
}
else if (RbSize128.Checked)
{
img = img.ReSize(128, 128, ResizeMode.HeightFirst);
}
else if (RbSize256.Checked)
{
img = img.ReSize(256, 256, ResizeMode.HeightFirst);
}
BtnConvert.Enabled = false;
var icon= RyImage.ConvertToIcon(img, true);
if (icon == null)
{
superPictureBox1.Image = null;
BtnConvert.Text = "转换失败";
BtnConvert.Enabled = true;
return;
}
BtnConvert.Enabled = false;
//superPictureBox1.Image = icon.ToBitmap();
BtnConvert.Text = "转换成功";
var icon_path = System.IO.Path.GetDirectoryName(path) + "\\"+System.IO.Path.GetFileNameWithoutExtension(path) + ".ico";
+206 -24
View File
@@ -31,6 +31,8 @@
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmJson));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.highlightEditor1 = new ScintillaNETV2.Highlight.HighlightEditor();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.treeView1 = new System.Windows.Forms.TreeView();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.复制键名ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -38,17 +40,30 @@
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
this.展开ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.折叠ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.TxtValue = new ryControls.Controls.RichTextBox2();
this.BtnApply = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.TxtName = new ryControls.TextBoxEx2();
this.label2 = new System.Windows.Forms.Label();
this.CbbType = new ryControls.RyComboBox();
this.label1 = new System.Windows.Forms.Label();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.BtnSave = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.BtnFormat = new System.Windows.Forms.ToolStripButton();
this.BtnPasteJson = new System.Windows.Forms.ToolStripButton();
this.BtnCopyJson = new System.Windows.Forms.ToolStripButton();
this.CopyJsonByCHS = new System.Windows.Forms.ToolStripButton();
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
this.highlightEditor1 = new ryControls.HighlightEditor();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
@@ -65,11 +80,51 @@
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.treeView1);
this.splitContainer1.Size = new System.Drawing.Size(800, 491);
this.splitContainer1.SplitterDistance = 400;
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(1035, 581);
this.splitContainer1.SplitterDistance = 517;
this.splitContainer1.TabIndex = 0;
//
// highlightEditor1
//
this.highlightEditor1.AutoMark = true;
this.highlightEditor1.CurHighliteLang = VPKSoft2.ScintillaLexers.LexerEnumerations.LexerType.Text;
this.highlightEditor1.Dock = System.Windows.Forms.DockStyle.Fill;
this.highlightEditor1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.highlightEditor1.LineNumberOn = true;
this.highlightEditor1.Location = new System.Drawing.Point(0, 0);
this.highlightEditor1.Name = "highlightEditor1";
this.highlightEditor1.ReadOnly = false;
this.highlightEditor1.SelectedText = "";
this.highlightEditor1.Size = new System.Drawing.Size(517, 581);
this.highlightEditor1.TabIndex = 0;
this.highlightEditor1.UseCustomGotoLine = false;
this.highlightEditor1.UseCustomShowFindReplace = false;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.treeView1);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.TxtValue);
this.splitContainer2.Panel2.Controls.Add(this.BtnApply);
this.splitContainer2.Panel2.Controls.Add(this.label3);
this.splitContainer2.Panel2.Controls.Add(this.TxtName);
this.splitContainer2.Panel2.Controls.Add(this.label2);
this.splitContainer2.Panel2.Controls.Add(this.CbbType);
this.splitContainer2.Panel2.Controls.Add(this.label1);
this.splitContainer2.Size = new System.Drawing.Size(514, 581);
this.splitContainer2.SplitterDistance = 250;
this.splitContainer2.TabIndex = 1;
//
// treeView1
//
this.treeView1.ContextMenuStrip = this.contextMenuStrip1;
@@ -77,11 +132,15 @@
this.treeView1.FullRowSelect = true;
this.treeView1.HideSelection = false;
this.treeView1.HotTracking = true;
this.treeView1.ItemHeight = 20;
this.treeView1.ImageIndex = 0;
this.treeView1.ImageList = this.imageList1;
this.treeView1.ItemHeight = 25;
this.treeView1.Location = new System.Drawing.Point(0, 0);
this.treeView1.Name = "treeView1";
this.treeView1.Size = new System.Drawing.Size(396, 491);
this.treeView1.SelectedImageIndex = 0;
this.treeView1.Size = new System.Drawing.Size(250, 581);
this.treeView1.TabIndex = 0;
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
this.treeView1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.TreeView1_MouseDown);
//
// contextMenuStrip1
@@ -128,46 +187,161 @@
this.折叠ToolStripMenuItem.Text = "折叠";
this.折叠ToolStripMenuItem.Click += new System.EventHandler(this.折叠ToolStripMenuItem_Click);
//
// imageList1
//
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
this.imageList1.Images.SetKeyName(0, "normal");
this.imageList1.Images.SetKeyName(1, "float");
this.imageList1.Images.SetKeyName(2, "int");
this.imageList1.Images.SetKeyName(3, "string");
this.imageList1.Images.SetKeyName(4, "array");
//
// TxtValue
//
this.TxtValue.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtValue.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.TxtValue.DetectUrls = false;
this.TxtValue.EmptyText = "请填写值";
this.TxtValue.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.TxtValue.ForeColor = System.Drawing.Color.Black;
this.TxtValue.Location = new System.Drawing.Point(6, 115);
this.TxtValue.Name = "TxtValue";
this.TxtValue.OnlyInputText = true;
this.TxtValue.Size = new System.Drawing.Size(248, 405);
this.TxtValue.TabIndex = 144;
this.TxtValue.Text = "";
this.TxtValue.WordWrap = true;
//
// BtnApply
//
this.BtnApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnApply.Location = new System.Drawing.Point(179, 526);
this.BtnApply.Name = "BtnApply";
this.BtnApply.Size = new System.Drawing.Size(75, 31);
this.BtnApply.TabIndex = 142;
this.BtnApply.Text = "应用";
this.BtnApply.UseVisualStyleBackColor = true;
this.BtnApply.Click += new System.EventHandler(this.BtnApply_Click);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(7, 100);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(17, 12);
this.label3.TabIndex = 140;
this.label3.Text = "值";
//
// TxtName
//
this.TxtName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.TxtName.EmptyText = "";
this.TxtName.Location = new System.Drawing.Point(6, 67);
this.TxtName.MaxLength = 999999999;
this.TxtName.Multiline = false;
this.TxtName.Name = "TxtName";
this.TxtName.OnlyNumeric = false;
this.TxtName.PasswordChar = '\0';
this.TxtName.ReadOnly = false;
this.TxtName.SelectedText = "";
this.TxtName.SelectionLength = 0;
this.TxtName.SelectionStart = 0;
this.TxtName.Size = new System.Drawing.Size(248, 28);
this.TxtName.TabIndex = 139;
this.TxtName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtName.ToolTip = "";
this.TxtName.WordWrap = true;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(7, 52);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 12);
this.label2.TabIndex = 138;
this.label2.Text = "名称";
//
// CbbType
//
this.CbbType.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CbbType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CbbType.Enabled = false;
this.CbbType.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbType.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbType.FormattingEnabled = true;
this.CbbType.Location = new System.Drawing.Point(6, 21);
this.CbbType.Name = "CbbType";
this.CbbType.Size = new System.Drawing.Size(248, 27);
this.CbbType.TabIndex = 137;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(7, 6);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(29, 12);
this.label1.TabIndex = 0;
this.label1.Text = "类型";
//
// toolStrip1
//
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.BtnSave,
this.toolStripSeparator1,
this.BtnFormat,
this.BtnPasteJson,
this.BtnCopyJson,
this.CopyJsonByCHS});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(800, 25);
this.toolStrip1.Size = new System.Drawing.Size(1035, 25);
this.toolStrip1.TabIndex = 2;
this.toolStrip1.Text = "toolStrip1";
//
// BtnSave
//
this.BtnSave.Image = ((System.Drawing.Image)(resources.GetObject("BtnSave.Image")));
this.BtnSave.ImageTransparentColor = System.Drawing.Color.Magenta;
this.BtnSave.Name = "BtnSave";
this.BtnSave.Size = new System.Drawing.Size(52, 22);
this.BtnSave.Text = "保存";
this.BtnSave.Click += new System.EventHandler(this.BtnSave_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
//
// BtnFormat
//
this.BtnFormat.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.BtnFormat.Image = ((System.Drawing.Image)(resources.GetObject("BtnFormat.Image")));
this.BtnFormat.ImageTransparentColor = System.Drawing.Color.Magenta;
this.BtnFormat.Name = "BtnFormat";
this.BtnFormat.Size = new System.Drawing.Size(48, 22);
this.BtnFormat.Size = new System.Drawing.Size(64, 22);
this.BtnFormat.Text = "格式化";
this.BtnFormat.Click += new System.EventHandler(this.BtnFormat_Click);
//
// BtnPasteJson
//
this.BtnPasteJson.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.BtnPasteJson.Image = ((System.Drawing.Image)(resources.GetObject("BtnPasteJson.Image")));
this.BtnPasteJson.ImageTransparentColor = System.Drawing.Color.Magenta;
this.BtnPasteJson.Name = "BtnPasteJson";
this.BtnPasteJson.Size = new System.Drawing.Size(62, 22);
this.BtnPasteJson.Size = new System.Drawing.Size(78, 22);
this.BtnPasteJson.Text = "粘贴Json";
this.BtnPasteJson.Click += new System.EventHandler(this.BtnPasteJson_Click);
//
// BtnCopyJson
//
this.BtnCopyJson.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.BtnCopyJson.Image = ((System.Drawing.Image)(resources.GetObject("BtnCopyJson.Image")));
this.BtnCopyJson.ImageTransparentColor = System.Drawing.Color.Magenta;
this.BtnCopyJson.Name = "BtnCopyJson";
this.BtnCopyJson.Size = new System.Drawing.Size(62, 22);
this.BtnCopyJson.Size = new System.Drawing.Size(78, 22);
this.BtnCopyJson.Text = "复制Json";
this.BtnCopyJson.Click += new System.EventHandler(this.BtnCopyJson_Click);
//
@@ -187,19 +361,11 @@
this.menuRight1.Size = new System.Drawing.Size(185, 92);
this.menuRight1.SourceContent = this;
//
// highlightEditor1
//
this.highlightEditor1.Dock = System.Windows.Forms.DockStyle.Fill;
this.highlightEditor1.Location = new System.Drawing.Point(0, 0);
this.highlightEditor1.Name = "highlightEditor1";
this.highlightEditor1.Size = new System.Drawing.Size(400, 491);
this.highlightEditor1.TabIndex = 0;
//
// FrmJson
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 516);
this.ClientSize = new System.Drawing.Size(1035, 606);
this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.toolStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
@@ -211,6 +377,11 @@
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
this.splitContainer2.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
this.contextMenuStrip1.ResumeLayout(false);
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
@@ -230,11 +401,22 @@
private System.Windows.Forms.ToolStripButton BtnFormat;
private System.Windows.Forms.ToolStripButton BtnPasteJson;
private System.Windows.Forms.ToolStripButton BtnCopyJson;
private ryPaiban.Model.MenuRight menuRight1;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem 展开ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 折叠ToolStripMenuItem;
private System.Windows.Forms.ToolStripButton CopyJsonByCHS;
private ryControls.HighlightEditor highlightEditor1;
private System.Windows.Forms.SplitContainer splitContainer2;
public ryControls.RyComboBox CbbType;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private ryControls.TextBoxEx2 TxtName;
private System.Windows.Forms.Button BtnApply;
public System.Windows.Forms.ToolStripButton BtnSave;
public System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
public ScintillaNETV2.Highlight.HighlightEditor highlightEditor1;
private System.Windows.Forms.ImageList imageList1;
public ryPaiban.Model.MenuRight menuRight1;
private ryControls.Controls.RichTextBox2 TxtValue;
}
}
+282 -6
View File
@@ -1,5 +1,6 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using ryCommon;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -18,6 +19,8 @@ namespace 开发辅助工具.Tools
public FrmJson()
{
InitializeComponent();
BtnSave.Visible = false;
toolStripSeparator1.Visible = false;
}
private void LoadTreeList(TreeNodeCollection nodes,JObject jo)
{
@@ -36,6 +39,8 @@ namespace 开发辅助工具.Tools
{
var node1 = node.Nodes.Add(i.ToString());
node.Tag = new JsonInfo() { name = item.Key.ToString(), value = item.Value.ToString() };
node.ImageKey = "array";
node.SelectedImageKey = "array";
LoadTreeList(node1.Nodes, (JObject)JsonConvert.DeserializeObject(jar[i].ToString()));
//TreeNode new_child = new TreeNode();
//new_child.Text = jar[i].ToString();
@@ -65,10 +70,11 @@ namespace 开发辅助工具.Tools
}
}
}
private void Format(string text)
public void Format(string text)
{
string json_text = text;
treeView1.Nodes.Clear();
var max_nodes_count = 0;
//if (Manager.Json.IsJson(json_text))
{
try
@@ -79,6 +85,9 @@ namespace 开发辅助工具.Tools
if (Manager.Json.IsArray(json_text))
{
var node2 = treeView1.Nodes.Add("0");
node2.Tag = new JsonInfo() { name = "0", value = "", JsonType= JTokenType.Array };
node2.ImageKey = "array";
node2.SelectedImageKey = "array";
JArray jar = JArray.Parse(json_text);
ScanArray(node2.Nodes, jar);
}
@@ -95,23 +104,30 @@ namespace 开发辅助工具.Tools
if (item.Value.Type == JTokenType.Array)
{
var node2 = nodes.Add(item.Name);
node2.Tag = new JsonInfo() { name = item.Name, value = item.Value.ToString() };
node2.Tag = new JsonInfo() { Property = item, name = item.Name, value = item.Value.ToString(), JsonType= JTokenType.Array };
node2.ImageKey = "array";
node2.SelectedImageKey = "array";
JArray jar = JArray.Parse(item.Value.ToString());
ScanArray(node2.Nodes, jar);
}
else if (item.Value.Type == JTokenType.Object)
{
var node2 = nodes.Add(item.Name);
node2.Tag = new JsonInfo() { name = item.Name, value = item.Value.ToString() };
var tag_json= new JsonInfo() { Property = item, name = item.Name, value = item.Value.ToString(), JsonType = JTokenType.Object };
node2.Tag = tag_json;
node2.ImageKey = node2.SelectedImageKey= tag_json.ImageKey;
Scan(node2.Nodes, (JObject)JsonConvert.DeserializeObject(item.Value.ToString()));
}
else
{
var node = nodes.Add(item.Name + ":" + item.Value + "|" + item.Value.Type.ToString());
node.Tag = new JsonInfo() { name = item.Name, value = item.Value.ToString() };
var tag_json = new JsonInfo() { Property = item, name = item.Name, value = item.Value.ToString(), JsonType = item.Value.Type };
node.Tag = tag_json;
node.ImageKey = node.SelectedImageKey = tag_json.ImageKey;
}
//Console.WriteLine(item.Name + ":" + item.Value);
}
if(nodes.Count> max_nodes_count && treeView1.Nodes!= nodes) { max_nodes_count = nodes.Count; }
//var values = _jo.Values<JProperty>();
//foreach (var item in values)
//{
@@ -128,16 +144,19 @@ namespace 开发辅助工具.Tools
for (int i = 0; i < jar.Count; i++)
{
var node3 = nodes.Add(i.ToString());
node3.Tag = new JsonInfo() { name = i.ToString(), value = "", JsonType = JTokenType.Array };
node3.ImageKey = "array";
node3.SelectedImageKey= "array";
if (jar[i].Type == JTokenType.Object)
{
Scan(node3.Nodes, (JObject)jar[i]);
}
else
{
node3.Nodes.Add(jar[i].ToString());
node3.Tag = new JsonInfo() { name = jar[i].ToString() };
node3.Nodes.Add(jar[i].ToString()).Tag = new JsonInfo() {IsNoValue=true, Property = new JProperty(jar[i].ToString(),null), name = jar[i].ToString(), value = "", JsonType = jar[i].Type };
}
}
if (nodes.Count > max_nodes_count && treeView1.Nodes != nodes) { max_nodes_count = nodes.Count; }
}
}
//if (Manager.Json.IsArray(json_text))
@@ -170,6 +189,13 @@ namespace 开发辅助工具.Tools
MessageBox.Show(ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
if (max_nodes_count < 5)
{ treeView1.ExpandAll(); }
else
{
if (treeView1.Nodes.Count > 0)
treeView1.Nodes[0].Expand();
}
//else
//{
// MessageBox.Show("无效的Json内容", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
@@ -191,6 +217,7 @@ namespace 开发辅助工具.Tools
{
if (treeView1.SelectedNode == null) { return; }
JsonInfo item = (JsonInfo)treeView1.SelectedNode.Tag;
if(item == null ) { return; }
ryCommon.RyFiles.CopyToClip(item.name);
}
@@ -214,6 +241,11 @@ namespace 开发辅助工具.Tools
private void FrmJson_Load(object sender, EventArgs e)
{
foreach (JTokenType day in Enum.GetValues(typeof(JTokenType)))
{
CbbType.Items.Add(day);
}
CbbType.SelectedIndex = 0;
}
private void TreeView1_MouseDown(object sender, MouseEventArgs e)
@@ -251,10 +283,254 @@ namespace 开发辅助工具.Tools
MessageBox.Show(ex.Message, "出错", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
{
if(e.Node==null)
{
CbbType.SelectedIndex = 0;
TxtName.Text = "";
TxtValue.Text = "";
BtnApply.Enabled = false;
return;
}
var item = (JsonInfo)e.Node.Tag;
if (item == null) { BtnApply.Enabled = false; return; }
CbbType.SelectedItem = item.JsonType;
TxtName.Text = item.name;
TxtValue.Text = item.value;
if(item.JsonType== JTokenType.Object || item.JsonType== JTokenType.Array)
{
BtnApply.Enabled = false;
}
else
{
BtnApply.Enabled = true;
}
}
private void ConvertTreeToJson()
{
JArray jarr= new JArray();
JObject jo = new JObject();
jo=Scan(treeView1.Nodes);
if (treeView1.Nodes.Count == 1 && treeView1.Nodes[0].Tag is JsonInfo ji2 && ji2.JsonType == JTokenType.Array && ji2.name == "0")
{
highlightEditor1.Text = jo.GetJsonValue("0","");
}
else
{
highlightEditor1.Text = jo.ToString();
}
JObject Scan(TreeNodeCollection nodes)
{
var jo_result=new JObject();
for (int i = 0; i < nodes.Count; i++)
{
var item = (JsonInfo)nodes[i].Tag;
switch (item.JsonType)
{
case JTokenType.Array:
var kk = ScanArray(nodes[i].Nodes);
jo_result.Add(item.name,kk);
break;
case JTokenType.Object:
jo_result.Add(new JProperty(item.name, Scan(nodes[i].Nodes)));
break;
case JTokenType.Integer:
jo_result.Add(item.Property.Name,item.Property.Value.ToInt64());
break;
case JTokenType.Boolean:
jo_result.Add(item.Property.Name, item.Property.Value.ToBool());
break;
case JTokenType.Float:
jo_result.Add(item.Property.Name, item.Property.Value.ToDouble());
break;
case JTokenType.Date:
jo_result.Add(item.Property.Name, item.Property.Value.ToDateTime());
break;
case JTokenType.String:
jo_result.Add(item.Property.Name, item.Property.Value.ToString());
break;
case JTokenType.Null:
jo_result.Add(item.Property.Name,null);
break;
default:
jo_result.Add(item.Property);
break;
}
}
return jo_result;
}
JArray ScanArray(TreeNodeCollection nodes)
{
JArray jarr_result = new JArray();
for (int i = 0; i < nodes.Count; i++)
{
var item = (JsonInfo)nodes[i].Tag;
switch (item.JsonType)
{
case JTokenType.Array:
if (item.Property == null)
{
if (nodes[i].Nodes[0].Tag is JsonInfo ji && ji.IsNoValue)
{
switch(ji.JsonType)
{
case JTokenType.Integer:
jarr_result.Add(ji.Property.Name.ToInt64());
break;
case JTokenType.Boolean:
jarr_result.Add(ji.Property.Name.ToBool());
break;
case JTokenType.Float:
jarr_result.Add(ji.Property.Name.ToDouble());
break;
default:
jarr_result.Add(ji.Property.Name);
break;
}
}
else
jarr_result.Add(Scan(nodes[i].Nodes));
}
else
{
//jarr_result.Add(Scan(nodes[i].Nodes));
}
break;
case JTokenType.Object:
break;
default:
if (item.IsNoValue)
{
jarr_result.Add(item.Property.Name);
}
else
{
jarr_result.Add(new JObject(item.Property));
}
break;
}
}
return jarr_result;
}
}
private void BtnApply_Click(object sender, EventArgs e)
{
var node = treeView1.SelectedNode;
if (node == null) { return; }
var item = (JsonInfo)node.Tag;
if (item.Property == null) { return; }
if(item.IsNoValue && TxtValue.Text.Length>0)
{
item.IsNoValue = false;
}
switch(item.JsonType)
{
case JTokenType.Array:
MessageBox.Show("不支持修改Array", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
case JTokenType.Object:
MessageBox.Show("不支持修改Object", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
case JTokenType.Float:
item.Property.Value = TxtValue.Text.ToDouble();
break;
case JTokenType.Boolean:
item.Property.Value = TxtValue.Text.ToBool();
break;
case JTokenType.Integer:
item.Property.Value = TxtValue.Text.ToInt64();
break;
case JTokenType.Date:
item.Property.Value = TxtValue.Text.ToDateTime();
break;
case JTokenType.Null:
if (TxtValue.Text.Length > 0)
{
if (TxtValue.Text.IsInt())
{
item.Property.Value = TxtValue.Text.ToInt64();
item.JsonType = JTokenType.Integer;
}
else if (TxtValue.Text.IsDouble())
{
item.Property.Value = TxtValue.Text.ToDouble();
item.JsonType = JTokenType.Float;
}
else if (TxtValue.Text.IsBool())
{
item.Property.Value = TxtValue.Text.ToBool();
item.JsonType = JTokenType.Boolean;
}
else
{
item.Property.Value = TxtValue.Text;
item.JsonType = JTokenType.String;
}
}
else
{
//item.Property.Value = TxtValue.Text.ToDateTime();
}
break;
default:
item.Property.Value = TxtValue.Text;
break;
}
item.value = TxtValue.Text;
node.Text = item.ToString();
ConvertTreeToJson();
}
private void BtnSave_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
}
}
public enum JsonType
{
JArray=0,
JObject=1,
String=2,
Int=3,
Double=4
}
public class JsonInfo
{
public string name = "";
public string value = "";
public bool IsNoValue = false;
public JProperty Property = null;
public JTokenType JsonType = JTokenType.None;
public override string ToString()
{
if(JsonType== JTokenType.Array || JsonType== JTokenType.Object)
{
return name;
}
else
{
return name + ":" + value + "|" + JsonType.ToString();
}
}
public string ImageKey
{
get
{
switch(JsonType)
{
case JTokenType.String:
return "string";
case JTokenType.Integer:
return "int";
case JTokenType.Float:
return "float";
case JTokenType.Array:
return "array";
}
return "normal";
}
}
}
}
+111 -36
View File
@@ -118,55 +118,130 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>262, 17</value>
<value>146, 20</value>
</metadata>
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>-5, 23</value>
</metadata>
<data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABY
DwAAAk1TRnQBSQFMAgEBBQEAAVABAAFQAQABFAEAARQBAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFQ
AwABKAMAAQEBAAEgBgABMv8A/wCcAAMMAQ8DPgFrA08BmQNPAZkDTgGVAzMBUBAAAyABLgNKAYoDTwGZ
A08BmQNHAYIDEgEX/wABAAMTARoDVgGzAwAB/wNdAcwDXAHLA0MBdhAAAyYBOANWAbIDXQHMAwAB/wNc
AdkDGwEm/wABAAMTARoDVgGzAwAB/ysAAf8DXAHZAxsBJv8AAQADEwEaA1YBswMAAf8rAAH/A1wB2QMb
ASb/AAEAAxMBGgNWAbMDAAH/KwAB/wNcAdkDGwEm/wABAAMTARoDVgGzAwAB/ysAAf8DXAHZAxsBJv8A
AQADEwEaA1YBswMAAf8rAAH/A1wB2QMbASb/AAEAAxMBGgNWAbMDAAH/KwAB/wNcAdkDGwEm/wABAAMT
ARoDVgGzAwAB/ysAAf8DXAHZAxsBJv8AAQADEwEaA1YBswMAAf8rAAH/A1wB2QMbASb/AAEAAxMBGgNW
AbMDAAH/KwAB/wNcAdkDGwEm/wABAAMTARoDVgGzAwAB/ysAAf8DXAHZAxsBJv8AAQADEwEaA1YBswMA
Af8rAAH/A1wB2QMbASb/AAEAAxMBGgNWAbMDAAH/AxsBJgMbASUDDwETEAADCgENAxoBJAMbASYDAAH/
A1wB2QMbASb/AAEAAxMBGgNWAbMDAAH/A1wB2QNdAdIDQAFvEAADLQFFA1oBxwNcAdkDAAH/A1wB2QMb
ASb/AAEAAwgBCgMuAUcDPAFmAzwBZgM7AWMDJQE2EAADFwEfAzgBXAM8AWYDPAFmAzYBVwMMAQ//AP8A
/wCbAAMIAQoDWQG8A20B5wMKAQ3/ADEAAwwBEANhAdEDmQH/AxEBFv8AMQADDAEQA2EB0QOZAf8DEQEW
/wAxAAMPARMDXwHSA5kB/wMTARl0AAMpAT0DPAFmAzwBZgM8AWYDPAFmAzwBZgM8AWYDPAFmAzwBZgM8
AWYDPAFmAzwBZgM8AWYDPAFmAzwBZgM8AWYDPAFmAy4BRwMIAQp0AAMqAT8DMgFPeAADTwSZAf8DmQH/
A5kB/wOZAf8DmQH/A5kB/wOZAf8DmQH/A5kB/wOZAf8DmQH/A5kB/wOZAf8DmQH/A5kB/wOZAf8DVwGy
AxMBGXAAAwYBCAMYASEDIAEtAw8BFCgAAyMBMwNRAZ4DQgF1BAADFwEfAzYBVwM8AWYDPAFmAzwBZgM4
AV0DGQEiBAADKwFCAzEBTQMaASQUAAMEAQUDDwEUAw8BFAMKAQ0DDwETAw8BEwMPARMDDwETAw8BEwMI
AQoEAAMDAQQDDQERAxMBGQMIAQoQAAMZASIDGwElAwsBDgQBAxgBIAMdASkDDgESAwIBAwgAAwwBDwMM
AQ8IAAMKAQ0DDwEUKAADDAEPAzwBZANWAasDWQG5A1ABmwMbASYkAAMdASkDTgGUA0IBdQQAA0oBigNX
AeYDXQHPA1EB7QNIAfIDXAHiAzkBXwQAA0YBfwMAAf8DMQFNFAADFwEfA0sBigNJAYUDMQFNA1IBoANS
AaADUgGgA1IBoANSAaADKgFAAxUBHAM5AV0DTgGYA1cBsgNJAYUDMQFNAwwBDwgAAlkBVwG5AmMBXwHV
A0kBiAMRARYDVQGsAWsBZgFfAeACUAFPAZsDIQEwCAADKwFCAkwBSwGPAxoBJAQAAxsBJgNSAaADKgFA
AwgBChwAAwkBDANAAW8DWgG3AzYBVwMjATMDUQGcA1QBqAMbASYgAAMIAQoDEwEaAxMBGgQAAzgBXANX
AeYDWAG3Az4BawM2AVkDNAFUAxsBJgQAA0YBfwMAAf8DMQFNFAADGwEmA1oBvwNXAbIDMQFNA4QB9wNa
AcIDUgGgA1IBoANSAaADKAE8A0UBfANjAd8DXAG+A0sBjANaAcIDagHmAzEBTQgAA10BzAH/AZABGAH/
Aa0BgAE+AfcDMgFPA1oBvwH/AZABGAL/AZABGAH/A0oBiQMJAQwEAAMYASACXAFZAcECVAFTAaYDEgEX
BAADVgGwAl8BXQHJAyYBOAgAAxMBGgMTARoDCAEKCAADPgFqA1wBwwM4AVwDQQFwA1cBsgMuAUgDUQGc
A1ABmwMPARQEAAMTARoDEwEaAxMBGgMEAQUYAAMPARQDUgGjAzQB9wNUAasQAANGAX8DAAH/AzEBTRQA
AxsBJgNaAb8DVwGyAwoBDQNfAdMDTwGZAw8BEwMPARMDDwETAxIBGANLAYsDSwGLAx0BKAMKAQ0DKQE9
A2YB4ANOAZQDDAEPBAADXQHMAf8BkAEYAv8BkAEYAf8DRAF7A1oBvwH/AZABGAL/AZABGAH/AlYBVQGu
AxIBGAQAAwMBBAM0AVMBYgFhAVwB2QJAAT8BbgQAAyMBMwNdAcwCTAFLAY8DDAEPA1oBvwOZAf8DmQH/
A5kB/wMxAU0EAANZAbkDOQFfA0IBcwN5AfIDmQH/A1cBsgMbASYDWgG/AyMBMwMYASADmQH/A5kB/wOZ
Af8DXQHMHAADCgENA1MBpgNeAeUDOgFgAxMBGggAAzwBZgNGAX8DEwEaFAADGwEmA1oBvwNXAbIEAAMx
AU0DaQHlAzEBTBwAAxsBJgNhAdkDSwGMAwoBDQQAA10BzAFwAWcBXgHlA1oBvwM2AVkDWgG/AZMBcwFM
AfIDWgG/A0kBhgMPARMIAAMbASYDWgG/AlcBVgGyBAADDwETA1IBoAJdAVsBxQMYASADVwGyA18B0gNf
AdIDWgG/AzEBTQQAA10BxwNBAXADQgF0A3kB8QOLAfkDVAGpAycBOgNYAbgDIQEwAyMBMwNfAdIDXwHS
A18B0gNZAbkgAAMMAQ8DQwF1AwAB/wNRAaQDDQERAz0BaANXAcIDAAH/A1EBogMnAToQAAMbASYDWgG/
A1cBsgQAAwwBDwNJAYcDZQHjAzMBUgMKAQ0IAAMSARcDLQFFAzEBTQNOAZUDYgHXAzABSggAAlQBUgGo
AloBWAG6AxgBIQQAA00BkgFpAWUBWwHdAyMBMgwAA0QBewNdAcwBfAFsAVgB6wNdAcwDLgFGA10BzAFr
AWYBXwHgAmEBXAHZAxsBJgQAAw8BEwMPARMDBgEICAADPgFrA1oBwgM0AVMDTAGOA00BkwM5AV0DUAGa
A1EBngMSARcEAAMPARMDDwETAw8BEwMDAQQYAAMjATMDOAFcAxcBHwMXAR8DSAHyA14B1QMaASMDRAF7
A1sB3gMAAf8DWwHFAz0BZxAAAxsBJgNaAb8DVwGyCAADEgEXA0cBggNmAeADQgFzCAADFwEfA1oBtwNd
AcwDdQHzA0kBiAMOARIIAAM4AVwBYgFhAVwB2QM8AWYDBgEIAycBOgFnAWMBXAHfAksBSgGLAw8BFAgA
AkwBSwGPAf8BkAEYAv8BkAEYAf8DXQHMAzoBYAH/AZABGAL/AZABGAH/AmEBXAHZAxsBJhgAAwwBDwNI
AYQDWgHCAz4BawMuAUYDUwGiA1QBqQMaASQwAANGAYADNgH1A0YBfgMeASoDSAHyA1wB2QMbASYDEgEX
A0wBkQMAAf8DOQFeAxIBFxAAAxsBJgNaAb8DVwGyAw8BEwMXAR8EAAMMAQ8DUgGjA2kB5QMMAQ8EAAMG
AQgDJAE1AyMBMwNJAYUDZgHgAy4BRwgAAw8BEwNMAZACXwFdAckDJQE2BAADRAF4Al8BWwHTAjkBOAFd
AwMBBAQAAzEBTgGTAXEBTAHzAf8BkAEYAf8DXQHMAxsBJgGCAWoBTwHwAf8BkAEYAf8CYQFcAdkDGwEm
HAADDAEPAz4BawNjAdYDZQHfA1MBpwMUARs0AAMmATgDXQHgA1EB7ANeAdoDAAH/A1MBpgMGAQgEAAM2
AVcDAAH/A1wB1gM+AWsQAAMbASYDWgG/A1cBsgM0AVMDWgG9AyABLgQAAz4BawOZAf8DJgE4AzMBUgMz
AVIDCAEKBAADHQEpA2YB4ANDAXUDBAEFBAAEAQMPARMDPgFrAzEBTQQAAwoBDQM0AVQDOgFgAwkBDAQA
AwsBDgM9AWcCXQFaAccCXQFaAccEAAM2AVcCWgFYAbcCYAFdAc4DGwEmJAADEwEaRAADIwEzA1IBpQNc
AdkDRgF/EAADRgF/A1sBxQNJAYYMAAMuAUYDPwFsA10BzANXAbIEAAOIAfkDVQGsAzoBYANcAcYDYwHf
AwoBDQNLAYwDmQH/A08BmQMYASADTwGZA3YB8gM2AVl4AAMxAU0DMQFNeAADSQGIA2MB3wNjAd8DUQGd
BAADNAFTA2MB2gNlAeIDXAHGAzwBZgQAAxcBHwNRAZ0DZQHdA2sB5QNhAdYDRwGAAw8BFHQAAwYBCANa
Ab8DmQH/AwgBCnQAAx4BKgMnAToDJwE6Ax4BKgQAAwMBBAMeASoDKwFBAx4BKgwAAwkBDAMjATIDMQFM
AyABLnwAAw8BEwNfAdIDmQH/AxMBGv8AMQADDwETA18B0gOZAf8DEwEa/wA1AANXAbIDWgG//wAVAAFC
AU0BPgcAAT4DAAEoAwABUAMAASgDAAEBAQABAQUAAeABARYAA/8BAAL/AfAJAAL/AfAJAAHAAfABMAkA
AcAB8AEwCQABxwH+ATAJAAHHAf4BMAkAAccB/gEwCQABxwH+ATAJAAHHAf4BMAkAAccB/gEwCQABxwH+
ATAJAAHHAf4BMAkAAccB/gEwCQABxwH+ATAJAAHHAf4BMAkAAcAB8AEwCQABwAHwATAJAAHAAfABMAkA
Av8B8AkAAv8B8AkAAf8BDwj/AgAB/wEPCP8CAAH/AQ8I/wIAAf8BDwP/AYABAAEPAv8CAAH/AZ8D/wGA
AQABDwL/AgAB/wEPAfwBQAFHAcABCAF4AQYBZwIAAf4BBwH8AUABRwHAAQABGAEGASECAAH8AQMB/AFA
AUcBwAEAARgBAgERAgABjAEBAQ8BwwHHAcABAAEIAQIBEAIAAQQBAAEPAeABxwHEAX8BCAEDARACAAEE
AQABDwHwAQMBxAIYAY4DAAGMAQEBDwHAAQMBxgIYAQYDAAH8AQMB/wHAAQMBwQEIARgBQgMAAf4BBwH/
AcABQwHAAYEBCAFCARACAAH/Ab8B/wHhAeMBhAEAAR8C/wIAAf8BnwP/AYQBEAEfAv8CAAH/AQ8D/wGE
ATgBfwL/AgAB/wEPCP8CAAH/AQ8I/wIAAf8Bnwj/AgAL
</value>
</data>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>427, 17</value>
<value>311, 20</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="BtnSave.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEjSURBVFhH7ZfBDYJAEEUpxdiI1uHJTqzAGmzBm0cPXjzY
gCfLMPGi86KfoO7iDIjBhJ/8SFb/zBuEJRR908g8b+mpuZEIXr/khTksgiezptg+1jiOmObkVma3aEqI
T4kCrDVRGEIATCC1AUAhiC4AkBuiKwDkgkgBKFhda6qPECkAjj+SB1QLkQJACnF7EvSYTE5ZiBwAOyMh
7QkevxV/Ed/zu6deOYAupL+WnqUGgN4CcBHqoomaOwdToyo3AEEVA6KJBVKFcAPkzkpEalbdG9wAmqDU
bHcez/aXjfngtcWoQS2pBcC9+TVii30VgKmSjXK22AAwAPwHgBZ/AaBhnwC07da+mEyW62PUjxrUUh3V
fX1GlGS/MCBJQQVIl+6TiuIGFMOBkRFjN2oAAAAASUVORK5CYII=
</value>
</data>
<data name="BtnFormat.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEISURBVFhH7ZbRDcIwDEQ7CqMwCpswCqMwCqOAH9JJV7eQ
oLgfSHnSCanYlyNpXZbJZIdT6B56mi6hX6HHPfDEu8kt5I2oIgC6hpqo+BEiDDqHfoUe9eMl3yYqpLEK
vGaAGaArAM/p0QG+zgKe06MDbGYBAwPl6dc1NDrJQ4lAWnf1hVS5uMDTB5K0uUDRO1kxHwNoK/ycUGUI
vNx7dQQOKb2oCvdtHu8RAXx3m+wF4M3G+Xl6/W/I73m2lVp/gw4H0BZiLFhAtb6YbjQPOxyAX4ihLwRc
yzcSNfT6rgwHGOW/AugM+aQR5a3vQUeB3LOJbjjXZmB0QE/24YnpwlOjigB4TiaJZXkBmvm3+bkbB3UA
AAAASUVORK5CYII=
</value>
</data>
<data name="BtnPasteJson.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAF1SURBVFhH7ZXrbcMwDIQ9SkfpKP3hxxgZJaN0lI6S8pij
oegViVICFOgBB0OySH56WF56dRzHh5ld79W+7zfztm0/AvLJV6/Tuq5fYeHYAJHnhcPni4WuKJKzAHwD
gsP9YsJkhjBWgcMSlVaoa2WCJLmZtgI8xAEAbjqwDLqxeQrBlqhkxOHJkFM4oHjXdFBLABAg+B6rk/Ml
N8upAFjmXhNOtybsz8HWtkBnMdPYLoCwxF3yIgtg+wwQkM+w5Es/2xqA9F/ZnCLk+wdwA+T2tMUMVw0B
YIzHYUFp+wHC77nH4SoMAczQ3waQtl4iJSMPhxblBsA+clz8MzqN/dbAijDOBTBLbwEIViux5Hz9v4Bx
2TsBBgSH3iWd0wBwDpArvgGlrb/2ZPaQAcRBHgDLxaaqWhzinumA0OgTDwE8LW4iRPxpDQE0Fy+Jq+AC
GC4OSTA+mccT+0QGMFwckiR6aRhIo/Xs4Mk0fvFcnJdHj5miomX5Bduh+L5XBebMAAAAAElFTkSuQmCC
</value>
</data>
<data name="BtnCopyJson.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAD9SURBVFhH7ZfRDcIwEEM7CqMwCpswCqMwCqNA/HFS4rp1
jwaKRJ7kj6aWe00uVToNNnAuenbQo+hWdCpK0auAEIo4BLw5CsBMHEbMwiKoElMUxj1Sax73FrkX1SE9
VK95jC1iDQnUmn+1AMB5Nt8aknCezVeGaxF6Y4vgreE8ld+gDAiOcSfe4zEe8PUMZUAz4Wu4RQznqfwG
a0jCeTbfGpJwns1XhtGEown3wHk2XxnWmpCbjuE8ld+gDHhQjLPc6SZ8AV/PUIa1JnRwnspvsIYknHcp
Wi380wVYfqaA+iD5LnEkSxXQ60RcK/Ujgqqxt1VQVtii7jvx90zTC8XzK727gWy4AAAAAElFTkSuQmCC
</value>
</data>
<data name="CopyJsonByCHS.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@@ -185,7 +260,7 @@
</value>
</data>
<metadata name="menuRight1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>537, 17</value>
<value>421, 20</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
+74
View File
@@ -0,0 +1,74 @@
namespace 开发辅助工具.Tools
{
partial class FrmKeyBroad
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmKeyBroad));
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
this.TxtKeys = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// menuRight1
//
this.menuRight1.Name = "menuRight1";
this.menuRight1.Size = new System.Drawing.Size(185, 92);
this.menuRight1.SourceContent = this;
//
// TxtKeys
//
this.TxtKeys.BackColor = System.Drawing.Color.White;
this.TxtKeys.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.TxtKeys.Location = new System.Drawing.Point(299, 218);
this.TxtKeys.Name = "TxtKeys";
this.TxtKeys.ReadOnly = true;
this.TxtKeys.Size = new System.Drawing.Size(198, 26);
this.TxtKeys.TabIndex = 1;
this.TxtKeys.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TxtKeys_KeyDown);
//
// FrmKeyBroad
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(836, 495);
this.Controls.Add(this.TxtKeys);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmKeyBroad";
this.TabPageContextMenuStrip = this.menuRight1;
this.Text = "按键获取";
this.Load += new System.EventHandler(this.FrmStrCount_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private ryPaiban.Model.MenuRight menuRight1;
private System.Windows.Forms.TextBox TxtKeys;
}
}
@@ -0,0 +1,31 @@
using ryCommon;
using ryControls;
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;
namespace 开发辅助工具.Tools
{
public partial class FrmKeyBroad : DockContent
{
public FrmKeyBroad()
{
InitializeComponent();
}
private void FrmStrCount_Load(object sender, EventArgs e)
{
}
private void TxtKeys_KeyDown(object sender, KeyEventArgs e)
{
TxtKeys.Text =e.KeyCode.ToString()+"["+e.KeyValue.ToString()+"]";
}
}
}
@@ -117,73 +117,75 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>35, 21</value>
<metadata name="menuRight1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>39, 27</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="scintillaDiffControl1.ImageRowAdded" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAB
ugAAAboB6KsBBgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAATdEVYdFNvdXJj
ZQBPeHlnZW4gSWNvbnPsGK7oAAAB8klEQVQ4T6WS3UtTYQCHj+NYkiaWhQyzSYs5RpZ9iERBU0mzoEHW
tMDSmTS2giAjoiUjY0mFH5M+HJGOBtqH4FqmZDNpBSV54U0xgvoHFl0KDnw6L7EV8V4UXTxweN7n/OA9
HAX4L6RS4Hl/NmQNmxeqn5V8C8Z7b8kagVQKGib3LQ3Fuwl89OGOHUrKGoFUCjYG87n/xUfw63WqIiZN
yTupFBgG8+j75MEf72D3mFFT8i71kKGhpqSg8F4unfPnuDrfTsWTYk39OtMQrXjn54DjuaOrcqQyuaxH
Jcefxerb2RQMrOTiBzeX5k5T9rCQitH1WJ8aqZs045lrSQY+e7vSA6pPTThftOKMNnNq5jjO1yc487aF
1lg9bW8Oc/7dSS7MOumYbcf9qo2m8XoaZ7Ym0gPKFSVRM1zF/tEabON1NL08gmPaTsNULceitbhiR2mO
2tj5aBOWoJFdw2XYpiy/DXgVl9KpLCrXFJQbCpk9OrL9mVSHN3NwYgfFg6swh9ayZUSvXaUIa2TD4oEJ
kys9IGN5r8reSCn2aDnrtA/653kKqRSo3TqsY2Yap8spCORoSt5JpSDjpoIlpGdP2ET+nRWakndSCV6d
4W7eUm5/FvqBNRj69f/+K9sfFw1pAwvbH2z7XtpXclnWCKTy70H5AYUgqeK+blp3AAAAAElFTkSuQmCC
</value>
</data>
<data name="scintillaDiffControl1.ImageRowDeleted" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAu
IgAALiIBquLdkgAAAAd0SU1FB+MEDgkGK7xsdzYAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJ
TVBXgQ4XAAAAN0lEQVQ4T2MYBVQAv/hV/1OAxSg1oIpSAxopNSAfZEAqEMfiwCA5XBgsDwtIbmwYLDkK
aA0YGADE96kTDgVxuQAAAABJRU5ErkJggg==
</value>
</data>
<data name="scintillaDiffControl1.ImageRowDiff" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29m
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAbdEVYdFNvdXJjZQBGQU1GQU1GQU0gU2lsayBJY29u
c4J6ZPsAAAGFSURBVDhPY/j//z9FGKsgKRirICkYqyAI398fF3pvb8yJu7ujxbDJwzBWQaAmvru7Iq+9
vb36/+1tYT3Y1MAwVkGgprrX15f8//3lzv/r6wPfX1vrb4pNHQhjCNzcGKwF1PT2x+st/3886/v/7u7W
/5eXeW66tNidFV0tCKNwgDYxXV3lu/jNzTX/fzxu+n+ow/j/r7dr/p+f5/zv3GzHYGS1MIzCAdrkcX9v
9f+frxb9/3Yn8f+hdsP/3x+W//9wb9v/U1Osrp2caMGLrB6E4YwLC1zZgDadeQ8MuO8PSv5/vRUBwbdj
gV6Z8P/hwUn/j3YZ1SFrBmE44+xM++yHh/r+/3wxHWz719vRQC8Ygelv97L+f3u+8f+hZt2XBxu1tbAa
AHTek29v7v7/+W7v/x+vgGHwajUSXvv/9+cr/5+cWPJ/X7XaaqwGAJ335ki7wbfDrfrfgDZ9A9r07UC9
5rf9tRrfgJq+7a1U/ba3XPnbnjKlw1gNIBdjFSQFYxUkHv9nAAC/hu6vewywPwAAAABJRU5ErkJggg==
</value>
</data>
<data name="scintillaDiffControl1.ImageRowOk" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAB
ugAAAboB6KsBBgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAATdEVYdFNvdXJj
ZQBPeHlnZW4gSWNvbnPsGK7oAAAB0UlEQVQ4T2P4//8/RRirICkYqyAuzKlsKsspa1XEIGTOBxPDUIQL
c8jbKYoZR73JbF/xn0/d9waDiDUvSByrYnQMslnKNOZV7ayt/1efuvc/qXnpfx5V7z0gOYQieescWcv4
r3yKzhNhYmBxGUtpWdOoFwU9K/5P2XQCjPO7V/yXM4+8ApIHK+KStczW9y37VzJx5X+XhOb/fEpOE0Di
3AqmErKmYc+T6mb9r5+96X8dEKc3z/8vahD+mU3GXA9ugKRh6K3Yqmn/01vm/k9tnP3fOiQfaIj9NCkj
3+ehhe3/M1vngeWSamf8lzIJ+8oqZ24M0gc3gFvevk/HI/N/YHb7/+jyKf8Tamf9N/WJ+u+bVfU/rXH+
/5SGOf+Tqyf/lzEN/s4qbW4B0ww3AIS55GwX6LrF/vfP6vwfUjD5f1TZ9P/RZbP/hxVM+e8SX/lfytDt
J6eUjQ2yZhBG4XArWK/Qcgn+H5Q/7X98zYr/SQ1r/gfkdv4XN3D4zSFt7YisFoYxBHjkrDYY+4T/L5my
939Gx7L/EoZ2f9ilrNzQ1cEwpgADAyO3vPk2s6C4/9Im9n/Y5a280dUgY+yCQEO4ZK2ysPkZHWMVJAVj
FSQe/2cAAKAehUz/zF2tAAAAAElFTkSuQmCC
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAAAAAAIAAUAgAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAgAAAAIAgGAAAAc3p69AAAAARn
QU1BAACxjwv8YQUAAAHLSURBVFhH7Ze/SsNQGMUzF1zFJ3Bw9QW6iWma0sFR6OQgOAmu7g6+gIO4iohv
0F2kU3cnwbeo5wvnJjfJPddYIxX0Bwfy/Tn3u7k1aU3+aZJl2eV4PF5CK6E5WxO7DsQhj2nJtQdsb9Mw
KPkDixzDzzbgtEjTdIeWCu7ONZ0xHQV9tROIgfWH7F/h+pHpChReWBwy1TvchN3gG1MVLJTH2QX0dz4B
h5wjCxF69fS6WATpWXOxZxPDTsg5shBhOp3umhh2otcNoP/WxLATco4q2ADommEN5THsvZLn+RXDEulR
BeReWbthqkR5bDhrreddeWIbOHa15h2FPN5w04zpkpCnQBYABp+7OlQuiusTE0PrO3J9uL5guoarM6yQ
BeDflQ1hurUBXB96fa3P33B1hhWqoIYbIU/jFO6YLgl5CkIFDHdfHq3hRshj+JuwNZguUB5ZQO50NBod
MKwhFwPIZ9AMm9liqkB6ZCEC+n/+RRTjN7yKN/tl1Kun18UiSM+ai92bGHZCzkFysz9KvTfeHM/9PtNR
rNfEMMpkMtnzZjwxXYHkAFqwIabv/mOiP2Y809toeIDefUND/gZqJ8A45DHZml/6e/kLJMkH/tMBL9aV
yvkAAAAASUVORK5CYII=
AAABAAEAIBwAAAEAIACYDgAAFgAAACgAAAAgAAAAOAAAAAEAIAAAAAAAAA4AAKdrAACnawAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJAAA
AKAAAABbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAsAAAA7AAAANgAAAAeAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAIAAACUAAAA/wAAAHkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAADoAAAA2wAAACEAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAI4AAAD/AAAAfwAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAOUAAADfAAAAJQAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAB6AAAAYgAAAAIAAAAAAAAAiQAA
AP8AAACFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE4AAACGAAAAHgAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjAAAArwAAAP8AAACvAAAABgAA
AAAAAAAoAAAA4gAAAOIAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjwAAAP8AAADDAAAANAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPAAAAMwAAAD/AAAAtgAA
ACgAAAAAAAAAAAAAAAAAAACDAAAA/wAAAIoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaAAAAoAAA
AP8AAADdAAAAUQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAFsAAADkAAAA/QAA
AJYAAAAVAAAAAAAAAAAAAAAAAAAAAAAAACQAAADeAAAA5gAAAC0AAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAALAAAAfgAAAPUAAADwAAAAcgAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAB8AAAA8wAA
AO8AAABzAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH4AAAD/AAAAjwAAAAEAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAACAAAAXAAAAOMAAAD7AAAAlAAAABMAAAAAAAAAAAAAAAAAAAAAAAAASQAA
APoAAAD8AAAAbgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAANoAAADpAAAAMQAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUgAAAPIAAAD/AAAAVgAAAAAAAAAAAAAAAAAA
AAAAAAAfAAAAuAAAAP8AAADGAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAeAAA
AP8AAACVAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACcAAACyAAAA/wAAAMwAAAAsAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAXAAAAmgAAAP4AAADhAAAAVwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAdAAAA1gAAAOwAAAA1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAABCAAAA0QAAAP8AAACxAAAAJQAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAeAAAAPMAAADzAAAAeAAAAAoAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAByAAAA/wAAAJsAAAADAAAAAAAAAAAAAAAEAAAAYQAAAOgAAAD7AAAAjwAA
ABIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAVgAAAOEAAAD/AAAAigAA
AAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoAAADSAAAA7wAAADkAAAAAAAAAAAAAAG0AAAD5AAAA7gAA
AG0AAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOQAA
AL8AAACXAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG0AAAD/AAAAoAAAAAQAAAAAAAAAfAAA
AMsAAABMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAADgAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFwAAAM4AAADyAAAAPQAA
AAAAAAAIAAAAEQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZwAA
AP8AAAClAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAUAAAAyQAAAPQAAABCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAABiAAAA/wAAAKsAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAADEAAAA9gAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFwAAAD/AAAAoQAAAAEAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAH8AAABXAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8H////A////wH///8B
////AP///wD///wAeD/4AHAf8AAwD+AAMAfAABABgAAQAYAACAGAMA4BgDgEAYAIAAGADAABwAwAA/AO
AAf4DgAf/A8AP///AP///4B///+Af///wH///8B////gf///4P8=
</value>
</data>
</root>
+232 -54
View File
@@ -1,33 +1,33 @@
namespace 开发辅助工具.Tools
{
partial class FrmProject
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
namespace 开发辅助工具.Tools
{
partial class FrmProject
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.BtnCustomMessageBox = new ryControls.ButtonEx();
this.BtnCopyCMD = new System.Windows.Forms.Button();
@@ -52,11 +52,15 @@
this.RbCompany = new System.Windows.Forms.RadioButton();
this.RbPersonal = new System.Windows.Forms.RadioButton();
this.RbGeneral = new System.Windows.Forms.RadioButton();
this.BtnUploadProject = new ryControls.ButtonEx();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.ChkPackByLite = new System.Windows.Forms.CheckBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.chromeTabControl1 = new ryControls.ChromeTabControl();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.TxtUploadName = new ryControls.TextBoxEx2();
this.label6 = new System.Windows.Forms.Label();
this.TxtProjectVer = new ryControls.TextBoxEx2();
this.label5 = new System.Windows.Forms.Label();
this.BtnSave = new ryControls.ButtonEx();
@@ -72,6 +76,13 @@
this.tabPage3 = new System.Windows.Forms.TabPage();
this.BtnSave2 = new ryControls.ButtonEx();
this.panel1 = new System.Windows.Forms.Panel();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.BtnSaveLog = new ryControls.ButtonEx();
this.LvUpdateLogList = new BrightIdeasSoftware.ObjectListView();
this.BtnPublishLogs = new ryControls.ButtonEx();
this.OlvUpVer = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvUpdateDate = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.tabControl1 = new System.Windows.Forms.TabControl();
((System.ComponentModel.ISupportInitialize)(this.table1)).BeginInit();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
@@ -80,6 +91,8 @@
this.tabPage1.SuspendLayout();
this.tabPage3.SuspendLayout();
this.panel1.SuspendLayout();
this.tabPage4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.LvUpdateLogList)).BeginInit();
this.SuspendLayout();
//
// BtnCustomMessageBox
@@ -321,10 +334,25 @@
this.toolTip1.SetToolTip(this.RbGeneral, "工作室项目将采用默认设置,不会植入编译条件。");
this.RbGeneral.UseVisualStyleBackColor = true;
//
// BtnUploadProject
//
this.BtnUploadProject.BaseColor = System.Drawing.Color.Navy;
this.BtnUploadProject.ColorGradient = true;
this.BtnUploadProject.Location = new System.Drawing.Point(15, 95);
this.BtnUploadProject.Name = "BtnUploadProject";
this.BtnUploadProject.Size = new System.Drawing.Size(126, 34);
this.BtnUploadProject.TabIndex = 32;
this.BtnUploadProject.Text = "上传项目到服务端";
this.toolTip1.SetToolTip(this.BtnUploadProject, "一键混淆并打包当前项目生成的文件。");
this.BtnUploadProject.UseDefSkin = false;
this.BtnUploadProject.UseVisualStyleBackColor = true;
this.BtnUploadProject.Click += new System.EventHandler(this.BtnUploadProject_Click);
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.ChkPackByLite);
this.groupBox1.Controls.Add(this.BtnRepairFolder);
this.groupBox1.Controls.Add(this.BtnUpdateDllVer);
this.groupBox1.Controls.Add(this.BtnUpdateVer);
@@ -339,6 +367,18 @@
this.groupBox1.TabStop = false;
this.groupBox1.Text = "项目管理";
//
// ChkPackByLite
//
this.ChkPackByLite.AutoSize = true;
this.ChkPackByLite.Checked = true;
this.ChkPackByLite.CheckState = System.Windows.Forms.CheckState.Checked;
this.ChkPackByLite.Location = new System.Drawing.Point(753, 30);
this.ChkPackByLite.Name = "ChkPackByLite";
this.ChkPackByLite.Size = new System.Drawing.Size(84, 16);
this.ChkPackByLite.TabIndex = 31;
this.ChkPackByLite.Text = "最简化打包";
this.ChkPackByLite.UseVisualStyleBackColor = true;
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
@@ -362,6 +402,7 @@
this.chromeTabControl1.Controls.Add(this.tabPage2);
this.chromeTabControl1.Controls.Add(this.tabPage1);
this.chromeTabControl1.Controls.Add(this.tabPage3);
this.chromeTabControl1.Controls.Add(this.tabPage4);
this.chromeTabControl1.Cursor = System.Windows.Forms.Cursors.Default;
this.chromeTabControl1.ItemSize = new System.Drawing.Size(100, 25);
this.chromeTabControl1.Location = new System.Drawing.Point(12, 205);
@@ -388,6 +429,9 @@
//
// tabPage1
//
this.tabPage1.Controls.Add(this.BtnUploadProject);
this.tabPage1.Controls.Add(this.TxtUploadName);
this.tabPage1.Controls.Add(this.label6);
this.tabPage1.Controls.Add(this.TxtProjectVer);
this.tabPage1.Controls.Add(this.label5);
this.tabPage1.Controls.Add(this.BtnSave);
@@ -408,12 +452,45 @@
this.tabPage1.Text = "项目信息";
this.tabPage1.UseVisualStyleBackColor = true;
//
// TxtUploadName
//
this.TxtUploadName.BackColor = System.Drawing.Color.White;
this.TxtUploadName.EmptyText = "";
this.TxtUploadName.Location = new System.Drawing.Point(354, 61);
this.TxtUploadName.LongTime = 2000;
this.TxtUploadName.MaxLength = 999999999;
this.TxtUploadName.MaxUndoRedoSteps = 50;
this.TxtUploadName.Multiline = false;
this.TxtUploadName.Name = "TxtUploadName";
this.TxtUploadName.OnlyNumeric = false;
this.TxtUploadName.PasswordChar = '\0';
this.TxtUploadName.ReadOnly = false;
this.TxtUploadName.SelectedText = "";
this.TxtUploadName.SelectionLength = 0;
this.TxtUploadName.SelectionStart = 0;
this.TxtUploadName.Size = new System.Drawing.Size(193, 28);
this.TxtUploadName.TabIndex = 31;
this.TxtUploadName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtUploadName.ToolTip = "";
this.TxtUploadName.WordWrap = true;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(271, 70);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(65, 12);
this.label6.TabIndex = 30;
this.label6.Text = "升级包名称";
//
// TxtProjectVer
//
this.TxtProjectVer.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.TxtProjectVer.EmptyText = "";
this.TxtProjectVer.Location = new System.Drawing.Point(72, 61);
this.TxtProjectVer.LongTime = 2000;
this.TxtProjectVer.MaxLength = 999999999;
this.TxtProjectVer.MaxUndoRedoSteps = 50;
this.TxtProjectVer.Multiline = false;
this.TxtProjectVer.Name = "TxtProjectVer";
this.TxtProjectVer.OnlyNumeric = false;
@@ -466,7 +543,9 @@
this.Txtproglang.BackColor = System.Drawing.Color.White;
this.Txtproglang.EmptyText = "";
this.Txtproglang.Location = new System.Drawing.Point(754, 6);
this.Txtproglang.LongTime = 2000;
this.Txtproglang.MaxLength = 999999999;
this.Txtproglang.MaxUndoRedoSteps = 50;
this.Txtproglang.Multiline = false;
this.Txtproglang.Name = "Txtproglang";
this.Txtproglang.OnlyNumeric = false;
@@ -495,7 +574,9 @@
this.Txtusqver.BackColor = System.Drawing.Color.White;
this.Txtusqver.EmptyText = "";
this.Txtusqver.Location = new System.Drawing.Point(627, 6);
this.Txtusqver.LongTime = 2000;
this.Txtusqver.MaxLength = 999999999;
this.Txtusqver.MaxUndoRedoSteps = 50;
this.Txtusqver.Multiline = false;
this.Txtusqver.Name = "Txtusqver";
this.Txtusqver.OnlyNumeric = false;
@@ -524,7 +605,9 @@
this.TxtEngName.BackColor = System.Drawing.Color.White;
this.TxtEngName.EmptyText = "";
this.TxtEngName.Location = new System.Drawing.Point(354, 6);
this.TxtEngName.LongTime = 2000;
this.TxtEngName.MaxLength = 999999999;
this.TxtEngName.MaxUndoRedoSteps = 50;
this.TxtEngName.Multiline = false;
this.TxtEngName.Name = "TxtEngName";
this.TxtEngName.OnlyNumeric = false;
@@ -553,7 +636,9 @@
this.TxtName.BackColor = System.Drawing.Color.White;
this.TxtName.EmptyText = "";
this.TxtName.Location = new System.Drawing.Point(72, 6);
this.TxtName.LongTime = 2000;
this.TxtName.MaxLength = 999999999;
this.TxtName.MaxUndoRedoSteps = 50;
this.TxtName.Multiline = false;
this.TxtName.Name = "TxtName";
this.TxtName.OnlyNumeric = false;
@@ -614,6 +699,84 @@
this.panel1.Size = new System.Drawing.Size(363, 23);
this.panel1.TabIndex = 14;
//
// tabPage4
//
this.tabPage4.Controls.Add(this.tabControl1);
this.tabPage4.Controls.Add(this.BtnSaveLog);
this.tabPage4.Controls.Add(this.LvUpdateLogList);
this.tabPage4.Controls.Add(this.BtnPublishLogs);
this.tabPage4.Location = new System.Drawing.Point(1, 29);
this.tabPage4.Name = "tabPage4";
this.tabPage4.Padding = new System.Windows.Forms.Padding(3);
this.tabPage4.Size = new System.Drawing.Size(903, 380);
this.tabPage4.TabIndex = 3;
this.tabPage4.Text = "更新日志";
this.tabPage4.UseVisualStyleBackColor = true;
//
// BtnSaveLog
//
this.BtnSaveLog.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnSaveLog.Location = new System.Drawing.Point(261, 6);
this.BtnSaveLog.Name = "BtnSaveLog";
this.BtnSaveLog.Size = new System.Drawing.Size(75, 33);
this.BtnSaveLog.TabIndex = 11;
this.BtnSaveLog.Text = "临时保存";
this.BtnSaveLog.UseVisualStyleBackColor = true;
this.BtnSaveLog.Click += new System.EventHandler(this.BtnSaveLog_Click);
//
// LvUpdateLogList
//
this.LvUpdateLogList.AllColumns.Add(this.OlvUpVer);
this.LvUpdateLogList.AllColumns.Add(this.OlvUpdateDate);
this.LvUpdateLogList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.LvUpdateLogList.CellEditUseWholeCell = false;
this.LvUpdateLogList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.OlvUpVer,
this.OlvUpdateDate});
this.LvUpdateLogList.Cursor = System.Windows.Forms.Cursors.Default;
this.LvUpdateLogList.FullRowSelect = true;
this.LvUpdateLogList.HideSelection = false;
this.LvUpdateLogList.Location = new System.Drawing.Point(3, 6);
this.LvUpdateLogList.Name = "LvUpdateLogList";
this.LvUpdateLogList.Size = new System.Drawing.Size(252, 368);
this.LvUpdateLogList.TabIndex = 10;
this.LvUpdateLogList.UseCompatibleStateImageBehavior = false;
this.LvUpdateLogList.View = System.Windows.Forms.View.Details;
//
// BtnPublishLogs
//
this.BtnPublishLogs.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnPublishLogs.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnPublishLogs.Location = new System.Drawing.Point(822, 6);
this.BtnPublishLogs.Name = "BtnPublishLogs";
this.BtnPublishLogs.Size = new System.Drawing.Size(75, 33);
this.BtnPublishLogs.TabIndex = 9;
this.BtnPublishLogs.Text = "发布日志";
this.BtnPublishLogs.UseVisualStyleBackColor = true;
this.BtnPublishLogs.Click += new System.EventHandler(this.BtnPublishLogs_Click);
//
// OlvUpVer
//
this.OlvUpVer.Text = "版本";
this.OlvUpVer.Width = 150;
//
// OlvUpdateDate
//
this.OlvUpdateDate.Text = "更新时间";
this.OlvUpdateDate.Width = 150;
//
// tabControl1
//
this.tabControl1.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.tabControl1.Location = new System.Drawing.Point(261, 39);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(636, 335);
this.tabControl1.TabIndex = 12;
//
// FrmProject
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -629,9 +792,11 @@
this.Controls.Add(this.BtnOpenOutput);
this.Name = "FrmProject";
this.Text = "项目";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmProject_FormClosing);
this.Load += new System.EventHandler(this.FrmProject_Load);
((System.ComponentModel.ISupportInitialize)(this.table1)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.chromeTabControl1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
@@ -641,32 +806,34 @@
this.tabPage3.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.tabPage4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.LvUpdateLogList)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private ryControls.ButtonEx BtnCustomMessageBox;
private System.Windows.Forms.Button BtnCopyCMD;
private System.Windows.Forms.Button BtnOpenOutput;
private ryControls.ButtonEx BtnMessageBox;
private XPTable.Models.Table table1;
private XPTable.Models.ColumnModel columnModel1;
private XPTable.Models.TextColumn ColName;
private XPTable.Models.TextColumn ColPath;
private XPTable.Models.TextColumn ColDes;
private XPTable.Models.TableModel tableModel1;
private ryControls.ButtonEx BtnClean;
private ryControls.ButtonEx BtnBatchZip;
private System.Windows.Forms.Label LblState;
private ryControls.ButtonEx BtnInsertUpdate;
private ryControls.ButtonEx BtnUpdateDll;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.GroupBox groupBox1;
private ryControls.ButtonEx BtnUpdateVer;
private System.Windows.Forms.GroupBox groupBox2;
}
#endregion
private ryControls.ButtonEx BtnCustomMessageBox;
private System.Windows.Forms.Button BtnCopyCMD;
private System.Windows.Forms.Button BtnOpenOutput;
private ryControls.ButtonEx BtnMessageBox;
private XPTable.Models.Table table1;
private XPTable.Models.ColumnModel columnModel1;
private XPTable.Models.TextColumn ColName;
private XPTable.Models.TextColumn ColPath;
private XPTable.Models.TextColumn ColDes;
private XPTable.Models.TableModel tableModel1;
private ryControls.ButtonEx BtnClean;
private ryControls.ButtonEx BtnBatchZip;
private System.Windows.Forms.Label LblState;
private ryControls.ButtonEx BtnInsertUpdate;
private ryControls.ButtonEx BtnUpdateDll;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.GroupBox groupBox1;
private ryControls.ButtonEx BtnUpdateVer;
private System.Windows.Forms.GroupBox groupBox2;
private ryControls.ButtonEx BtnUpdateDllVer;
private ryControls.ButtonEx BtnRepairFolder;
private ryControls.ChromeTabControl chromeTabControl1;
@@ -691,5 +858,16 @@
private ryControls.ButtonEx BtnSave2;
private ryControls.TextBoxEx2 TxtProjectVer;
private System.Windows.Forms.Label label5;
}
private System.Windows.Forms.CheckBox ChkPackByLite;
private ryControls.TextBoxEx2 TxtUploadName;
private System.Windows.Forms.Label label6;
private ryControls.ButtonEx BtnUploadProject;
private System.Windows.Forms.TabPage tabPage4;
private BrightIdeasSoftware.ObjectListView LvUpdateLogList;
private ryControls.ButtonEx BtnPublishLogs;
private ryControls.ButtonEx BtnSaveLog;
private BrightIdeasSoftware.OLVColumn OlvUpVer;
private BrightIdeasSoftware.OLVColumn OlvUpdateDate;
private System.Windows.Forms.TabControl tabControl1;
}
}
+488 -6
View File
@@ -1,13 +1,14 @@
using Microsoft.Win32;
using Newtonsoft.Json.Linq;
using ryCommon;
using ryCommonDb;
using ryControls.Controls;
using SuperDesign.Manager.FTP;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
@@ -19,6 +20,7 @@ namespace 开发辅助工具.Tools
{
public partial class FrmProject : DockContent
{
public string ProjectName { get; set; } = "";
public FrmProject(string ProjectPath)
{
_ProjectPath = ProjectPath;
@@ -33,6 +35,7 @@ namespace 开发辅助工具.Tools
var root = @"d:Project//d:PropertyGroup//d:";
var project_name = GetValue("AssemblyName");
if (project_name != "") { Text = project_name; }
ProjectName = project_name;
#region 读取图标
var ApplicationIcon = GetValue("ApplicationIcon");
ApplicationIcon = System.IO.Path.GetDirectoryName(_ProjectPath) + "\\" + ApplicationIcon;
@@ -78,6 +81,8 @@ namespace 开发辅助工具.Tools
}
}
catch { }
OlvUpVer.AspectGetter = delegate (object x) { return ((UpLogItem)x).Version; };
OlvUpdateDate.AspectGetter = delegate (object x) { return ((UpLogItem)x).AddTime.ToDateTime().ToString(); };
}
/// <summary>
/// 获取毕方标准项目根路径
@@ -112,6 +117,7 @@ namespace 开发辅助工具.Tools
Txtusqver.Text = ini.ReadIni("project", "usqver");
Txtproglang.Text = ini.ReadIni("project", "proglang");
ChkConfuse.Checked = ini.ReadIni("project", "confuse", false);
TxtUploadName.Text = ini.ReadIni("project", "UploadName");
AddPath(true,"Debug输出目录", "Bin\\Debug","包含调试信息的输出目录");
AddPath(true, "Release输出目录", "Bin\\Release", "不包含调试信息的输出目录");
AddPath(true,"源代码目录", "Source", "含有项目源码");
@@ -275,12 +281,196 @@ namespace 开发辅助工具.Tools
CloseApp();
}
}
public List<string> GetAllProjectFiles()
{
var result = new List<string>();
var _path = GetBFFolderPath();
if (_path.Length > 0)
{
var files = System.IO.Directory.GetFiles(_path+ "\\Source","*.sln");
var sln_path = "";
if(files==null || files.Length==0)
{
var dirs = System.IO.Directory.GetDirectories(_path + "\\Source");
if(dirs!=null)
{
for (int i = 0; i < dirs.Length; i++)
{
files = System.IO.Directory.GetFiles(dirs[i], "*.sln");
if(files!=null && files.Length>0)
{
sln_path = files[0];
break;
}
}
}
}
else
{
sln_path = files[0];
}
if(sln_path.Length>0)
{
var lines = RyFiles.ReadAllLines(sln_path);
if(lines!=null)
{
for (int i = 0; i < lines.Length; i++)
{
if (lines[i].StartsWith("Project("))
{
var project_path = lines[i].GetStr(",", ",").Trim().Trim('"');
if(project_path.Length>0)
{
project_path = System.IO.Path.GetDirectoryName(sln_path).TrimEnd('\\') + "\\" + project_path;
if(System.IO.File.Exists(project_path))
{
result.Add(project_path);
}
}
}
}
}
}
}
return result;
}
private void FrmProject_Load(object sender, EventArgs e)
{
var _path = GetBFFolderPath();
if (_path.Length>0)
{
IDbInterface db = new SQLiteDataProvider();
if (db.ConnDb(_path+ "\\Res\\Setting\\UpdateLogs.dat") == 1)
{
RyQuickSQL mySQL = new RyQuickSQL("UpdateLogs");
mySQL.AddField("VerStr", "");
mySQL.AddField("LogText", "");
mySQL.AddField("LogJson", "");
mySQL.AddField("editTime", DateTime.Now.ToInt64());
mySQL.AddField("addTime", DateTime.Now.ToInt64());
db.CreateDb(mySQL);
#region 项目当前日志表
mySQL.Clear();
mySQL.TableName = "ProjectNowLogs";
mySQL.AddField("Name", "");
mySQL.AddField("Value", "");//值
mySQL.AddField("editTime", DateTime.Now.ToInt64());
mySQL.AddField("addTime", DateTime.Now.ToInt64());
if (db.CreateDb(mySQL) == 1)
{
db.ExecuteNonQuery("CREATE INDEX index_Name ON ProjectNowLogs(Name); ");
}
#endregion
#region 设置表
mySQL.Clear();
mySQL.TableName = "Settings";
mySQL.AddField("Name", "");
mySQL.AddField("Value", "");//值
mySQL.AddField("addTime", DateTime.Now);
if (db.CreateDb(mySQL) == 1)
{
db.ExecuteNonQuery("CREATE INDEX index_Name ON Settings(Name); ");
}
#endregion
var ds_logs = db.ReadData("select * from UpdateLogs order by addTime desc");
if(ds_logs.HaveData())
{
List<UpLogItem> list = new List<UpLogItem>();
for (int i = 0; i < ds_logs.RowCount(); i++)
{
var row = ds_logs.GetRow(i);
list.Add(new UpLogItem() {
Version = row["VerStr"].ToString(),
LogText = row["LogText"].ToString(),
AddTime = row["addTime"].ToInt64(),
});
}
LvUpdateLogList.AddObjects(list);
}
ds_logs?.Dispose();
var all_project_path= GetAllProjectFiles();
for (int i = 0; i < all_project_path.Count; i++)
{
var p_name = "";
try
{
System.Xml.XmlDocument xml = new System.Xml.XmlDocument();
xml.Load(all_project_path[i]);
var xmlnsm = new XmlNamespaceManager(xml.NameTable);
xmlnsm.AddNamespace("d", xml.DocumentElement.NamespaceURI);
var root = @"d:Project//d:PropertyGroup//d:";
p_name = GetValue("AssemblyName");
string GetValue(string name)
{
var node = xml.SelectSingleNode(root + name, xmlnsm);
if (node != null)
{
return node.InnerText;
}
return "";
}
}
catch { }
if (p_name.Length == 0) { continue; }
ProjectLogItem projectLogItem = new ProjectLogItem
{
ProjectName = p_name,
ProjectPath = all_project_path[i],
VersionPath= System.IO.Path.GetDirectoryName(all_project_path[i]) + "\\Properties\\AssemblyInfo.cs",
};
TabPage tab = new TabPage()
{
Text = p_name,
Tag= projectLogItem
};
Label label = new Label
{
Parent = tab,
Location = new Point(1, 4),
AutoSize=true,
Text = "版本号:" + projectLogItem.Version
};
label.Refresh();
RichTextBox2 rich = new RichTextBox2
{
Parent = tab,
Dock = DockStyle.Fill,
Location = new Point(label.Left, label.Top + label.Height+2),
Size = new Size(tab.ClientSize.Width,tab.ClientSize.Height-(label.Top + label.Height+4)),
Anchor= AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom
};
var ds_now_up = db.ReadData("select * from ProjectNowLogs where Name='" + p_name + "'");
if (ds_now_up.HaveData())
{
rich.Text = ds_now_up.GetRow(0)["Value"].ToString();
}
ds_now_up?.Dispose();
tabControl1.TabPages.Add(tab);
}
}
db.Free();
}
}
class ProjectLogItem
{
public string ProjectName { get; set; } = "";
public string ProjectPath { get; set; } = "";
public string Version
{
get
{
return RyProject.GetVerInfo(VersionPath).Version;
}
}
/// <summary>
///更新版本号
/// </summary>
public void UpdateVer()
{
Manager.RyProject.UpdateVer(VersionPath);
}
public string VersionPath { get; set; } = "";
}
private void table1_DoubleClick(object sender, EventArgs e)
{
if (table1.SelectedItems.Length == 0) { return; }
@@ -369,13 +559,14 @@ namespace 开发辅助工具.Tools
private void BtnBatchZip_Click(object sender, EventArgs e)
{
BtnBatchZip.Enabled = false;
bool PackByLite = ChkPackByLite.Checked;
Thread th = new Thread(Start);
th.Start();
void Start()
{
RyProject project = new RyProject();
project.OnStateChanged += Project_OnStateChanged;
project.Pack(GetBFFolderPath());
project.Pack(GetBFFolderPath(), PackByLite);
this.Invoke(new Action(() =>
{
BtnBatchZip.Enabled = true;
@@ -518,6 +709,11 @@ namespace 开发辅助工具.Tools
{
error += project.UpdateDlls(bf_folder + "\\Bin",out _error_str);
}
var debug_path = GetDebugPath();
if(debug_path.IndexOfEx(bf_folder + "\\Bin")<0)
{
error += project.UpdateDlls(debug_path, out _error_str);
}
BtnUpdateDllVer.Enabled = true;
if (error == 0)
{
@@ -561,6 +757,7 @@ namespace 开发辅助工具.Tools
ini.WriteIni("project", "usqver", Txtusqver.Text);
ini.WriteIni("project", "proglang", Txtproglang.Text);
ini.WriteIni("project", "confuse", ChkConfuse.Checked);
ini.WriteIni("project", "UploadName", TxtUploadName.Text);
MessageBox.Show("保存成功。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
@@ -609,5 +806,290 @@ namespace 开发辅助工具.Tools
}
#endregion
}
private void BtnUploadProject_Click(object sender, EventArgs e)
{
List<UploadInfo> list = new List<UploadInfo>();
var _path = GetBFFolderPath();
if (_path.Length > 0)
{
string ftp_setting_path = _path + "\\FTPUploadData.jryp";
if(System.IO.File.Exists(ftp_setting_path))
{
ryCommon.Ini ini = new ryCommon.Ini(_path + "\\查看项目.ryp");
var eng_name = ini.ReadIni("project", "engname");
var com_mode = "Debug";
var ouput_folder = _path + "\\Bin\\" + com_mode + "\\" + eng_name;
if (!System.IO.Directory.Exists(ouput_folder))
{
ouput_folder = _path + "\\Bin\\" + com_mode;
}
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
{
var lines = RyFiles.ReadAllLines(ftp_setting_path);
if (lines != null && lines.Length > 0)
{
for (int i = 0; i < lines.Length; i++)
{
var line = lines[i].Split('=');
if (line.Length < 2) { continue; }
var item = line[0];
if (item.Contains("<") && item.Contains(">"))
{
DataSet ds_var = db.ReadData("select * from VarInfo");
if (ds_var.HaveData())
{
for (int n = 0; n < ds_var.Tables[0].Rows.Count; n++)
{
DataRow row_var = ds_var.Tables[0].Rows[n];
item = item.Replace("<" + row_var["VarName"].ToString() + ">", row_var["VarValue"].ToString());
if (!item.Contains("<") || !item.Contains(">"))
{
break;
}
}
}
}
if (item.IndexOfEx(":") < 0 && item.IndexOfEx("<") < 0)
{
item = ouput_folder + "\\" + item;
}
if(System.IO.File.Exists(item))
list.Add(new UploadInfo() { FromPath = item, ToPath = line[1] });
}
}
}
db.Free();
}
}
if(list.Count>0)
{
FrmUploadFilesToFtp frm= new FrmUploadFilesToFtp();
frm.UploadInfos.AddRange(list);
if(frm.ShowDialog()==DialogResult.OK)
{
}
frm.Dispose();
}
}
private bool SaveUpdateLog(bool clean=false)
{
var _path = GetBFFolderPath();
if (_path.Length > 0)
{
IDbInterface db = new SQLiteDataProvider();
if (db.ConnDb(_path + "\\Res\\Setting\\UpdateLogs.dat") == 1)
{
if (clean)
{
db.ExecuteNonQuery("delete from ProjectNowLogs");
for (int i = 0; i < tabControl1.TabPages.Count; i++)
{
var tab = tabControl1.TabPages[i];
for (int c = 0; c < tab.Controls.Count; c++)
{
var ctl = tab.Controls[c];
if (ctl is RichTextBox2 rich && tab.Tag is ProjectLogItem p_item)
{
rich.Text = "";
}
}
}
}
else
{
#region 当前日志表
for (int i = 0; i < tabControl1.TabPages.Count; i++)
{
var tab = tabControl1.TabPages[i];
for (int c = 0; c < tab.Controls.Count; c++)
{
var ctl = tab.Controls[c];
if (ctl is RichTextBox2 rich && tab.Tag is ProjectLogItem p_item)
{
RyQuickSQL mySQL = new RyQuickSQL("ProjectNowLogs");
mySQL.AddField("Name", p_item.ProjectName);
mySQL.AddField("Value", rich.Text);//值
mySQL.AddField("editTime", DateTime.Now.ToInt64());
if (db.Update(mySQL, "Name=@Name") == 0)
{
mySQL.AddField("addTime", DateTime.Now.ToInt64());
db.Insert(mySQL);
}
}
}
}
db.Free();
return true;
#endregion
}
}
db.Free();
}
return false;
}
private void BtnSaveLog_Click(object sender, EventArgs e)
{
if (SaveUpdateLog())
{
MessageBox.Show("保存成功。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
private void FrmProject_FormClosing(object sender, FormClosingEventArgs e)
{
SaveUpdateLog();
}
private string GetLogText(JArray jarr,DateTime dt)
{
string log_text = "### " + DateTime.Now.ToString("yyyy-MM-dd dddd") + "更新";
log_text += "\r\n------";
for (int i = 0; i < jarr.Count; i++)
{
var item = jarr[i];
log_text += "\r\n#### "+ item.GetJsonValue("ProjectName", "")+ " V"+ item.GetJsonValue("VerStr", "");
var logs = item.GetJsonValue("LogText", "").Replace("\r", "\n").Replace("\n\n", "\n").Split('\n');
for (int m = 0; m < logs.Length; m++)
{
if (logs[m].Length == 0) { continue; }
var log_item = logs[m];
if (log_item.StartsWith("- *."))
{
log_text += "\r\n" + log_item;
}
else if (log_item.StartsWith("*."))
{
log_text += "\r\n- " + log_item;
}
else
{
log_text += "\r\n- *." + log_item;
}
}
}
return log_text;
}
private void BtnPublishLogs_Click(object sender, EventArgs e)
{
var _path = GetBFFolderPath();
if (_path.Length > 0)
{
IDbInterface db = new SQLiteDataProvider();
if (db.ConnDb(_path + "\\Res\\Setting\\UpdateLogs.dat") == 1)
{
Ini ini = new Ini(_path+ "\\查看项目.ryp");
var Main_Project = ini.ReadIni("project", "MainProject", "");
var Main_Version = "";
ProjectLogItem first_tag = null;
JArray jarr = new JArray();
var index = 0;
for (int i = 0; i < tabControl1.TabPages.Count; i++)
{
var tab = tabControl1.TabPages[i];
for (int c = 0; c < tab.Controls.Count; c++)
{
var ctl = tab.Controls[c];
if (ctl is RichTextBox2 rich && tab.Tag is ProjectLogItem p_item)
{
if (rich.Text.Length == 0) { continue; }
p_item.UpdateVer();
var Version = p_item.Version;
if (Main_Project.Length == 0) {
if (index == 0) {
Main_Version = Version;
}
}
else
{
if(Main_Project== p_item.ProjectName)
{
Main_Version = Version;
}
}
if (index == 0) { first_tag = p_item; }
JObject jo_item = new JObject
{
{ "ProjectName", p_item.ProjectName },
{ "VerStr", Version },
{ "LogText",rich.Text }
};
if (Main_Version.Length > 0)
{
jarr.Insert(0,jo_item);
}
else
{
jarr.Add(jo_item);
}
index++;
}
}
}
for (int i = 0; i < tabControl1.TabPages.Count; i++)
{
var tab = tabControl1.TabPages[i];
for (int c = 0; c < tab.Controls.Count; c++)
{
var ctl = tab.Controls[c];
if (ctl is Label txt && tab.Tag is ProjectLogItem p_item)
{
txt.Text = "版本号:"+p_item.Version;
}
}
}
if (Main_Version.Length==0 && first_tag!=null)
{
Main_Version = first_tag.Version;
}
#region 日志表
var log_text = GetLogText(jarr, DateTime.Now);
var CHANGELOG = RyFiles.ReadAllText(_path+ "\\CHANGELOG.md").Trim();
CHANGELOG = log_text + "\r\n\r\n" + CHANGELOG;
RyFiles.WriteAllText(_path + "\\CHANGELOG.md", CHANGELOG);
RyQuickSQL mySQL = new RyQuickSQL("UpdateLogs");
var folder = System.IO.Path.GetDirectoryName(_ProjectPath);
mySQL.AddField("VerStr", Main_Version);
mySQL.AddField("LogText", log_text);
mySQL.AddField("LogJson", jarr.ToString());
mySQL.AddField("editTime", DateTime.Now.ToInt64());
if (db.Update(mySQL, "VerStr=@VerStr") == 0)
{
mySQL.AddField("addTime", DateTime.Now.ToInt64());
db.Insert(mySQL);
}
SaveUpdateLog(true);
LvUpdateLogList.ClearObjects();
var ds_logs = db.ReadData("select * from UpdateLogs order by addTime desc");
if (ds_logs.HaveData())
{
List<UpLogItem> list = new List<UpLogItem>();
for (int i = 0; i < ds_logs.RowCount(); i++)
{
var row = ds_logs.GetRow(i);
list.Add(new UpLogItem()
{
Version = row["VerStr"].ToString(),
LogText = row["LogText"].ToString(),
AddTime = row["addTime"].ToInt64(),
});
}
LvUpdateLogList.AddObjects(list);
}
ds_logs?.Dispose();
MessageBox.Show("发布成功。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
#endregion
}
db.Free();
}
}
}
class UpLogItem
{
public string Version { get; set; } = "";
public string LogText { get; set; } = "";
public long AddTime { get; set; } = 0;
}
}
@@ -126,4 +126,7 @@
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>285, 17</value>
</metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>285, 17</value>
</metadata>
</root>
+13 -9
View File
@@ -32,7 +32,7 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmStrCount));
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
this.TxtFromCode = new ryControls.Controls.RichTextBox2();
this.highlightEditor1 = new ryControls.HighlightEditor();
this.htmlPanel1 = new TheArtOfDev.HtmlRenderer.WinForms.HtmlPanel();
this.SuspendLayout();
//
// menuRight1
@@ -59,22 +59,26 @@
this.TxtFromCode.WordWrap = false;
this.TxtFromCode.TextChanged += new System.EventHandler(this.TxtFromCode_TextChanged);
//
// highlightEditor1
// htmlPanel1
//
this.highlightEditor1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.htmlPanel1.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.highlightEditor1.Location = new System.Drawing.Point(12, 216);
this.highlightEditor1.Name = "highlightEditor1";
this.highlightEditor1.Size = new System.Drawing.Size(812, 258);
this.highlightEditor1.TabIndex = 31;
this.htmlPanel1.AutoScroll = true;
this.htmlPanel1.BackColor = System.Drawing.SystemColors.Window;
this.htmlPanel1.BaseStylesheet = null;
this.htmlPanel1.Cursor = System.Windows.Forms.Cursors.IBeam;
this.htmlPanel1.Location = new System.Drawing.Point(12, 216);
this.htmlPanel1.Name = "htmlPanel1";
this.htmlPanel1.Size = new System.Drawing.Size(812, 258);
this.htmlPanel1.TabIndex = 32;
//
// FrmStrCount
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(836, 495);
this.Controls.Add(this.highlightEditor1);
this.Controls.Add(this.htmlPanel1);
this.Controls.Add(this.TxtFromCode);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmStrCount";
@@ -88,6 +92,6 @@
#endregion
private ryPaiban.Model.MenuRight menuRight1;
private ryControls.Controls.RichTextBox2 TxtFromCode;
private ryControls.HighlightEditor highlightEditor1;
private TheArtOfDev.HtmlRenderer.WinForms.HtmlPanel htmlPanel1;
}
}
+12 -12
View File
@@ -1,4 +1,5 @@
using ryControls;
using ryCommon;
using ryControls;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -16,23 +17,22 @@ namespace 开发辅助工具.Tools
public FrmStrCount()
{
InitializeComponent();
highlightEditor1.ReadOnly = true;
}
private void TxtFromCode_TextChanged(object sender, EventArgs e)
{
Manager.TotalCount totalCount = new Manager.TotalCount();
string fromText = TxtFromCode.Text;
int iCount = totalCount.GetByteLength(fromText, out int HanziCount, out int engCount, out int NumCount);
var count_info = fromText.GetCountInfo();
string resultStr;
resultStr = "字节数: " + iCount.ToString() + "个(汉字算两个字符)";
resultStr += "\r\n字数: " + fromText.Length.ToString() + "个(汉字算一个字符)";
resultStr += "\r\n汉字数: " + HanziCount.ToString() + "个(汉字算一个字符)";
resultStr += "\r\n英文数量: " + engCount.ToString() + "个";
resultStr += "\r\n数字数量: " + NumCount.ToString() + "个";
highlightEditor1.ReadOnly = false;
highlightEditor1.Text = resultStr;
highlightEditor1.ReadOnly = true;
resultStr =System.Web.HttpUtility.HtmlEncode("字节数: ") + "<span style='color:blue'><strong>" + count_info.TotalByteCount + "</strong></span>个(<span style='color:gray'>汉字算两个字符</span>)";
resultStr += "<br>"+ System.Web.HttpUtility.HtmlEncode("全部字数: ") + "<span style='color:blue'><strong>" + fromText.Length + "</strong></span>个(<span style='color:gray'>汉字算一个字符</span>)";
resultStr += "<br>" + System.Web.HttpUtility.HtmlEncode("可见字数: ") + "<span style='color:blue'><strong>" + count_info.VisibleTotalCount + "</strong></span>个(<span style='color:gray'>汉字算一个字符</span>)";
resultStr += "<br>" + System.Web.HttpUtility.HtmlEncode("汉字数: ") + "<span style='color:blue'><strong>" + count_info.HanziCount + "</strong></span>个(<span style='color:gray'>汉字算一个字符</span>)";
resultStr += "<br>" + System.Web.HttpUtility.HtmlEncode("英文单词数量: ") + "<span style='color:blue'><strong>" + count_info.EngWordCount + "</strong></span>个";
resultStr += "<br>" + System.Web.HttpUtility.HtmlEncode("英文字母数量: ") + "<span style='color:blue'><strong>" + count_info.EngLetterCount + "</strong></span>个";
resultStr += "<br>" + System.Web.HttpUtility.HtmlEncode("数字组数量: ") + "<span style='color:blue'><strong>" + count_info.NumWordCount + "</strong></span>个(<span style='color:gray'>一串数字算一个字符</span>)";
resultStr += "<br>" + System.Web.HttpUtility.HtmlEncode("数字字符数量: ") + "<span style='color:blue'><strong>" + count_info.NumCount + "</strong></span>个(<span style='color:gray'>一个数字算一个字符</span>)";
htmlPanel1.Text = resultStr;
}
private void FrmStrCount_Load(object sender, EventArgs e)
+2 -2
View File
@@ -34,7 +34,7 @@
this.RbStrToQuickJS = new System.Windows.Forms.RadioButton();
this.RbStrToASP = new System.Windows.Forms.RadioButton();
this.TxtFromCode = new ryControls.Controls.RichTextBox2();
this.highlightEditor1 = new ryControls.HighlightEditor();
this.highlightEditor1 = new ScintillaNETV2.Highlight.HighlightEditor();
this.SuspendLayout();
//
// RbStrToC
@@ -137,6 +137,6 @@
private System.Windows.Forms.RadioButton RbStrToQuickJS;
private System.Windows.Forms.RadioButton RbStrToASP;
private ryControls.Controls.RichTextBox2 TxtFromCode;
private ryControls.HighlightEditor highlightEditor1;
private ScintillaNETV2.Highlight.HighlightEditor highlightEditor1;
}
}
+271 -107
View File
@@ -35,7 +35,7 @@
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.RichHtml = new ryControls.Controls.RichTextBox2();
this.tabPage12 = new System.Windows.Forms.TabPage();
this.highlightEditor1 = new ryControls.HighlightEditor();
this.highlightEditor1 = new ScintillaNETV2.Highlight.HighlightEditor();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.RichCookie = new ryControls.Controls.RichTextBox2();
this.tabPage5 = new System.Windows.Forms.TabPage();
@@ -46,18 +46,19 @@
this.extendedWebBrowser1 = new ExtendedWebBrowser2.ExtendedWebBrowser();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.TxtPost = new ryControls.HighlightEditor();
this.label1 = new System.Windows.Forms.Label();
this.TxtPost = new ScintillaNETV2.Highlight.HighlightEditor();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.TxtCookie = new ryControls.Controls.RichTextBox2();
this.tabPage7 = new System.Windows.Forms.TabPage();
this.TxtInputHeader = new ryControls.Controls.RichTextBox2();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.CbbReferer = new ryControls.RyComboBox();
this.CbbIp = new ryControls.RyComboBox();
this.CbbContentType = new ryControls.ComboBoxEx2();
this.CbbUserAgent = new ryControls.ComboBoxEx2();
this.CbbReferer = new ryControls.TextBoxEx2();
this.CbbIp = new ryControls.TextBoxEx2();
this.label6 = new System.Windows.Forms.Label();
this.CbbUserAgent = new ryControls.RyComboBox();
this.label7 = new System.Windows.Forms.Label();
this.CbbContentType = new ryControls.RyComboBox();
this.label11 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
@@ -81,14 +82,22 @@
this.设置备注ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuRight1 = new ryPaiban.Model.MenuRight(this.components);
this.TxtUrl = new ryControls.TextBoxEx2();
this.BtnCtreateCShape = new ryControls.ButtonEx();
this.BtnRunHtml = new ryControls.ButtonEx();
this.objectListView2 = new BrightIdeasSoftware.ObjectListView();
this.objectListView2 = new BrightIdeasSoftware.FastObjectListView();
this.OlvUrl = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.BtnMore = new ryControls.SuperPictureBox();
this.MenuMore = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.BtnSetting = new ryControls.SuperPictureBox();
this.BtnShare = new ryControls.SuperPictureBox();
this.RbHead = new System.Windows.Forms.RadioButton();
this.MenuSetting = new System.Windows.Forms.ContextMenuStrip(this.components);
this.生成代码ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.生成curl代码ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
this.导出当前设置ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.导入当前设置ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tabControl2.SuspendLayout();
this.tabPage3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
@@ -106,6 +115,9 @@
this.contextMenuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.objectListView2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.BtnMore)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.BtnSetting)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.BtnShare)).BeginInit();
this.MenuSetting.SuspendLayout();
this.SuspendLayout();
//
// tabControl2
@@ -122,7 +134,7 @@
this.tabControl2.Location = new System.Drawing.Point(8, 288);
this.tabControl2.Name = "tabControl2";
this.tabControl2.SelectedIndex = 0;
this.tabControl2.Size = new System.Drawing.Size(889, 332);
this.tabControl2.Size = new System.Drawing.Size(896, 332);
this.tabControl2.TabIndex = 108;
//
// tabPage3
@@ -132,7 +144,7 @@
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
this.tabPage3.Size = new System.Drawing.Size(881, 306);
this.tabPage3.Size = new System.Drawing.Size(888, 306);
this.tabPage3.TabIndex = 0;
this.tabPage3.Text = "HTML";
this.tabPage3.UseVisualStyleBackColor = true;
@@ -142,7 +154,7 @@
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox1.Location = new System.Drawing.Point(3, 3);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(875, 300);
this.pictureBox1.Size = new System.Drawing.Size(882, 300);
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;
this.pictureBox1.Visible = false;
@@ -158,10 +170,11 @@
this.RichHtml.Location = new System.Drawing.Point(3, 3);
this.RichHtml.Name = "RichHtml";
this.RichHtml.OnlyInputText = true;
this.RichHtml.Size = new System.Drawing.Size(875, 300);
this.RichHtml.ReadOnly = true;
this.RichHtml.Size = new System.Drawing.Size(882, 300);
this.RichHtml.TabIndex = 3;
this.RichHtml.Text = "";
this.RichHtml.WordWrap = false;
this.RichHtml.WordWrap = true;
//
// tabPage12
//
@@ -169,7 +182,7 @@
this.tabPage12.Location = new System.Drawing.Point(4, 22);
this.tabPage12.Name = "tabPage12";
this.tabPage12.Padding = new System.Windows.Forms.Padding(3);
this.tabPage12.Size = new System.Drawing.Size(881, 306);
this.tabPage12.Size = new System.Drawing.Size(888, 306);
this.tabPage12.TabIndex = 4;
this.tabPage12.Text = "HTML格式化";
this.tabPage12.UseVisualStyleBackColor = true;
@@ -177,6 +190,7 @@
// highlightEditor1
//
this.highlightEditor1.AutoMark = true;
this.highlightEditor1.CurHighliteLang = VPKSoft2.ScintillaLexers.LexerEnumerations.LexerType.Text;
this.highlightEditor1.Dock = System.Windows.Forms.DockStyle.Fill;
this.highlightEditor1.Font = new System.Drawing.Font("Consolas", 11.25F);
this.highlightEditor1.LineNumberOn = true;
@@ -184,7 +198,7 @@
this.highlightEditor1.Name = "highlightEditor1";
this.highlightEditor1.ReadOnly = true;
this.highlightEditor1.SelectedText = "";
this.highlightEditor1.Size = new System.Drawing.Size(875, 300);
this.highlightEditor1.Size = new System.Drawing.Size(882, 300);
this.highlightEditor1.TabIndex = 0;
this.highlightEditor1.UseCustomGotoLine = false;
this.highlightEditor1.UseCustomShowFindReplace = false;
@@ -195,7 +209,7 @@
this.tabPage4.Location = new System.Drawing.Point(4, 22);
this.tabPage4.Name = "tabPage4";
this.tabPage4.Padding = new System.Windows.Forms.Padding(3);
this.tabPage4.Size = new System.Drawing.Size(881, 306);
this.tabPage4.Size = new System.Drawing.Size(888, 306);
this.tabPage4.TabIndex = 1;
this.tabPage4.Text = "Cookie";
this.tabPage4.UseVisualStyleBackColor = true;
@@ -211,10 +225,11 @@
this.RichCookie.Location = new System.Drawing.Point(3, 3);
this.RichCookie.Name = "RichCookie";
this.RichCookie.OnlyInputText = true;
this.RichCookie.Size = new System.Drawing.Size(875, 300);
this.RichCookie.ReadOnly = true;
this.RichCookie.Size = new System.Drawing.Size(882, 300);
this.RichCookie.TabIndex = 4;
this.RichCookie.Text = "";
this.RichCookie.WordWrap = false;
this.RichCookie.WordWrap = true;
//
// tabPage5
//
@@ -222,7 +237,7 @@
this.tabPage5.Location = new System.Drawing.Point(4, 22);
this.tabPage5.Name = "tabPage5";
this.tabPage5.Padding = new System.Windows.Forms.Padding(3);
this.tabPage5.Size = new System.Drawing.Size(881, 306);
this.tabPage5.Size = new System.Drawing.Size(888, 306);
this.tabPage5.TabIndex = 2;
this.tabPage5.Text = "Status";
this.tabPage5.UseVisualStyleBackColor = true;
@@ -238,10 +253,11 @@
this.RichStatus.Location = new System.Drawing.Point(3, 3);
this.RichStatus.Name = "RichStatus";
this.RichStatus.OnlyInputText = true;
this.RichStatus.Size = new System.Drawing.Size(875, 300);
this.RichStatus.ReadOnly = true;
this.RichStatus.Size = new System.Drawing.Size(882, 300);
this.RichStatus.TabIndex = 5;
this.RichStatus.Text = "";
this.RichStatus.WordWrap = false;
this.RichStatus.WordWrap = true;
//
// tabPage6
//
@@ -249,7 +265,7 @@
this.tabPage6.Location = new System.Drawing.Point(4, 22);
this.tabPage6.Name = "tabPage6";
this.tabPage6.Padding = new System.Windows.Forms.Padding(3);
this.tabPage6.Size = new System.Drawing.Size(881, 306);
this.tabPage6.Size = new System.Drawing.Size(888, 306);
this.tabPage6.TabIndex = 3;
this.tabPage6.Text = "Header";
this.tabPage6.UseVisualStyleBackColor = true;
@@ -265,10 +281,11 @@
this.RichHeader.Location = new System.Drawing.Point(3, 3);
this.RichHeader.Name = "RichHeader";
this.RichHeader.OnlyInputText = true;
this.RichHeader.Size = new System.Drawing.Size(875, 300);
this.RichHeader.ReadOnly = true;
this.RichHeader.Size = new System.Drawing.Size(882, 300);
this.RichHeader.TabIndex = 6;
this.RichHeader.Text = "";
this.RichHeader.WordWrap = false;
this.RichHeader.WordWrap = true;
//
// tabPreview
//
@@ -276,7 +293,7 @@
this.tabPreview.Location = new System.Drawing.Point(4, 22);
this.tabPreview.Name = "tabPreview";
this.tabPreview.Padding = new System.Windows.Forms.Padding(3);
this.tabPreview.Size = new System.Drawing.Size(881, 306);
this.tabPreview.Size = new System.Drawing.Size(888, 306);
this.tabPreview.TabIndex = 5;
this.tabPreview.Text = "预览";
this.tabPreview.UseVisualStyleBackColor = true;
@@ -289,7 +306,7 @@
this.extendedWebBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
this.extendedWebBrowser1.Name = "extendedWebBrowser1";
this.extendedWebBrowser1.ScriptErrorsSuppressed = true;
this.extendedWebBrowser1.Size = new System.Drawing.Size(875, 300);
this.extendedWebBrowser1.Size = new System.Drawing.Size(882, 300);
this.extendedWebBrowser1.TabIndex = 2;
//
// tabControl1
@@ -302,27 +319,42 @@
this.tabControl1.Location = new System.Drawing.Point(10, 171);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(887, 115);
this.tabControl1.Size = new System.Drawing.Size(894, 115);
this.tabControl1.TabIndex = 6;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.label1);
this.tabPage1.Controls.Add(this.TxtPost);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(879, 89);
this.tabPage1.Size = new System.Drawing.Size(886, 89);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Post数据";
this.tabPage1.UseVisualStyleBackColor = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.Color.White;
this.label1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.ForeColor = System.Drawing.Color.Gray;
this.label1.Location = new System.Drawing.Point(314, 39);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(189, 14);
this.label1.TabIndex = 4;
this.label1.Text = "当前模式下无法修改Post数据";
this.label1.Visible = false;
//
// TxtPost
//
this.TxtPost.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.TxtPost.AutoMark = true;
this.TxtPost.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TxtPost.BorderStyle = ScintillaNETV2.BorderStyle.FixedSingle;
this.TxtPost.CurHighliteLang = VPKSoft2.ScintillaLexers.LexerEnumerations.LexerType.Text;
this.TxtPost.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.TxtPost.ImeMode = System.Windows.Forms.ImeMode.Close;
this.TxtPost.LineNumberOn = true;
@@ -330,10 +362,11 @@
this.TxtPost.Name = "TxtPost";
this.TxtPost.ReadOnly = false;
this.TxtPost.SelectedText = "";
this.TxtPost.Size = new System.Drawing.Size(873, 83);
this.TxtPost.Size = new System.Drawing.Size(880, 83);
this.TxtPost.TabIndex = 3;
this.TxtPost.UseCustomGotoLine = false;
this.TxtPost.UseCustomShowFindReplace = false;
this.TxtPost.EnabledChanged += new System.EventHandler(this.TxtPost_EnabledChanged);
this.TxtPost.TextChanged += new System.EventHandler(this.TxtPost_TextChanged);
this.TxtPost.DoubleClick += new System.EventHandler(this.TxtPost_DoubleClick);
//
@@ -343,7 +376,7 @@
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(879, 89);
this.tabPage2.Size = new System.Drawing.Size(886, 89);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Cookie";
this.tabPage2.UseVisualStyleBackColor = true;
@@ -361,10 +394,10 @@
this.TxtCookie.Location = new System.Drawing.Point(2, 3);
this.TxtCookie.Name = "TxtCookie";
this.TxtCookie.OnlyInputText = true;
this.TxtCookie.Size = new System.Drawing.Size(862, 83);
this.TxtCookie.Size = new System.Drawing.Size(881, 83);
this.TxtCookie.TabIndex = 6;
this.TxtCookie.Text = "";
this.TxtCookie.WordWrap = false;
this.TxtCookie.WordWrap = true;
this.TxtCookie.TextChanged += new System.EventHandler(this.TxtCookie_TextChanged);
this.TxtCookie.DoubleClick += new System.EventHandler(this.TxtCookie_DoubleClick);
//
@@ -374,7 +407,7 @@
this.tabPage7.Location = new System.Drawing.Point(4, 22);
this.tabPage7.Name = "tabPage7";
this.tabPage7.Padding = new System.Windows.Forms.Padding(3);
this.tabPage7.Size = new System.Drawing.Size(879, 89);
this.tabPage7.Size = new System.Drawing.Size(886, 89);
this.tabPage7.TabIndex = 2;
this.tabPage7.Text = "Header";
this.tabPage7.UseVisualStyleBackColor = true;
@@ -392,10 +425,10 @@
this.TxtInputHeader.Location = new System.Drawing.Point(2, 3);
this.TxtInputHeader.Name = "TxtInputHeader";
this.TxtInputHeader.OnlyInputText = true;
this.TxtInputHeader.Size = new System.Drawing.Size(862, 83);
this.TxtInputHeader.Size = new System.Drawing.Size(881, 83);
this.TxtInputHeader.TabIndex = 7;
this.TxtInputHeader.Text = "";
this.TxtInputHeader.WordWrap = false;
this.TxtInputHeader.WordWrap = true;
this.TxtInputHeader.TextChanged += new System.EventHandler(this.TxtInputHeader_TextChanged);
this.TxtInputHeader.DoubleClick += new System.EventHandler(this.TxtCookie_DoubleClick);
//
@@ -403,12 +436,12 @@
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.CbbContentType);
this.groupBox2.Controls.Add(this.CbbUserAgent);
this.groupBox2.Controls.Add(this.CbbReferer);
this.groupBox2.Controls.Add(this.CbbIp);
this.groupBox2.Controls.Add(this.label6);
this.groupBox2.Controls.Add(this.CbbUserAgent);
this.groupBox2.Controls.Add(this.label7);
this.groupBox2.Controls.Add(this.CbbContentType);
this.groupBox2.Controls.Add(this.label11);
this.groupBox2.Controls.Add(this.label8);
this.groupBox2.Location = new System.Drawing.Point(10, 90);
@@ -418,29 +451,91 @@
this.groupBox2.TabStop = false;
this.groupBox2.Text = "高级配置";
//
// CbbContentType
//
this.CbbContentType.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.CbbContentType.ButtonRoundBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.CbbContentType.EmptyText = "";
this.CbbContentType.Items.Add("text/html");
this.CbbContentType.Items.Add("application/x-www-form-urlencoded");
this.CbbContentType.Items.Add("application/json");
this.CbbContentType.Items.Add("text/json");
this.CbbContentType.Location = new System.Drawing.Point(86, 18);
this.CbbContentType.MaxPopupHeight = 0;
this.CbbContentType.MaxPopupWidth = 250;
this.CbbContentType.Name = "CbbContentType";
this.CbbContentType.SelectedIndex = -1;
this.CbbContentType.SelectedItem = null;
this.CbbContentType.Size = new System.Drawing.Size(205, 23);
this.CbbContentType.TabIndex = 304;
//
// CbbUserAgent
//
this.CbbUserAgent.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CbbUserAgent.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.CbbUserAgent.ButtonRoundBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.CbbUserAgent.EmptyText = "";
this.CbbUserAgent.Items.Add("Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)");
this.CbbUserAgent.Items.Add("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0");
this.CbbUserAgent.Items.Add("Mozilla/4.0 (compatible; MSIE 8.0; Windows NT6.0)");
this.CbbUserAgent.Items.Add("Opera/9.27 (Windows NT 5.2; U; zh-cn)");
this.CbbUserAgent.Location = new System.Drawing.Point(360, 18);
this.CbbUserAgent.MaxPopupHeight = 0;
this.CbbUserAgent.MaxPopupWidth = 0;
this.CbbUserAgent.Name = "CbbUserAgent";
this.CbbUserAgent.SelectedIndex = -1;
this.CbbUserAgent.SelectedItem = null;
this.CbbUserAgent.Size = new System.Drawing.Size(520, 23);
this.CbbUserAgent.TabIndex = 303;
//
// CbbReferer
//
this.CbbReferer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CbbReferer.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbReferer.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbReferer.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbReferer.FormattingEnabled = true;
this.CbbReferer.Location = new System.Drawing.Point(360, 45);
this.CbbReferer.BackColor = System.Drawing.Color.White;
this.CbbReferer.EmptyText = "引用页(可选)";
this.CbbReferer.ImeMode = System.Windows.Forms.ImeMode.Close;
this.CbbReferer.Location = new System.Drawing.Point(360, 46);
this.CbbReferer.LongTime = 2000;
this.CbbReferer.MaxLength = 999999999;
this.CbbReferer.MaxUndoRedoSteps = 50;
this.CbbReferer.Multiline = false;
this.CbbReferer.Name = "CbbReferer";
this.CbbReferer.Size = new System.Drawing.Size(520, 24);
this.CbbReferer.TabIndex = 6;
this.CbbReferer.OnlyNumeric = false;
this.CbbReferer.PasswordChar = '\0';
this.CbbReferer.ReadOnly = false;
this.CbbReferer.SelectedText = "";
this.CbbReferer.SelectionLength = 0;
this.CbbReferer.SelectionStart = 0;
this.CbbReferer.Size = new System.Drawing.Size(520, 23);
this.CbbReferer.TabIndex = 302;
this.CbbReferer.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.CbbReferer.ToolTip = "";
this.CbbReferer.WordWrap = true;
//
// CbbIp
//
this.CbbIp.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbIp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbIp.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbIp.FormattingEnabled = true;
this.CbbIp.BackColor = System.Drawing.Color.White;
this.CbbIp.EmptyText = "代理IP可为空";
this.CbbIp.ImeMode = System.Windows.Forms.ImeMode.Close;
this.CbbIp.Location = new System.Drawing.Point(86, 46);
this.CbbIp.LongTime = 2000;
this.CbbIp.MaxLength = 999999999;
this.CbbIp.MaxUndoRedoSteps = 50;
this.CbbIp.Multiline = false;
this.CbbIp.Name = "CbbIp";
this.CbbIp.Size = new System.Drawing.Size(205, 22);
this.CbbIp.TabIndex = 5;
this.CbbIp.OnlyNumeric = false;
this.CbbIp.PasswordChar = '\0';
this.CbbIp.ReadOnly = false;
this.CbbIp.SelectedText = "";
this.CbbIp.SelectionLength = 0;
this.CbbIp.SelectionStart = 0;
this.CbbIp.Size = new System.Drawing.Size(205, 23);
this.CbbIp.TabIndex = 301;
this.CbbIp.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.CbbIp.ToolTip = "";
this.CbbIp.WordWrap = true;
//
// label6
//
@@ -451,24 +546,6 @@
this.label6.TabIndex = 4;
this.label6.Text = "代理IP";
//
// CbbUserAgent
//
this.CbbUserAgent.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CbbUserAgent.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbUserAgent.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbUserAgent.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbUserAgent.FormattingEnabled = true;
this.CbbUserAgent.Items.AddRange(new object[] {
"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)",
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0",
"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT6.0)",
"Opera/9.27 (Windows NT 5.2; U; zh-cn)"});
this.CbbUserAgent.Location = new System.Drawing.Point(360, 18);
this.CbbUserAgent.Name = "CbbUserAgent";
this.CbbUserAgent.Size = new System.Drawing.Size(520, 22);
this.CbbUserAgent.TabIndex = 300;
//
// label7
//
this.label7.AutoSize = true;
@@ -478,22 +555,6 @@
this.label7.TabIndex = 2;
this.label7.Text = "UserAgent";
//
// CbbContentType
//
this.CbbContentType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbContentType.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbContentType.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbContentType.FormattingEnabled = true;
this.CbbContentType.Items.AddRange(new object[] {
"text/html",
"application/x-www-form-urlencoded",
"application/json",
"text/json"});
this.CbbContentType.Location = new System.Drawing.Point(86, 18);
this.CbbContentType.Name = "CbbContentType";
this.CbbContentType.Size = new System.Drawing.Size(205, 22);
this.CbbContentType.TabIndex = 1;
//
// label11
//
this.label11.AutoSize = true;
@@ -593,6 +654,7 @@
"10秒",
"5秒"});
this.CbbWriteTimeout.Location = new System.Drawing.Point(393, 18);
this.CbbWriteTimeout.MaxUndoRedoSteps = 50;
this.CbbWriteTimeout.Name = "CbbWriteTimeout";
this.CbbWriteTimeout.Size = new System.Drawing.Size(74, 22);
this.CbbWriteTimeout.TabIndex = 5;
@@ -620,6 +682,7 @@
"10秒",
"5秒"});
this.CbbTimeout.Location = new System.Drawing.Point(256, 18);
this.CbbTimeout.MaxUndoRedoSteps = 50;
this.CbbTimeout.Name = "CbbTimeout";
this.CbbTimeout.Size = new System.Drawing.Size(74, 22);
this.CbbTimeout.TabIndex = 3;
@@ -648,6 +711,7 @@
"Unicode",
"iso-8859-1"});
this.CbbEncoding.Location = new System.Drawing.Point(70, 18);
this.CbbEncoding.MaxUndoRedoSteps = 50;
this.CbbEncoding.Name = "CbbEncoding";
this.CbbEncoding.Size = new System.Drawing.Size(121, 22);
this.CbbEncoding.TabIndex = 1;
@@ -743,7 +807,9 @@
this.TxtUrl.EmptyText = "请填写请求url";
this.TxtUrl.ImeMode = System.Windows.Forms.ImeMode.Close;
this.TxtUrl.Location = new System.Drawing.Point(45, 6);
this.TxtUrl.LongTime = 2000;
this.TxtUrl.MaxLength = 999999999;
this.TxtUrl.MaxUndoRedoSteps = 50;
this.TxtUrl.Multiline = false;
this.TxtUrl.Name = "TxtUrl";
this.TxtUrl.OnlyNumeric = false;
@@ -761,21 +827,10 @@
this.TxtUrl.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TxtUrl_KeyDown);
this.TxtUrl.Leave += new System.EventHandler(this.TxtUrl_Leave);
//
// BtnCtreateCShape
//
this.BtnCtreateCShape.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnCtreateCShape.Location = new System.Drawing.Point(812, 6);
this.BtnCtreateCShape.Name = "BtnCtreateCShape";
this.BtnCtreateCShape.Size = new System.Drawing.Size(82, 26);
this.BtnCtreateCShape.TabIndex = 111;
this.BtnCtreateCShape.Text = "生成代码";
this.BtnCtreateCShape.UseVisualStyleBackColor = true;
this.BtnCtreateCShape.Click += new System.EventHandler(this.BtnCtreateCShape_Click);
//
// BtnRunHtml
//
this.BtnRunHtml.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnRunHtml.Location = new System.Drawing.Point(723, 6);
this.BtnRunHtml.Location = new System.Drawing.Point(735, 6);
this.BtnRunHtml.Name = "BtnRunHtml";
this.BtnRunHtml.Size = new System.Drawing.Size(82, 26);
this.BtnRunHtml.TabIndex = 104;
@@ -798,13 +853,14 @@
this.objectListView2.Location = new System.Drawing.Point(45, 30);
this.objectListView2.MultiSelect = false;
this.objectListView2.Name = "objectListView2";
this.objectListView2.RowHeight = 25;
this.objectListView2.ShowGroups = false;
this.objectListView2.ShowItemToolTips = true;
this.objectListView2.Size = new System.Drawing.Size(653, 323);
this.objectListView2.TabIndex = 113;
this.objectListView2.UseCompatibleStateImageBehavior = false;
this.objectListView2.UseHotItem = true;
this.objectListView2.View = System.Windows.Forms.View.Details;
this.objectListView2.VirtualMode = true;
this.objectListView2.Visible = false;
this.objectListView2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Table1_KeyDown);
this.objectListView2.Leave += new System.EventHandler(this.Table1_Leave);
@@ -840,15 +896,102 @@
this.MenuMore.Name = "MenuMore";
this.MenuMore.Size = new System.Drawing.Size(61, 4);
//
// BtnSetting
//
this.BtnSetting.Cursor = System.Windows.Forms.Cursors.Hand;
this.BtnSetting.Image = ((System.Drawing.Image)(resources.GetObject("BtnSetting.Image")));
this.BtnSetting.ImageDomain = null;
this.BtnSetting.ImageResFolder = null;
this.BtnSetting.Location = new System.Drawing.Point(823, 11);
this.BtnSetting.Name = "BtnSetting";
this.BtnSetting.Size = new System.Drawing.Size(20, 18);
this.BtnSetting.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.BtnSetting.TabIndex = 116;
this.BtnSetting.TabStop = false;
this.toolTip1.SetToolTip(this.BtnSetting, "更多选项");
this.BtnSetting.Click += new System.EventHandler(this.BtnSetting_Click);
//
// BtnShare
//
this.BtnShare.Cursor = System.Windows.Forms.Cursors.Hand;
this.BtnShare.Image = ((System.Drawing.Image)(resources.GetObject("BtnShare.Image")));
this.BtnShare.ImageDomain = null;
this.BtnShare.ImageResFolder = null;
this.BtnShare.Location = new System.Drawing.Point(849, 11);
this.BtnShare.Name = "BtnShare";
this.BtnShare.Size = new System.Drawing.Size(20, 18);
this.BtnShare.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.BtnShare.TabIndex = 117;
this.BtnShare.TabStop = false;
this.toolTip1.SetToolTip(this.BtnShare, "分享当前页面数据给别人");
this.BtnShare.Click += new System.EventHandler(this.BtnShare_Click);
//
// RbHead
//
this.RbHead.AutoSize = true;
this.RbHead.Location = new System.Drawing.Point(682, 10);
this.RbHead.Name = "RbHead";
this.RbHead.Size = new System.Drawing.Size(47, 16);
this.RbHead.TabIndex = 115;
this.RbHead.Text = "Head";
this.RbHead.UseVisualStyleBackColor = true;
this.RbHead.CheckedChanged += new System.EventHandler(this.RbHead_CheckedChanged);
//
// MenuSetting
//
this.MenuSetting.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.生成代码ToolStripMenuItem,
this.生成curl代码ToolStripMenuItem,
this.toolStripMenuItem2,
this.导出当前设置ToolStripMenuItem,
this.导入当前设置ToolStripMenuItem});
this.MenuSetting.Name = "MenuMore";
this.MenuSetting.Size = new System.Drawing.Size(185, 98);
//
// 生成代码ToolStripMenuItem
//
this.生成代码ToolStripMenuItem.Name = "生成代码ToolStripMenuItem";
this.生成代码ToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.生成代码ToolStripMenuItem.Text = "生成C#代码";
this.生成代码ToolStripMenuItem.Click += new System.EventHandler(this.生成代码ToolStripMenuItem_Click);
//
// 生成curl代码ToolStripMenuItem
//
this.生成curl代码ToolStripMenuItem.Name = "生成curl代码ToolStripMenuItem";
this.生成curl代码ToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.生成curl代码ToolStripMenuItem.Text = "生成curl代码";
this.生成curl代码ToolStripMenuItem.Click += new System.EventHandler(this.生成curl代码ToolStripMenuItem_Click);
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(181, 6);
//
// 导出当前设置ToolStripMenuItem
//
this.导出当前设置ToolStripMenuItem.Name = "导出当前设置ToolStripMenuItem";
this.导出当前设置ToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.导出当前设置ToolStripMenuItem.Text = "分享当前设置给别人";
this.导出当前设置ToolStripMenuItem.Click += new System.EventHandler(this.导出当前设置ToolStripMenuItem_Click);
//
// 导入当前设置ToolStripMenuItem
//
this.导入当前设置ToolStripMenuItem.Name = "导入当前设置ToolStripMenuItem";
this.导入当前设置ToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.导入当前设置ToolStripMenuItem.Text = "导入别人的分享链接";
this.导入当前设置ToolStripMenuItem.Click += new System.EventHandler(this.导入当前设置ToolStripMenuItem_Click);
//
// 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.BtnShare);
this.Controls.Add(this.BtnSetting);
this.Controls.Add(this.RbHead);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.BtnMore);
this.Controls.Add(this.TxtUrl);
this.Controls.Add(this.BtnCtreateCShape);
this.Controls.Add(this.tabControl2);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
@@ -857,10 +1000,18 @@
this.Controls.Add(this.RbGet);
this.Controls.Add(this.label2);
this.Controls.Add(this.objectListView2);
this.DockAreas = ((WeifenLuo.WinFormsUI.Docking.DockAreas)((((((WeifenLuo.WinFormsUI.Docking.DockAreas.Float | WeifenLuo.WinFormsUI.Docking.DockAreas.DockLeft)
| WeifenLuo.WinFormsUI.Docking.DockAreas.DockRight)
| WeifenLuo.WinFormsUI.Docking.DockAreas.DockTop)
| WeifenLuo.WinFormsUI.Docking.DockAreas.DockBottom)
| WeifenLuo.WinFormsUI.Docking.DockAreas.Document)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmWebGet";
this.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.Unknown;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
this.TabPageContextMenuStrip = this.menuRight1;
this.Text = "网页抓取工具";
this.Activated += new System.EventHandler(this.FrmWebGet_Activated);
this.Load += new System.EventHandler(this.FrmWebGet_Load);
this.Click += new System.EventHandler(this.FrmWebGet_Click);
this.tabControl2.ResumeLayout(false);
@@ -873,6 +1024,7 @@
this.tabPreview.ResumeLayout(false);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.tabPage7.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
@@ -882,6 +1034,9 @@
this.contextMenuStrip1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.objectListView2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.BtnMore)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.BtnSetting)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.BtnShare)).EndInit();
this.MenuSetting.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@@ -896,12 +1051,8 @@
private System.Windows.Forms.TabPage tabPage5;
private System.Windows.Forms.TabPage tabPage6;
private System.Windows.Forms.GroupBox groupBox2;
private ryControls.RyComboBox CbbReferer;
private ryControls.RyComboBox CbbIp;
private System.Windows.Forms.Label label6;
private ryControls.RyComboBox CbbUserAgent;
private System.Windows.Forms.Label label7;
private ryControls.RyComboBox CbbContentType;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.GroupBox groupBox1;
@@ -919,7 +1070,6 @@
private ryControls.TextBoxEx2 TxtUrl;
private System.Windows.Forms.Label label2;
private ryPaiban.Model.MenuRight menuRight1;
private ryControls.ButtonEx BtnCtreateCShape;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
@@ -930,7 +1080,7 @@
private ExtendedWebBrowser2.ExtendedWebBrowser extendedWebBrowser1;
private System.Windows.Forms.CheckBox ChkHtmlPreview;
private System.Windows.Forms.CheckBox ChkNoPreview;
private BrightIdeasSoftware.ObjectListView objectListView2;
private BrightIdeasSoftware.FastObjectListView objectListView2;
private BrightIdeasSoftware.OLVColumn OlvUrl;
private BrightIdeasSoftware.OLVColumn OlvName;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
@@ -942,10 +1092,24 @@
private System.Windows.Forms.ToolStripMenuItem 删除该项ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem 设置备注ToolStripMenuItem;
private ryControls.HighlightEditor highlightEditor1;
private ScintillaNETV2.Highlight.HighlightEditor highlightEditor1;
private ryControls.SuperPictureBox BtnMore;
private System.Windows.Forms.ContextMenuStrip MenuMore;
private System.Windows.Forms.ToolTip toolTip1;
private ryControls.HighlightEditor TxtPost;
private ScintillaNETV2.Highlight.HighlightEditor TxtPost;
private System.Windows.Forms.RadioButton RbHead;
private ryControls.SuperPictureBox BtnSetting;
private System.Windows.Forms.ContextMenuStrip MenuSetting;
private System.Windows.Forms.ToolStripMenuItem 生成代码ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 导出当前设置ToolStripMenuItem;
public System.Windows.Forms.ToolStripMenuItem 导入当前设置ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem2;
private ryControls.SuperPictureBox BtnShare;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ToolStripMenuItem 生成curl代码ToolStripMenuItem;
private ryControls.TextBoxEx2 CbbIp;
private ryControls.TextBoxEx2 CbbReferer;
private ryControls.ComboBoxEx2 CbbUserAgent;
private ryControls.ComboBoxEx2 CbbContentType;
}
}
Loaded 100 of 349 files, more files were not shown because too many files have changed in this diff. Show more