aboutsummaryrefslogtreecommitdiff
path: root/source/WindowsFormsApplication1/API.cs
diff options
context:
space:
mode:
authorMichaelTheShifter <[email protected]>2016-07-05 18:29:22 -0400
committerMichaelTheShifter <[email protected]>2016-07-05 18:29:22 -0400
commitb2b7d4c442dffc518f0f29d3fabb9c06ea9c4229 (patch)
tree60eaef98a9bfe60748b457471970e8ec5c54fd53 /source/WindowsFormsApplication1/API.cs
parentad0e84c4be1411321e36a9f6ab022195c0d006b3 (diff)
downloadshiftos-c--b2b7d4c442dffc518f0f29d3fabb9c06ea9c4229.tar.gz
shiftos-c--b2b7d4c442dffc518f0f29d3fabb9c06ea9c4229.tar.bz2
shiftos-c--b2b7d4c442dffc518f0f29d3fabb9c06ea9c4229.zip
on_window_open(userdata ShiftOSDesktop,
string) and on_window_close(userdata ShiftOSDesktop, string) now report window GUIDs to their handlers instead of userdata Form objects. You can now use get_window(string) to get a Form from a window GUID.
Diffstat (limited to 'source/WindowsFormsApplication1/API.cs')
-rw-r--r--source/WindowsFormsApplication1/API.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/WindowsFormsApplication1/API.cs b/source/WindowsFormsApplication1/API.cs
index f952a18..2fe6126 100644
--- a/source/WindowsFormsApplication1/API.cs
+++ b/source/WindowsFormsApplication1/API.cs
@@ -82,7 +82,8 @@ namespace ShiftOS
public class API
{
-
+ public static Dictionary<Form, string> OpenGUIDs = new Dictionary<Form, string>();
+
/// <summary>
/// Settings file.
/// </summary>
@@ -1188,6 +1189,7 @@ namespace ShiftOS
}
}));
WindowComposition.SafeToAddControls = true;
+ API.OpenGUIDs.Add(formToCreate, Guid.NewGuid().ToString());
API.CurrentSession.Invoke(new Action(() => { CurrentSession.InvokeWindowOp("open", formToCreate); }));
};
bw.RunWorkerAsync();