Skip to content

Commit eba84c2

Browse files
author
KHerron
committed
Added Screen Controls Validation
Also added UserControlDescriptionEditor to solution
1 parent 3c1d0db commit eba84c2

29 files changed

+1864
-79
lines changed

Open Source Automation.sln

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Microsoft Visual Studio Solution File, Format Version 12.00
2-
# Visual Studio 2012
2+
# Visual Studio Express 2012 for Windows Desktop
33
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OSAE.Jabber", "Plugins\OSAE.Jabber\OSAE.Jabber.csproj", "{589EDA2C-421D-40F1-9682-D4360E02897A}"
44
EndProject
55
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OSAE.API", "OSAE.API\OSAE.API.csproj", "{022F45F1-C988-41A1-A203-39E97BE928B6}"
@@ -65,6 +65,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OSAE.PowerShell", "Plugins\
6565
EndProject
6666
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OSAE.WebServer", "Plugins\OSAE.WebServer\OSAE.WebServer.csproj", "{35DEF1F9-4FFE-494F-AE8D-0AF15B278C22}"
6767
EndProject
68+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UserControlDescriptionEditor", "UI\UserControlDescriptionEditor\UserControlDescriptionEditor.csproj", "{394D2B41-4B78-4701-8D36-BF04EB42EAA4}"
69+
EndProject
6870
Global
6971
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7072
Debug|Any CPU = Debug|Any CPU
@@ -271,6 +273,16 @@ Global
271273
{35DEF1F9-4FFE-494F-AE8D-0AF15B278C22}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
272274
{35DEF1F9-4FFE-494F-AE8D-0AF15B278C22}.Release|Mixed Platforms.Build.0 = Release|Any CPU
273275
{35DEF1F9-4FFE-494F-AE8D-0AF15B278C22}.Release|x86.ActiveCfg = Release|Any CPU
276+
{394D2B41-4B78-4701-8D36-BF04EB42EAA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
277+
{394D2B41-4B78-4701-8D36-BF04EB42EAA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
278+
{394D2B41-4B78-4701-8D36-BF04EB42EAA4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
279+
{394D2B41-4B78-4701-8D36-BF04EB42EAA4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
280+
{394D2B41-4B78-4701-8D36-BF04EB42EAA4}.Debug|x86.ActiveCfg = Debug|Any CPU
281+
{394D2B41-4B78-4701-8D36-BF04EB42EAA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
282+
{394D2B41-4B78-4701-8D36-BF04EB42EAA4}.Release|Any CPU.Build.0 = Release|Any CPU
283+
{394D2B41-4B78-4701-8D36-BF04EB42EAA4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
284+
{394D2B41-4B78-4701-8D36-BF04EB42EAA4}.Release|Mixed Platforms.Build.0 = Release|Any CPU
285+
{394D2B41-4B78-4701-8D36-BF04EB42EAA4}.Release|x86.ActiveCfg = Release|Any CPU
274286
EndGlobalSection
275287
GlobalSection(SolutionProperties) = preSolution
276288
HideSolutionNode = FALSE
@@ -294,5 +306,6 @@ Global
294306
{B1ECF3AD-57BE-4F79-9AEA-0DB153117AEB} = {2A452081-FFE5-43C4-82D1-7202917BC509}
295307
{503092C1-23FE-4AD8-B855-CF1D24D632A9} = {2A452081-FFE5-43C4-82D1-7202917BC509}
296308
{E730B38F-5144-4AA2-9369-5287A3667CB0} = {2A452081-FFE5-43C4-82D1-7202917BC509}
309+
{394D2B41-4B78-4701-8D36-BF04EB42EAA4} = {2A452081-FFE5-43C4-82D1-7202917BC509}
297310
EndGlobalSection
298311
EndGlobal

UI/Screens/MainWindow.xaml.cs

+16-3
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ public void Load_Screen(string sScreen)
131131
cameraViewers.Clear();
132132
canGUI.Children.Clear();
133133
browserFrames.Clear();
134-
134+
controlTypes.Clear();
135+
135136
gCurrentScreen = sScreen;
136137
OSAEObjectPropertyManager.ObjectPropertySet(gAppName, "Current Screen", sScreen, "GUI");
137138
OSAE.OSAEImageManager imgMgr = new OSAE.OSAEImageManager();
@@ -305,7 +306,18 @@ private void Update_Objects()
305306
{
306307
foreach (dynamic obj in userControls)
307308
{
308-
if (newCtrl.ControlName == obj.screenObject.Name) oldCtrl = true;
309+
if (newCtrl.ControlName == obj.screenObject.Name)
310+
{
311+
if (newCtrl.LastUpdated != obj.LastUpdated)
312+
{
313+
this.Dispatcher.Invoke((Action)(() =>
314+
{
315+
obj.LastUpdated = newCtrl.LastUpdated;
316+
obj.Update();
317+
}));
318+
}
319+
oldCtrl = true;
320+
}
309321
}
310322
}
311323
#endregion
@@ -605,7 +617,8 @@ private void LoadControl(OSAE.OSAEObject obj)
605617
uc.Location.X = dX;
606618
uc.Location.Y = dY;
607619
userControls.Add(uc);
608-
controlTypes.Add(uc.GetType());
620+
//controlTypes.Add(uc.GetType());
621+
controlTypes.Add(typeof(UserControl));
609622
uc.PreviewMouseMove += new MouseEventHandler(DragSource_PreviewMouseMove);
610623
}
611624
#endregion
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0"?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
5+
</startup>
6+
</configuration>

0 commit comments

Comments
 (0)