-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
43 lines (36 loc) · 1.44 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.Reflection;
using System.Windows.Forms;
namespace _163AlbumGet
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
public static string savedir = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\",
tloc = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\Temp\163AlbumGet",
afn = "&at;", ssf = "&st;", msf = "&d;_&st;", fmt = ".mp3";
[STAThread]
static void Main()
{
AppDomain.CurrentDomain.AssemblyResolve += (sender, args) => {
string resourceName = "_163AlbumGet." +
new AssemblyName(args.Name).Name + ".dll";
using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
{
byte[] assemblyData = new byte[] { 0 };
if (stream != null)
{
assemblyData = new byte[stream.Length];
stream.Read(assemblyData, 0, assemblyData.Length);
}
return Assembly.Load(assemblyData);
}
};
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
}
}