diff --git a/ACTWebSocket.Core/ACTWebSocket.Core.csproj b/ACTWebSocket.Core/ACTWebSocket.Core.csproj
index 0726925..4d0e434 100644
--- a/ACTWebSocket.Core/ACTWebSocket.Core.csproj
+++ b/ACTWebSocket.Core/ACTWebSocket.Core.csproj
@@ -115,6 +115,12 @@
+
+ Form
+
+
+ IPC_COPYDATA.cs
+
@@ -142,6 +148,9 @@
+
+ IPC_COPYDATA.cs
+
diff --git a/ACTWebSocket.Core/ACTWebSocket.cs b/ACTWebSocket.Core/ACTWebSocket.cs
index 7c8b595..0df2a10 100644
--- a/ACTWebSocket.Core/ACTWebSocket.cs
+++ b/ACTWebSocket.Core/ACTWebSocket.cs
@@ -32,6 +32,7 @@ public interface PluginDirectory
public class ACTWebSocketMain : UserControl, IActPluginV1, PluginDirectory
{
+ string overlayCaption = "OverlayProcWMCOPYDATA";
string overlaySkinDirectory { get; set; }
string pluginDirectory = "";
private ComboBox hostnames;
@@ -39,17 +40,21 @@ public class ACTWebSocketMain : UserControl, IActPluginV1, PluginDirectory
private TextBox uPnPPort;
private Button buttonAddURL;
private Button buttonURL;
- private ListView skinList;
+ private ListView WebSkinListView;
private Button buttonOpen;
- private Button buttonManage;
- private Button buttonDownload;
- private Button buttonExit;
- private ProgressBar progressBar;
private CheckBox skinOnAct;
- private Button buttonStart;
- private GroupBox groupBox1;
private GroupBox groupBox2;
private CheckBox autostartoverlay;
+ private GroupBox groupBox1;
+ private GroupBox groupBox3;
+ private ListView FileSkinListView;
+ private Button buttonOpenOverlayProcManager;
+ private ColumnHeader Title2;
+ private ColumnHeader Title;
+ private Button buttonStartStopOverlayProc;
+ private Button buttonOverlay;
+ private ProgressBar progressBar;
+ private Button buttonDownload;
private CheckBox chatFilter;
public void SetSkinDir(string path)
@@ -142,22 +147,27 @@ private void InitializeComponent()
this.copyURL = new System.Windows.Forms.Button();
this.buttonAddURL = new System.Windows.Forms.Button();
this.buttonURL = new System.Windows.Forms.Button();
- this.skinList = new System.Windows.Forms.ListView();
+ this.WebSkinListView = new System.Windows.Forms.ListView();
+ this.Title2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.buttonOpen = new System.Windows.Forms.Button();
- this.buttonManage = new System.Windows.Forms.Button();
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.buttonOverlay = new System.Windows.Forms.Button();
+ this.autostartoverlay = new System.Windows.Forms.CheckBox();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
this.buttonDownload = new System.Windows.Forms.Button();
- this.buttonExit = new System.Windows.Forms.Button();
+ this.buttonStartStopOverlayProc = new System.Windows.Forms.Button();
+ this.buttonOpenOverlayProcManager = new System.Windows.Forms.Button();
this.progressBar = new System.Windows.Forms.ProgressBar();
- this.buttonStart = new System.Windows.Forms.Button();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.autostartoverlay = new System.Windows.Forms.CheckBox();
- this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.groupBox3 = new System.Windows.Forms.GroupBox();
+ this.FileSkinListView = new System.Windows.Forms.ListView();
+ this.Title = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.startoption.SuspendLayout();
this.hostdata.SuspendLayout();
this.othersets.SuspendLayout();
this.serverStatus.SuspendLayout();
- this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.groupBox3.SuspendLayout();
this.SuspendLayout();
//
// port
@@ -268,6 +278,7 @@ private void InitializeComponent()
resources.ApplyResources(this.hostnames, "hostnames");
this.hostnames.FormattingEnabled = true;
this.hostnames.Name = "hostnames";
+ this.hostnames.TextChanged += new System.EventHandler(this.hostnames_TextChanged);
//
// label2
//
@@ -341,15 +352,24 @@ private void InitializeComponent()
this.buttonURL.UseVisualStyleBackColor = true;
this.buttonURL.Click += new System.EventHandler(this.buttonURL_Click);
//
- // skinList
+ // WebSkinListView
//
- resources.ApplyResources(this.skinList, "skinList");
- this.skinList.HideSelection = false;
- this.skinList.MultiSelect = false;
- this.skinList.Name = "skinList";
- this.skinList.Sorting = System.Windows.Forms.SortOrder.Ascending;
- this.skinList.UseCompatibleStateImageBehavior = false;
- this.skinList.View = System.Windows.Forms.View.List;
+ resources.ApplyResources(this.WebSkinListView, "WebSkinListView");
+ this.WebSkinListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+ this.Title2});
+ this.WebSkinListView.FullRowSelect = true;
+ this.WebSkinListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
+ this.WebSkinListView.HideSelection = false;
+ this.WebSkinListView.MultiSelect = false;
+ this.WebSkinListView.Name = "WebSkinListView";
+ this.WebSkinListView.Sorting = System.Windows.Forms.SortOrder.Ascending;
+ this.WebSkinListView.UseCompatibleStateImageBehavior = false;
+ this.WebSkinListView.View = System.Windows.Forms.View.Details;
+ this.WebSkinListView.SelectedIndexChanged += new System.EventHandler(this.skinList_SelectedIndexChanged);
+ //
+ // Title2
+ //
+ resources.ApplyResources(this.Title2, "Title2");
//
// buttonOpen
//
@@ -358,12 +378,42 @@ private void InitializeComponent()
this.buttonOpen.UseVisualStyleBackColor = true;
this.buttonOpen.Click += new System.EventHandler(this.buttonOpen_Click);
//
- // buttonManage
+ // groupBox2
+ //
+ resources.ApplyResources(this.groupBox2, "groupBox2");
+ this.groupBox2.Controls.Add(this.buttonOverlay);
+ this.groupBox2.Controls.Add(this.buttonOpen);
+ this.groupBox2.Controls.Add(this.buttonURL);
+ this.groupBox2.Controls.Add(this.WebSkinListView);
+ this.groupBox2.Controls.Add(this.copyURL);
+ this.groupBox2.Controls.Add(this.buttonAddURL);
+ this.groupBox2.Name = "groupBox2";
+ this.groupBox2.TabStop = false;
+ //
+ // buttonOverlay
+ //
+ resources.ApplyResources(this.buttonOverlay, "buttonOverlay");
+ this.buttonOverlay.Name = "buttonOverlay";
+ this.buttonOverlay.UseVisualStyleBackColor = true;
+ this.buttonOverlay.Click += new System.EventHandler(this.buttonOverlay_Click);
//
- resources.ApplyResources(this.buttonManage, "buttonManage");
- this.buttonManage.Name = "buttonManage";
- this.buttonManage.UseVisualStyleBackColor = true;
- this.buttonManage.Click += new System.EventHandler(this.buttonManage_Click);
+ // autostartoverlay
+ //
+ resources.ApplyResources(this.autostartoverlay, "autostartoverlay");
+ this.autostartoverlay.BackColor = System.Drawing.Color.Transparent;
+ this.autostartoverlay.Name = "autostartoverlay";
+ this.autostartoverlay.UseVisualStyleBackColor = false;
+ //
+ // groupBox1
+ //
+ resources.ApplyResources(this.groupBox1, "groupBox1");
+ this.groupBox1.Controls.Add(this.buttonDownload);
+ this.groupBox1.Controls.Add(this.buttonStartStopOverlayProc);
+ this.groupBox1.Controls.Add(this.buttonOpenOverlayProcManager);
+ this.groupBox1.Controls.Add(this.autostartoverlay);
+ this.groupBox1.Controls.Add(this.progressBar);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.TabStop = false;
//
// buttonDownload
//
@@ -372,59 +422,56 @@ private void InitializeComponent()
this.buttonDownload.UseVisualStyleBackColor = true;
this.buttonDownload.Click += new System.EventHandler(this.buttonDownload_Click);
//
- // buttonExit
+ // buttonStartStopOverlayProc
//
- resources.ApplyResources(this.buttonExit, "buttonExit");
- this.buttonExit.Name = "buttonExit";
- this.buttonExit.UseVisualStyleBackColor = true;
- this.buttonExit.Click += new System.EventHandler(this.buttonExit_Click);
+ resources.ApplyResources(this.buttonStartStopOverlayProc, "buttonStartStopOverlayProc");
+ this.buttonStartStopOverlayProc.Name = "buttonStartStopOverlayProc";
+ this.buttonStartStopOverlayProc.UseVisualStyleBackColor = true;
+ this.buttonStartStopOverlayProc.Click += new System.EventHandler(this.buttonStartStopOverlayProc_Click);
+ //
+ // buttonOpenOverlayProcManager
+ //
+ resources.ApplyResources(this.buttonOpenOverlayProcManager, "buttonOpenOverlayProcManager");
+ this.buttonOpenOverlayProcManager.Name = "buttonOpenOverlayProcManager";
+ this.buttonOpenOverlayProcManager.UseVisualStyleBackColor = true;
+ this.buttonOpenOverlayProcManager.Click += new System.EventHandler(this.buttonOpenOverlayProcManager_Click);
//
// progressBar
//
resources.ApplyResources(this.progressBar, "progressBar");
this.progressBar.Name = "progressBar";
//
- // buttonStart
+ // groupBox3
//
- resources.ApplyResources(this.buttonStart, "buttonStart");
- this.buttonStart.Name = "buttonStart";
- this.buttonStart.UseVisualStyleBackColor = true;
- this.buttonStart.Click += new System.EventHandler(this.buttonStart_Click);
+ resources.ApplyResources(this.groupBox3, "groupBox3");
+ this.groupBox3.Controls.Add(this.FileSkinListView);
+ this.groupBox3.Name = "groupBox3";
+ this.groupBox3.TabStop = false;
//
- // groupBox1
+ // FileSkinListView
//
- resources.ApplyResources(this.groupBox1, "groupBox1");
- this.groupBox1.Controls.Add(this.autostartoverlay);
- this.groupBox1.Controls.Add(this.buttonDownload);
- this.groupBox1.Controls.Add(this.buttonStart);
- this.groupBox1.Controls.Add(this.buttonExit);
- this.groupBox1.Controls.Add(this.buttonManage);
- this.groupBox1.Controls.Add(this.progressBar);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.TabStop = false;
+ resources.ApplyResources(this.FileSkinListView, "FileSkinListView");
+ this.FileSkinListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+ this.Title});
+ this.FileSkinListView.FullRowSelect = true;
+ this.FileSkinListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
+ this.FileSkinListView.HideSelection = false;
+ this.FileSkinListView.MultiSelect = false;
+ this.FileSkinListView.Name = "FileSkinListView";
+ this.FileSkinListView.Sorting = System.Windows.Forms.SortOrder.Ascending;
+ this.FileSkinListView.UseCompatibleStateImageBehavior = false;
+ this.FileSkinListView.View = System.Windows.Forms.View.Details;
+ this.FileSkinListView.SelectedIndexChanged += new System.EventHandler(this.FileSkinListView_SelectedIndexChanged);
//
- // autostartoverlay
+ // Title
//
- resources.ApplyResources(this.autostartoverlay, "autostartoverlay");
- this.autostartoverlay.BackColor = System.Drawing.Color.Transparent;
- this.autostartoverlay.Name = "autostartoverlay";
- this.autostartoverlay.UseVisualStyleBackColor = false;
- //
- // groupBox2
- //
- resources.ApplyResources(this.groupBox2, "groupBox2");
- this.groupBox2.Controls.Add(this.buttonOpen);
- this.groupBox2.Controls.Add(this.buttonURL);
- this.groupBox2.Controls.Add(this.skinList);
- this.groupBox2.Controls.Add(this.copyURL);
- this.groupBox2.Controls.Add(this.buttonAddURL);
- this.groupBox2.Name = "groupBox2";
- this.groupBox2.TabStop = false;
+ resources.ApplyResources(this.Title, "Title");
//
// ACTWebSocketMain
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+ this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.serverStatus);
@@ -439,8 +486,9 @@ private void InitializeComponent()
this.othersets.ResumeLayout(false);
this.serverStatus.ResumeLayout(false);
this.serverStatus.PerformLayout();
- this.groupBox1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox3.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -477,8 +525,38 @@ public ACTWebSocketMain()
JObject overlayWindows = new JObject(); // 설정 전부
+ public bool SendMessage(string caption, JObject obj)
+ {
+ return ipc.SendMessage(caption, 0, obj.ToString());
+ }
+
+
+ IPC_COPYDATA ipc = null;
public void InitPlugin(TabPage pluginScreenSpace, Label pluginStatusText)
{
+ if(ipc == null)
+ {
+ ipc = new IPC_COPYDATA();
+ ipc.Show();
+ ipc.Text = "Client"+overlayCaption;
+ ipc.onMessage = (code, message) =>
+ {
+ if (message == ".")
+ return;
+ JObject obj = JObject.Parse(message);
+ JToken token;
+ if (obj.TryGetValue("cmd", out token))
+ {
+ String cmd = token.ToObject();
+ switch(cmd)
+ {
+ case "get_urllist":
+ hostnames_TextChanged(null, null);
+ break;
+ }
+ }
+ };
+ }
if (core == null)
{
core = new ACTWebSocketCore();
@@ -486,8 +564,6 @@ public void InitPlugin(TabPage pluginScreenSpace, Label pluginStatusText)
core.overlaySkinDirectory = overlaySkinDirectory;
core.hwnd = Handle;
}
- progressBar.Hide();
- progressBar.BringToFront();
lblStatus = pluginStatusText; // Hand the status label's reference to our local var
pluginScreenSpace.Controls.Add(this); // Add this UserControl to the tab ACT provides
Dock = DockStyle.Fill; // Expand the UserControl to fill the tab's client space
@@ -501,6 +577,8 @@ public void InitPlugin(TabPage pluginScreenSpace, Label pluginStatusText)
chatFilter.Checked = ChatFilter;
autostart.Checked = AutoRun;
autostartoverlay.Checked = AutoOverlay;
+ progressBar.Hide();
+ progressBar.BringToFront();
StopServer();
if (core != null)
@@ -534,7 +612,7 @@ public void InitPlugin(TabPage pluginScreenSpace, Label pluginStatusText)
{
if (autostartoverlay.Checked)
{
- buttonStart_Click(null, null);
+ StartOverlayProc();
}
}
catch (Exception e)
@@ -558,8 +636,11 @@ public void DeInitPlugin()
ActGlobals.oFormActMain.OnLogLineRead -= oFormActMain_OnLogLineRead;
SaveSettings();
- buttonExit_Click(null, null);
- //browser.ExecuteScriptAsync("api_overlaywindow_close_all();");
+
+ SendMessage(overlayCaption, JObject.FromObject(new
+ {
+ cmd = "stop"
+ }));
lblStatus.Text = "Plugin Exited";
}
@@ -721,7 +802,6 @@ void SaveSettings()
private List addrs = new List();
private void ACTWebSocket_Load(object sender, EventArgs e)
{
-
Task task = Task.Factory.StartNew(() =>
{
String strHostName = string.Empty;
@@ -998,7 +1078,7 @@ public bool MiniParse
public string overlayProcDir { get; private set; }
public string overlayProcExe { get; private set; }
- public List GetSkinList()
+ public List GetFileSkinList()
{
string dir = SkinOnAct ? overlaySkinDirectory : pluginDirectory;
List list = new List();
@@ -1149,26 +1229,54 @@ private void buttonAddURL_Click(object sender, EventArgs e)
{
string url = ShowDialog("Add URL", "Add URL").Trim() ;
SkinURLList.Add(url);
- AddURL(url);
+ AddWebURL(url);
}
private void buttonURL_Click(object sender, EventArgs e)
{
- if (skinList.SelectedItems == null) return;
- if(skinList.SelectedItems.Count > 0)
+ if (WebSkinListView.SelectedItems == null) return;
+ if(WebSkinListView.SelectedItems.Count > 0)
{
- string url = skinList.SelectedItems[0].Text;
+ string url = (string)WebSkinListView.SelectedItems[0].Tag;
SkinURLList.Remove(url);
- skinList.Items.RemoveAt(skinList.SelectedItems[0].Index);
+ WebSkinListView.Items.RemoveAt(WebSkinListView.SelectedItems[0].Index);
+ {
+ if (core != null)
+ {
+ lock (core.skinObject)
+ {
+ JArray urlConverted = new JArray();
+ JArray array = (JArray)core.skinObject["URLList"];
+ foreach (JToken obj in array)
+ {
+ if(obj["URL"].ToObject() == url)
+ {
+ obj.Remove();
+ break;
+ }
+ }
+ SendMessage(overlayCaption, JObject.FromObject(new
+ {
+ cmd = "urllist",
+ value = core.skinObject
+ }));
+ }
+ }
+ }
}
}
private void copyURL_Click(object sender, EventArgs e)
{
- if (skinList.SelectedItems == null) return;
- if (skinList.SelectedItems.Count > 0)
+ if (WebSkinListView.SelectedItems == null) return;
+ if (WebSkinListView.SelectedItems.Count > 0)
{
- string url = (string)skinList.SelectedItems[0].Tag;
+ string url = (string)WebSkinListView.SelectedItems[0].Tag;
+ copyURLPath(url);
+ }
+ else if (FileSkinListView.SelectedItems.Count > 0)
+ {
+ string url = (string)FileSkinListView.SelectedItems[0].Tag;
copyURLPath(url);
}
else
@@ -1176,7 +1284,7 @@ private void copyURL_Click(object sender, EventArgs e)
copyURLPath();
}
}
-
+
string GetTitle(string path)
{
string dir = SkinOnAct ? overlaySkinDirectory : pluginDirectory;
@@ -1196,6 +1304,7 @@ string GetTitle(string path)
else
{
WebClient wc = new WebClient();
+ wc.Encoding = Encoding.UTF8;
string source = wc.DownloadString(path);
title = Regex.Match(source, @"\]*\>\s*(?[\s\S]*?)\", RegexOptions.IgnoreCase).Groups["Title"].Value;
}
@@ -1207,7 +1316,7 @@ string GetTitle(string path)
return title;
}
- private void AddURL(string a)
+ private void AddWebURL(string a)
{
string title = null;
Task task = Task.Factory.StartNew(() =>
@@ -1217,7 +1326,7 @@ private void AddURL(string a)
Task UITask = task.ContinueWith((t) =>
{
bool find = false;
- foreach (ListViewItem i in skinList.Items)
+ foreach (ListViewItem i in WebSkinListView.Items)
{
if (((string)i.Tag).CompareTo(a) == 0)
{
@@ -1225,39 +1334,108 @@ private void AddURL(string a)
}
}
- if(!find)
+ if (!find)
{
title = title == null ? a : title;
ListViewItem lvi = new ListViewItem();
lvi.Text = title;
lvi.Tag = a;
- skinList.Items.Add(lvi);
+ WebSkinListView.Items.Add(lvi);
+ if (core != null)
+ {
+ lock (core.skinObject)
+ {
+ JObject skinInfo = new JObject();
+ skinInfo["Title"] = title;
+ skinInfo["URL"] = a;
+ JArray array = (JArray)core.skinObject["URLList"];
+ array.Add(skinInfo);
+ hostnames_TextChanged(null, null);
+ }
+ }
+ }
+ }, TaskScheduler.FromCurrentSynchronizationContext());
+ }
+
+ private void AddFileURL(string a)
+ {
+ string title = null;
+ Task task = Task.Factory.StartNew(() =>
+ {
+ title = GetTitle(a);
+ });
+ Task UITask = task.ContinueWith((t) =>
+ {
+ bool find = false;
+ foreach (ListViewItem i in WebSkinListView.Items)
+ {
+ if (((string)i.Tag).CompareTo(a) == 0)
+ {
+ find = true;
+ }
+ }
+
+ if (!find)
+ {
+ title = title == null ? a : title;
+ ListViewItem lvi = new ListViewItem();
+ lvi.Text = title;
+ lvi.Tag = a;
+ FileSkinListView.Items.Add(lvi);
+ if (core != null)
+ {
+ lock (core.skinObject)
+ {
+ JObject skinInfo = new JObject();
+ skinInfo["Title"] = title;
+ skinInfo["URL"] = a;
+ JArray array = (JArray)core.skinObject["URLList"];
+ array.Add(skinInfo);
+ hostnames_TextChanged(null, null);
+ }
+ }
}
}, TaskScheduler.FromCurrentSynchronizationContext());
}
private void buttonRefresh_Click(object sender, EventArgs e)
{
- skinList.Items.Clear();
+ if (core != null)
+ {
+ lock (core.skinObject)
+ {
+ core.skinObject.RemoveAll();
+ core.skinObject["Type"] = "URLList";
+ core.skinObject["HostName"] = hostnames.Text;
+ core.skinObject["URLList"] = new JArray();
+ SendMessage(overlayCaption, JObject.FromObject(new
+ {
+ cmd = "urllist",
+ value = core.skinObject
+ }));
+ }
+ }
+ FileSkinListView.Items.Clear();
+ WebSkinListView.Items.Clear();
foreach (var a in SkinURLList)
{
- AddURL(a);
+ AddWebURL(a);
}
- List list = GetSkinList();
+ List list = GetFileSkinList();
foreach(var a in list)
{
bool find = false;
- for(int i=0;i 0)
+ if (WebSkinListView.SelectedItems.Count > 0)
{
- string url = (string)skinList.SelectedItems[0].Tag;
+ string url = (string)WebSkinListView.SelectedItems[0].Tag;
url = getURLPath(url);
if(url != null)
{
- ProcessStartInfo startInfo = new ProcessStartInfo(overlayProcExe);
- startInfo.WorkingDirectory = overlayProcDir;
- startInfo.Arguments = "-o " + Utility.Base64Encoding(url);
- Process.Start(startInfo);
+ System.Diagnostics.Process.Start(url);
+ }
+ }
+ else if (FileSkinListView.SelectedItems.Count > 0)
+ {
+ string url = (string)FileSkinListView.SelectedItems[0].Tag;
+ url = getURLPath(url);
+ if (url != null)
+ {
+ System.Diagnostics.Process.Start(url);
}
}
+ else
+ {
+ copyURLPath();
+ }
}
- private void buttonManage_Click(object sender, EventArgs e)
+ private void port_TextChanged(object sender, EventArgs e)
{
- UpdateOverlayProc();
- if (!buttonManage.Enabled)
- return;
+ uPnPPort.Text = port.Text;
+ }
+
+ private void skinList_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (WebSkinListView.SelectedItems.Count > 0)
+ {
+ FileSkinListView.SelectedItems.Clear();
+ }
+ }
+
+ private void FileSkinListView_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (FileSkinListView.SelectedItems.Count > 0)
+ {
+ WebSkinListView.SelectedItems.Clear();
+ }
+ }
+
+ public bool StartOverlayProc()
+ {
+ bool b = File.Exists(overlayProcExe);
+ if(!b)
+ {
+ return false;
+ }
try
{
ProcessStartInfo startInfo = new ProcessStartInfo(overlayProcExe);
startInfo.WorkingDirectory = overlayProcDir;
- startInfo.Arguments = "-m";
+ startInfo.Arguments = "";
Process.Start(startInfo);
}
- catch(Exception ex)
+ catch (Exception ex)
{
MessageBox.Show(ex.Message);
+ return false;
}
+ return true;
}
private void buttonDownload_Click(object sender, EventArgs e)
@@ -1340,12 +1552,12 @@ private void buttonDownload_Click(object sender, EventArgs e)
UpdateOverlayProc();
try
{
- if(File.Exists(overlayProcExe))
+ if (File.Exists(overlayProcExe))
{
- ProcessStartInfo startInfo = new ProcessStartInfo(overlayProcExe);
- startInfo.WorkingDirectory = overlayProcDir;
- startInfo.Arguments = "-x";
- Process.Start(startInfo).WaitForExit();
+ SendMessage(overlayCaption, JObject.FromObject(new
+ {
+ cmd = "stop"
+ }));
}
buttonDownload.Enabled = false;
string url = "https://www.dropbox.com/sh/ionr8nkmp49gr8d/AADzOjamXxPGjOzFuhBSthPHa?dl=1";
@@ -1396,51 +1608,104 @@ private void Completed(object sender, AsyncCompletedEventArgs e)
progressBar.Hide();
buttonDownload.Enabled = true;
UpdateOverlayProc();
- buttonStart_Click(null, null);
+ StartOverlayProc();
}, TaskScheduler.FromCurrentSynchronizationContext());
}
-
- private void buttonStart_Click(object sender, EventArgs e)
+ private void buttonStartStopOverlayProc_Click(object sender, EventArgs e)
{
- UpdateOverlayProc();
- if (!buttonStart.Enabled)
- return;
- try
+ bool b = File.Exists(overlayProcExe);
+ if (!SendMessage(overlayCaption, JObject.FromObject(new
{
- ProcessStartInfo startInfo = new ProcessStartInfo(overlayProcExe);
- startInfo.WorkingDirectory = overlayProcDir;
- startInfo.Arguments = "";
- Process.Start(startInfo);
+ cmd = "stop"
+ })))
+ {
+ // run instance
+ StartOverlayProc();
}
- catch (Exception ex)
+ }
+
+ private void buttonOpenOverlayProcManager_Click(object sender, EventArgs e)
+ {
+ bool b = File.Exists(overlayProcExe);
+ if (!SendMessage(overlayCaption, JObject.FromObject(new
{
- MessageBox.Show(ex.Message);
+ cmd = "manager"
+ })))
+ {
+ // run instance ?
}
}
- private void buttonExit_Click(object sender, EventArgs e)
+ private void buttonOverlay_Click(object sender, EventArgs e)
{
- UpdateOverlayProc();
- if (!buttonExit.Enabled)
- return;
- try
+ if (FileSkinListView.SelectedItems.Count > 0)
{
- ProcessStartInfo startInfo = new ProcessStartInfo(overlayProcExe);
- startInfo.WorkingDirectory = overlayProcDir;
- startInfo.Arguments = "-x";
- Process.Start(startInfo);
+ string url = (string)FileSkinListView.SelectedItems[0].Tag;
+ SendMessage(overlayCaption, JObject.FromObject(new
+ {
+ cmd = "set",
+ value = new
+ {
+ opacity = 1.0,
+ zoom = 1.0,
+ fps = 30.0,
+ hide = false,
+ useDragFilter = true,
+ useDragMove = true,
+ useResizeGrip = true,
+ NoActivate = false,
+ Transparent = false,
+ url = getURLPath(url),
+ title = FileSkinListView.SelectedItems[0].Text
+ }
+ }));
}
- catch (Exception ex)
+ else if (WebSkinListView.SelectedItems.Count > 0)
{
- MessageBox.Show(ex.Message);
+ string url = (string)WebSkinListView.SelectedItems[0].Tag;
+ SendMessage(overlayCaption, JObject.FromObject(new
+ {
+ cmd = "set",
+ value = new
+ {
+ opacity = 1.0,
+ zoom = 1.0,
+ fps = 30.0,
+ hide = false,
+ useDragFilter = true,
+ useDragMove = true,
+ useResizeGrip = true,
+ NoActivate = false,
+ Transparent = false,
+ url = getURLPath(url),
+ title = WebSkinListView.SelectedItems[0].Text
+ }
+ }));
}
}
- private void port_TextChanged(object sender, EventArgs e)
+ private void hostnames_TextChanged(object sender, EventArgs e)
{
- uPnPPort.Text = port.Text;
+ Hostname = hostnames.Text;
+ if (core != null)
+ {
+ lock (core.skinObject)
+ {
+ JToken skinObject = core.skinObject.DeepClone();
+ JArray urlConverted = new JArray();
+ JArray array = (JArray)skinObject["URLList"];
+ foreach(JToken obj in array)
+ {
+ obj["URL"] = getURLPath(obj["URL"].ToObject());
+ }
+ SendMessage(overlayCaption, JObject.FromObject(new
+ {
+ cmd = "urllist",
+ value = skinObject
+ }));
+ }
+ }
}
-
}
}
diff --git a/ACTWebSocket.Core/ACTWebSocket.ko.resx b/ACTWebSocket.Core/ACTWebSocket.ko.resx
index 746f132..6360f92 100644
--- a/ACTWebSocket.Core/ACTWebSocket.ko.resx
+++ b/ACTWebSocket.Core/ACTWebSocket.ko.resx
@@ -182,49 +182,37 @@
서버 상태
-
- 202, 325
-
URL 복사
-
- 6, 325
-
URL 추가
-
- 104, 325
-
URL 삭제
-
- 386, 299
+
+ URL 열기
-
- 300, 325
+
+ 오버레이
-
- 새 오버레이
+
+ 웹 스킨
-
- 오버레이 관리
+
+ 오버레이 자동 시작/종료
다운로드
-
- 오버레이 종료
+
+ OverlayProc 실행/종료
-
- 실행
-
-
- 오버레이 자동 시작
+
+ 오버레이 관리자
-
- 700, 500
+
+ 파일 스킨
\ No newline at end of file
diff --git a/ACTWebSocket.Core/ACTWebSocket.resx b/ACTWebSocket.Core/ACTWebSocket.resx
index cb6ba0e..60659a3 100644
--- a/ACTWebSocket.Core/ACTWebSocket.resx
+++ b/ACTWebSocket.Core/ACTWebSocket.resx
@@ -126,52 +126,43 @@
$this
-
- 1
-
-
+
System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 2
+
3, 248
+
+ 11, 70
+
startoption
othersets
-
-
- 23
-
5
label15
+
True
- 5
-
-
- 92, 26
+ 4
231, 21
-
- OverlayProc Auto Start (with ACT
-
-
- Off
-
-
- 6, 20
+
+ WebSkinListView
30
@@ -183,11 +174,11 @@
NoControl
-
- Bottom, Left
+
+ 71, 23
-
- Exit
+
+ 17
True
@@ -204,53 +195,68 @@
18
-
- 104, 19
-
-
- System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Top, Bottom, Left, Right
groupBox1
+
+ Bottom, Left
+
13
NoControl
-
- buttonExit
+
+ 248, 125
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 388, 120
+
True
404, 80
-
- 104, 331
+
+ FileSkinListView
+
+
+ 23
236, 25
+
+ groupBox3
+
groupBox2
+
+ groupBox3
+
Top, Left, Right
-
- buttonStart
+
+ $this
15
- 404, 368
+ 404, 210
System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
@@ -258,18 +264,18 @@
Host
-
- NoControl
-
-
- NoControl
-
groupBox2
6, 18
+
+ 151, 21
+
+
+ groupBox2
+
31
@@ -282,14 +288,23 @@
24
+
+ Open Manager
+
+
+ 7, 45
+
NoControl
+
+ OverlayProc
+
11, 25
-
- 92, 26
+
+ 404, 152
hostdata
@@ -298,10 +313,10 @@
Top, Bottom, Left, Right
- 0
+ 3
- 0
+ 1
System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
@@ -339,6 +354,9 @@
startoption
+
+ Top, Bottom, Left, Right
+
NoControl
@@ -369,6 +387,9 @@
0
+
+ 366
+
MiniParseUse
@@ -376,7 +397,7 @@
Start Options
- 3
+ 4
System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
@@ -384,8 +405,8 @@
System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 391, 20
hostdata
@@ -393,11 +414,11 @@
port
-
- 26
+
+ Overlay
-
- 162, 20
+
+ 6
79, 23
@@ -405,6 +426,9 @@
18
+
+ System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
NoControl
@@ -429,20 +453,20 @@
groupBox1
+
+ Start/Stop OverlayProc
+
0
-
- 92, 26
-
hostdata
-
- 4
+
+ autostartoverlay
-
- 11, 70
+
+ 144, 44
groupBox2
@@ -450,11 +474,8 @@
NoControl
-
- label2
-
- 1
+ 0
4
@@ -477,11 +498,8 @@
249, 124
-
- 248, 79
-
-
- groupBox1
+
+ System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Top, Bottom, Left, Right
@@ -489,15 +507,18 @@
3
-
- 27
-
22
231, 21
+
+ 366
+
+
+ Top, Bottom, Left
+
10, 52
@@ -513,30 +534,30 @@
Delete URL
+
+ System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
11, 69
-
- Top, Bottom, Left, Right
-
NoControl
- 3
+ 4
System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- 92, 26
-
-
- 3
+ 75, 26
NoControl
+
+ 75, 26
+
14
@@ -547,10 +568,13 @@
TopLeft
- 258, 4
+ 257, 5
+
+
+ 18
- 4
+ 5
2
@@ -558,14 +582,23 @@
11, 24
+
+ buttonOpenOverlayProcManager
+
buttonAddURL
79, 76
-
- buttonURL
+
+ 23
+
+
+ 0
+
+
+ Bottom, Left
buttonOff
@@ -573,8 +606,8 @@
164, 21
-
- Use UPNP
+
+ label2
System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
@@ -582,14 +615,17 @@
System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 0
+
236, 25
progressBar
-
- 5
+
+ Off
1
@@ -616,10 +652,10 @@
System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- 28
+ 20
-
- 386, 305
+
+ 258, 90
System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
@@ -627,8 +663,8 @@
2
-
- skinList
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
3
@@ -636,8 +672,11 @@
11, 47
+
+ $this
+
- 6, 331
+ 6, 173
8
@@ -654,8 +693,8 @@
12
-
- 92, 26
+
+ Use UPNP
System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
@@ -664,31 +703,37 @@
231, 21
- 258, 90
+ 258, 248
System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
10501
System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- NoControl
+
+ OverlayProc Auto Start (with ACT
-
- 29
+
+ System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
14
-
- Using Chat
-
- 92, 26
+ 75, 26
+
+
+ 4, 20
+
+
+ 0
random URL
@@ -714,8 +759,11 @@
Top, Left, Right
-
- TopLeft
+
+ 124, 21
+
+
+ Title
On
@@ -729,14 +777,20 @@
Gulim, 9pt
-
- System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 318, 173
+
+
+ 5
+
+
+ 75, 26
15
-
- OverlayProc
+
+ copyURL
Using BeforeLogLineRead
@@ -744,6 +798,9 @@
hostdata
+
+ groupBox1
+
System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
@@ -754,40 +811,43 @@
79, 49
- 92, 26
+ 75, 26
1
-
- Top, Bottom, Left, Right
-
-
- groupBox1
-
othersets
-
- groupBox1
-
Top, Bottom, Left, Right
+
+ NoControl
+
- Skin
+ Web Skins
groupBox1
+
+ 19
+
+
+ 4, 20
+
+
+ System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
serverStatus
System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- 288, 26
+
+ Title
System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
@@ -804,23 +864,32 @@
randomURL
+
+ NoControl
+
startoption
+
+ buttonURL
+
+
+ groupBox1
+
13
- 1
+ 2
ACTWebSocketMain
-
- 2
+
+ File Skins
-
- 25
+
+ 162, 20
10501
@@ -834,8 +903,11 @@
Skin Dir On Act/OverlaySkin
-
- 300, 19
+
+ groupBox2
+
+
+ groupBox2
Host
@@ -846,14 +918,14 @@
othersets
-
- System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
buttonDownload
+
+ 25
+
- 202, 331
+ 162, 173
Top, Bottom, Left, Right
@@ -867,30 +939,21 @@
0
-
- NoControl
-
-
- groupBox2
-
NoControl
-
- 248, 125
+
+ 84, 173
2
-
- 4
+
+ TopLeft
Bottom, Left
-
- 2
-
13
@@ -898,40 +961,46 @@
164, 21
- 789, 500
+ 700, 500
Server Status
-
- 92, 26
+
+ 7, 44
-
- Manager
+
+ buttonOverlay
hostnames
+
+ buttonStartStopOverlayProc
+
+
+ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
- 0
+ 1
NoControl
- 6, 51
+ 6, 20
-
- $this
+
+ 15
3
-
- Run
+
+ 21
- 6, 19
+ 327, 18
0
@@ -945,17 +1014,23 @@
NoControl
-
- 21
+
+ 388, 147
-
- copyURL
+
+ 248, 79
Download
-
- groupBox2
+
+ 3
+
+
+ 32
+
+
+ 2
OnLogLineReadUse
@@ -963,26 +1038,26 @@
True
-
- System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 1
231, 21
+
+ Title2
+
3
-
- autostartoverlay
-
-
- $this
+
+ NoControl
Top, Left, Right
-
- 104, 19
+
+ Using Chat
System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
@@ -991,10 +1066,10 @@
Use Miniparse Data
- New Overlay
+ Open URL
- 2
+ 3
30, 12
@@ -1002,12 +1077,12 @@
6, 46
-
- 202, 19
-
249, 109
+
+ $this
+
Bottom, Left
@@ -1020,9 +1095,6 @@
skinOnAct
-
- buttonManage
-
10, 93
@@ -1033,17 +1105,17 @@
System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- 300, 331
+ 240, 173
othersets
-
- 15
-
11, 47
+
+ Title
+
16
diff --git a/ACTWebSocket.Core/ACTWebSocketCore.cs b/ACTWebSocket.Core/ACTWebSocketCore.cs
index 611df30..8a89bd9 100644
--- a/ACTWebSocket.Core/ACTWebSocketCore.cs
+++ b/ACTWebSocket.Core/ACTWebSocketCore.cs
@@ -29,6 +29,7 @@ public ACTWebSocketCore()
Timer pingTimer = null;
public string randomDir = null;
internal IntPtr hwnd;
+ public JObject skinObject = new JObject();
void InitUpdate()
{
@@ -106,7 +107,26 @@ internal void StartServer(string address, int port, int extPort, string domain =
if (content == null)
{
- res.StatusCode = (int)HttpStatusCode.NotFound;
+ if (path == "/skins.json")
+ {
+ if(skinObject != null)
+ {
+ lock (skinObject)
+ {
+ res.ContentType = "text/html";
+ res.ContentEncoding = Encoding.UTF8;
+ res.WriteContent(res.ContentEncoding.GetBytes(skinObject.ToString()));
+ }
+ }
+ else
+ {
+ res.StatusCode = (int)HttpStatusCode.NotFound;
+ }
+ }
+ else
+ {
+ res.StatusCode = (int)HttpStatusCode.NotFound;
+ }
return;
}
@@ -147,7 +167,6 @@ internal void StartServer(string address, int port, int extPort, string domain =
}
res.WriteContent(content);
- //new System.Threading.Thread(InitUpdate).Start();
};
//// TODO : Basic Auth
diff --git a/ACTWebSocket.Core/IPC_COPYDATA.Designer.cs b/ACTWebSocket.Core/IPC_COPYDATA.Designer.cs
new file mode 100644
index 0000000..cdd64c8
--- /dev/null
+++ b/ACTWebSocket.Core/IPC_COPYDATA.Designer.cs
@@ -0,0 +1,52 @@
+namespace ACTWebSocket_Plugin
+{
+ partial class IPC_COPYDATA
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.SuspendLayout();
+ //
+ // Form_COPYDATA
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(284, 261);
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "Form_COPYDATA";
+ this.ShowIcon = false;
+ this.ShowInTaskbar = false;
+ this.Text = "Form_COPYDATA";
+ this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
+ this.Load += new System.EventHandler(this.Form_COPYDATA_Load);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/ACTWebSocket.Core/IPC_COPYDATA.cs b/ACTWebSocket.Core/IPC_COPYDATA.cs
new file mode 100644
index 0000000..20b0c46
--- /dev/null
+++ b/ACTWebSocket.Core/IPC_COPYDATA.cs
@@ -0,0 +1,85 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace ACTWebSocket_Plugin
+{
+ public partial class IPC_COPYDATA : Form
+ {
+ public delegate void OnMessage(int code, string message) ;
+ public OnMessage onMessage;
+ public IPC_COPYDATA()
+ {
+ InitializeComponent();
+ }
+
+ private void Form_COPYDATA_Load(object sender, EventArgs e)
+ {
+ this.Hide();
+ }
+
+ [DllImport("User32.dll", CharSet = CharSet.Auto, EntryPoint = "SendMessage")]
+ public static extern int SendMessage(IntPtr hWnd, Int32 Msg, IntPtr wParam, ref Win32API.COPYDATASTRUCT lParam);
+
+ [DllImport("User32.dll", CharSet = CharSet.Auto, EntryPoint = "SendMessage")]
+ public static extern int SendMessage(IntPtr hWnd, Int32 Msg, IntPtr wParam, IntPtr lParam);
+
+ [DllImport("user32.dll", SetLastError = true)]
+ static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
+
+ public class Win32API
+ {
+ public const Int32 WM_COPYDATA = 0x004A;
+ public struct COPYDATASTRUCT
+ {
+ public IntPtr dwData;
+ public int cbData;
+ public IntPtr lpData;
+ }
+ }
+
+ protected override void WndProc(ref Message m)
+ {
+ switch (m.Msg)
+ {
+ case Win32API.WM_COPYDATA:
+ Win32API.COPYDATASTRUCT cds = (Win32API.COPYDATASTRUCT)m.GetLParam(typeof(Win32API.COPYDATASTRUCT));
+ //Win32API.COPYDATASTRUCT cds2 = (Win32API.COPYDATASTRUCT)Marshal.PtrToStructure(m.LParam, typeof(Win32API.COPYDATASTRUCT));
+
+ byte[] data = new byte[cds.cbData];
+ Marshal.Copy(cds.lpData, data, 0, cds.cbData);
+
+ onMessage(cds.dwData.ToInt32(), Encoding.UTF8.GetString(data));
+ break;
+ default:
+ break;
+ }
+ base.WndProc(ref m);
+ }
+
+ public bool SendMessage(string caption, int code, string msg)
+ {
+ IntPtr hwnd = FindWindow(null, caption);
+ if (hwnd != IntPtr.Zero)
+ {
+ Win32API.COPYDATASTRUCT cds = new Win32API.COPYDATASTRUCT();
+ cds.dwData = new IntPtr(code);
+ byte[] buff = Encoding.UTF8.GetBytes(msg);
+ cds.lpData = Marshal.AllocHGlobal(buff.Length);
+ Marshal.Copy(buff, 0, cds.lpData, buff.Length);
+ cds.cbData = buff.Length;
+ SendMessage(hwnd, Win32API.WM_COPYDATA, this.Handle, ref cds);
+ return true;
+ }
+ return false;
+ }
+
+ }
+}
diff --git a/ACTWebSocket.Core/IPC_COPYDATA.resx b/ACTWebSocket.Core/IPC_COPYDATA.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/ACTWebSocket.Core/IPC_COPYDATA.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/OverlayProcWebUI/MainForm.html b/OverlayProcWebUI/MainForm.html
new file mode 100644
index 0000000..978ca4b
--- /dev/null
+++ b/OverlayProcWebUI/MainForm.html
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
URL or File
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Enable ClickThru
+
Enable Non focusing
+
Enable Dragging
+
Enable Drag & Drop
+
Hide Overlay
+
Enable Resize
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OverlayProcWebUI/css/default.css b/OverlayProcWebUI/css/default.css
new file mode 100644
index 0000000..36ca4ed
--- /dev/null
+++ b/OverlayProcWebUI/css/default.css
@@ -0,0 +1,79 @@
+@charset "utf-8";
+@import url(http://fonts.googleapis.com/earlyaccess/notosanskr.css);
+* {font-family:'Noto Sans KR';}
+* [data-checked] {cursor:pointer;}
+* [disabled] {cursor:default; color:#AAA;}
+* ::selection {background:rgba(161, 127, 255, .5); color:inherit; border:1px solid #A17FFF;}
+body
+{
+ -webkit-user-select: none;
+ -moz-user-select: -moz-none;
+ -ms-user-select: none;
+ user-select: none;
+}
+input, textarea
+{
+ -webkit-user-select: text;
+ -moz-user-select: text;
+ -ms-user-select: text;
+ -o-user-select: text;
+ -moz-user-select:text;
+}
+html, body{padding:0px; margin:0px; font-size:12px;}
+.disableall, .disablemenu {z-index:9999; position:fixed; left:0px; top:0px; bottom:0px; right:0px; background:rgba(192, 192, 192, .5);}
+
+.body {position:fixed; left:0px; top:0px; bottom:0px; right:0px; background:#FFF;}
+
+.body>.console {bottom:0px; left:0px; right:0px; top:0px; border-top:1px solid #E5E5E5; position:absolute; display:none;}
+
+.body>.center {position:absolute; left:0px; top:0px; bottom:0px; right:0px;}
+.body>.center>.listhead {position:absolute; left:0px; top:0px; height:40px; line-height:40px; padding-left:15px; font-size:18px; font-weight:bold; width:265px; border-bottom:1px solid #E5E5E5;}
+.body>.center>.listhead>svg {cursor:pointer; width:24px; height:24px; position:absolute; right:12px; top:8px; border-radius:50%; fill:#4D89C1;}
+.body>.center>.listhead>svg:hover {fill:#2061A1;}
+.body>.center>.listhead>svg:active {fill:#0B4680;}
+
+.body>.center>.list {width:280px; position:Absolute; left:0px; right:0px; top:40px; bottom:0px;}
+.body>.center>.list>div {height:32px; line-height:32px; padding-left:38px; cursor:pointer; position:relative; overflow:hidden;}
+.body>.center>.list>div::after{content:" "; position:absolute; left:8px; height:24px; width:24px; top:4px; background-color:#AAA;}
+.body>.center>.list>div[data-url^="file"]::after {-webkit-mask-image:url(../img/file.svg); background-repeat:no-repeat;}
+.body>.center>.list>div[data-url^="http"]::after {-webkit-mask-image:url(../img/link.svg); background-repeat:no-repeat;}
+.body>.center>.list>div:hover {background-color:#E5E5E5;}
+.body>.center>.list>div:active, .body>.center>.list>div.selected {background-color:#3998D6; color:#FFF;}
+.body>.center>.list>div:hover::after {background-color:#AAA;}
+.body>.center>.list>div:active::after {background-color:#FFF;}
+.body>.center>.list>div.selected::after {background-color:#FFF;}
+
+.body>.center>.setting {position:absolute; overflow:auto; left:280px; top:0px; right:0px; bottom:0px; border-left:1px solid #E5E5E5; padding-top:37px; padding-right:10px;}
+.body>.center>.setting>div {height:30px; line-height:30px; padding-left:12px; position:relative;}
+.body>.center>.setting>div[data-checked] {padding-left:55px;}
+.body>.center>.setting>div[data-checked=true][disabled]:after {background:#AAA;}
+.body>.center>.setting>div[data-checked=false]:after {float:left; margin-left:-24px; margin-top:6px; width:18px; height:18px; background:#DDD; content:' '; border-radius:4px;}
+.body>.center>.setting>div[data-checked=true]:after {float:left; margin-left:-24px; margin-top:6px; width:18px; height:18px; background:#4D89C1; content:'✓'; border-radius:4px; line-height:18px; font-weight:bold; text-align:center; color:#FFF;}
+.body>.center>.setting>div>.label {float:left; width:50px; text-align:right;}
+.body>.center>.setting>div>.inputcase {position:absolute; left:70px; right:10px; }
+.body>.center>.setting>div>.inputcase>input[type=text] {width:100%; height:16px; border:1px solid #E5E5E5; border-radius:4px; padding:2px; font-size:12px;}
+.body>.center>.setting>div>.inputcase>input[type=number] {width:100%; height:16px; border:1px solid #E5E5E5; border-radius:4px; padding:2px; font-size:12px;}
+.body>.center>.setting>div>.inputcase>input[type=range] {width:100%; border:0px; margin-top:6px; height:22px; -webkit-appearance: none;}
+.body>.center>.setting>div>.inputcase>input[type=range]::-webkit-slider-runnable-track {background:#E5E5E5; height:4px;}
+.body>.center>.setting>div>.inputcase>input[type=range]::-webkit-slider-thumb {background: #4D89C1; -webkit-appearance: none; height:16px; width:8px; margin-top:-6px; border:2px solid #FFF;}
+.body>.center>.setting>div>button {position:absolute; z-index:9; border:1px solid #E5E5E5; background:transparent; height:22px; top:4px; font-size:12px; border-radius:4px;}
+.body>.center>.setting>div>button:hover {background:rgba(0,192,255,0.15);}
+.body>.center>.setting>div>button:active {background:#E5E5E5;}
+.body>.center>.setting>div>.valueview {position:absolute; border:1px solid #E5E5E5; background:transparent; right:5px; width:53px; height:20px; top:4px; font-size:12px; line-height:22px; border-radius:4px; text-align:center;}
+
+.newwindow {position:fixed; z-index:10000; left:10px; top:130px; width:400px; min-height:70px; max-height:600px; background:#FFF; border-radius:2px; -webkit-filter:drop-shadow(0px 0px 2px rgba(0,0,0,0.5));}
+.newwindow::after {position:absolute; right:146px; width:15px; height:15px; transform:rotate(45deg); content:" "; background:#FFF; top:-3px;}
+.newwindow>.url {height:40px; border-bottom:1px solid #E5E5E5; line-height:40px;}
+.newwindow>.url>.label {float:left; width:80px; text-align:right;}
+.newwindow>.url>.inputcase {position:absolute; left:90px; right:10px; z-index:99;}
+.newwindow>.url>.inputcase>input[type=text] {width:100%; height:16px; border:1px solid #E5E5E5; border-radius:4px; padding:2px; font-size:12px;}
+.newwindow>.url>button {position:absolute; border:1px solid #E5E5E5; background:transparent; height:22px; top:9px; font-size:12px; border-radius:4px; z-index:99;}
+.newwindow>.lists>div {height:29px; line-height:30px; padding-left:12px; cursor:default; border-bottom:1px solid #E5E5E5; position:relative; padding-right:50px;}
+.newwindow>.lists>div:last-child {height:30px; border:0px;}
+.newwindow>.lists>div>.link, .newwindow>.lists>div>.select{position:absolute; right:5px; content:" "; width:20px; height:20px; top:5px; background:#E5E5E5; border-radius:3px;}
+.newwindow>.lists>div>.select {right:30px;}
+.newwindow>.lists>div>.select:hover, .newwindow>.lists>div>.link:hover {background:#4D89C1;}
+.newwindow>.lists>div>.link::after, .newwindow>.lists>div>.select::after{-webkit-mask-size:18px 18px; -webkit-mask-repeat:no-repeat; -webkit-mask-position:center center; background-color:#333; content:" "; width:20px; height:20px; position:absolute;}
+.newwindow>.lists>div>.link:hover::after, .newwindow>.lists>div>.select:hover::after {background-color:#FFF;}
+.newwindow>.lists>div>.link::after {-webkit-mask-image:url(../img/copy.svg);}
+.newwindow>.lists>div>.select::after {-webkit-mask-image:url(../img/done.svg);}
\ No newline at end of file
diff --git a/OverlayProcWebUI/img/copy.svg b/OverlayProcWebUI/img/copy.svg
new file mode 100644
index 0000000..be9d591
--- /dev/null
+++ b/OverlayProcWebUI/img/copy.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/OverlayProcWebUI/img/detail.svg b/OverlayProcWebUI/img/detail.svg
new file mode 100644
index 0000000..c2834b3
--- /dev/null
+++ b/OverlayProcWebUI/img/detail.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/OverlayProcWebUI/img/done.svg b/OverlayProcWebUI/img/done.svg
new file mode 100644
index 0000000..446af14
--- /dev/null
+++ b/OverlayProcWebUI/img/done.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/OverlayProcWebUI/img/file.svg b/OverlayProcWebUI/img/file.svg
new file mode 100644
index 0000000..4d60655
--- /dev/null
+++ b/OverlayProcWebUI/img/file.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/OverlayProcWebUI/img/gear.svg b/OverlayProcWebUI/img/gear.svg
new file mode 100644
index 0000000..875fb01
--- /dev/null
+++ b/OverlayProcWebUI/img/gear.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/OverlayProcWebUI/img/link.svg b/OverlayProcWebUI/img/link.svg
new file mode 100644
index 0000000..a2a1ab3
--- /dev/null
+++ b/OverlayProcWebUI/img/link.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/OverlayProcWebUI/img/off.svg b/OverlayProcWebUI/img/off.svg
new file mode 100644
index 0000000..2ceecdb
--- /dev/null
+++ b/OverlayProcWebUI/img/off.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/OverlayProcWebUI/img/on.svg b/OverlayProcWebUI/img/on.svg
new file mode 100644
index 0000000..0b714cb
--- /dev/null
+++ b/OverlayProcWebUI/img/on.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/OverlayProcWebUI/img/wide.svg b/OverlayProcWebUI/img/wide.svg
new file mode 100644
index 0000000..d2a24ed
--- /dev/null
+++ b/OverlayProcWebUI/img/wide.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/OverlayProcWebUI/js/app.js b/OverlayProcWebUI/js/app.js
new file mode 100644
index 0000000..f4c57d3
--- /dev/null
+++ b/OverlayProcWebUI/js/app.js
@@ -0,0 +1,855 @@
+var language = {
+ "new-url":{"ko":"주소 또는 파일", "ja-JP":"", "en":"URL or File"},
+ "new-add":{"ko":"추가", "ja-JP":"", "en":"Add"},
+ "start-option":{"ko":"시작 설정", "ja-JP":"", "en":"Start Option"},
+ "autorun":{"ko":"ACT와 함께 시작", "ja-JP":"", "en":"Auto Running With ACT"},
+ "localhost":{"ko":"이 PC만 사용", "ja-JP":"", "en":"Localhost Only"},
+ "randurl":{"ko":"무작위 주소 사용", "ja-JP":"", "en":"Random URL"},
+ "url":{"ko":"IP 주소", "ja-JP":"", "en":"URL"},
+ "port":{"ko":"포트", "ja-JP":"", "en":"Port"},
+ "server-status":{"ko":"서버 설정", "ja-JP":"", "en":"Server Option"},
+ "miniparse":{"ko":"전투기록 사용", "ja-JP":"", "en":"Use Mini Parse"},
+ "onloglineread":{"ko":"OnLogLineRead 사용", "ja-JP":"", "en":"Use OnLogLineRead"},
+ "beforeloglineread":{"ko":"BeforeLogLineRead 사용", "ja-JP":"", "en":"Use BeforeLogLineRead"},
+ "miniparseset":{"ko":"전투기록 설정", "ja-JP":"", "en":"Mini Parse Setting"},
+ "miniparseSortkey":{"ko":"정렬 키", "ja-JP":"", "en":"Sort Key"},
+ "miniparseSorttype":{"ko":"정렬 방법", "ja-JP":"", "en":"Sort Type"},
+ "opt-none":{"ko":"없음", "ja-JP":"", "en":"None"},
+ "opt-sa":{"ko":"문자-오름차순", "ja-JP":"", "en":"StringAscending"},
+ "opt-sd":{"ko":"문자-내림차순", "ja-JP":"", "en":"StringDescending"},
+ "opt-na":{"ko":"숫자-오름차순", "ja-JP":"", "en":"NumericAscending"},
+ "opt-nd":{"ko":"숫자-내림차순", "ja-JP":"", "en":"NumericDescending"},
+ "overlays":{"ko":"오버레이 목록", "ja-JP":"", "en":"Overlays"},
+ "overlay-title":{"ko":"제목", "ja-JP":"", "en":"Title"},
+ "overlay-url":{"ko":"주소", "ja-JP":"", "en":"URL"},
+ "overlay-open":{"ko":"열기", "ja-JP":"", "en":"Open"},
+ "overlay-opacity":{"ko":"투명도", "ja-JP":"", "en":"Opacity"},
+ "overlay-zoom":{"ko":"확축", "ja-JP":"", "en":"Zoom"},
+ "overlay-fps":{"ko":"프레임", "ja-JP":"", "en":"FPS"},
+ "overlay-clickthru":{"ko":"클릭 통과 사용", "ja-JP":"", "en":"Enable ClickThru"},
+ "overlay-nonfocus":{"ko":"포커스를 주지 않음", "ja-JP":"", "en":"Enable Non focusing"},
+ "overlay-dragging":{"ko":"화면 내 드래그 사용", "ja-JP":"", "en":"Enable Dragging"},
+ "overlay-dragndrop":{"ko":"드래그 화면 이동 사용", "ja-JP":"", "en":"Enable Drag & Drop"},
+ "overlay-hide":{"ko":"오버레이 숨김", "ja-JP":"", "en":"Hide Overlay"},
+ "overlay-resize":{"ko":"크기 조절 사용", "ja-JP":"", "en":"Enable Resize"},
+ "overlay-x":{"ko":"X좌표", "ja-JP":"", "en":"pos X"},
+ "overlay-y":{"ko":"Y좌표", "ja-JP":"", "en":"pos Y"},
+ "overlay-width":{"ko":"폭", "ja-JP":"", "en":"Width"},
+ "overlay-height":{"ko":"높이", "ja-JP":"", "en":"Height"},
+ "overlay-save":{"ko":"저장", "ja-JP":"", "en":"Save"},
+ "overlay-delete":{"ko":"삭제", "ja-JP":"", "en":"Delete"},
+ "overlay-reload":{"ko":"리로드", "ja-JP":"", "en":"Reload"},
+ "overlay-opendevtool":{"ko":"개발자 도구 열기", "ja":"","en":"Open DevTool"},
+ "serverstatus":
+ {
+ "ko":
+ {
+ "on":"서버 상태 : 작동중 (멈추려면 클릭)",
+ "off":"서버 상태 : 멈춤 (시작하려면 클릭)",
+ },
+ "ja":
+ {
+ "on":"Server Status : Running (Stop at Click)",
+ "off":"Server Status : Stoped (Run at Click)",
+ },
+ "en":
+ {
+ "on":"Server Status : Running (Stop at Click)",
+ "off":"Server Status : Stoped (Run at Click)",
+ }
+ }
+};
+
+function closeMenu()
+{
+ $(".wideswap").attr("data-checked", "true");
+ $(".left").css({"left":"-261px", "box-shadow":"0px 0px 0px transparent"});
+ $(".wideswap").css({"left":"8px"});
+}
+
+function api_overlaywindow_get(json, callback)
+{
+ websocket.send(
+ JSON.stringify({
+ cmd: "get",
+ value: json
+ })
+ );
+}
+
+function api_overlaywindow_set(json, callback)
+{
+ websocket.send(
+ JSON.stringify({
+ cmd: "set",
+ value: json
+ })
+ );
+}
+
+function api_overlaywindow_set_all(json)
+{
+ websocket.send(
+ JSON.stringify({
+ cmd: "set_all",
+ value: json
+ })
+ );
+}
+
+function api_overlaywindow_close_all()
+{
+ websocket.send(
+ JSON.stringify({
+ cmd: "close_all"
+ })
+ );
+}
+
+function api_overlaywindow_get_all()
+{
+ websocket.send(
+ JSON.stringify({
+ cmd: "get_all"
+ })
+ );
+}
+
+function api_overlaywindow_close(json)
+{
+ websocket.send(
+ JSON.stringify({
+ cmd: "close",
+ value: json
+ })
+ );
+}
+
+var wsUri = "ws://localhost:9991/";
+var pageActive = true;
+var websocket = null;
+function connectWebSocket(uri)
+{
+ websocket = new WebSocket(uri);
+ websocket.onopen = function(evt) {
+ $(".list").empty();
+ api_overlaywindow_get_all();
+ // //api_overlaywindow_close_all();
+ // var count = $(".list div").length;
+ // var objs = {};
+ // for(var i = 0; i= 0)
+ {
+ obj = {};
+ obj["title"] = $($(".list div")[index]).find("span")[0].innerText;
+ obj["id"] = $($(".list div")[index]).attr("data-id");
+ obj["url"] = $($(".list div")[index]).attr("data-url");
+ //obj["title"] = $($(".list div")[index]).find("span").html($("*[data-flag=overlay-title]").val());
+ for(var i in savedvar)
+ {
+ if($("*[data-flag=overlay-"+savedvar[i]+"]").is("[data-checked]"))
+ {
+ if(index == selectedIndex)
+ {
+ $($(".list div")[index]).attr("data-"+savedvar[i], $("*[data-flag=overlay-"+savedvar[i]+"]").attr("data-checked")=="true"?"true":"false");
+ }
+ obj[nameJSToNativeMap[savedvar[i]]] = $($(".list div")[index]).attr("data-"+savedvar[i])=="true"?true:false;
+ }
+ else
+ {
+ if(index == selectedIndex)
+ {
+ $($(".list div")[index]).attr("data-"+savedvar[i], $("*[data-flag=overlay-"+savedvar[i]+"]").val());
+ }
+ obj[nameJSToNativeMap[savedvar[i]]] = $($(".list div")[index]).attr("data-"+savedvar[i]);
+ }
+ }
+ for(var i in floatvar)
+ {
+ obj[floatvar[i]] = parseFloat(obj[floatvar[i]]) / 100.0;
+ }
+ for(var i in intvar)
+ {
+ obj[intvar[i]] = parseFloat(obj[intvar[i]]);
+ }
+ }
+ return obj;
+}
+function addHostname(hostname)
+{
+ var html ="