-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathProgram.cs
39 lines (36 loc) · 1.08 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
using System.Runtime.InteropServices;
namespace CefDetector
{
internal static class Program
{
[DllImport("Everything64.dll")]
private static extern uint Everything_GetMajorVersion();
[STAThread]
static void Main()
{
try
{
_ = Everything_GetMajorVersion();
}
catch (Exception)
{
MessageBox.Show("Please install and run Everything first!", "Error:");
return;
}
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
try
{
var wplayer = new WMPLib.WindowsMediaPlayer
{
URL = "bgm.mp3"
};
wplayer.controls.play();
wplayer.settings.setMode("loop", true);
wplayer.settings.setMode("shuffle", false);
} catch { }
Application.Run(new Form1());
}
}
}