Merge branch 'develop' into 整理机台兼容内容
This commit is contained in:
commit
936f9fffa3
|
@ -839,6 +839,7 @@
|
|||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Resource Include="resources\barcode.png" />
|
||||
<Resource Include="resources\blue.png" />
|
||||
|
|
|
@ -1458,7 +1458,7 @@ namespace MECF.Framework.UI.Client.CenterViews.Editors.Recipe
|
|||
return false;
|
||||
}
|
||||
|
||||
if (CurrentRecipe.Validate() == false)
|
||||
if (recipe.Validate() == false)
|
||||
{
|
||||
var mbr = DialogBox.ShowDialog(
|
||||
DialogButton.Yes | DialogButton.No,
|
||||
|
@ -1472,7 +1472,7 @@ namespace MECF.Framework.UI.Client.CenterViews.Editors.Recipe
|
|||
recipe.Revisor = BaseApp.Instance.UserContext.LoginName;
|
||||
recipe.ReviseTime = DateTime.Now;
|
||||
|
||||
if (!CurrentRecipe.GetXmlString(out var recipeXmlString, out var reason))
|
||||
if (!recipe.GetXmlString(out var recipeXmlString, out var reason))
|
||||
{
|
||||
DialogBox.ShowError($"Unable to generate recipe content, {reason}");
|
||||
return false;
|
||||
|
|
|
@ -65,7 +65,12 @@ namespace MECF.Framework.UI.Client.CenterViews.Editors.Sequence
|
|||
}
|
||||
else if (col is PositionColumn)
|
||||
{
|
||||
posParam = new PositionParam() { Name = col.ControlName, Options = ((PositionColumn)col).Options, IsEnabled = !col.IsReadOnly };
|
||||
posParam = new PositionParam()
|
||||
{
|
||||
Name = col.ControlName,
|
||||
Options = ((PositionColumn)col).Options,
|
||||
IsEnabled = !col.IsReadOnly
|
||||
};
|
||||
param = posParam;
|
||||
posValue = value;
|
||||
}
|
||||
|
@ -81,13 +86,11 @@ namespace MECF.Framework.UI.Client.CenterViews.Editors.Sequence
|
|||
value = value.Substring(path.Length + 1);
|
||||
}
|
||||
|
||||
param = new PathFileParam()
|
||||
param = new PathFileParam(col.ControlName, !col.IsReadOnly, ((RecipeSelectColumn)col).RecipeProcessType)
|
||||
{
|
||||
Name = col.ControlName,
|
||||
Value = value,
|
||||
IsEnabled = !col.IsReadOnly,
|
||||
PrefixPath = ((RecipeSelectColumn)col).RecipeProcessType
|
||||
};
|
||||
|
||||
}
|
||||
else if (col is MultipleSelectColumn)
|
||||
{
|
||||
|
|
|
@ -9,9 +9,12 @@
|
|||
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:micro="clr-namespace:Caliburn.Micro"
|
||||
xmlns:sequence="clr-namespace:MECF.Framework.UI.Client.CenterViews.Editors.Sequence"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="1900"
|
||||
mc:Ignorable="d">
|
||||
mc:Ignorable="d"
|
||||
d:Background="LightSteelBlue"
|
||||
d:DataContext="{d:DesignInstance Type=sequence:SequenceViewModel, IsDesignTimeCreatable=False}">
|
||||
|
||||
<UserControl.Resources>
|
||||
|
||||
|
@ -160,7 +163,6 @@
|
|||
</Grid.ColumnDefinitions>
|
||||
<controls:TextBoxEx
|
||||
Width="Auto"
|
||||
FontSize="14"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding FileName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
TextSaved="True"
|
||||
|
@ -168,12 +170,12 @@
|
|||
Visibility="{Binding Visible}" />
|
||||
<Button
|
||||
Grid.Column="1"
|
||||
Width="30"
|
||||
Height="20"
|
||||
Margin="5,0,0,0"
|
||||
Width="25"
|
||||
Height="23"
|
||||
Margin="3,0,0,0"
|
||||
Content="..."
|
||||
FontSize="20"
|
||||
Foreground="White"
|
||||
FontSize="10"
|
||||
Focusable="False"
|
||||
Visibility="{Binding Visible}">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
|
|
|
@ -767,7 +767,7 @@ namespace MECF.Framework.UI.Client.CenterViews.Editors.Sequence
|
|||
}
|
||||
}
|
||||
|
||||
var lstFiles = RecipeClient.Instance.Service.GetRecipesByPath($"Sic\\{param.PrefixPath}", false).ToList();
|
||||
var lstFiles = RecipeClient.Instance.Service.GetRecipesByPath(param.PrefixWithSysName, false).ToList();
|
||||
|
||||
dialog.Files = new ObservableCollection<FileNode>(RecipeSequenceTreeBuilder.GetFiles("", lstFiles));
|
||||
|
||||
|
@ -777,16 +777,17 @@ namespace MECF.Framework.UI.Client.CenterViews.Editors.Sequence
|
|||
{
|
||||
param.Value = dialog.DialogResult;
|
||||
|
||||
var path = param.Value;
|
||||
var index = path.LastIndexOf("\\");
|
||||
/*var path = param.Value;
|
||||
var index = path.LastIndexOf("\\", StringComparison.Ordinal);
|
||||
if (index > -1)
|
||||
{
|
||||
param.FileName = path.Substring(index + 1);
|
||||
// Remove the prefix "Sic\Process\" and show folder name in recipe selection text box.
|
||||
param.FileName = seqFullPrefix.Replace($"{seqFullPrefix}\\", "");
|
||||
}
|
||||
else
|
||||
{
|
||||
param.FileName = path;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,25 @@ namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
|||
public class PathFileParam : ParamBaseWithGenericValue<string>
|
||||
{
|
||||
|
||||
//TODO 系统所有的配方文件保存在“Sic\xxx\”路径下,"Sic"前缀可以通过系统配置设置,此处为了省事写死。
|
||||
private const string SYS_NAME = "Sic";
|
||||
|
||||
#region Constructors
|
||||
|
||||
public PathFileParam()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public PathFileParam(string name, bool isEnabled, string prefixPath)
|
||||
{
|
||||
Name = name;
|
||||
IsEnabled = isEnabled;
|
||||
PrefixPath = prefixPath;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public override string Value
|
||||
{
|
||||
get => _value;
|
||||
|
@ -19,14 +38,17 @@ namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
|
|||
}
|
||||
else
|
||||
{
|
||||
// Remove the prefix "Sic\xxx\", and leave the folder name of the recipe/seq file.
|
||||
var index = _value.LastIndexOf("\\", StringComparison.Ordinal);
|
||||
FileName = index > -1 ? _value.Substring(index + 1) : _value;
|
||||
FileName = index > -1 ? _value.Replace($"{PrefixWithSysName}\\", "") : _value;
|
||||
}
|
||||
|
||||
IsSaved = false;
|
||||
}
|
||||
}
|
||||
|
||||
public string PrefixWithSysName => $"{SYS_NAME}\\{PrefixPath}";
|
||||
|
||||
private string _fileName;
|
||||
public string FileName
|
||||
{
|
||||
|
|
|
@ -389,9 +389,9 @@
|
|||
<Setter Property="Foreground" Value="{DynamicResource FG_White}" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Padding" Value="6,3" />
|
||||
<Setter Property="MinWidth" Value="40" />
|
||||
<Setter Property="MinHeight" Value="20" />
|
||||
<Setter Property="Padding" Value="1,1" />
|
||||
<Setter Property="MinWidth" Value="20" />
|
||||
<Setter Property="MinHeight" Value="10" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="Border.CornerRadius" Value="4" />
|
||||
<Setter Property="Template">
|
||||
|
|
Loading…
Reference in New Issue