├── 1.PNG
├── 2.PNG
├── AddFile.Designer.cs
├── AddFile.cs
├── AddFile.resx
├── AndLua.Designer.cs
├── AndLua.cs
├── AndLua.resx
├── AndLuaPlus.csproj
├── AndLuaPlus.csproj.user
├── AndLuaPlus.ico
├── FodyWeavers.xml
├── FodyWeavers.xsd
├── Install.Designer.cs
├── Install.cs
├── Install.resx
├── LICENSE
├── Loading.Designer.cs
├── Loading.cs
├── Loading.resx
├── NewProject.Designer.cs
├── NewProject.cs
├── NewProject.resx
├── Program.cs
├── Project.resx
├── Properties
├── AssemblyInfo.cs
├── Resources.Designer.cs
├── Resources.resx
├── Settings.Designer.cs
└── Settings.settings
├── README.md
├── Resources
├── AndLua+.exe.config
├── Lua.xshd
├── LuaConfig.txt
├── Main.txt
└── icon.png
├── Settings.cs
├── Welcome.Designer.cs
├── Welcome.cs
├── Welcome.resx
├── about.Designer.cs
├── about.cs
├── about.resx
├── app.config
├── bin
└── Debug
│ ├── AndLua+.exe.config
│ ├── AndLua+.pdb
│ ├── dll
│ └── IWshRuntimeLibrary.dll
│ ├── libs
│ ├── CSkin.dll
│ ├── HZH_Controls.dll
│ ├── ICSharpCode.AvalonEdit.dll
│ ├── LuaInterface.dll
│ ├── lua51.dll
│ └── luanet.dll
│ ├── libs1
│ └── HZH_Controls.dll
│ └── lua
│ ├── http.lua
│ ├── http_headers.lua
│ └── json.lua
├── libs
└── ICSharpCode.SharpZipLib.dll
├── packages.config
├── project.Designer.cs
└── project.cs
/1.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/team-xc/AndLuaPlus/479336bf606c6f7445f0a0ea26ecba3e60b560b5/1.PNG
--------------------------------------------------------------------------------
/2.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/team-xc/AndLuaPlus/479336bf606c6f7445f0a0ea26ecba3e60b560b5/2.PNG
--------------------------------------------------------------------------------
/AddFile.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AndLuaPlus
2 | {
3 | partial class AddFile
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | /*
11 | *AndLua+ v1.0
12 | * Copyright 2020-02-01
13 | * Author: Alone
14 | * My Blog: http://ly250.cn/
15 | * Github: https://github.com/LingYang8/AndLuaPlus
16 | */
17 |
18 | ///
19 | /// 清理所有正在使用的资源。
20 | ///
21 | /// 如果应释放托管资源,为 true;否则为 false。
22 | protected override void Dispose(bool disposing)
23 | {
24 | if (disposing && (components != null))
25 | {
26 | components.Dispose();
27 | }
28 | base.Dispose(disposing);
29 | }
30 |
31 | #region Windows 窗体设计器生成的代码
32 |
33 | ///
34 | /// 设计器支持所需的方法 - 不要修改
35 | /// 使用代码编辑器修改此方法的内容。
36 | ///
37 | private void InitializeComponent()
38 | {
39 | this.panel1 = new System.Windows.Forms.Panel();
40 | this.no = new HZH_Controls.Controls.UCBtnExt();
41 | this.ok = new HZH_Controls.Controls.UCBtnExt();
42 | this.FileName = new System.Windows.Forms.TextBox();
43 | this.label1 = new System.Windows.Forms.Label();
44 | this.panel1.SuspendLayout();
45 | this.SuspendLayout();
46 | //
47 | // panel1
48 | //
49 | this.panel1.Controls.Add(this.no);
50 | this.panel1.Controls.Add(this.ok);
51 | this.panel1.Controls.Add(this.FileName);
52 | this.panel1.Controls.Add(this.label1);
53 | this.panel1.Location = new System.Drawing.Point(12, 12);
54 | this.panel1.Name = "panel1";
55 | this.panel1.Size = new System.Drawing.Size(460, 187);
56 | this.panel1.TabIndex = 1;
57 | //
58 | // no
59 | //
60 | this.no.BackColor = System.Drawing.Color.White;
61 | this.no.BtnBackColor = System.Drawing.Color.White;
62 | this.no.BtnFont = new System.Drawing.Font("微软雅黑", 8.5F);
63 | this.no.BtnForeColor = System.Drawing.Color.Black;
64 | this.no.BtnText = "取消";
65 | this.no.ConerRadius = 5;
66 | this.no.Cursor = System.Windows.Forms.Cursors.Hand;
67 | this.no.EnabledMouseEffect = true;
68 | this.no.FillColor = System.Drawing.Color.White;
69 | this.no.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
70 | this.no.IsRadius = true;
71 | this.no.IsShowRect = true;
72 | this.no.IsShowTips = false;
73 | this.no.Location = new System.Drawing.Point(310, 162);
74 | this.no.Margin = new System.Windows.Forms.Padding(0);
75 | this.no.Name = "no";
76 | this.no.RectColor = System.Drawing.Color.Silver;
77 | this.no.RectWidth = 1;
78 | this.no.RightToLeft = System.Windows.Forms.RightToLeft.No;
79 | this.no.Size = new System.Drawing.Size(70, 25);
80 | this.no.TabIndex = 5;
81 | this.no.TabStop = false;
82 | this.no.TipsColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(30)))), ((int)(((byte)(99)))));
83 | this.no.TipsText = "";
84 | this.no.BtnClick += new System.EventHandler(this.no_BtnClick);
85 | //
86 | // ok
87 | //
88 | this.ok.BackColor = System.Drawing.Color.White;
89 | this.ok.BtnBackColor = System.Drawing.Color.White;
90 | this.ok.BtnFont = new System.Drawing.Font("微软雅黑", 8.5F);
91 | this.ok.BtnForeColor = System.Drawing.Color.White;
92 | this.ok.BtnText = "创建";
93 | this.ok.ConerRadius = 5;
94 | this.ok.Cursor = System.Windows.Forms.Cursors.Hand;
95 | this.ok.EnabledMouseEffect = true;
96 | this.ok.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(138)))), ((int)(((byte)(255)))));
97 | this.ok.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
98 | this.ok.IsRadius = true;
99 | this.ok.IsShowRect = true;
100 | this.ok.IsShowTips = false;
101 | this.ok.Location = new System.Drawing.Point(390, 162);
102 | this.ok.Margin = new System.Windows.Forms.Padding(0);
103 | this.ok.Name = "ok";
104 | this.ok.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(138)))), ((int)(((byte)(255)))));
105 | this.ok.RectWidth = 1;
106 | this.ok.RightToLeft = System.Windows.Forms.RightToLeft.No;
107 | this.ok.Size = new System.Drawing.Size(70, 25);
108 | this.ok.TabIndex = 4;
109 | this.ok.TabStop = false;
110 | this.ok.TipsColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(30)))), ((int)(((byte)(99)))));
111 | this.ok.TipsText = "";
112 | this.ok.BtnClick += new System.EventHandler(this.ok_BtnClick);
113 | //
114 | // FileName
115 | //
116 | this.FileName.Font = new System.Drawing.Font("微软雅黑", 9F);
117 | this.FileName.Location = new System.Drawing.Point(3, 24);
118 | this.FileName.Name = "FileName";
119 | this.FileName.Size = new System.Drawing.Size(454, 23);
120 | this.FileName.TabIndex = 1;
121 | //
122 | // label1
123 | //
124 | this.label1.AutoSize = true;
125 | this.label1.Font = new System.Drawing.Font("微软雅黑", 8F);
126 | this.label1.Location = new System.Drawing.Point(3, 0);
127 | this.label1.Name = "label1";
128 | this.label1.Size = new System.Drawing.Size(60, 16);
129 | this.label1.TabIndex = 0;
130 | this.label1.Text = "File Name";
131 | //
132 | // AddFile
133 | //
134 | this.BackColor = System.Drawing.Color.White;
135 | this.ClientSize = new System.Drawing.Size(484, 211);
136 | this.Controls.Add(this.panel1);
137 | this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
138 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
139 | this.MaximizeBox = false;
140 | this.MinimizeBox = false;
141 | this.Name = "AddFile";
142 | this.ShowIcon = false;
143 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
144 | this.Text = "新建文件";
145 | this.panel1.ResumeLayout(false);
146 | this.panel1.PerformLayout();
147 | this.ResumeLayout(false);
148 |
149 | }
150 |
151 | #endregion
152 |
153 | private System.Windows.Forms.Panel panel1;
154 | private HZH_Controls.Controls.UCBtnExt no;
155 | private HZH_Controls.Controls.UCBtnExt ok;
156 | private System.Windows.Forms.TextBox FileName;
157 | private System.Windows.Forms.Label label1;
158 | }
159 | }
160 |
--------------------------------------------------------------------------------
/AddFile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using System.IO;
9 |
10 | /*
11 | *AndLua+ v1.0
12 | * Copyright 2020-02-01
13 | * Author: Alone
14 | * My Blog: http://ly250.cn/
15 | * Github: https://github.com/LingYang8/AndLuaPlus
16 | */
17 |
18 | namespace AndLuaPlus
19 | {
20 | public partial class AddFile : Form
21 | {
22 | //声明参数
23 | private readonly AndLua _andlua;
24 | //工程路径
25 | string ProjectPath = "";
26 | public AddFile()
27 | {
28 | InitializeComponent();
29 |
30 | }
31 | //接收参数
32 | public AddFile(AndLua andlua, string file) : this()
33 | {
34 | _andlua = andlua;
35 | ProjectPath = file;
36 | }
37 | private void no_BtnClick(object sender, EventArgs e)
38 | {
39 | this.Close();
40 | }
41 | //新建文件
42 | private void ok_BtnClick(object sender, EventArgs e)
43 | {
44 | if (FileName.Text != "")
45 | {
46 | if (File.Exists(ProjectPath + "/" + FileName.Text))
47 | {
48 | MessageBox.Show("该文件已存在,你必须重新输入一个有效的文件名称,以继续创建你的项目文件。", "提示");
49 | }
50 | else
51 | {
52 | FileStream fs = new FileStream(ProjectPath + "/" + FileName.Text, FileMode.OpenOrCreate);
53 | StreamWriter sw = new StreamWriter(fs);
54 | sw.WriteLine(Properties.Resources.Main);
55 | sw.Close();
56 | _andlua.OpenFile(ProjectPath + "/" + FileName.Text);
57 | this.Close();
58 | }
59 | }
60 | else
61 | {
62 | this.Close();
63 | }
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/AddFile.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/AndLua.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AndLuaPlus
2 | {
3 | partial class AndLua
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | /*
11 | *AndLua+ v1.0
12 | * Copyright 2020-02-01
13 | * Author: Alone
14 | * My Blog: http://ly250.cn/
15 | * Github: https://github.com/LingYang8/AndLuaPlus
16 | */
17 |
18 | ///
19 | /// 清理所有正在使用的资源。
20 | ///
21 | /// 如果应释放托管资源,为 true;否则为 false。
22 | protected override void Dispose(bool disposing)
23 | {
24 | if (disposing && (components != null))
25 | {
26 | components.Dispose();
27 | }
28 | base.Dispose(disposing);
29 | }
30 |
31 | #region Windows 窗体设计器生成的代码
32 |
33 | ///
34 | /// 设计器支持所需的方法 - 不要
35 | /// 使用代码编辑器修改此方法的内容。
36 | ///
37 | private void InitializeComponent()
38 | {
39 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AndLua));
40 | this.MenuStrip = new System.Windows.Forms.MenuStrip();
41 | this.文件ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
42 | this.打开ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
43 | this.新建ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
44 | this.删除ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
45 | this.运行ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
46 | this.帮助ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
47 | this.关于ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
48 | this.OutPutText = new System.Windows.Forms.TextBox();
49 | this.Editor = new System.Windows.Forms.Integration.ElementHost();
50 | this.MenuStrip.SuspendLayout();
51 | this.SuspendLayout();
52 | //
53 | // MenuStrip
54 | //
55 | this.MenuStrip.BackColor = System.Drawing.Color.White;
56 | this.MenuStrip.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
57 | this.MenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
58 | this.文件ToolStripMenuItem,
59 | this.运行ToolStripMenuItem,
60 | this.帮助ToolStripMenuItem});
61 | this.MenuStrip.Location = new System.Drawing.Point(0, 0);
62 | this.MenuStrip.Name = "MenuStrip";
63 | this.MenuStrip.Padding = new System.Windows.Forms.Padding(7, 3, 0, 3);
64 | this.MenuStrip.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
65 | this.MenuStrip.Size = new System.Drawing.Size(1084, 27);
66 | this.MenuStrip.TabIndex = 1;
67 | this.MenuStrip.Text = "NenuStrip";
68 | //
69 | // 文件ToolStripMenuItem
70 | //
71 | this.文件ToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
72 | this.文件ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
73 | this.打开ToolStripMenuItem,
74 | this.新建ToolStripMenuItem,
75 | this.删除ToolStripMenuItem1});
76 | this.文件ToolStripMenuItem.Name = "文件ToolStripMenuItem";
77 | this.文件ToolStripMenuItem.Size = new System.Drawing.Size(58, 21);
78 | this.文件ToolStripMenuItem.Text = "文件(F)";
79 | //
80 | // 打开ToolStripMenuItem
81 | //
82 | this.打开ToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
83 | this.打开ToolStripMenuItem.Name = "打开ToolStripMenuItem";
84 | this.打开ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
85 | this.打开ToolStripMenuItem.Text = "打开";
86 | this.打开ToolStripMenuItem.Click += new System.EventHandler(this.打开ToolStripMenuItem_Click);
87 | //
88 | // 新建ToolStripMenuItem
89 | //
90 | this.新建ToolStripMenuItem.Name = "新建ToolStripMenuItem";
91 | this.新建ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
92 | this.新建ToolStripMenuItem.Text = "新建";
93 | this.新建ToolStripMenuItem.Click += new System.EventHandler(this.新建ToolStripMenuItem_Click);
94 | //
95 | // 删除ToolStripMenuItem1
96 | //
97 | this.删除ToolStripMenuItem1.Name = "删除ToolStripMenuItem1";
98 | this.删除ToolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
99 | this.删除ToolStripMenuItem1.Text = "删除";
100 | this.删除ToolStripMenuItem1.Click += new System.EventHandler(this.删除ToolStripMenuItem1_Click);
101 | //
102 | // 运行ToolStripMenuItem
103 | //
104 | this.运行ToolStripMenuItem.Name = "运行ToolStripMenuItem";
105 | this.运行ToolStripMenuItem.Size = new System.Drawing.Size(60, 21);
106 | this.运行ToolStripMenuItem.Text = "运行(R)";
107 | this.运行ToolStripMenuItem.Click += new System.EventHandler(this.运行ToolStripMenuItem_Click);
108 | //
109 | // 帮助ToolStripMenuItem
110 | //
111 | this.帮助ToolStripMenuItem.BackColor = System.Drawing.Color.White;
112 | this.帮助ToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
113 | this.帮助ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
114 | this.关于ToolStripMenuItem});
115 | this.帮助ToolStripMenuItem.Name = "帮助ToolStripMenuItem";
116 | this.帮助ToolStripMenuItem.Size = new System.Drawing.Size(61, 21);
117 | this.帮助ToolStripMenuItem.Text = "帮助(H)";
118 | //
119 | // 关于ToolStripMenuItem
120 | //
121 | this.关于ToolStripMenuItem.Name = "关于ToolStripMenuItem";
122 | this.关于ToolStripMenuItem.Size = new System.Drawing.Size(100, 22);
123 | this.关于ToolStripMenuItem.Text = "关于";
124 | this.关于ToolStripMenuItem.Click += new System.EventHandler(this.关于ToolStripMenuItem_Click);
125 | //
126 | // OutPutText
127 | //
128 | this.OutPutText.AcceptsReturn = true;
129 | this.OutPutText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
130 | | System.Windows.Forms.AnchorStyles.Right)));
131 | this.OutPutText.BackColor = System.Drawing.Color.White;
132 | this.OutPutText.BorderStyle = System.Windows.Forms.BorderStyle.None;
133 | this.OutPutText.Cursor = System.Windows.Forms.Cursors.IBeam;
134 | this.OutPutText.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
135 | this.OutPutText.Location = new System.Drawing.Point(0, 427);
136 | this.OutPutText.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
137 | this.OutPutText.Multiline = true;
138 | this.OutPutText.Name = "OutPutText";
139 | this.OutPutText.ReadOnly = true;
140 | this.OutPutText.ScrollBars = System.Windows.Forms.ScrollBars.Both;
141 | this.OutPutText.Size = new System.Drawing.Size(1084, 183);
142 | this.OutPutText.TabIndex = 1;
143 | this.OutPutText.Text = "程序运行日志...";
144 | this.OutPutText.WordWrap = false;
145 | this.OutPutText.TextChanged += new System.EventHandler(this.outputText_TextChanged);
146 | //
147 | // Editor
148 | //
149 | this.Editor.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
150 | | System.Windows.Forms.AnchorStyles.Left)
151 | | System.Windows.Forms.AnchorStyles.Right)));
152 | this.Editor.BackColor = System.Drawing.Color.White;
153 | this.Editor.Cursor = System.Windows.Forms.Cursors.IBeam;
154 | this.Editor.Font = new System.Drawing.Font("Cambria Math", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
155 | this.Editor.Location = new System.Drawing.Point(0, 27);
156 | this.Editor.Margin = new System.Windows.Forms.Padding(0);
157 | this.Editor.Name = "Editor";
158 | this.Editor.Size = new System.Drawing.Size(1084, 396);
159 | this.Editor.TabIndex = 0;
160 | this.Editor.Child = null;
161 | //
162 | // AndLua
163 | //
164 | this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
165 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
166 | this.ClientSize = new System.Drawing.Size(1084, 561);
167 | this.Controls.Add(this.Editor);
168 | this.Controls.Add(this.OutPutText);
169 | this.Controls.Add(this.MenuStrip);
170 | this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
171 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
172 | this.MainMenuStrip = this.MenuStrip;
173 | this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
174 | this.Name = "AndLua";
175 | this.ShowIcon = false;
176 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
177 | this.Text = "AndLua+";
178 | this.Shown += new System.EventHandler(this.Form1_Shown);
179 | this.MenuStrip.ResumeLayout(false);
180 | this.MenuStrip.PerformLayout();
181 | this.ResumeLayout(false);
182 | this.PerformLayout();
183 |
184 | }
185 |
186 | #endregion
187 | private System.Windows.Forms.MenuStrip MenuStrip;
188 | private System.Windows.Forms.ToolStripMenuItem 文件ToolStripMenuItem;
189 | private System.Windows.Forms.ToolStripMenuItem 运行ToolStripMenuItem;
190 | private System.Windows.Forms.ToolStripMenuItem 帮助ToolStripMenuItem;
191 | private System.Windows.Forms.ToolStripMenuItem 关于ToolStripMenuItem;
192 | public System.Windows.Forms.TextBox OutPutText;
193 | private System.Windows.Forms.ToolStripMenuItem 打开ToolStripMenuItem;
194 | private System.Windows.Forms.ToolStripMenuItem 新建ToolStripMenuItem;
195 | private System.Windows.Forms.ToolStripMenuItem 删除ToolStripMenuItem1;
196 | public System.Windows.Forms.Integration.ElementHost Editor;
197 | }
198 | }
199 |
200 |
--------------------------------------------------------------------------------
/AndLua.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Reflection;
4 | using System.Text;
5 | using System.Windows.Forms;
6 | using ICSharpCode.AvalonEdit;
7 | using ICSharpCode.AvalonEdit.Highlighting;
8 | using ICSharpCode.AvalonEdit.Highlighting.Xshd;
9 | using LuaInterface;
10 | using HZH_Controls;
11 | using HZH_Controls.Forms;
12 | using System.Configuration;
13 | using System.Linq;
14 |
15 | /*
16 | *AndLua+ v1.0
17 | * Copyright 2020-02-01
18 | * Author: Alone
19 | * My Blog: http://ly250.cn/
20 | * Github: https://github.com/LingYang8/AndLuaPlus
21 | */
22 |
23 | namespace AndLuaPlus
24 | {
25 |
26 | //初始化窗口
27 | public partial class AndLua : Form
28 | {
29 | //声明当前窗口
30 | public static AndLua form1;
31 | //实例化Lua编辑器
32 | TextEditor LuaEditor = new TextEditor();
33 | // Lua解释器
34 | Lua lua = new Lua();
35 | //实例化功能库
36 | AndLuaFun andlua = new AndLuaFun();
37 | //当前打开的Lua文件路径
38 | string NowLuaFile = "";
39 | //工程配置文件
40 | public static string ProjectConfig = "";
41 | //工程路径
42 | public static string ProjectPath = "";
43 | //窗口载入事件
44 | public AndLua(string projectpath)
45 | {
46 | InitializeComponent();
47 | //接收参数
48 | this.NowLuaFile = projectpath + "/main.lua";
49 | ProjectConfig = projectpath + "/init.config";
50 | ProjectPath = projectpath;
51 | RefreshTitle();
52 | //把当前窗口赋值
53 | form1 = this;
54 | //行号
55 | LuaEditor.ShowLineNumbers = true;
56 | //边距
57 | LuaEditor.Padding = new System.Windows.Thickness(0);
58 | //字体
59 | LuaEditor.FontFamily = new System.Windows.Media.FontFamily("Console");
60 | LuaEditor.FontSize = 14;
61 | //Lua语法高亮
62 | LuaEditor.SyntaxHighlighting = HighlightingManager.Instance.GetDefinition("Lua");
63 | //将Editor作为ElemetnHost的组件
64 | Editor.Child = LuaEditor;
65 | //实例化Lua核心库
66 | LuaFun luafun = new LuaFun();
67 | //注册核心库方法到Lua
68 | lua.RegisterFunction("print", luafun, luafun.GetType().GetMethod("print"));
69 | }
70 | //鼠标右键菜单
71 | /* -----------------------------------------------------------------------------------------*/
72 | /* -----------------------------------------------------------------------------------------*/
73 | //窗口第一次显示时执行
74 | private void Form1_Shown(object sender, EventArgs e)
75 | {
76 | //全屏
77 | // this.WindowState = FormWindowState.Maximized;
78 | //Lua语法高亮
79 | System.Xml.XmlTextReader reader = new System.Xml.XmlTextReader(Assembly.GetExecutingAssembly().GetManifestResourceStream("AndLuaPlus.Resources.Lua.xshd"));
80 | var xshd = HighlightingLoader.LoadXshd(reader);
81 | LuaEditor.SyntaxHighlighting = HighlightingLoader.Load(xshd, HighlightingManager.Instance);
82 | //加载Lua文件
83 | LuaEditor.Text = andlua.readFile(NowLuaFile);
84 | }
85 |
86 | //日志组件自动滚动到底部
87 | private void outputText_TextChanged(object sender, EventArgs e)
88 | {
89 | OutPutText.SelectionStart = OutPutText.Text.Length;
90 | OutPutText.ScrollToCaret();
91 | }
92 |
93 | //菜单选项
94 | /* -----------------------------------------------------------------------------------------*/
95 | private void 运行ToolStripMenuItem_Click(object sender, EventArgs e)
96 | {
97 | try
98 | {
99 | //保存Lua代码
100 | andlua.writeFile(NowLuaFile, LuaEditor.Text);
101 | //运行Lua文件
102 | lua.DoFile(NowLuaFile);
103 | }
104 | catch (Exception ex)
105 | {
106 | //运行Lua文件错误处理
107 | andlua.outPut(ex.Message);
108 | }
109 | }
110 | private void 关于ToolStripMenuItem_Click(object sender, EventArgs e)
111 | {
112 | About about = new About();
113 | about.ShowDialog();
114 | }
115 | private void 新建ToolStripMenuItem_Click(object sender, EventArgs e)
116 | {
117 | AddFile addfile = new AddFile(this, ProjectPath);
118 | addfile.ShowDialog();
119 | }
120 | private void 打开ToolStripMenuItem_Click(object sender, EventArgs e)
121 | {
122 | OpenFileDialog Filedialog = new OpenFileDialog();
123 | Filedialog.Multiselect = false;//禁止选择多个文件
124 | Filedialog.Title = "请选择一个文件";
125 | Filedialog.Filter = "所有文件(*.*)|*.*";
126 | Filedialog.InitialDirectory = ProjectPath;
127 | if (Filedialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
128 | {
129 | OpenFile(Filedialog.FileName);
130 | }
131 | }
132 | private void 删除ToolStripMenuItem1_Click(object sender, EventArgs e)
133 | {
134 | File.Delete(NowLuaFile);
135 | OpenFile(ProjectPath + "/main.lua");
136 | }
137 | /* -----------------------------------------------------------------------------------------*/
138 | //读取配置文件
139 | private string GetConfig(string key)
140 | {
141 | if (System.IO.File.Exists(ProjectConfig))
142 | {
143 | ExeConfigurationFileMap ecf = new ExeConfigurationFileMap();
144 | ecf.ExeConfigFilename = ProjectConfig;
145 | Configuration config = System.Configuration.ConfigurationManager.OpenMappedExeConfiguration(ecf, ConfigurationUserLevel.None);
146 | var keys = config.AppSettings.Settings.AllKeys.ToList();
147 | if (keys == null || keys.Count == 0)
148 | {
149 | return "Project Config File Error";
150 | }
151 | if (keys.Contains(key))
152 | {
153 | return config.AppSettings.Settings[key].Value.ToString();
154 | }
155 | }
156 | return "Project Config File Error";
157 | }
158 | //刷新标题
159 | public void RefreshTitle()
160 | {
161 | this.Text = "AndLua+ - " + GetConfig("Name") + " - [ " + NowLuaFile + " ]";
162 | }
163 | //打开文件
164 | public void OpenFile(string file)
165 | {
166 | if (File.Exists(file))
167 | {
168 | if (File.Exists(NowLuaFile))
169 | {
170 | //保存Lua代码
171 | andlua.writeFile(NowLuaFile, LuaEditor.Text);
172 | }
173 | this.LuaEditor.Text = andlua.readFile(file);
174 | NowLuaFile = file;
175 | RefreshTitle();
176 | }
177 | }
178 | }
179 |
180 | //Lua核心库
181 | public class LuaFun
182 | {
183 | //打印
184 | public void print(string str1, string str2 = null, string str3 = null, string str4 = null, string str5 = null, string str6 = null, string str7 = null, string str8 = null, string str9 = null, string str10 = null)
185 | {
186 | AndLuaFun obj = new AndLuaFun();
187 | obj.outPut(str1, str2, str3, str4, str5, str6, str7, str8, str9, str10);
188 | }
189 | }
190 | //AndLua+辅助库
191 | class AndLuaFun
192 | {
193 | //输出日志
194 | public void outPut(string str1, string str2 = null, string str3 = null, string str4 = null, string str5 = null, string str6 = null, string str7 = null, string str8 = null, string str9 = null, string str10 = null)
195 | {
196 | if (str2 != null)
197 | {
198 | str1 = str1 + " " + str2;
199 | }
200 | if (str3 != null)
201 | {
202 | str1 = str1 + " " + str3;
203 | }
204 | if (str4 != null)
205 | {
206 | str1 = str1 + " " + str4;
207 | }
208 | if (str5 != null)
209 | {
210 | str1 = str1 + " " + str5;
211 | }
212 | if (str6 != null)
213 | {
214 | str1 = str1 + " " + str6;
215 | }
216 | if (str7 != null)
217 | {
218 | str1 = str1 + " " + str7;
219 | }
220 | if (str8 != null)
221 | {
222 | str1 = str1 + " " + str8;
223 | }
224 | if (str9 != null)
225 | {
226 | str1 = str1 + " " + str9;
227 | }
228 | if (str10 != null)
229 | {
230 | str1 = str1 + " " + str10;
231 | }
232 | AndLua.form1.OutPutText.Text = AndLua.form1.OutPutText.Text + Environment.NewLine + "[" + DateTime.Now.ToString("HH:mm:ss:fff") + "]" + " " + str1;
233 | }
234 | //读取文件
235 | public string readFile(string path)
236 | {
237 | string filetext = File.ReadAllText(path, Encoding.Default);
238 | return filetext;
239 | }
240 | //写入文件
241 | public void writeFile(string path, string text)
242 | {
243 | FileStream fs = new FileStream(path, FileMode.Create);
244 | byte[] data = System.Text.Encoding.Default.GetBytes(text);
245 | fs.Write(data, 0, data.Length);
246 | fs.Flush();
247 | fs.Close();
248 | }
249 | }
250 | }
--------------------------------------------------------------------------------
/AndLuaPlus.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | x86
6 | 8.0.30703
7 | 2.0
8 | {C026A2BA-7617-425C-859B-F2893D11C083}
9 | WinExe
10 | Properties
11 | AndLuaPlus
12 | AndLua+
13 | v4.5
14 |
15 |
16 | 512
17 | false
18 |
19 |
20 | E:\11\
21 | true
22 | Disk
23 | false
24 | Foreground
25 | 7
26 | Days
27 | false
28 | false
29 | true
30 | true
31 | 1
32 | 1.0.0.%2a
33 | false
34 | true
35 | true
36 |
37 |
38 | x86
39 | true
40 | full
41 | false
42 | bin\Debug\
43 | DEBUG;TRACE
44 | prompt
45 | 4
46 | false
47 | ConcurrencyRules.ruleset
48 | true
49 |
50 |
51 | x86
52 | pdbonly
53 | true
54 | bin\Release\
55 | TRACE
56 | prompt
57 | 4
58 | false
59 |
60 |
61 | AndLuaPlus.ico
62 |
63 |
64 | C5F654B50A6ACFC8C186F2EFF3CD695D7883F900
65 |
66 |
67 | AndLuaPlus_TemporaryKey.pfx
68 |
69 |
70 | true
71 |
72 |
73 | true
74 |
75 |
76 |
77 | F:\下载\CSkin 16.1.14.3\CSkin 4.0\CSkin.dll
78 | False
79 |
80 |
81 | ..\packages\HZH_Controls.1.0.11\lib\net40\HZH_Controls.dll
82 | False
83 |
84 |
85 | ..\packages\AvalonEdit.6.0.1\lib\net40\ICSharpCode.AvalonEdit.dll
86 | False
87 |
88 |
89 | ..\packages\ICSharpCode.SharpZipLib.dll.0.85.4.369\lib\net20\ICSharpCode.SharpZipLib.dll
90 | False
91 |
92 |
93 | bin\Debug\dll\IWshRuntimeLibrary.dll
94 | True
95 |
96 |
97 | ..\..\..\谷歌浏览器\luainterface-1.5.3\Built\LuaInterface.dll
98 | False
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 | Form
126 |
127 |
128 | About.cs
129 |
130 |
131 | Form
132 |
133 |
134 | AddFile.cs
135 |
136 |
137 | Form
138 |
139 |
140 | AndLua.cs
141 |
142 |
143 | Form
144 |
145 |
146 | Install.cs
147 |
148 |
149 | Form
150 |
151 |
152 | Loading.cs
153 |
154 |
155 | Form
156 |
157 |
158 | NewProject.cs
159 |
160 |
161 |
162 | Form
163 |
164 |
165 | Project.cs
166 |
167 |
168 |
169 | True
170 | True
171 | Resources.resx
172 |
173 |
174 |
175 | Form
176 |
177 |
178 | Welcome.cs
179 |
180 |
181 | About.cs
182 |
183 |
184 | AddFile.cs
185 |
186 |
187 | AndLua.cs
188 |
189 |
190 | Install.cs
191 |
192 |
193 | Loading.cs
194 |
195 |
196 | NewProject.cs
197 |
198 |
199 | Project.cs
200 |
201 |
202 | ResXFileCodeGenerator
203 | Designer
204 | Resources.Designer.cs
205 |
206 |
207 | Welcome.cs
208 |
209 |
210 |
211 |
212 |
213 |
214 | SettingsSingleFileGenerator
215 | Settings.Designer.cs
216 |
217 |
218 | True
219 | Settings.settings
220 | True
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 | False
234 | .NET Framework 3.5 SP1
235 | false
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
250 |
--------------------------------------------------------------------------------
/AndLuaPlus.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | publish\
5 |
6 |
7 |
8 |
9 |
10 | zh-CN
11 | false
12 | ProjectFiles
13 |
14 |
15 | false
16 |
17 |
--------------------------------------------------------------------------------
/AndLuaPlus.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/team-xc/AndLuaPlus/479336bf606c6f7445f0a0ea26ecba3e60b560b5/AndLuaPlus.ico
--------------------------------------------------------------------------------
/FodyWeavers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/FodyWeavers.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks
13 |
14 |
15 |
16 |
17 | A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.
18 |
19 |
20 |
21 |
22 | A list of unmanaged 32 bit assembly names to include, delimited with line breaks.
23 |
24 |
25 |
26 |
27 | A list of unmanaged 64 bit assembly names to include, delimited with line breaks.
28 |
29 |
30 |
31 |
32 | The order of preloaded assemblies, delimited with line breaks.
33 |
34 |
35 |
36 |
37 |
38 | This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.
39 |
40 |
41 |
42 |
43 | Controls if .pdbs for reference assemblies are also embedded.
44 |
45 |
46 |
47 |
48 | Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.
49 |
50 |
51 |
52 |
53 | As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.
54 |
55 |
56 |
57 |
58 | Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.
59 |
60 |
61 |
62 |
63 | Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.
64 |
65 |
66 |
67 |
68 | A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |
69 |
70 |
71 |
72 |
73 | A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.
74 |
75 |
76 |
77 |
78 | A list of unmanaged 32 bit assembly names to include, delimited with |.
79 |
80 |
81 |
82 |
83 | A list of unmanaged 64 bit assembly names to include, delimited with |.
84 |
85 |
86 |
87 |
88 | The order of preloaded assemblies, delimited with |.
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 | 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
97 |
98 |
99 |
100 |
101 | A comma-separated list of error codes that can be safely ignored in assembly verification.
102 |
103 |
104 |
105 |
106 | 'false' to turn off automatic generation of the XML Schema file.
107 |
108 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/Install.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AndLuaPlus
2 | {
3 | partial class Install
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | /*
11 | *AndLua+ v1.0
12 | * Copyright 2020-02-01
13 | * Author: Alone
14 | * My Blog: http://ly250.cn/
15 | * Github: https://github.com/LingYang8/AndLuaPlus
16 | */
17 |
18 | ///
19 | /// 清理所有正在使用的资源。
20 | ///
21 | /// 如果应释放托管资源,为 true;否则为 false。
22 | protected override void Dispose(bool disposing)
23 | {
24 | if (disposing && (components != null))
25 | {
26 | components.Dispose();
27 | }
28 | base.Dispose(disposing);
29 | }
30 |
31 | #region Windows 窗体设计器生成的代码
32 |
33 | ///
34 | /// 设计器支持所需的方法 - 不要修改
35 | /// 使用代码编辑器修改此方法的内容。
36 | ///
37 | private void InitializeComponent()
38 | {
39 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Install));
40 | this.ucStep1 = new HZH_Controls.Controls.UCStep();
41 | this.ucProcessLine1 = new HZH_Controls.Controls.UCProcessLine();
42 | this.panel1 = new System.Windows.Forms.Panel();
43 | this.label1 = new System.Windows.Forms.Label();
44 | this.pictureBox1 = new System.Windows.Forms.PictureBox();
45 | this.panel1.SuspendLayout();
46 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
47 | this.SuspendLayout();
48 | //
49 | // ucStep1
50 | //
51 | this.ucStep1.BackColor = System.Drawing.Color.White;
52 | this.ucStep1.Enabled = false;
53 | this.ucStep1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
54 | this.ucStep1.ImgCompleted = null;
55 | this.ucStep1.LineWidth = 2;
56 | this.ucStep1.Location = new System.Drawing.Point(249, 220);
57 | this.ucStep1.Name = "ucStep1";
58 | this.ucStep1.Size = new System.Drawing.Size(320, 80);
59 | this.ucStep1.StepBackColor = System.Drawing.Color.Silver;
60 | this.ucStep1.StepFontColor = System.Drawing.Color.White;
61 | this.ucStep1.StepForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(138)))), ((int)(((byte)(255)))));
62 | this.ucStep1.StepIndex = 1;
63 | this.ucStep1.Steps = new string[] {
64 | "准备",
65 | "解压",
66 | "安装",
67 | "完成"};
68 | this.ucStep1.StepWidth = 35;
69 | this.ucStep1.TabIndex = 0;
70 | //
71 | // ucProcessLine1
72 | //
73 | this.ucProcessLine1.BorderColor = System.Drawing.Color.Silver;
74 | this.ucProcessLine1.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
75 | this.ucProcessLine1.ForeColor = System.Drawing.Color.White;
76 | this.ucProcessLine1.Location = new System.Drawing.Point(173, 350);
77 | this.ucProcessLine1.MaxValue = 100;
78 | this.ucProcessLine1.Name = "ucProcessLine1";
79 | this.ucProcessLine1.Size = new System.Drawing.Size(394, 35);
80 | this.ucProcessLine1.TabIndex = 1;
81 | this.ucProcessLine1.Text = "ucProcessLine1";
82 | this.ucProcessLine1.Value = 1;
83 | this.ucProcessLine1.ValueBGColor = System.Drawing.Color.Silver;
84 | this.ucProcessLine1.ValueColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(138)))), ((int)(((byte)(255)))));
85 | this.ucProcessLine1.ValueTextType = HZH_Controls.Controls.ValueTextType.Percent;
86 | this.ucProcessLine1.ValueChanged += new System.EventHandler(this.ucProcessLine1_ValueChanged);
87 | //
88 | // panel1
89 | //
90 | this.panel1.Anchor = System.Windows.Forms.AnchorStyles.None;
91 | this.panel1.Controls.Add(this.label1);
92 | this.panel1.Controls.Add(this.ucProcessLine1);
93 | this.panel1.Controls.Add(this.ucStep1);
94 | this.panel1.Controls.Add(this.pictureBox1);
95 | this.panel1.Location = new System.Drawing.Point(12, 12);
96 | this.panel1.Name = "panel1";
97 | this.panel1.Size = new System.Drawing.Size(760, 437);
98 | this.panel1.TabIndex = 3;
99 | //
100 | // label1
101 | //
102 | this.label1.AutoSize = true;
103 | this.label1.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
104 | this.label1.Location = new System.Drawing.Point(324, 140);
105 | this.label1.Name = "label1";
106 | this.label1.Size = new System.Drawing.Size(119, 31);
107 | this.label1.TabIndex = 3;
108 | this.label1.Text = "AndLua+";
109 | //
110 | // pictureBox1
111 | //
112 | this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.None;
113 | this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
114 | this.pictureBox1.Location = new System.Drawing.Point(332, 45);
115 | this.pictureBox1.Name = "pictureBox1";
116 | this.pictureBox1.Size = new System.Drawing.Size(95, 85);
117 | this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
118 | this.pictureBox1.TabIndex = 1;
119 | this.pictureBox1.TabStop = false;
120 | //
121 | // Install
122 | //
123 | this.BackColor = System.Drawing.Color.White;
124 | this.ClientSize = new System.Drawing.Size(784, 461);
125 | this.Controls.Add(this.panel1);
126 | this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
127 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
128 | this.MaximizeBox = false;
129 | this.MinimizeBox = false;
130 | this.Name = "Install";
131 | this.ShowIcon = false;
132 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
133 | this.Text = "正在安装...";
134 | this.Shown += new System.EventHandler(this.install_Shown);
135 | this.panel1.ResumeLayout(false);
136 | this.panel1.PerformLayout();
137 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
138 | this.ResumeLayout(false);
139 |
140 | }
141 |
142 | #endregion
143 |
144 | private HZH_Controls.Controls.UCStep ucStep1;
145 | private HZH_Controls.Controls.UCProcessLine ucProcessLine1;
146 | private System.Windows.Forms.Panel panel1;
147 | private System.Windows.Forms.Label label1;
148 | private System.Windows.Forms.PictureBox pictureBox1;
149 | }
150 | }
151 |
--------------------------------------------------------------------------------
/Install.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.IO;
7 | using System.Reflection;
8 | using System.Text;
9 | using System.Threading;
10 | using System.Threading.Tasks;
11 | using System.Windows.Forms;
12 | using System.IO.Compression;
13 | using System.Runtime.Serialization.Formatters.Binary;
14 | using ICSharpCode.SharpZipLib.Zip;
15 | using System.Diagnostics;
16 | using System.Runtime.InteropServices;
17 | using IWshRuntimeLibrary;
18 |
19 | /*
20 | *AndLua+ v1.0
21 | * Copyright 2020-02-01
22 | * Author: Alone
23 | * My Blog: http://ly250.cn/
24 | * Github: https://github.com/LingYang8/AndLuaPlus
25 | */
26 |
27 | namespace AndLuaPlus
28 | {
29 | public partial class Install : Form
30 | {
31 | //安装路径
32 | public static string InstallationPath = Properties.Settings.Default.InstallationPath;
33 | //实例化FastZip
34 | public static FastZip fz = new FastZip();
35 | public Install()
36 | {
37 | InitializeComponent();
38 | }
39 | //重写横向居中方法
40 | protected override void OnResize(EventArgs e)
41 | {
42 | base.OnResize(e);
43 | int x;
44 | int y;
45 | //步骤条
46 | x = (int)(0.5 * (this.Width - ucStep1.Width));
47 | y = ucStep1.Location.Y;
48 | ucStep1.Location = new System.Drawing.Point(x, y);
49 | //Logo图片
50 | x = (int)(0.5 * (this.Width - pictureBox1.Width));
51 | y = pictureBox1.Location.Y;
52 | pictureBox1.Location = new System.Drawing.Point(x, y);
53 | //进度条
54 | x = (int)(0.5 * (this.Width - ucProcessLine1.Width));
55 | y = ucProcessLine1.Location.Y;
56 | ucProcessLine1.Location = new System.Drawing.Point(x, y);
57 | //软件名称Logo
58 | x = (int)(0.5 * (this.Width - label1.Width));
59 | y = label1.Location.Y;
60 | label1.Location = new System.Drawing.Point(x, y);
61 | }
62 | //进度条监听
63 | private void ucProcessLine1_ValueChanged(object sender, EventArgs e)
64 | {
65 | if (ucProcessLine1.Value == 26)
66 | {
67 | this.ucStep1.StepIndex = 2;
68 | }
69 | else if (ucProcessLine1.Value == 51)
70 | {
71 | this.ucStep1.StepIndex = 3;
72 | }
73 | else if (ucProcessLine1.Value == 76)
74 | {
75 | this.ucStep1.StepIndex = 4;
76 | }
77 | else if (ucProcessLine1.Value == 100)
78 | {
79 | System.Diagnostics.Process.Start(InstallationPath + "/AndLua+.exe");
80 | System.Environment.Exit(0);
81 | }
82 | }
83 | //窗口显示时事件
84 | private void install_Shown(object sender, EventArgs e)
85 | {
86 | //开始安装
87 |
88 | //创建相关文件和文件夹
89 | //创建安装目录
90 | if (!Directory.Exists(InstallationPath))
91 | {
92 | Directory.CreateDirectory(InstallationPath);
93 | for (int i = 0; i < 6; i++) { Delay(50); ucProcessLine1.Value = i; } // 5
94 | }
95 | //创建配置文件
96 | for (int i = 5; i < 11; i++) { Delay(50); ucProcessLine1.Value = i; } // 10
97 | string config = @" ";
98 | FileStream fs = new FileStream(InstallationPath + "/andlua.config", FileMode.Create);
99 | byte[] data = System.Text.Encoding.Default.GetBytes(config);
100 | fs.Write(data, 0, data.Length);
101 | fs.Flush();
102 | fs.Close();
103 | //创建lua文件库目录
104 | if (!Directory.Exists(InstallationPath + "/lua"))
105 | {
106 | Directory.CreateDirectory(InstallationPath + "/lua");
107 | for (int i = 10; i < 16; i++) { Delay(50); ucProcessLine1.Value = i; } // 15
108 | }
109 | //创建dll文件库目录
110 | if (!Directory.Exists(InstallationPath + "/libs"))
111 | {
112 | Directory.CreateDirectory(InstallationPath + "/libs");
113 | for (int i = 15; i < 21; i++) { Delay(50); ucProcessLine1.Value = i; } // 20
114 | }
115 | //创建工程文件目录
116 | if (!Directory.Exists(InstallationPath + "/project"))
117 | {
118 | Directory.CreateDirectory(InstallationPath + "/project");
119 | for (int i = 20; i < 26; i++) { Delay(50); ucProcessLine1.Value = i; } // 25
120 | }
121 |
122 | //解压Dll资源包
123 | ucProcessLine1.Value = 26;
124 | deszip("libs", InstallationPath + "/libs.zip");
125 | if (Compress(InstallationPath + "/libs", InstallationPath + "/libs.zip", null) != "Success")
126 | {
127 | MessageBox.Show("安装错误!", "提示");
128 | }
129 | for (int i = 26; i < 41; i++) { Delay(50); ucProcessLine1.Value = i; } // 40
130 | //解压Lua资源包
131 | deszip("lua", InstallationPath + "/lua.zip");
132 | if (Compress(InstallationPath + "/lua", InstallationPath + "/lua.zip", null) != "Success")
133 | {
134 | MessageBox.Show("安装错误!", "提示");
135 | }
136 | for (int i = 40; i < 51; i++) { Delay(50); ucProcessLine1.Value = i; } // 50
137 |
138 | //安装程序
139 | ucProcessLine1.Value = 51;
140 | //创建执行文件
141 | System.IO.File.Copy(System.Windows.Forms.Application.ExecutablePath, InstallationPath + "/AndLua+.exe", true);
142 | for (int i = 51; i < 61; i++) { Delay(50); ucProcessLine1.Value = i; } // 60
143 | //创建配置文件
144 | FileStream fs1 = new FileStream(InstallationPath + "/AndLua+.exe.config", FileMode.Create);
145 | byte[] data1 = System.Text.Encoding.Default.GetBytes(Properties.Resources.AndLuaConfig);
146 | fs1.Write(data1, 0, data1.Length);
147 | fs1.Flush();
148 | fs1.Close();
149 | //修改安装路径
150 | string config2 = System.IO.File.ReadAllText(InstallationPath + "/AndLua+.exe.config", Encoding.Default);
151 | config2 = config2.Replace(@"C:/Program Files (x86)/AndLuaPlus", InstallationPath);
152 | FileStream fs3 = new FileStream(InstallationPath + "/AndLua+.exe.config", FileMode.Create);
153 | byte[] data3 = System.Text.Encoding.Default.GetBytes(config2);
154 | fs3.Write(data3, 0, data3.Length);
155 | fs3.Flush();
156 | fs3.Close();
157 | //创建快捷方式
158 | String shortcutPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "AndLuaPlus.lnk");
159 | if (!System.IO.File.Exists(shortcutPath))
160 | {
161 | String exePath = InstallationPath + "/AndLua+.exe";
162 | IWshShell shell = new WshShell();
163 | foreach (var item in Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "*.lnk"))
164 | {
165 | WshShortcut tempShortcut = (WshShortcut)shell.CreateShortcut(item);
166 | if (tempShortcut.TargetPath == exePath)
167 | {
168 | return;
169 | }
170 | }
171 | WshShortcut shortcut = (WshShortcut)shell.CreateShortcut(shortcutPath);
172 | shortcut.TargetPath = exePath;
173 | shortcut.Arguments = "";
174 | shortcut.Description = "Developer Alone";
175 | shortcut.WorkingDirectory = InstallationPath;
176 | shortcut.IconLocation = exePath;
177 | shortcut.WindowStyle = 1;
178 | shortcut.Save();
179 | }
180 | for (int i = 60; i < 76; i++) { Delay(50); ucProcessLine1.Value = i; } // 75
181 |
182 | //释放资源
183 | ucProcessLine1.Value = 76;
184 | DeleteFile(InstallationPath + "/libs.zip");
185 | DeleteFile(AppDomain.CurrentDomain.BaseDirectory + "/libs1.zip");
186 | DeleteFile(AppDomain.CurrentDomain.BaseDirectory + @"/HZH_Controls.dll");
187 | for (int i = 76; i < 86; i++) { Delay(50); ucProcessLine1.Value = i; } // 85
188 | DeleteFile(InstallationPath + "/lua.zip");
189 |
190 | for (int i = 85; i < 100; i++) { Delay(50); ucProcessLine1.Value = i; } // 99
191 |
192 | //安装完成
193 | Delay(1000);
194 | ucProcessLine1.Value = 100;
195 | }
196 | //删除文件
197 | public bool DeleteFile(string path1)
198 | {
199 | try
200 | {
201 | if (System.IO.File.Exists(path1))
202 | {
203 | System.IO.File.Delete(path1);
204 | }
205 | return true;
206 | }
207 | catch
208 | {
209 | return false;
210 | }
211 | }
212 | //解压Zip
213 | public static string Compress(string DirPath, string ZipPath, string ZipPWD)
214 | {
215 | string state = "Fail...";
216 | try
217 | {
218 | fz.Password = ZipPWD;
219 | fz.ExtractZip(ZipPath, DirPath, null);
220 | state = "Success";
221 | }
222 | catch (Exception ex)
223 | {
224 | state += "," + ex.Message;
225 | }
226 | return state;
227 | }
228 | //读取Resource文件并保存到指定路径
229 | public void deszip(string filename, string path)
230 | {
231 | System.Resources.ResourceManager rm = Properties.Resources.ResourceManager;
232 | FileStream Stream = new FileStream(path, FileMode.OpenOrCreate);
233 | BinaryFormatter bin = new BinaryFormatter();
234 | try
235 | {
236 | bin.Serialize(Stream, rm.GetObject(filename, null));
237 | Stream.Close();
238 | }
239 | catch (InvalidOperationException)
240 | {
241 | throw;
242 | }
243 | }
244 | //延迟代码
245 | public static void Delay(int milliSecond)
246 | {
247 | int start = Environment.TickCount;
248 | while (Math.Abs(Environment.TickCount - start) < milliSecond)
249 | {
250 | Application.DoEvents();
251 | }
252 | }
253 | }
254 | }
255 |
--------------------------------------------------------------------------------
/Install.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 |
123 | 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
206 | aAqN11skAAAAAElFTkSuQmCC
207 |
208 |
209 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Lxc
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Loading.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AndLuaPlus
2 | {
3 | partial class Loading
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | /*
11 | *AndLua+ v1.0
12 | * Copyright 2020-02-01
13 | * Author: Alone
14 | * My Blog: http://ly250.cn/
15 | * Github: https://github.com/LingYang8/AndLuaPlus
16 | */
17 |
18 | ///
19 | /// 清理所有正在使用的资源。
20 | ///
21 | /// 如果应释放托管资源,为 true;否则为 false。
22 | protected override void Dispose(bool disposing)
23 | {
24 | if (disposing && (components != null))
25 | {
26 | components.Dispose();
27 | }
28 | base.Dispose(disposing);
29 | }
30 |
31 | #region Windows 窗体设计器生成的代码
32 |
33 | ///
34 | /// 设计器支持所需的方法 - 不要修改
35 | /// 使用代码编辑器修改此方法的内容。
36 | ///
37 | private void InitializeComponent()
38 | {
39 | this.ucProcessLine1 = new HZH_Controls.Controls.UCProcessLine();
40 | this.SuspendLayout();
41 | //
42 | // ucProcessLine1
43 | //
44 | this.ucProcessLine1.BackColor = System.Drawing.Color.White;
45 | this.ucProcessLine1.BorderColor = System.Drawing.Color.White;
46 | this.ucProcessLine1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
47 | this.ucProcessLine1.ForeColor = System.Drawing.Color.Black;
48 | this.ucProcessLine1.Location = new System.Drawing.Point(7, 2);
49 | this.ucProcessLine1.MaxValue = 100;
50 | this.ucProcessLine1.Name = "ucProcessLine1";
51 | this.ucProcessLine1.Size = new System.Drawing.Size(477, 23);
52 | this.ucProcessLine1.TabIndex = 0;
53 | this.ucProcessLine1.Text = "ucProcessLine1";
54 | this.ucProcessLine1.Value = 0;
55 | this.ucProcessLine1.ValueBGColor = System.Drawing.Color.White;
56 | this.ucProcessLine1.ValueColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(138)))), ((int)(((byte)(255)))));
57 | this.ucProcessLine1.ValueTextType = HZH_Controls.Controls.ValueTextType.None;
58 | //
59 | // Loading
60 | //
61 | this.BackColor = System.Drawing.Color.White;
62 | this.ClientSize = new System.Drawing.Size(484, 31);
63 | this.Controls.Add(this.ucProcessLine1);
64 | this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
65 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
66 | this.MaximizeBox = false;
67 | this.MinimizeBox = false;
68 | this.Name = "Loading";
69 | this.ShowIcon = false;
70 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
71 | this.Text = "AndLua+";
72 | this.Shown += new System.EventHandler(this.Loading_Shown);
73 | this.ResumeLayout(false);
74 |
75 | }
76 |
77 | #endregion
78 |
79 | private HZH_Controls.Controls.UCProcessLine ucProcessLine1;
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/Loading.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.IO;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using System.Configuration;
10 | using System.Linq;
11 | using System.Runtime.Serialization.Formatters.Binary;
12 |
13 | /*
14 | *AndLua+ v1.0
15 | * Copyright 2020-02-01
16 | * Author: Alone
17 | * My Blog: http://ly250.cn/
18 | * Github: https://github.com/LingYang8/AndLuaPlus
19 | */
20 |
21 | namespace AndLuaPlus
22 | {
23 | public partial class Loading : Form
24 | {
25 | //配置文件路径
26 | private static string configPath = Properties.Settings.Default.InstallationPath + "/andlua.config";
27 | public Loading()
28 | {
29 | InitializeComponent();
30 | }
31 | //窗口显示时事件 检查是否安装
32 | private void Loading_Shown(object sender, EventArgs e)
33 | {
34 | //延迟一下防止BUG
35 | int start = Environment.TickCount;
36 | while (Math.Abs(Environment.TickCount - start) < 100)
37 | {
38 | Application.DoEvents();
39 | }
40 | //进度条
41 | for (int i = 1; i < 100; i++)
42 | {
43 | ucProcessLine1.Value = i;
44 | }
45 | //读取配置文件的安装版本
46 | if (GetConfig("var") == System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString())
47 | {
48 | //版本一致 跳转工程界面
49 | Form Project = new Project();
50 | this.Hide();
51 | Project.ShowDialog();
52 | Application.ExitThread();
53 | }
54 | else
55 | {
56 | //版本不一致 跳转安装界面
57 | Form welcome = new Welcome();
58 | this.Hide();
59 | welcome.ShowDialog();
60 | Application.ExitThread();
61 | }
62 | }
63 | //读取配置文件
64 | private string GetConfig(string key)
65 | {
66 | if (System.IO.File.Exists(configPath))
67 | {
68 | ExeConfigurationFileMap ecf = new ExeConfigurationFileMap();
69 | ecf.ExeConfigFilename = configPath;
70 | Configuration config = System.Configuration.ConfigurationManager.OpenMappedExeConfiguration(ecf, ConfigurationUserLevel.None);
71 | var keys = config.AppSettings.Settings.AllKeys.ToList();
72 | if (keys == null || keys.Count == 0)
73 | {
74 | return "";
75 | }
76 | if (keys.Contains(key))
77 | {
78 | return config.AppSettings.Settings[key].Value.ToString();
79 | }
80 | }
81 | else
82 | {
83 | //配置文件不存在 跳转安装界面
84 | Form welcome = new Welcome();
85 | this.Hide();
86 | welcome.ShowDialog();
87 | Application.ExitThread();
88 | }
89 | return "";
90 | }
91 | //Delay function
92 | public static void Delay(int milliSecond)
93 | {
94 | int start = Environment.TickCount;
95 | while (Math.Abs(Environment.TickCount - start) < milliSecond)
96 | {
97 | Application.DoEvents();
98 | }
99 | }
100 | }
101 | }
102 |
103 |
--------------------------------------------------------------------------------
/Loading.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/NewProject.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AndLuaPlus
2 | {
3 | partial class NewProject
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | /*
11 | *AndLua+ v1.0
12 | * Copyright 2020-02-01
13 | * Author: Alone
14 | * My Blog: http://ly250.cn/
15 | * Github: https://github.com/LingYang8/AndLuaPlus
16 | */
17 |
18 | ///
19 | /// 清理所有正在使用的资源。
20 | ///
21 | /// 如果应释放托管资源,为 true;否则为 false。
22 | protected override void Dispose(bool disposing)
23 | {
24 | if (disposing && (components != null))
25 | {
26 | components.Dispose();
27 | }
28 | base.Dispose(disposing);
29 | }
30 |
31 | #region Windows 窗体设计器生成的代码
32 |
33 | ///
34 | /// 设计器支持所需的方法 - 不要修改
35 | /// 使用代码编辑器修改此方法的内容。
36 | ///
37 | private void InitializeComponent()
38 | {
39 | this.panel1 = new System.Windows.Forms.Panel();
40 | this.ucBtnExt2 = new HZH_Controls.Controls.UCBtnExt();
41 | this.ucBtnExt1 = new HZH_Controls.Controls.UCBtnExt();
42 | this.textBox2 = new System.Windows.Forms.TextBox();
43 | this.label2 = new System.Windows.Forms.Label();
44 | this.textBox1 = new System.Windows.Forms.TextBox();
45 | this.label1 = new System.Windows.Forms.Label();
46 | this.panel1.SuspendLayout();
47 | this.SuspendLayout();
48 | //
49 | // panel1
50 | //
51 | this.panel1.Controls.Add(this.ucBtnExt2);
52 | this.panel1.Controls.Add(this.ucBtnExt1);
53 | this.panel1.Controls.Add(this.textBox2);
54 | this.panel1.Controls.Add(this.label2);
55 | this.panel1.Controls.Add(this.textBox1);
56 | this.panel1.Controls.Add(this.label1);
57 | this.panel1.Location = new System.Drawing.Point(13, 13);
58 | this.panel1.Name = "panel1";
59 | this.panel1.Size = new System.Drawing.Size(559, 286);
60 | this.panel1.TabIndex = 0;
61 | //
62 | // ucBtnExt2
63 | //
64 | this.ucBtnExt2.BackColor = System.Drawing.Color.White;
65 | this.ucBtnExt2.BtnBackColor = System.Drawing.Color.White;
66 | this.ucBtnExt2.BtnFont = new System.Drawing.Font("微软雅黑", 8.5F);
67 | this.ucBtnExt2.BtnForeColor = System.Drawing.Color.Black;
68 | this.ucBtnExt2.BtnText = "取消";
69 | this.ucBtnExt2.ConerRadius = 5;
70 | this.ucBtnExt2.Cursor = System.Windows.Forms.Cursors.Hand;
71 | this.ucBtnExt2.EnabledMouseEffect = true;
72 | this.ucBtnExt2.FillColor = System.Drawing.Color.White;
73 | this.ucBtnExt2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
74 | this.ucBtnExt2.IsRadius = true;
75 | this.ucBtnExt2.IsShowRect = true;
76 | this.ucBtnExt2.IsShowTips = false;
77 | this.ucBtnExt2.Location = new System.Drawing.Point(404, 256);
78 | this.ucBtnExt2.Margin = new System.Windows.Forms.Padding(0);
79 | this.ucBtnExt2.Name = "ucBtnExt2";
80 | this.ucBtnExt2.RectColor = System.Drawing.Color.Silver;
81 | this.ucBtnExt2.RectWidth = 1;
82 | this.ucBtnExt2.RightToLeft = System.Windows.Forms.RightToLeft.No;
83 | this.ucBtnExt2.Size = new System.Drawing.Size(70, 25);
84 | this.ucBtnExt2.TabIndex = 5;
85 | this.ucBtnExt2.TabStop = false;
86 | this.ucBtnExt2.TipsColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(30)))), ((int)(((byte)(99)))));
87 | this.ucBtnExt2.TipsText = "";
88 | this.ucBtnExt2.BtnClick += new System.EventHandler(this.ucBtnExt2_BtnClick);
89 | //
90 | // ucBtnExt1
91 | //
92 | this.ucBtnExt1.BackColor = System.Drawing.Color.White;
93 | this.ucBtnExt1.BtnBackColor = System.Drawing.Color.White;
94 | this.ucBtnExt1.BtnFont = new System.Drawing.Font("微软雅黑", 8.5F);
95 | this.ucBtnExt1.BtnForeColor = System.Drawing.Color.White;
96 | this.ucBtnExt1.BtnText = "创建";
97 | this.ucBtnExt1.ConerRadius = 5;
98 | this.ucBtnExt1.Cursor = System.Windows.Forms.Cursors.Hand;
99 | this.ucBtnExt1.EnabledMouseEffect = true;
100 | this.ucBtnExt1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(138)))), ((int)(((byte)(255)))));
101 | this.ucBtnExt1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
102 | this.ucBtnExt1.IsRadius = true;
103 | this.ucBtnExt1.IsShowRect = true;
104 | this.ucBtnExt1.IsShowTips = false;
105 | this.ucBtnExt1.Location = new System.Drawing.Point(489, 256);
106 | this.ucBtnExt1.Margin = new System.Windows.Forms.Padding(0);
107 | this.ucBtnExt1.Name = "ucBtnExt1";
108 | this.ucBtnExt1.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(138)))), ((int)(((byte)(255)))));
109 | this.ucBtnExt1.RectWidth = 1;
110 | this.ucBtnExt1.RightToLeft = System.Windows.Forms.RightToLeft.No;
111 | this.ucBtnExt1.Size = new System.Drawing.Size(70, 25);
112 | this.ucBtnExt1.TabIndex = 4;
113 | this.ucBtnExt1.TabStop = false;
114 | this.ucBtnExt1.TipsColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(30)))), ((int)(((byte)(99)))));
115 | this.ucBtnExt1.TipsText = "";
116 | this.ucBtnExt1.BtnClick += new System.EventHandler(this.ucBtnExt1_BtnClick);
117 | //
118 | // textBox2
119 | //
120 | this.textBox2.BackColor = System.Drawing.Color.White;
121 | this.textBox2.Enabled = false;
122 | this.textBox2.Font = new System.Drawing.Font("微软雅黑", 9F);
123 | this.textBox2.Location = new System.Drawing.Point(3, 85);
124 | this.textBox2.Name = "textBox2";
125 | this.textBox2.Size = new System.Drawing.Size(553, 23);
126 | this.textBox2.TabIndex = 3;
127 | //
128 | // label2
129 | //
130 | this.label2.AutoSize = true;
131 | this.label2.Font = new System.Drawing.Font("微软雅黑", 8F);
132 | this.label2.Location = new System.Drawing.Point(3, 61);
133 | this.label2.Name = "label2";
134 | this.label2.Size = new System.Drawing.Size(78, 16);
135 | this.label2.TabIndex = 2;
136 | this.label2.Text = "Save location";
137 | //
138 | // textBox1
139 | //
140 | this.textBox1.Font = new System.Drawing.Font("微软雅黑", 9F);
141 | this.textBox1.Location = new System.Drawing.Point(3, 24);
142 | this.textBox1.Name = "textBox1";
143 | this.textBox1.Size = new System.Drawing.Size(553, 23);
144 | this.textBox1.TabIndex = 1;
145 | this.textBox1.Text = "My LuaScript";
146 | this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
147 | //
148 | // label1
149 | //
150 | this.label1.AutoSize = true;
151 | this.label1.Font = new System.Drawing.Font("微软雅黑", 8F);
152 | this.label1.Location = new System.Drawing.Point(3, 0);
153 | this.label1.Name = "label1";
154 | this.label1.Size = new System.Drawing.Size(39, 16);
155 | this.label1.TabIndex = 0;
156 | this.label1.Text = "Name";
157 | //
158 | // NewProject
159 | //
160 | this.BackColor = System.Drawing.Color.White;
161 | this.ClientSize = new System.Drawing.Size(584, 311);
162 | this.Controls.Add(this.panel1);
163 | this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
164 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
165 | this.MaximizeBox = false;
166 | this.MinimizeBox = false;
167 | this.Name = "NewProject";
168 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
169 | this.Text = "New Project";
170 | this.panel1.ResumeLayout(false);
171 | this.panel1.PerformLayout();
172 | this.ResumeLayout(false);
173 |
174 | }
175 |
176 | #endregion
177 |
178 | private System.Windows.Forms.Panel panel1;
179 | private System.Windows.Forms.TextBox textBox1;
180 | private System.Windows.Forms.Label label1;
181 | private System.Windows.Forms.TextBox textBox2;
182 | private System.Windows.Forms.Label label2;
183 | private HZH_Controls.Controls.UCBtnExt ucBtnExt1;
184 | private HZH_Controls.Controls.UCBtnExt ucBtnExt2;
185 | }
186 | }
187 |
--------------------------------------------------------------------------------
/NewProject.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.IO;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | /*
11 | *AndLua+ v1.0
12 | * Copyright 2020-02-01
13 | * Author: Alone
14 | * My Blog: http://ly250.cn/
15 | * Github: https://github.com/LingYang8/AndLuaPlus
16 | */
17 |
18 | namespace AndLuaPlus
19 | {
20 | public partial class NewProject : Form
21 | {
22 | //声明参数
23 | private readonly Project _project;
24 | //工程路径
25 | public static string ProjectPath = Properties.Settings.Default.InstallationPath + "/project";
26 | //启动事件
27 | public NewProject()
28 | {
29 | InitializeComponent();
30 | //默认工程路径
31 | textBox2.Text = ProjectPath + "/" + textBox1.Text.Replace(" ", "");
32 | }
33 | //接收参数
34 | public NewProject(Project project) : this()
35 | {
36 | _project = project;
37 | }
38 | //创建工程
39 | private void ucBtnExt1_BtnClick(object sender, EventArgs e)
40 | {
41 | //判断工程文件夹是否存在
42 | if (!Directory.Exists(textBox2.Text))
43 | {
44 | //不存在 创建工程
45 | Directory.CreateDirectory(textBox2.Text);
46 | //创建工程首文件
47 | FileStream fs1 = new FileStream(textBox2.Text + "/init.config", FileMode.Create);
48 | byte[] data1 = System.Text.Encoding.Default.GetBytes(Properties.Resources.LuaConfig);
49 | fs1.Write(data1, 0, data1.Length);
50 | fs1.Flush();
51 | fs1.Close();
52 | FileStream fs2 = new FileStream(textBox2.Text + "/Main.lua", FileMode.Create);
53 | byte[] data2 = System.Text.Encoding.Default.GetBytes(Properties.Resources.Main);
54 | fs2.Write(data2, 0, data2.Length);
55 | fs2.Flush();
56 | fs2.Close();
57 | string config2 = System.IO.File.ReadAllText(textBox2.Text + "/init.config", Encoding.Default);
58 | config2 = config2.Replace(@"AndLuaPlus", textBox1.Text);
59 | FileStream fs3 = new FileStream(textBox2.Text + "/init.config", FileMode.Create);
60 | byte[] data3 = System.Text.Encoding.Default.GetBytes(config2);
61 | fs3.Write(data3, 0, data3.Length);
62 | fs3.Flush();
63 | fs3.Close();
64 | //刷新工程
65 | _project.LoadProject();
66 | //关闭窗口
67 | this.Close();
68 | }
69 | else
70 | {
71 | //存在
72 | MessageBox.Show("该文件夹已被占用,你必须重新选择一个有效的文件夹,以继续创建你的应用程序。", "提示");
73 | }
74 | }
75 | //取消
76 | private void ucBtnExt2_BtnClick(object sender, EventArgs e)
77 | {
78 | this.Close();
79 | }
80 | private void textBox1_TextChanged(object sender, EventArgs e)
81 | {
82 | //实时更新工程路径 并且去除工程文件夹包含的空格
83 | textBox2.Text = ProjectPath + "/" + textBox1.Text.Replace(" ", "");
84 | }
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/NewProject.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/Program.cs:
--------------------------------------------------------------------------------
1 | using ICSharpCode.SharpZipLib.Zip;
2 | using System;
3 | using System.IO;
4 | using System.Reflection;
5 | using System.Runtime.Serialization.Formatters.Binary;
6 | using System.Windows.Forms;
7 |
8 | /*
9 | *AndLua+ v1.0
10 | * Copyright 2020-02-01
11 | * Author: Alone
12 | * My Blog: http://ly250.cn/
13 | * Github: https://github.com/LingYang8/AndLuaPlus
14 | */
15 |
16 | namespace AndLuaPlus
17 | {
18 | static class Program
19 | {
20 | [STAThread]
21 | static void Main()
22 | {
23 | AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
24 | if (Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + "/libs") == false)
25 | {
26 | deszip("libs1", AppDomain.CurrentDomain.BaseDirectory + "/libs1.zip");
27 | if (Compress(AppDomain.CurrentDomain.BaseDirectory + "/", AppDomain.CurrentDomain.BaseDirectory + "/libs1.zip", null) != "Success")
28 | {
29 | MessageBox.Show("初始化错误!", "提示");
30 | }
31 | }
32 | Application.EnableVisualStyles();
33 | Application.SetCompatibleTextRenderingDefault(false);
34 | Application.Run(new Loading());
35 | }
36 | private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs e)
37 | {
38 | string _resName = "AndLuaPlus.libs." + new AssemblyName(e.Name).Name + ".dll";
39 | using (var _stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(_resName))
40 | {
41 | byte[] _data = new byte[_stream.Length];
42 | _stream.Read(_data, 0, _data.Length);
43 | return Assembly.Load(_data);
44 | }
45 | }
46 | public static string Compress(string DirPath, string ZipPath, string ZipPWD)
47 | {
48 | FastZip fz = new FastZip();
49 | string state = "Fail...";
50 | try
51 | {
52 | fz.Password = ZipPWD;
53 | fz.ExtractZip(ZipPath, DirPath, null);
54 | state = "Success";
55 | }
56 | catch (Exception ex)
57 | {
58 | state += "," + ex.Message;
59 | }
60 | return state;
61 | }
62 | //读取Resource文件并保存到指定路径
63 | public static void deszip(string filename, string path)
64 | {
65 | System.Resources.ResourceManager rm = Properties.Resources.ResourceManager;
66 | FileStream Stream = new FileStream(path, FileMode.OpenOrCreate);
67 | BinaryFormatter bin = new BinaryFormatter();
68 | try
69 | {
70 | bin.Serialize(Stream, rm.GetObject(filename, null));
71 | Stream.Close();
72 | }
73 | catch (InvalidOperationException)
74 | {
75 | throw;
76 | }
77 | }
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/Project.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 26, 17
122 |
123 |
--------------------------------------------------------------------------------
/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("AndLuaPlus")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("AndLuaPlus")]
13 | [assembly: AssemblyCopyright("Copyright © 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("c6128084-b8e4-448f-9339-1c6a8e3a1ef9")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace AndLuaPlus.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// 一个强类型的资源类,用于查找本地化的字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// 返回此类使用的缓存的 ResourceManager 实例。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AndLuaPlus.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 重写当前线程的 CurrentUICulture 属性
51 | /// 重写当前线程的 CurrentUICulture 属性。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// 查找类似 <?xml version="1.0" encoding="utf-8"?>
65 | ///<configuration>
66 | /// <configSections>
67 | /// <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
68 | /// <section name="AndLuaPlus.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
69 | /// </sectionGroup>
70 | /// </ [字符串的其余部分被截断]"; 的本地化字符串。
71 | ///
72 | internal static string AndLuaConfig {
73 | get {
74 | return ResourceManager.GetString("AndLuaConfig", resourceCulture);
75 | }
76 | }
77 |
78 | ///
79 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。
80 | ///
81 | internal static System.Drawing.Bitmap icon {
82 | get {
83 | object obj = ResourceManager.GetObject("icon", resourceCulture);
84 | return ((System.Drawing.Bitmap)(obj));
85 | }
86 | }
87 |
88 | ///
89 | /// 查找 System.Byte[] 类型的本地化资源。
90 | ///
91 | internal static byte[] libs {
92 | get {
93 | object obj = ResourceManager.GetObject("libs", resourceCulture);
94 | return ((byte[])(obj));
95 | }
96 | }
97 |
98 | ///
99 | /// 查找 System.Byte[] 类型的本地化资源。
100 | ///
101 | internal static byte[] libs1 {
102 | get {
103 | object obj = ResourceManager.GetObject("libs1", resourceCulture);
104 | return ((byte[])(obj));
105 | }
106 | }
107 |
108 | ///
109 | /// 查找 System.Byte[] 类型的本地化资源。
110 | ///
111 | internal static byte[] lua {
112 | get {
113 | object obj = ResourceManager.GetObject("lua", resourceCulture);
114 | return ((byte[])(obj));
115 | }
116 | }
117 |
118 | ///
119 | /// 查找类似 <?xml version="1.0" encoding="utf-8" ?>
120 | ///<configuration>
121 | ///<appSettings>
122 | ///<add key = "Name" value = "AndLuaPlus"></add>
123 | ///<add key = "Var" value = "1.0"></add>
124 | ///</appSettings>
125 | ///</configuration> 的本地化字符串。
126 | ///
127 | internal static string LuaConfig {
128 | get {
129 | return ResourceManager.GetString("LuaConfig", resourceCulture);
130 | }
131 | }
132 |
133 | ///
134 | /// 查找类似 print("Hello World!") 的本地化字符串。
135 | ///
136 | internal static string Main {
137 | get {
138 | return ResourceManager.GetString("Main", resourceCulture);
139 | }
140 | }
141 | }
142 | }
143 |
--------------------------------------------------------------------------------
/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | ..\bin\Debug\AndLua+.exe.config;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;gb2312
123 |
124 |
125 | ..\Resources\icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
126 |
127 |
128 | ..\bin\Debug\libs.zip;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
129 |
130 |
131 | ..\bin\Debug\libs1.zip;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
132 |
133 |
134 | ..\bin\Debug\lua.zip;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
135 |
136 |
137 | ..\Resources\LuaConfig.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;gb2312
138 |
139 |
140 | ..\Resources\Main.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;gb2312
141 |
142 |
--------------------------------------------------------------------------------
/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace AndLuaPlus.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.UserScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.DefaultSettingValueAttribute("C:/Program Files (x86)/AndLuaPlus")]
29 | public string InstallationPath {
30 | get {
31 | return ((string)(this["InstallationPath"]));
32 | }
33 | set {
34 | this["InstallationPath"] = value;
35 | }
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | C:/Program Files (x86)/AndLuaPlus
7 |
8 |
9 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # AndLuaPlus
2 | AndLua+是使用Lua语言开发应用程序的工具。
3 | 基于.net framework 4.5开发。
4 | 在使用之前建议详细阅读程序自带帮助文档或阅读Lua官方文档。
5 | 用户协议
6 | 作者不对使用该软件产生的任何直接或间接损失负责。 勿使用该程序编写恶意程序以损害他人。 继续使用表示你已知晓并同意该协议。
7 |
8 | 程序截图
9 | 
10 |
11 | 
12 |
--------------------------------------------------------------------------------
/Resources/AndLua+.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | C:/Program Files (x86)/AndLuaPlus
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Resources/Lua.xshd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | TODO
19 | FIXME
20 |
21 |
22 | HACK
23 | UNDONE
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | ---
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | --\[[=]*\[
41 | \][=]*]
42 |
43 |
44 |
45 |
46 | --
47 |
48 |
49 |
50 | "
51 | "
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | '
60 | '
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | \[[=]*\[
69 | \][=]*]
70 |
71 |
72 |
73 | true
74 | false
75 |
76 |
77 |
78 | and
79 | break
80 | do
81 | else
82 | elseif
83 | end
84 | false
85 | for
86 | function
87 | if
88 | in
89 | local
90 |
91 | not
92 | or
93 | repeat
94 | return
95 | then
96 | true
97 | until
98 | while
99 | using
100 | continue
101 |
102 |
103 |
104 | break
105 | return
106 |
107 |
108 |
109 | import
110 | Form
111 |
112 |
113 |
114 | local
115 |
116 |
117 |
118 | nil
119 |
120 |
121 |
122 |
123 | \b
124 | [\d\w_]+ # an identifier
125 | (?=\s*\() # followed by (
126 |
127 |
128 | \b
129 | [\d\w_]+ # an identifier
130 | (?=\s*\") # followed by "
131 |
132 |
133 | \b
134 | [\d\w_]+ # an identifier
135 | (?=\s*\') # followed by '
136 |
137 |
138 | \b
139 | [\d\w_]+ # an identifier
140 | (?=\s*\{) # followed by {
141 |
142 |
143 | \b
144 | [\d\w_]+ # an identifier
145 | (?=\s*\[) # followed by [
146 |
147 |
148 |
149 |
150 | \b0[xX][0-9a-fA-F]+ # hex number
151 | |
152 | ( \b\d+(\.[0-9]+)? #number with optional floating point
153 | | \.[0-9]+ #or just starting with floating point
154 | )
155 | ([eE][+-]?[0-9]+)? # optional exponent
156 |
157 |
158 |
159 | [?,.;()\[\]{}+\-/%*<>^+~!|&]+
160 |
161 |
162 |
--------------------------------------------------------------------------------
/Resources/LuaConfig.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Resources/Main.txt:
--------------------------------------------------------------------------------
1 | print("Hello World!")
--------------------------------------------------------------------------------
/Resources/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/team-xc/AndLuaPlus/479336bf606c6f7445f0a0ea26ecba3e60b560b5/Resources/icon.png
--------------------------------------------------------------------------------
/Settings.cs:
--------------------------------------------------------------------------------
1 | namespace AndLuaPlus.Properties
2 | {
3 |
4 | /*
5 | *AndLua+ v1.0
6 | * Copyright 2020-02-01
7 | * Author: Alone
8 | * My Blog: http://ly250.cn/
9 | * Github: https://github.com/LingYang8/AndLuaPlus
10 | */
11 |
12 | // 通过此类可以处理设置类的特定事件:
13 | // 在更改某个设置的值之前将引发 SettingChanging 事件。
14 | // 在更改某个设置的值之后将引发 PropertyChanged 事件。
15 | // 在加载设置值之后将引发 SettingsLoaded 事件。
16 | // 在保存设置值之前将引发 SettingsSaving 事件。
17 | internal sealed partial class Settings
18 | {
19 |
20 | public Settings()
21 | {
22 | // // 若要为保存和更改设置添加事件处理程序,请取消注释下列行:
23 | //
24 | // this.SettingChanging += this.SettingChangingEventHandler;
25 | //
26 | // this.SettingsSaving += this.SettingsSavingEventHandler;
27 | //
28 | }
29 |
30 | private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e)
31 | {
32 | // 在此处添加用于处理 SettingChangingEvent 事件的代码。
33 | }
34 |
35 | private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e)
36 | {
37 | // 在此处添加用于处理 SettingsSaving 事件的代码。
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Welcome.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AndLuaPlus
2 | {
3 | partial class Welcome
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | /*
11 | *AndLua+ v1.0
12 | * Copyright 2020-02-01
13 | * Author: Alone
14 | * My Blog: http://ly250.cn/
15 | * Github: https://github.com/LingYang8/AndLuaPlus
16 | */
17 |
18 | ///
19 | /// 清理所有正在使用的资源。
20 | ///
21 | /// 如果应释放托管资源,为 true;否则为 false。
22 | protected override void Dispose(bool disposing)
23 | {
24 | if (disposing && (components != null))
25 | {
26 | components.Dispose();
27 | }
28 | base.Dispose(disposing);
29 | }
30 |
31 | #region Windows 窗体设计器生成的代码
32 |
33 | ///
34 | /// 设计器支持所需的方法 - 不要修改
35 | /// 使用代码编辑器修改此方法的内容。
36 | ///
37 | private void InitializeComponent()
38 | {
39 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Welcome));
40 | this.ucWave1 = new HZH_Controls.Controls.UCWave();
41 | this.panel1 = new System.Windows.Forms.Panel();
42 | this.label1 = new System.Windows.Forms.Label();
43 | this.panel2 = new System.Windows.Forms.Panel();
44 | this.ucBtnImg2 = new HZH_Controls.Controls.UCBtnImg();
45 | this.textBox1 = new System.Windows.Forms.TextBox();
46 | this.pictureBox1 = new System.Windows.Forms.PictureBox();
47 | this.ucBtnExt1 = new HZH_Controls.Controls.UCBtnExt();
48 | this.panel1.SuspendLayout();
49 | this.panel2.SuspendLayout();
50 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
51 | this.SuspendLayout();
52 | //
53 | // ucWave1
54 | //
55 | this.ucWave1.Location = new System.Drawing.Point(-7, 367);
56 | this.ucWave1.Name = "ucWave1";
57 | this.ucWave1.Size = new System.Drawing.Size(799, 100);
58 | this.ucWave1.TabIndex = 0;
59 | this.ucWave1.Text = "ucWave1";
60 | this.ucWave1.WaveColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(138)))), ((int)(((byte)(255)))));
61 | this.ucWave1.WaveHeight = 20;
62 | this.ucWave1.WaveSleep = 30;
63 | this.ucWave1.WaveWidth = 270;
64 | //
65 | // panel1
66 | //
67 | this.panel1.Anchor = System.Windows.Forms.AnchorStyles.None;
68 | this.panel1.Controls.Add(this.label1);
69 | this.panel1.Controls.Add(this.panel2);
70 | this.panel1.Controls.Add(this.pictureBox1);
71 | this.panel1.Controls.Add(this.ucBtnExt1);
72 | this.panel1.Location = new System.Drawing.Point(12, 12);
73 | this.panel1.Name = "panel1";
74 | this.panel1.Size = new System.Drawing.Size(760, 349);
75 | this.panel1.TabIndex = 2;
76 | //
77 | // label1
78 | //
79 | this.label1.AutoSize = true;
80 | this.label1.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
81 | this.label1.Location = new System.Drawing.Point(324, 140);
82 | this.label1.Name = "label1";
83 | this.label1.Size = new System.Drawing.Size(119, 31);
84 | this.label1.TabIndex = 3;
85 | this.label1.Text = "AndLua+";
86 | //
87 | // panel2
88 | //
89 | this.panel2.Controls.Add(this.ucBtnImg2);
90 | this.panel2.Controls.Add(this.textBox1);
91 | this.panel2.Location = new System.Drawing.Point(282, 275);
92 | this.panel2.Name = "panel2";
93 | this.panel2.Size = new System.Drawing.Size(200, 25);
94 | this.panel2.TabIndex = 2;
95 | //
96 | // ucBtnImg2
97 | //
98 | this.ucBtnImg2.BackColor = System.Drawing.Color.White;
99 | this.ucBtnImg2.BtnBackColor = System.Drawing.Color.White;
100 | this.ucBtnImg2.BtnFont = new System.Drawing.Font("微软雅黑", 17F);
101 | this.ucBtnImg2.BtnForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))));
102 | this.ucBtnImg2.BtnText = "";
103 | this.ucBtnImg2.ConerRadius = 5;
104 | this.ucBtnImg2.Cursor = System.Windows.Forms.Cursors.Hand;
105 | this.ucBtnImg2.EnabledMouseEffect = true;
106 | this.ucBtnImg2.FillColor = System.Drawing.Color.White;
107 | this.ucBtnImg2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
108 | this.ucBtnImg2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))));
109 | this.ucBtnImg2.Image = ((System.Drawing.Image)(resources.GetObject("ucBtnImg2.Image")));
110 | this.ucBtnImg2.ImageAlign = System.Drawing.ContentAlignment.MiddleCenter;
111 | this.ucBtnImg2.ImageFontIcons = ((object)(resources.GetObject("ucBtnImg2.ImageFontIcons")));
112 | this.ucBtnImg2.IsRadius = false;
113 | this.ucBtnImg2.IsShowRect = false;
114 | this.ucBtnImg2.IsShowTips = false;
115 | this.ucBtnImg2.Location = new System.Drawing.Point(164, 0);
116 | this.ucBtnImg2.Margin = new System.Windows.Forms.Padding(0);
117 | this.ucBtnImg2.Name = "ucBtnImg2";
118 | this.ucBtnImg2.RectColor = System.Drawing.Color.White;
119 | this.ucBtnImg2.RectWidth = 1;
120 | this.ucBtnImg2.Size = new System.Drawing.Size(36, 23);
121 | this.ucBtnImg2.TabIndex = 2;
122 | this.ucBtnImg2.TabStop = false;
123 | this.ucBtnImg2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
124 | this.ucBtnImg2.TipsColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(30)))), ((int)(((byte)(99)))));
125 | this.ucBtnImg2.TipsText = "";
126 | this.ucBtnImg2.BtnClick += new System.EventHandler(this.ucBtnImg2_BtnClick);
127 | //
128 | // textBox1
129 | //
130 | this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
131 | this.textBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
132 | this.textBox1.ForeColor = System.Drawing.SystemColors.WindowFrame;
133 | this.textBox1.Location = new System.Drawing.Point(0, 1);
134 | this.textBox1.Name = "textBox1";
135 | this.textBox1.Size = new System.Drawing.Size(161, 23);
136 | this.textBox1.TabIndex = 0;
137 | this.textBox1.Text = "C:\\Program Files (x86)\\AndLuaPlus";
138 | this.textBox1.WordWrap = false;
139 | //
140 | // pictureBox1
141 | //
142 | this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.None;
143 | this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
144 | this.pictureBox1.Location = new System.Drawing.Point(332, 45);
145 | this.pictureBox1.Name = "pictureBox1";
146 | this.pictureBox1.Size = new System.Drawing.Size(95, 85);
147 | this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
148 | this.pictureBox1.TabIndex = 1;
149 | this.pictureBox1.TabStop = false;
150 | //
151 | // ucBtnExt1
152 | //
153 | this.ucBtnExt1.BackColor = System.Drawing.Color.White;
154 | this.ucBtnExt1.BtnBackColor = System.Drawing.Color.White;
155 | this.ucBtnExt1.BtnFont = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
156 | this.ucBtnExt1.BtnForeColor = System.Drawing.Color.White;
157 | this.ucBtnExt1.BtnText = "开始安装";
158 | this.ucBtnExt1.ConerRadius = 40;
159 | this.ucBtnExt1.Cursor = System.Windows.Forms.Cursors.Hand;
160 | this.ucBtnExt1.EnabledMouseEffect = true;
161 | this.ucBtnExt1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(138)))), ((int)(((byte)(255)))));
162 | this.ucBtnExt1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
163 | this.ucBtnExt1.IsRadius = true;
164 | this.ucBtnExt1.IsShowRect = false;
165 | this.ucBtnExt1.IsShowTips = false;
166 | this.ucBtnExt1.Location = new System.Drawing.Point(282, 200);
167 | this.ucBtnExt1.Margin = new System.Windows.Forms.Padding(0);
168 | this.ucBtnExt1.Name = "ucBtnExt1";
169 | this.ucBtnExt1.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(138)))), ((int)(((byte)(255)))));
170 | this.ucBtnExt1.RectWidth = 1;
171 | this.ucBtnExt1.Size = new System.Drawing.Size(200, 40);
172 | this.ucBtnExt1.TabIndex = 0;
173 | this.ucBtnExt1.TabStop = false;
174 | this.ucBtnExt1.TipsColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(30)))), ((int)(((byte)(99)))));
175 | this.ucBtnExt1.TipsText = "";
176 | this.ucBtnExt1.BtnClick += new System.EventHandler(this.ucBtnExt1_BtnClick);
177 | //
178 | // Welcome
179 | //
180 | this.BackColor = System.Drawing.Color.White;
181 | this.ClientSize = new System.Drawing.Size(784, 461);
182 | this.Controls.Add(this.panel1);
183 | this.Controls.Add(this.ucWave1);
184 | this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
185 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
186 | this.MaximizeBox = false;
187 | this.MinimizeBox = false;
188 | this.Name = "Welcome";
189 | this.ShowIcon = false;
190 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
191 | this.Text = "AndLua+ v1.0 Powered By Alone";
192 | this.Shown += new System.EventHandler(this.Welcome_Shown);
193 | this.panel1.ResumeLayout(false);
194 | this.panel1.PerformLayout();
195 | this.panel2.ResumeLayout(false);
196 | this.panel2.PerformLayout();
197 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
198 | this.ResumeLayout(false);
199 |
200 | }
201 |
202 | #endregion
203 |
204 | private HZH_Controls.Controls.UCWave ucWave1;
205 | private System.Windows.Forms.Panel panel1;
206 | private HZH_Controls.Controls.UCBtnExt ucBtnExt1;
207 | private System.Windows.Forms.PictureBox pictureBox1;
208 | private System.Windows.Forms.TextBox textBox1;
209 | private System.Windows.Forms.Panel panel2;
210 | private HZH_Controls.Controls.UCBtnImg ucBtnImg2;
211 | private System.Windows.Forms.Label label1;
212 | }
213 | }
214 |
--------------------------------------------------------------------------------
/Welcome.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using HZH_Controls;
9 | using HZH_Controls.Forms;
10 |
11 | /*
12 | *AndLua+ v1.0
13 | * Copyright 2020-02-01
14 | * Author: Alone
15 | * My Blog: http://ly250.cn/
16 | * Github: https://github.com/LingYang8/AndLuaPlus
17 | */
18 |
19 | namespace AndLuaPlus
20 | {
21 | public partial class Welcome : Form
22 | {
23 | //载入事件
24 | public Welcome()
25 | {
26 | InitializeComponent();
27 | textBox1.Text = Properties.Settings.Default.InstallationPath;
28 | }
29 | //窗口第一次显示事件
30 | private void Welcome_Shown(object sender, EventArgs e)
31 | {
32 | }
33 | //重写横向居中方法
34 | protected override void OnResize(EventArgs e)
35 | {
36 | base.OnResize(e);
37 | int x;
38 | int y;
39 | //开始安装按钮
40 | x = (int)(0.5 * (this.Width - ucBtnExt1.Width));
41 | y = ucBtnExt1.Location.Y;
42 | ucBtnExt1.Location = new System.Drawing.Point(x, y);
43 | //Logo图片
44 | x = (int)(0.5 * (this.Width - pictureBox1.Width));
45 | y = pictureBox1.Location.Y;
46 | pictureBox1.Location = new System.Drawing.Point(x, y);
47 | //安装路径文本
48 | x = (int)(0.5 * (this.Width - panel2.Width));
49 | y = panel2.Location.Y;
50 | panel2.Location = new System.Drawing.Point(x, y);
51 | //软件名称Logo
52 | x = (int)(0.5 * (this.Width - label1.Width));
53 | y = label1.Location.Y;
54 | label1.Location = new System.Drawing.Point(x, y);
55 | }
56 | //选择安装目录
57 | private void ucBtnImg2_BtnClick(object sender, EventArgs e)
58 | {
59 | FolderBrowserDialog path = new FolderBrowserDialog();
60 | path.SelectedPath = this.textBox1.Text;
61 | path.Description = "请选择一个有效的AndLua+安装路径,相关的文件以及你创建的工程都会在此文件夹。";
62 | path.ShowDialog();
63 | this.textBox1.Text = path.SelectedPath;
64 | }
65 | //开始安装
66 | private void ucBtnExt1_BtnClick(object sender, EventArgs e)
67 | {
68 | //配置文件路径
69 | string configPath = textBox1.Text + "/andlua.config";
70 | //判断配置文件是否存在
71 | if (System.IO.File.Exists(configPath))
72 | {
73 | //存在 弹出是否重新安装
74 | if (MessageBox.Show("重新安装将会删除你所有的安装文件,包括你的Lua支持库,但这操作并不会删除你的Lua工程。", "检测到当前目录已存在安装文件,是否重新安装?", MessageBoxButtons.YesNo) == DialogResult.Yes)
75 | {
76 | //保存安装路径
77 | Properties.Settings.Default["InstallationPath"] = textBox1.Text;
78 | Properties.Settings.Default.Save();
79 | //重新安装
80 | Form install = new Install();
81 | this.Hide();
82 | install.ShowDialog();
83 | Application.ExitThread();
84 | }
85 | }
86 | else
87 | {
88 | //保存安装路径
89 | Properties.Settings.Default["InstallationPath"] = textBox1.Text;
90 | Properties.Settings.Default.Save();
91 | //不存在 跳转安装
92 | Form install = new Install();
93 | this.Hide();
94 | install.ShowDialog();
95 | Application.ExitThread();
96 | }
97 | }
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/about.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AndLuaPlus
2 | {
3 | partial class About
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | /*
11 | *AndLua+ v1.0
12 | * Copyright 2020-02-01
13 | * Author: Alone
14 | * My Blog: http://ly250.cn/
15 | * Github: https://github.com/LingYang8/AndLuaPlus
16 | */
17 |
18 | ///
19 | /// 清理所有正在使用的资源。
20 | ///
21 | /// 如果应释放托管资源,为 true;否则为 false。
22 | protected override void Dispose(bool disposing)
23 | {
24 | if (disposing && (components != null))
25 | {
26 | components.Dispose();
27 | }
28 | base.Dispose(disposing);
29 | }
30 |
31 | #region Windows 窗体设计器生成的代码
32 |
33 | ///
34 | /// 设计器支持所需的方法 - 不要修改
35 | /// 使用代码编辑器修改此方法的内容。
36 | ///
37 | private void InitializeComponent()
38 | {
39 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(About));
40 | this.label1 = new System.Windows.Forms.Label();
41 | this.pictureBox1 = new System.Windows.Forms.PictureBox();
42 | this.label2 = new System.Windows.Forms.Label();
43 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
44 | this.SuspendLayout();
45 | //
46 | // label1
47 | //
48 | this.label1.AutoSize = true;
49 | this.label1.Font = new System.Drawing.Font("微软雅黑", 10F);
50 | this.label1.Location = new System.Drawing.Point(40, 136);
51 | this.label1.Name = "label1";
52 | this.label1.Size = new System.Drawing.Size(461, 160);
53 | this.label1.TabIndex = 0;
54 | this.label1.Text = "AndLua+是由Alone开发的在PC平台使用Lua语言开发应用程序的工具。\r\n在使用之前建议详细阅读程序自带帮助文档。\r\n用户协议\r\n作者不对使用该软件产生的" +
55 | "任何直接或间接损失负责。\r\n勿使用该程序编写恶意程序以损害他人。\r\n继续使用表示你已知晓并同意该协议。\r\n\r\n1.0 (2020-02-01)";
56 | //
57 | // pictureBox1
58 | //
59 | this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.None;
60 | this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
61 | this.pictureBox1.Location = new System.Drawing.Point(220, 12);
62 | this.pictureBox1.Name = "pictureBox1";
63 | this.pictureBox1.Size = new System.Drawing.Size(85, 75);
64 | this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
65 | this.pictureBox1.TabIndex = 2;
66 | this.pictureBox1.TabStop = false;
67 | //
68 | // label2
69 | //
70 | this.label2.AutoSize = true;
71 | this.label2.Font = new System.Drawing.Font("微软雅黑", 12F);
72 | this.label2.Location = new System.Drawing.Point(216, 95);
73 | this.label2.Name = "label2";
74 | this.label2.Size = new System.Drawing.Size(80, 21);
75 | this.label2.TabIndex = 4;
76 | this.label2.Text = "AndLua+";
77 | //
78 | // About
79 | //
80 | this.BackColor = System.Drawing.Color.White;
81 | this.ClientSize = new System.Drawing.Size(534, 341);
82 | this.Controls.Add(this.label2);
83 | this.Controls.Add(this.pictureBox1);
84 | this.Controls.Add(this.label1);
85 | this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
86 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
87 | this.MaximizeBox = false;
88 | this.MinimizeBox = false;
89 | this.Name = "About";
90 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
91 | this.Text = "About AndLua+";
92 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
93 | this.ResumeLayout(false);
94 | this.PerformLayout();
95 |
96 | }
97 |
98 | #endregion
99 |
100 | private System.Windows.Forms.Label label1;
101 | private System.Windows.Forms.PictureBox pictureBox1;
102 | private System.Windows.Forms.Label label2;
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/about.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace AndLuaPlus
10 | {
11 | public partial class About : Form
12 | {
13 | public About()
14 | {
15 | InitializeComponent();
16 | }
17 | //关闭窗口
18 | private void ucBtnExt1_BtnClick(object sender, EventArgs e)
19 | {
20 | this.Close();
21 | }
22 | //重写横向居中方法
23 | protected override void OnResize(EventArgs e)
24 | {
25 | base.OnResize(e);
26 | int x;
27 | int y;
28 | //Logo
29 | x = (int)(0.5 * (this.Width - pictureBox1.Width));
30 | y = pictureBox1.Location.Y;
31 | pictureBox1.Location = new System.Drawing.Point(x, y);
32 | //软件名称Logo
33 | x = (int)(0.5 * (this.Width - label2.Width));
34 | y = label2.Location.Y;
35 | label2.Location = new System.Drawing.Point(x, y);
36 | //软件说明
37 | x = (int)(0.5 * (this.Width - label1.Width));
38 | y = label1.Location.Y;
39 | label1.Location = new System.Drawing.Point(x, y);
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/about.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 |
123 | 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
206 | aAqN11skAAAAAElFTkSuQmCC
207 |
208 |
209 |
--------------------------------------------------------------------------------
/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | C:/Program Files (x86)/AndLuaPlus
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/bin/Debug/AndLua+.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | C:/Program Files (x86)/AndLuaPlus
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/bin/Debug/AndLua+.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/team-xc/AndLuaPlus/479336bf606c6f7445f0a0ea26ecba3e60b560b5/bin/Debug/AndLua+.pdb
--------------------------------------------------------------------------------
/bin/Debug/dll/IWshRuntimeLibrary.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/team-xc/AndLuaPlus/479336bf606c6f7445f0a0ea26ecba3e60b560b5/bin/Debug/dll/IWshRuntimeLibrary.dll
--------------------------------------------------------------------------------
/bin/Debug/libs/CSkin.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/team-xc/AndLuaPlus/479336bf606c6f7445f0a0ea26ecba3e60b560b5/bin/Debug/libs/CSkin.dll
--------------------------------------------------------------------------------
/bin/Debug/libs/HZH_Controls.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/team-xc/AndLuaPlus/479336bf606c6f7445f0a0ea26ecba3e60b560b5/bin/Debug/libs/HZH_Controls.dll
--------------------------------------------------------------------------------
/bin/Debug/libs/ICSharpCode.AvalonEdit.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/team-xc/AndLuaPlus/479336bf606c6f7445f0a0ea26ecba3e60b560b5/bin/Debug/libs/ICSharpCode.AvalonEdit.dll
--------------------------------------------------------------------------------
/bin/Debug/libs/LuaInterface.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/team-xc/AndLuaPlus/479336bf606c6f7445f0a0ea26ecba3e60b560b5/bin/Debug/libs/LuaInterface.dll
--------------------------------------------------------------------------------
/bin/Debug/libs/lua51.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/team-xc/AndLuaPlus/479336bf606c6f7445f0a0ea26ecba3e60b560b5/bin/Debug/libs/lua51.dll
--------------------------------------------------------------------------------
/bin/Debug/libs/luanet.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/team-xc/AndLuaPlus/479336bf606c6f7445f0a0ea26ecba3e60b560b5/bin/Debug/libs/luanet.dll
--------------------------------------------------------------------------------
/bin/Debug/libs1/HZH_Controls.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/team-xc/AndLuaPlus/479336bf606c6f7445f0a0ea26ecba3e60b560b5/bin/Debug/libs1/HZH_Controls.dll
--------------------------------------------------------------------------------
/bin/Debug/lua/http_headers.lua:
--------------------------------------------------------------------------------
1 | local rawget, rawset, setmetatable =
2 | rawget, rawset, setmetatable
3 |
4 | local str_lower = string.lower
5 |
6 | local _M = {
7 | _VERSION = '0.12',
8 | }
9 |
10 |
11 | -- Returns an empty headers table with internalised case normalisation.
12 | function _M.new()
13 | local mt = {
14 | normalised = {},
15 | }
16 |
17 | mt.__index = function(t, k)
18 | return rawget(t, mt.normalised[str_lower(k)])
19 | end
20 |
21 | mt.__newindex = function(t, k, v)
22 | local k_normalised = str_lower(k)
23 |
24 | -- First time seeing this header field?
25 | if not mt.normalised[k_normalised] then
26 | -- Create a lowercased entry in the metatable proxy, with the value
27 | -- of the given field case
28 | mt.normalised[k_normalised] = k
29 |
30 | -- Set the header using the given field case
31 | rawset(t, k, v)
32 | else
33 | -- We're being updated just with a different field case. Use the
34 | -- normalised metatable proxy to give us the original key case, and
35 | -- perorm a rawset() to update the value.
36 | rawset(t, mt.normalised[k_normalised], v)
37 | end
38 | end
39 |
40 | return setmetatable({}, mt)
41 | end
42 |
43 |
44 | return _M
45 |
--------------------------------------------------------------------------------
/bin/Debug/lua/json.lua:
--------------------------------------------------------------------------------
1 | --
2 | -- json.lua
3 | --
4 | -- Copyright (c) 2019 rxi
5 | --
6 | -- Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | -- this software and associated documentation files (the "Software"), to deal in
8 | -- the Software without restriction, including without limitation the rights to
9 | -- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | -- of the Software, and to permit persons to whom the Software is furnished to do
11 | -- so, subject to the following conditions:
12 | --
13 | -- The above copyright notice and this permission notice shall be included in all
14 | -- copies or substantial portions of the Software.
15 | --
16 | -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | -- SOFTWARE.
23 | --
24 |
25 | local json = { _version = "0.1.2" }
26 |
27 | -------------------------------------------------------------------------------
28 | -- Encode
29 | -------------------------------------------------------------------------------
30 |
31 | local encode
32 |
33 | local escape_char_map = {
34 | [ "\\" ] = "\\\\",
35 | [ "\"" ] = "\\\"",
36 | [ "\b" ] = "\\b",
37 | [ "\f" ] = "\\f",
38 | [ "\n" ] = "\\n",
39 | [ "\r" ] = "\\r",
40 | [ "\t" ] = "\\t",
41 | }
42 |
43 | local escape_char_map_inv = { [ "\\/" ] = "/" }
44 | for k, v in pairs(escape_char_map) do
45 | escape_char_map_inv[v] = k
46 | end
47 |
48 |
49 | local function escape_char(c)
50 | return escape_char_map[c] or string.format("\\u%04x", c:byte())
51 | end
52 |
53 |
54 | local function encode_nil(val)
55 | return "null"
56 | end
57 |
58 |
59 | local function encode_table(val, stack)
60 | local res = {}
61 | stack = stack or {}
62 |
63 | -- Circular reference?
64 | if stack[val] then error("circular reference") end
65 |
66 | stack[val] = true
67 |
68 | if rawget(val, 1) ~= nil or next(val) == nil then
69 | -- Treat as array -- check keys are valid and it is not sparse
70 | local n = 0
71 | for k in pairs(val) do
72 | if type(k) ~= "number" then
73 | error("invalid table: mixed or invalid key types")
74 | end
75 | n = n + 1
76 | end
77 | if n ~= #val then
78 | error("invalid table: sparse array")
79 | end
80 | -- Encode
81 | for i, v in ipairs(val) do
82 | table.insert(res, encode(v, stack))
83 | end
84 | stack[val] = nil
85 | return "[" .. table.concat(res, ",") .. "]"
86 |
87 | else
88 | -- Treat as an object
89 | for k, v in pairs(val) do
90 | if type(k) ~= "string" then
91 | error("invalid table: mixed or invalid key types")
92 | end
93 | table.insert(res, encode(k, stack) .. ":" .. encode(v, stack))
94 | end
95 | stack[val] = nil
96 | return "{" .. table.concat(res, ",") .. "}"
97 | end
98 | end
99 |
100 |
101 | local function encode_string(val)
102 | return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"'
103 | end
104 |
105 |
106 | local function encode_number(val)
107 | -- Check for NaN, -inf and inf
108 | if val ~= val or val <= -math.huge or val >= math.huge then
109 | error("unexpected number value '" .. tostring(val) .. "'")
110 | end
111 | return string.format("%.14g", val)
112 | end
113 |
114 |
115 | local type_func_map = {
116 | [ "nil" ] = encode_nil,
117 | [ "table" ] = encode_table,
118 | [ "string" ] = encode_string,
119 | [ "number" ] = encode_number,
120 | [ "boolean" ] = tostring,
121 | }
122 |
123 |
124 | encode = function(val, stack)
125 | local t = type(val)
126 | local f = type_func_map[t]
127 | if f then
128 | return f(val, stack)
129 | end
130 | error("unexpected type '" .. t .. "'")
131 | end
132 |
133 |
134 | function json.encode(val)
135 | return ( encode(val) )
136 | end
137 |
138 |
139 | -------------------------------------------------------------------------------
140 | -- Decode
141 | -------------------------------------------------------------------------------
142 |
143 | local parse
144 |
145 | local function create_set(...)
146 | local res = {}
147 | for i = 1, select("#", ...) do
148 | res[ select(i, ...) ] = true
149 | end
150 | return res
151 | end
152 |
153 | local space_chars = create_set(" ", "\t", "\r", "\n")
154 | local delim_chars = create_set(" ", "\t", "\r", "\n", "]", "}", ",")
155 | local escape_chars = create_set("\\", "/", '"', "b", "f", "n", "r", "t", "u")
156 | local literals = create_set("true", "false", "null")
157 |
158 | local literal_map = {
159 | [ "true" ] = true,
160 | [ "false" ] = false,
161 | [ "null" ] = nil,
162 | }
163 |
164 |
165 | local function next_char(str, idx, set, negate)
166 | for i = idx, #str do
167 | if set[str:sub(i, i)] ~= negate then
168 | return i
169 | end
170 | end
171 | return #str + 1
172 | end
173 |
174 |
175 | local function decode_error(str, idx, msg)
176 | local line_count = 1
177 | local col_count = 1
178 | for i = 1, idx - 1 do
179 | col_count = col_count + 1
180 | if str:sub(i, i) == "\n" then
181 | line_count = line_count + 1
182 | col_count = 1
183 | end
184 | end
185 | error( string.format("%s at line %d col %d", msg, line_count, col_count) )
186 | end
187 |
188 |
189 | local function codepoint_to_utf8(n)
190 | -- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-appendixa
191 | local f = math.floor
192 | if n <= 0x7f then
193 | return string.char(n)
194 | elseif n <= 0x7ff then
195 | return string.char(f(n / 64) + 192, n % 64 + 128)
196 | elseif n <= 0xffff then
197 | return string.char(f(n / 4096) + 224, f(n % 4096 / 64) + 128, n % 64 + 128)
198 | elseif n <= 0x10ffff then
199 | return string.char(f(n / 262144) + 240, f(n % 262144 / 4096) + 128,
200 | f(n % 4096 / 64) + 128, n % 64 + 128)
201 | end
202 | error( string.format("invalid unicode codepoint '%x'", n) )
203 | end
204 |
205 |
206 | local function parse_unicode_escape(s)
207 | local n1 = tonumber( s:sub(3, 6), 16 )
208 | local n2 = tonumber( s:sub(9, 12), 16 )
209 | -- Surrogate pair?
210 | if n2 then
211 | return codepoint_to_utf8((n1 - 0xd800) * 0x400 + (n2 - 0xdc00) + 0x10000)
212 | else
213 | return codepoint_to_utf8(n1)
214 | end
215 | end
216 |
217 |
218 | local function parse_string(str, i)
219 | local has_unicode_escape = false
220 | local has_surrogate_escape = false
221 | local has_escape = false
222 | local last
223 | for j = i + 1, #str do
224 | local x = str:byte(j)
225 |
226 | if x < 32 then
227 | decode_error(str, j, "control character in string")
228 | end
229 |
230 | if last == 92 then -- "\\" (escape char)
231 | if x == 117 then -- "u" (unicode escape sequence)
232 | local hex = str:sub(j + 1, j + 5)
233 | if not hex:find("%x%x%x%x") then
234 | decode_error(str, j, "invalid unicode escape in string")
235 | end
236 | if hex:find("^[dD][89aAbB]") then
237 | has_surrogate_escape = true
238 | else
239 | has_unicode_escape = true
240 | end
241 | else
242 | local c = string.char(x)
243 | if not escape_chars[c] then
244 | decode_error(str, j, "invalid escape char '" .. c .. "' in string")
245 | end
246 | has_escape = true
247 | end
248 | last = nil
249 |
250 | elseif x == 34 then -- '"' (end of string)
251 | local s = str:sub(i + 1, j - 1)
252 | if has_surrogate_escape then
253 | s = s:gsub("\\u[dD][89aAbB]..\\u....", parse_unicode_escape)
254 | end
255 | if has_unicode_escape then
256 | s = s:gsub("\\u....", parse_unicode_escape)
257 | end
258 | if has_escape then
259 | s = s:gsub("\\.", escape_char_map_inv)
260 | end
261 | return s, j + 1
262 |
263 | else
264 | last = x
265 | end
266 | end
267 | decode_error(str, i, "expected closing quote for string")
268 | end
269 |
270 |
271 | local function parse_number(str, i)
272 | local x = next_char(str, i, delim_chars)
273 | local s = str:sub(i, x - 1)
274 | local n = tonumber(s)
275 | if not n then
276 | decode_error(str, i, "invalid number '" .. s .. "'")
277 | end
278 | return n, x
279 | end
280 |
281 |
282 | local function parse_literal(str, i)
283 | local x = next_char(str, i, delim_chars)
284 | local word = str:sub(i, x - 1)
285 | if not literals[word] then
286 | decode_error(str, i, "invalid literal '" .. word .. "'")
287 | end
288 | return literal_map[word], x
289 | end
290 |
291 |
292 | local function parse_array(str, i)
293 | local res = {}
294 | local n = 1
295 | i = i + 1
296 | while 1 do
297 | local x
298 | i = next_char(str, i, space_chars, true)
299 | -- Empty / end of array?
300 | if str:sub(i, i) == "]" then
301 | i = i + 1
302 | break
303 | end
304 | -- Read token
305 | x, i = parse(str, i)
306 | res[n] = x
307 | n = n + 1
308 | -- Next token
309 | i = next_char(str, i, space_chars, true)
310 | local chr = str:sub(i, i)
311 | i = i + 1
312 | if chr == "]" then break end
313 | if chr ~= "," then decode_error(str, i, "expected ']' or ','") end
314 | end
315 | return res, i
316 | end
317 |
318 |
319 | local function parse_object(str, i)
320 | local res = {}
321 | i = i + 1
322 | while 1 do
323 | local key, val
324 | i = next_char(str, i, space_chars, true)
325 | -- Empty / end of object?
326 | if str:sub(i, i) == "}" then
327 | i = i + 1
328 | break
329 | end
330 | -- Read key
331 | if str:sub(i, i) ~= '"' then
332 | decode_error(str, i, "expected string for key")
333 | end
334 | key, i = parse(str, i)
335 | -- Read ':' delimiter
336 | i = next_char(str, i, space_chars, true)
337 | if str:sub(i, i) ~= ":" then
338 | decode_error(str, i, "expected ':' after key")
339 | end
340 | i = next_char(str, i + 1, space_chars, true)
341 | -- Read value
342 | val, i = parse(str, i)
343 | -- Set
344 | res[key] = val
345 | -- Next token
346 | i = next_char(str, i, space_chars, true)
347 | local chr = str:sub(i, i)
348 | i = i + 1
349 | if chr == "}" then break end
350 | if chr ~= "," then decode_error(str, i, "expected '}' or ','") end
351 | end
352 | return res, i
353 | end
354 |
355 |
356 | local char_func_map = {
357 | [ '"' ] = parse_string,
358 | [ "0" ] = parse_number,
359 | [ "1" ] = parse_number,
360 | [ "2" ] = parse_number,
361 | [ "3" ] = parse_number,
362 | [ "4" ] = parse_number,
363 | [ "5" ] = parse_number,
364 | [ "6" ] = parse_number,
365 | [ "7" ] = parse_number,
366 | [ "8" ] = parse_number,
367 | [ "9" ] = parse_number,
368 | [ "-" ] = parse_number,
369 | [ "t" ] = parse_literal,
370 | [ "f" ] = parse_literal,
371 | [ "n" ] = parse_literal,
372 | [ "[" ] = parse_array,
373 | [ "{" ] = parse_object,
374 | }
375 |
376 |
377 | parse = function(str, idx)
378 | local chr = str:sub(idx, idx)
379 | local f = char_func_map[chr]
380 | if f then
381 | return f(str, idx)
382 | end
383 | decode_error(str, idx, "unexpected character '" .. chr .. "'")
384 | end
385 |
386 |
387 | function json.decode(str)
388 | if type(str) ~= "string" then
389 | error("expected argument of type string, got " .. type(str))
390 | end
391 | local res, idx = parse(str, next_char(str, 1, space_chars, true))
392 | idx = next_char(str, idx, space_chars, true)
393 | if idx <= #str then
394 | decode_error(str, idx, "trailing garbage")
395 | end
396 | return res
397 | end
398 |
399 |
400 | return json
401 |
--------------------------------------------------------------------------------
/libs/ICSharpCode.SharpZipLib.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/team-xc/AndLuaPlus/479336bf606c6f7445f0a0ea26ecba3e60b560b5/libs/ICSharpCode.SharpZipLib.dll
--------------------------------------------------------------------------------
/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/project.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace AndLuaPlus
2 | {
3 | partial class Project
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | /*
11 | *AndLua+ v1.0
12 | * Copyright 2020-02-01
13 | * Author: Alone
14 | * My Blog: http://ly250.cn/
15 | * Github: https://github.com/LingYang8/AndLuaPlus
16 | */
17 |
18 | ///
19 | /// 清理所有正在使用的资源。
20 | ///
21 | /// 如果应释放托管资源,为 true;否则为 false。
22 | protected override void Dispose(bool disposing)
23 | {
24 | if (disposing && (components != null))
25 | {
26 | components.Dispose();
27 | }
28 | base.Dispose(disposing);
29 | }
30 |
31 | #region Windows 窗体设计器生成的代码
32 |
33 | ///
34 | /// 设计器支持所需的方法 - 不要修改
35 | /// 使用代码编辑器修改此方法的内容。
36 | ///
37 | private void InitializeComponent()
38 | {
39 | this.components = new System.ComponentModel.Container();
40 | this.panel1 = new System.Windows.Forms.Panel();
41 | this.NewProject = new HZH_Controls.Controls.UCBtnExt();
42 | this.label1 = new System.Windows.Forms.Label();
43 | this.ProjectList = new CCWin.SkinControl.ChatListBox();
44 | this.ProjectListMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
45 | this.打开工程toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
46 | this.删除工程ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
47 | this.打开文件夹ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
48 | this.panel1.SuspendLayout();
49 | this.ProjectListMenu.SuspendLayout();
50 | this.SuspendLayout();
51 | //
52 | // panel1
53 | //
54 | this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
55 | | System.Windows.Forms.AnchorStyles.Right)));
56 | this.panel1.Controls.Add(this.NewProject);
57 | this.panel1.Controls.Add(this.label1);
58 | this.panel1.Location = new System.Drawing.Point(12, 12);
59 | this.panel1.Name = "panel1";
60 | this.panel1.Size = new System.Drawing.Size(960, 26);
61 | this.panel1.TabIndex = 1;
62 | //
63 | // NewProject
64 | //
65 | this.NewProject.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
66 | this.NewProject.BackColor = System.Drawing.Color.White;
67 | this.NewProject.BtnBackColor = System.Drawing.Color.White;
68 | this.NewProject.BtnFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
69 | this.NewProject.BtnForeColor = System.Drawing.Color.White;
70 | this.NewProject.BtnText = "New Project";
71 | this.NewProject.CausesValidation = false;
72 | this.NewProject.ConerRadius = 6;
73 | this.NewProject.Cursor = System.Windows.Forms.Cursors.Hand;
74 | this.NewProject.EnabledMouseEffect = true;
75 | this.NewProject.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(138)))), ((int)(((byte)(255)))));
76 | this.NewProject.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
77 | this.NewProject.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(138)))), ((int)(((byte)(255)))));
78 | this.NewProject.IsRadius = true;
79 | this.NewProject.IsShowRect = false;
80 | this.NewProject.IsShowTips = false;
81 | this.NewProject.Location = new System.Drawing.Point(862, 0);
82 | this.NewProject.Margin = new System.Windows.Forms.Padding(2);
83 | this.NewProject.Name = "NewProject";
84 | this.NewProject.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(138)))), ((int)(((byte)(255)))));
85 | this.NewProject.RectWidth = 1;
86 | this.NewProject.Size = new System.Drawing.Size(99, 26);
87 | this.NewProject.TabIndex = 2;
88 | this.NewProject.TabStop = false;
89 | this.NewProject.TipsColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(30)))), ((int)(((byte)(99)))));
90 | this.NewProject.TipsText = "";
91 | this.NewProject.BtnClick += new System.EventHandler(this.NewProject_BtnClick);
92 | //
93 | // label1
94 | //
95 | this.label1.AutoSize = true;
96 | this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
97 | this.label1.Location = new System.Drawing.Point(3, 0);
98 | this.label1.Name = "label1";
99 | this.label1.Size = new System.Drawing.Size(92, 21);
100 | this.label1.TabIndex = 0;
101 | this.label1.Text = "My project";
102 | //
103 | // ProjectList
104 | //
105 | this.ProjectList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
106 | | System.Windows.Forms.AnchorStyles.Left)
107 | | System.Windows.Forms.AnchorStyles.Right)));
108 | this.ProjectList.BackColor = System.Drawing.Color.White;
109 | this.ProjectList.CausesValidation = false;
110 | this.ProjectList.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
111 | this.ProjectList.ForeColor = System.Drawing.Color.Black;
112 | this.ProjectList.FriendsMobile = false;
113 | this.ProjectList.ItemColor = System.Drawing.Color.White;
114 | this.ProjectList.ItemMouseOnColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
115 | this.ProjectList.ListSubItemMenu = this.ProjectListMenu;
116 | this.ProjectList.Location = new System.Drawing.Point(11, 12);
117 | this.ProjectList.Name = "ProjectList";
118 | this.ProjectList.SelectSubItem = null;
119 | this.ProjectList.Size = new System.Drawing.Size(963, 537);
120 | this.ProjectList.SubItemColor = System.Drawing.Color.White;
121 | this.ProjectList.SubItemMenu = null;
122 | this.ProjectList.SubItemMouseOnColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
123 | this.ProjectList.SubItemSelectColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
124 | this.ProjectList.TabIndex = 2;
125 | this.ProjectList.TabStop = false;
126 | this.ProjectList.DoubleClick += new System.EventHandler(this.ProjectList_DoubleClick);
127 | //
128 | // ProjectListMenu
129 | //
130 | this.ProjectListMenu.BackColor = System.Drawing.Color.White;
131 | this.ProjectListMenu.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
132 | this.ProjectListMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
133 | this.打开工程toolStripMenuItem1,
134 | this.删除工程ToolStripMenuItem,
135 | this.打开文件夹ToolStripMenuItem});
136 | this.ProjectListMenu.Name = "ProjectListMenu";
137 | this.ProjectListMenu.ShowImageMargin = false;
138 | this.ProjectListMenu.Size = new System.Drawing.Size(112, 70);
139 | //
140 | // 打开工程toolStripMenuItem1
141 | //
142 | this.打开工程toolStripMenuItem1.Name = "打开工程toolStripMenuItem1";
143 | this.打开工程toolStripMenuItem1.Size = new System.Drawing.Size(111, 22);
144 | this.打开工程toolStripMenuItem1.Text = "打开工程";
145 | this.打开工程toolStripMenuItem1.Click += new System.EventHandler(this.打开工程toolStripMenuItem1_Click);
146 | //
147 | // 删除工程ToolStripMenuItem
148 | //
149 | this.删除工程ToolStripMenuItem.Name = "删除工程ToolStripMenuItem";
150 | this.删除工程ToolStripMenuItem.Size = new System.Drawing.Size(111, 22);
151 | this.删除工程ToolStripMenuItem.Text = "删除工程";
152 | this.删除工程ToolStripMenuItem.Click += new System.EventHandler(this.删除工程ToolStripMenuItem_Click);
153 | //
154 | // 打开文件夹ToolStripMenuItem
155 | //
156 | this.打开文件夹ToolStripMenuItem.Name = "打开文件夹ToolStripMenuItem";
157 | this.打开文件夹ToolStripMenuItem.Size = new System.Drawing.Size(111, 22);
158 | this.打开文件夹ToolStripMenuItem.Text = "打开文件夹";
159 | this.打开文件夹ToolStripMenuItem.Click += new System.EventHandler(this.打开文件夹ToolStripMenuItem_Click);
160 | //
161 | // Project
162 | //
163 | this.BackColor = System.Drawing.Color.White;
164 | this.ClientSize = new System.Drawing.Size(984, 561);
165 | this.Controls.Add(this.panel1);
166 | this.Controls.Add(this.ProjectList);
167 | this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
168 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
169 | this.Name = "Project";
170 | this.ShowIcon = false;
171 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
172 | this.Text = "Welcome to AndLua+ and My project(0)";
173 | this.Shown += new System.EventHandler(this.Project_Shown);
174 | this.panel1.ResumeLayout(false);
175 | this.panel1.PerformLayout();
176 | this.ProjectListMenu.ResumeLayout(false);
177 | this.ResumeLayout(false);
178 |
179 | }
180 |
181 | #endregion
182 | private System.Windows.Forms.Panel panel1;
183 | private HZH_Controls.Controls.UCBtnExt NewProject;
184 | public System.Windows.Forms.Label label1;
185 | public CCWin.SkinControl.ChatListBox ProjectList;
186 | private System.Windows.Forms.ContextMenuStrip ProjectListMenu;
187 | private System.Windows.Forms.ToolStripMenuItem 删除工程ToolStripMenuItem;
188 | private System.Windows.Forms.ToolStripMenuItem 打开文件夹ToolStripMenuItem;
189 | private System.Windows.Forms.ToolStripMenuItem 打开工程toolStripMenuItem1;
190 | }
191 | }
192 |
--------------------------------------------------------------------------------
/project.cs:
--------------------------------------------------------------------------------
1 | using CCWin.SkinControl;
2 | using HZH_Controls.Controls;
3 | using HZH_Controls.Forms;
4 | using Microsoft.VisualBasic;
5 | using System;
6 | using System.Collections.Generic;
7 | using System.ComponentModel;
8 | using System.Configuration;
9 | using System.Data;
10 | using System.Drawing;
11 | using System.Drawing.Imaging;
12 | using System.IO;
13 | using System.Linq;
14 | using System.Runtime.Serialization.Formatters.Binary;
15 | using System.Text;
16 | using System.Windows.Forms;
17 |
18 | /*
19 | *AndLua+ v1.0
20 | * Copyright 2020-02-01
21 | * Author: Alone
22 | * My Blog: http://ly250.cn/
23 | * Github: https://github.com/LingYang8/AndLuaPlus
24 | */
25 |
26 | namespace AndLuaPlus
27 | {
28 | public partial class Project : Form
29 | {
30 | //工程路径
31 | public static string ProjectPath = Properties.Settings.Default.InstallationPath + "/project";
32 | //工程配置文件
33 | private static string ProjectConfig = "";
34 | //统计项目数量
35 | public static int ProjectNum = 0;
36 | //载入事件
37 | public Project()
38 | {
39 | InitializeComponent();
40 | }
41 | //窗口第一次显示时事件
42 | private void Project_Shown(object sender, EventArgs e)
43 | {
44 | //设置标题
45 | this.Text = "Welcome to AndLua+ (" + System.Environment.UserName + ")";
46 | LoadProject();
47 | }
48 | //加载工程
49 | public void LoadProject()
50 | {
51 | //清空工程列表
52 | ProjectList.Items.Clear();
53 | ProjectNum = 0;
54 | //一些没用的东西
55 | ChatListItem item = new ChatListItem("My Project");
56 | //工程数据
57 | DirectoryInfo[] di = new DirectoryInfo(ProjectPath).GetDirectories();
58 | for (int i = 0; i < di.Length; i++)
59 | {
60 | ProjectConfig = di[i].FullName + "/init.config";
61 | //判断文件是否存在
62 | if (File.Exists(ProjectConfig))
63 | {
64 | ChatListSubItem sub = new ChatListSubItem();
65 | //判断工程配置文件是否读取错误
66 | if (GetConfig("Name") == "Project Config File Error")
67 | {
68 | //配置文件损坏 工程名称标红
69 | sub.IsVip = true;
70 | }
71 | //判断图标文件是否存在
72 | if (File.Exists(di[i].FullName + "/icon.png"))
73 | {
74 | //存在 使用工程图标
75 | sub.HeadImage = new Bitmap(di[i].FullName + "/icon.png");
76 | }
77 | else
78 | {
79 | //不存在 使用默认图标
80 | sub.HeadImage = Properties.Resources.icon;
81 | }
82 | sub.NicName = GetConfig("Var");
83 | sub.DisplayName = GetConfig("Name");
84 | sub.PersonalMsg = di[i].FullName;
85 | item.SubItems.Add(sub);
86 | ProjectList.Items.Add(item);
87 | ProjectNum += 1;
88 | }
89 | }
90 | //展开工程
91 | ProjectList.ExpandAll();
92 | //设置统计
93 | label1.Text = "My project (" + ProjectNum + ")";
94 | }
95 | //读取配置文件
96 | private string GetConfig(string key)
97 | {
98 | if (System.IO.File.Exists(ProjectConfig))
99 | {
100 | ExeConfigurationFileMap ecf = new ExeConfigurationFileMap();
101 | ecf.ExeConfigFilename = ProjectConfig;
102 | Configuration config = System.Configuration.ConfigurationManager.OpenMappedExeConfiguration(ecf, ConfigurationUserLevel.None);
103 | var keys = config.AppSettings.Settings.AllKeys.ToList();
104 | if (keys == null || keys.Count == 0)
105 | {
106 | return "Project Config File Error";
107 | }
108 | if (keys.Contains(key))
109 | {
110 | return config.AppSettings.Settings[key].Value.ToString();
111 | }
112 | }
113 | return "Project Config File Error";
114 | }
115 | //新建工程
116 | private void NewProject_BtnClick(object sender, EventArgs e)
117 | {
118 | NewProject newProject = new NewProject(this);
119 | newProject.ShowDialog();
120 | }
121 | //右键菜单##########################################################
122 | private void 打开文件夹ToolStripMenuItem_Click(object sender, EventArgs e)
123 | {
124 | //跳转工程目录
125 | System.Diagnostics.Process.Start("explorer.exe", this.ProjectList.SelectSubItem.PersonalMsg);
126 | }
127 |
128 | private void 打开工程toolStripMenuItem1_Click(object sender, EventArgs e)
129 | {
130 | AndLua andlua = new AndLua(this.ProjectList.SelectSubItem.PersonalMsg);
131 | this.Hide();
132 | andlua.ShowDialog();
133 | Application.ExitThread();
134 | }
135 |
136 | private void 删除工程ToolStripMenuItem_Click(object sender, EventArgs e)
137 | {
138 | Directory.Delete(this.ProjectList.SelectSubItem.PersonalMsg, true);
139 | //刷新工程
140 | LoadProject();
141 | }
142 |
143 | //双击打开工程
144 | private void ProjectList_DoubleClick(object sender, EventArgs e)
145 | {
146 | AndLua andlua = new AndLua(this.ProjectList.SelectSubItem.PersonalMsg);
147 | this.Hide();
148 | andlua.ShowDialog();
149 | Application.ExitThread();
150 | }
151 | //###############################################################
152 | }
153 | }
154 |
--------------------------------------------------------------------------------