Commit a44d0cb9 authored by JoyJ's avatar JoyJ

update version

parent 1de76256
Pipeline #8988 failed with stage
......@@ -17,7 +17,7 @@ build_dex:
- cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" DataEditorX.sln /p:Configuration=Release /p:Platform="Any CPU" /p:OutDir=$PWD/output/ /p:TargetFrameworkVersion=v4.6
- mkdir -p dist/releases
- cd output
- 7z a -mx9 ../dist/releases/DataEditorX-3.0.1.0.zip ./*
- 7z a -mx9 ../dist/releases/DataEditorX-4.0.0.0.zip ./*
- cd ..
- copy DataEditorX/readme.txt dist/version.txt
......
......@@ -71,7 +71,7 @@ private void InitializeComponent()
this.host = new System.Windows.Forms.Integration.ElementHost();
this.editor = new ICSharpCode.AvalonEdit.TextEditor();
this.lbTooltip = new System.Windows.Forms.Label();
this.setCodeEditorFontToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_CEFont = new System.Windows.Forms.ToolStripMenuItem();
this.mainMenu.SuspendLayout();
this.SuspendLayout();
//
......@@ -142,7 +142,7 @@ private void InitializeComponent()
this.menuitem_find,
this.menuitem_replace,
this.menuitem_tooltipFont,
this.setCodeEditorFontToolStripMenuItem});
this.menuitem_CEFont});
this.menuitem_setting.Name = "menuitem_setting";
this.menuitem_setting.Size = new System.Drawing.Size(75, 20);
this.menuitem_setting.Text = "Settings(&S)";
......@@ -268,12 +268,12 @@ private void InitializeComponent()
this.lbTooltip.TabIndex = 6;
this.lbTooltip.MouseMove += new System.Windows.Forms.MouseEventHandler(this.lbTooltip_MouseMove);
//
// setCodeEditorFontToolStripMenuItem
// menuitem_CEFont
//
this.setCodeEditorFontToolStripMenuItem.Name = "setCodeEditorFontToolStripMenuItem";
this.setCodeEditorFontToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.setCodeEditorFontToolStripMenuItem.Text = "Set CodeEditor Font";
this.setCodeEditorFontToolStripMenuItem.Click += new System.EventHandler(this.setCodeEditorFontToolStripMenuItem_Click);
this.menuitem_CEFont.Name = "menuitem_CEFont";
this.menuitem_CEFont.Size = new System.Drawing.Size(184, 22);
this.menuitem_CEFont.Text = "Set CodeEditor Font";
this.menuitem_CEFont.Click += new System.EventHandler(this.setCodeEditorFontToolStripMenuItem_Click);
//
// CodeEditForm_Avalon
//
......@@ -548,6 +548,6 @@ public double Priority
ICSharpCode.AvalonEdit.TextEditor editor;
private Label lbTooltip;
private ToolStripMenuItem menuitem_tooltipFont;
private ToolStripMenuItem setCodeEditorFontToolStripMenuItem;
private ToolStripMenuItem menuitem_CEFont;
}
}
......@@ -69,9 +69,36 @@ void InitForm()
editor.WordWrap = DEXConfig.ReadBoolean(DEXConfig.TAG_WORDWRAP);
editor.Background = System.Windows.Media.Brushes.Black;
editor.Foreground = System.Windows.Media.Brushes.GhostWhite;
editor.AllowDrop = true;
editor.PreviewDragEnter += Editor_DragEnter;
this.RefreshHighlighting();
}
private void Editor_DragEnter(object sender, System.Windows.DragEventArgs e)
{
try
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
{
var data = e.Data.GetData(DataFormats.FileDrop);
string[] files = (string[])data;
(this.DockPanel.Parent as MainForm).Open(files[0]);
SendKeys.Send("{ESC}");
}
}
catch { }
try
{
if (e.Data.GetDataPresent(DataFormats.Text))
{
string file = (string)e.Data.GetData(DataFormats.Text);
(this.DockPanel.Parent as MainForm).Open(file);
SendKeys.Send("{ESC}");
}
}
catch { }
}
private void Editor_MouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
{
if ((Control.ModifierKeys & Keys.Control) == Keys.Control)
......
......@@ -2210,11 +2210,12 @@ private void menuitem_language_Click(object sender, EventArgs e)
private void OnDragDrop(object sender, DragEventArgs e)
{
string[] drops = (string[])e.Data.GetData(DataFormats.FileDrop);
List<string> files = new List<string>();
if (drops == null)
{
return;
string file = (string)e.Data.GetData(DataFormats.Text);
drops = new string[1] { file };
}
List<string> files = new List<string>();
foreach (string file in drops)
{
if (Directory.Exists(file))
......@@ -2222,8 +2223,11 @@ private void OnDragDrop(object sender, DragEventArgs e)
files.AddRange(Directory.EnumerateFiles(file, "*.cdb", SearchOption.AllDirectories));
files.AddRange(Directory.EnumerateFiles(file, "*.lua", SearchOption.AllDirectories));
}
else if (File.Exists(file))
{
files.Add(file);
}
}
if (files.Count > 5)
{
if (!MyMsg.Question(LMSG.IfOpenLotsOfFile))
......
......@@ -67,6 +67,7 @@ private void InitializeComponent()
//
// dockPanel
//
this.dockPanel.AllowDrop = true;
this.dockPanel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.dockPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.dockPanel.DockBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(238)))), ((int)(((byte)(238)))), ((int)(((byte)(242)))));
......@@ -292,6 +293,8 @@ private void InitializeComponent()
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "MainForm";
this.Load += new System.EventHandler(this.MainForm_Load);
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.MainForm_DragDrop);
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.MainForm_DragEnter);
this.mainMenu.ResumeLayout(false);
this.mainMenu.PerformLayout();
this.ResumeLayout(false);
......
......@@ -10,6 +10,7 @@
using DataEditorX.Core;
using DataEditorX.Language;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Windows.Forms;
......@@ -578,6 +579,11 @@ private void bgWorker1_RunWorkerCompleted(object sender, System.ComponentModel.R
#endregion
private void dockPanel_DragEnter(object sender, DragEventArgs e)
{
e.Effect = DragDropEffects.All;
}
private void dockPanel_DragDrop(object sender, DragEventArgs e)
{
string[] files = e.Data.GetData(DataFormats.FileDrop) as string[];
if (files != null)
......@@ -587,9 +593,51 @@ private void dockPanel_DragEnter(object sender, DragEventArgs e)
this.Open(file);
}
}
else
{
string file = (string)e.Data.GetData(DataFormats.Text);
if (file != null && File.Exists(file))
{
this.Open(file);
}
}
}
private void dockPanel_DragDrop(object sender, DragEventArgs e)
private void MainForm_DragDrop(object sender, DragEventArgs e)
{
string[] drops = (string[])e.Data.GetData(DataFormats.FileDrop);
List<string> files = new List<string>();
if (drops == null)
{
string file = (string)e.Data.GetData(DataFormats.Text);
drops = new string[1] { file };
}
foreach (string file in drops)
{
if (Directory.Exists(file))
{
files.AddRange(Directory.EnumerateFiles(file, "*.cdb", SearchOption.AllDirectories));
files.AddRange(Directory.EnumerateFiles(file, "*.lua", SearchOption.AllDirectories));
}
else if (File.Exists(file))
{
files.Add(file);
}
}
if (files.Count > 5)
{
if (!MyMsg.Question(LMSG.IfOpenLotsOfFile))
{
return;
}
}
foreach (string file in files)
{
this.Open(file);
}
}
private void MainForm_DragEnter(object sender, DragEventArgs e)
{
e.Effect = DragDropEffects.All;
}
......
......@@ -27,4 +27,4 @@
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("3.0.1.0")]
\ No newline at end of file
[assembly: AssemblyVersion("4.0.0.0")]
\ No newline at end of file
★更新历史
4.0.0.0
更新了版本号(?)
3.0.1.0
更新了一个新的编辑器,现在能正常显示中文了。
一些旧功能无法在新版编辑器中使用,可自行编辑app.config将editor字段改成【Avalon】以外的字符串以启用旧版编辑器。
......
......@@ -4,10 +4,10 @@
<Color name="Comment" foreground="#ff999999" exampleText="-- comment" />
<Color name="String" foreground="#fff99157" />
<Color name="Punctuation" />
<Color name="Functions" fontWeight="bold" foreground="Green" />
<Color name="Functions" foreground="#ff59c817" />
<Color name="WrongFunctions" fontWeight="bold" foreground="Red" />
<Color name="MethodCall" foreground="#ffffcc66" fontWeight="bold"/>
<Color name="NumberLiteral" foreground="#ff99cc99"/>
<Color name="NumberLiteral" foreground="#ffc2dfff"/>
<Color name="NilKeyword" fontWeight="bold"/>
<Color name="Keywords" fontWeight="bold" foreground="#ff6699cc" />
<Color name="GotoKeywords" foreground="#ffcc99cc" />
......
[DataEditorX]3.0.1.0[DataEditorX]
[URL]https://cdn01.moecube.com/DataEditorX/releases/DataEditorX-3.0.1.0.zip[URL]
[DataEditorX]4.0.0.0[DataEditorX]
[URL]https://cdn01.moecube.com/DataEditorX/releases/DataEditorX-4.0.0.0.zip[URL]
★运行环境(Environment)
本程序基于.Net framework 4.6开发
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment