aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/common
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-09-18 09:22:04 +0000
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-09-18 09:22:04 +0000
commitf73ce5a6db8949227834d9d65b195bbb9e8acb32 (patch)
tree759eac7b86ca8cf03a1cee9796dcd17079bdd02c /Samples/common
parent8b343e10f1a65b07988e15ea76596b16a03adadc (diff)
save commit, BubbleEvents, iface.search type and ext meth for loadCtx wise searches, IncludedEvents as list, removed discarded events
Diffstat (limited to 'Samples/common')
-rw-r--r--Samples/common/src/Editor.cs4
-rw-r--r--Samples/common/src/SampleBase.cs11
-rw-r--r--Samples/common/src/SampleBaseForEditor.cs7
-rw-r--r--Samples/common/ui/Interfaces/Experimental/buttonSizing.crow9
-rw-r--r--Samples/common/ui/Interfaces/Experimental/enumSelector2.crow18
-rw-r--r--Samples/common/ui/Interfaces/Experimental/fileDialog.crow17
6 files changed, 59 insertions, 7 deletions
diff --git a/Samples/common/src/Editor.cs b/Samples/common/src/Editor.cs
index e56914f8..0c702745 100644
--- a/Samples/common/src/Editor.cs
+++ b/Samples/common/src/Editor.cs
@@ -52,13 +52,13 @@ namespace Crow
IEnumerable<MemberInfo> getAllCrowTypeMembers (string crowTypeName) {
- Type crowType = IML.Instantiator.GetWidgetTypeFromName (crowTypeName);
+ Type crowType = IFace.GetWidgetTypeFromName (crowTypeName);
return crowType.GetMembers (BindingFlags.Public | BindingFlags.Instance).
Where (m=>((m is PropertyInfo pi && pi.CanWrite) || (m is EventInfo)) &&
m.GetCustomAttribute<XmlIgnoreAttribute>() == null);
}
MemberInfo getCrowTypeMember (string crowTypeName, string memberName) {
- Type crowType = IML.Instantiator.GetWidgetTypeFromName (crowTypeName);
+ Type crowType = IFace.GetWidgetTypeFromName (crowTypeName);
return crowType.GetMember (memberName, BindingFlags.Public | BindingFlags.Instance).FirstOrDefault ();
}
diff --git a/Samples/common/src/SampleBase.cs b/Samples/common/src/SampleBase.cs
index b44bb8f5..3e0ef714 100644
--- a/Samples/common/src/SampleBase.cs
+++ b/Samples/common/src/SampleBase.cs
@@ -94,6 +94,17 @@ namespace Samples
new ActionCommand("Action A", () => MessageBox.ShowModal(this, MessageBox.Type.Information, "context menu A clicked"))
);
}
+ DeviceEventType deviceEventTypeEnum;
+ public DeviceEventType DeviceEventTypeEnum {
+ get => deviceEventTypeEnum;
+ set {
+ if (deviceEventTypeEnum == value)
+ return;
+ deviceEventTypeEnum = value;
+ NotifyValueChanged ("DeviceEventTypeEnum", deviceEventTypeEnum);
+ }
+
+ }
public int intValue = 500;
VerticalAlignment currentVAlign;
diff --git a/Samples/common/src/SampleBaseForEditor.cs b/Samples/common/src/SampleBaseForEditor.cs
index e1cadc0a..a63ba54e 100644
--- a/Samples/common/src/SampleBaseForEditor.cs
+++ b/Samples/common/src/SampleBaseForEditor.cs
@@ -67,7 +67,7 @@ namespace Samples
}
public bool DebugLoggingEnabled => DbgLogger.IsEnabled;
- public DbgEvtType RecordedEvents {
+ /*public DbgEvtType RecordedEvents {
get => Configuration.Global.Get<DbgEvtType> (nameof (RecordedEvents));
set {
if (RecordedEvents == value)
@@ -88,7 +88,7 @@ namespace Samples
DbgLogger.DiscardEvents = DiscardedEvents;
NotifyValueChanged(DiscardedEvents);
}
- }
+ }*/
public bool DebugLogRecording {
get => debugLogRecording;
set {
@@ -119,9 +119,6 @@ namespace Samples
}
protected static void initDebugLog () {
- DbgLogger.IncludeEvents = DbgEvtType.None;
- DbgLogger.DiscardEvents = DbgEvtType.All;
- //DbgLogger.DiscardEvents = DbgEvtType.All;
DbgLogger.ConsoleOutput = !Configuration.Global.Get<bool> (nameof (DebugLogToFile));
}
diff --git a/Samples/common/ui/Interfaces/Experimental/buttonSizing.crow b/Samples/common/ui/Interfaces/Experimental/buttonSizing.crow
new file mode 100644
index 00000000..04139b1b
--- /dev/null
+++ b/Samples/common/ui/Interfaces/Experimental/buttonSizing.crow
@@ -0,0 +1,9 @@
+<VerticalStack Fit="true" Background="Onyx" Margin="0">
+ <Button Caption='Ok' Background='MediumSeaGreen' Width="Stretched" MouseClick="{Background=Red}">
+ <Template>
+ <Border Style="ButtonBorder" Background="{./Background}" Name="Content" CornerRadius="{../CornerRadius}" Width="Stretched">
+ <Label Font="{./Font}" Name="caption" Margin="${ButtonCaptionMargin}" Foreground="{./Foreground}" Text="{./Caption}"/>
+ </Border>
+ </Template>
+ </Button>
+</VerticalStack> \ No newline at end of file
diff --git a/Samples/common/ui/Interfaces/Experimental/enumSelector2.crow b/Samples/common/ui/Interfaces/Experimental/enumSelector2.crow
new file mode 100644
index 00000000..adaf0870
--- /dev/null
+++ b/Samples/common/ui/Interfaces/Experimental/enumSelector2.crow
@@ -0,0 +1,18 @@
+<VerticalStack>
+ <Label Text="{DeviceEventTypeEnum}"/>
+ <EnumSelector Caption="Device Events:" EnumValue="{²DeviceEventTypeEnum}" ItemStyle="CheckBox3" Width="Fit" Background="Jet">
+ <Template>
+ <Border Style="ControlBorder" Background="{./Background}" CornerRadius="{./CornerRadius}">
+ <HorizontalStack>
+ <Label Text="{./Caption}"/>
+ <Popper Caption="{./EnumValue}" PopDirection="BottomLeft" >
+ <Template>
+ <Label Style="ControlCaption" Text="{./Caption}" Foreground="{./Foreground}" MinimumSize="80,1" TextAlignment="Center"/>
+ </Template>
+ <VerticalStack Fit="true" Name="Content" Background="Onyx" Width="{../PopWidth}" Margin="5"/>
+ </Popper>
+ </HorizontalStack>
+ </Border>
+ </Template>
+ </EnumSelector>
+</VerticalStack>
diff --git a/Samples/common/ui/Interfaces/Experimental/fileDialog.crow b/Samples/common/ui/Interfaces/Experimental/fileDialog.crow
new file mode 100644
index 00000000..90f9c70c
--- /dev/null
+++ b/Samples/common/ui/Interfaces/Experimental/fileDialog.crow
@@ -0,0 +1,17 @@
+<VerticalStack>
+ <HorizontalStack Height="Fit">
+ <Label Text="Hover:" Width="50" Foreground="Grey"/>
+ <Label Text="{HoverWidget}" Font="mono, 8"/>
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Text="Focus:" Width="50" Foreground="Grey"/>
+ <Label Text="{FocusedWidget}" Font="mono, 8"/>
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Text="Active:" Width="50" Foreground="Grey"/>
+ <Label Text="{ActiveWidget}" Font="mono, 8"/>
+ </HorizontalStack>
+ <Container>
+ <FileDialog Focusable="true" Resizable="true"/>
+ </Container>
+</VerticalStack> \ No newline at end of file