}
Button {
Caption = "Button";
+ MinimumSize = "50,20";
Width = "Fit";
}
Label {
<?xml version="1.0"?>
-<Border Background="{./Background}" MinimumSize="50,20" Name="Content"
+<Border Background="{./Background}" Name="Content"
Foreground="Transparent" CornerRadius="{../CornerRadius}" BorderWidth="1"
MouseEnter="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black};{caption.Foreground=White}"
MouseLeave="{Foreground=Transparent};{caption.Foreground=LightGrey}"
<TextBox Style="TxtInFileDialog" Text="{²./CurrentDirectory}"/>
</HorizontalStack>
<DirectoryView ShowHidden="{²../cbShowHidden.IsChecked}" FileMask="{²../txtFileMask.Text}" ShowFiles="{²../cbShowFiles.IsChecked}" Name="fv" CurrentDirectory="{./CurrentDirectory}" SelectedItemChanged="./onFVSelectedItemChanged"
- Width="100%" Margin="0" MouseDoubleClick="./onFileSelect">
+ Width="100%" Margin="0" MouseDoubleClick="./onFileSelectDblClick">
<Template>
<ListBox ItemTemplate="#Crow.FileItems.template" Name="fileView" Data="{./FileSystemEntries}"
SelectedItemChanged="./onSelectedItemChanged">
return;
caption = value;
NotifyValueChanged ("Caption", caption);
-
}
}
/// <summary>
//get the dataSource of the sender
il.Emit (OpCodes.Ldarg_0);//push root TemplatedGroup into the stack
il.Emit (OpCodes.Ldarg_1);//load sender node of expand
- il.Emit (OpCodes.Callvirt, CompilerServices.miGetDataSource);
+ il.Emit (OpCodes.Callvirt, CompilerServices.miGetDataSource);
if (fetchMethodName != "self") {//special keyword self allows the use of recurent list<<<
if (dataType == null) {
il.Emit (OpCodes.Ldstr, fetchMethodName);
il.Emit (OpCodes.Call, CompilerServices.miGetDataTypeAndFetch);
- }else
- emitGetSubData(il, dataType);
+ } else {
+ emitGetSubData (il, dataType);
+ }
}
//set 'return' from the fetch method as 'data' of the list
//il.Emit (OpCodes.Callvirt, piData.GetSetMethod ());
}
//data is on the stack
void emitGetSubData(ILGenerator il, Type dataType){
+ if (dataType.IsValueType)
+ il.Emit (OpCodes.Unbox_Any, dataType);
MethodInfo miGetDatas = dataType.GetMethod (fetchMethodName, new Type[] {});
if (miGetDatas == null)
miGetDatas = CompilerServices.SearchExtMethod (dataType, fetchMethodName);
return;
CurrentDirectory = Directory.GetParent(CurrentDirectory).FullName;
}
- void onFileSelect(object sender, MouseButtonEventArgs e){
- if (string.IsNullOrEmpty (SelectedFile))
- CurrentDirectory = SelectedDirectory;
- else {
- OkClicked.Raise (this, null);
- IFace.DeleteWidget (this);
+ void onFileSelectDblClick (object sender, MouseButtonEventArgs e) {
+ CurrentDirectory = SelectedDirectory;
+ }
+
+ void onFileSelect (object sender, MouseButtonEventArgs e){
+ if (ShowFiles) {
+ if (string.IsNullOrEmpty (SelectedFile)) {
+ CurrentDirectory = SelectedDirectory;
+ return;
+ }
}
+ OkClicked.Raise (this, null);
+ IFace.DeleteWidget (this);
}
void onCancel(object sender, MouseButtonEventArgs e){
IFace.DeleteWidget (this);
break;
case ',':
ReadChar ();
- if (!(curState == States.classNames) || string.IsNullOrEmpty (token))
+ if (curState != States.classNames || string.IsNullOrEmpty (token))
throw new ParserException (line, column, "Unexpected char ','", resId);
targetsClasses.Add (token);
token = "";