|
@@ -276,11 +276,17 @@ namespace FurnaceUI.Views.Recipes
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private bool _isEnabledNewRecipe = false;
|
|
|
public bool IsEnabledNewRecipe
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
- return !IsSingleFile;
|
|
|
+ return _isEnabledNewRecipe;
|
|
|
+ }
|
|
|
+ set
|
|
|
+ {
|
|
|
+ _isEnabledNewRecipe = value;
|
|
|
+ NotifyOfPropertyChange(nameof(IsEnabledNewRecipe));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -288,7 +294,7 @@ namespace FurnaceUI.Views.Recipes
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
- return editMode == EditMode.Edit ;
|
|
|
+ return editMode == EditMode.Edit;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -581,8 +587,20 @@ namespace FurnaceUI.Views.Recipes
|
|
|
this.editMode = EditMode.None;
|
|
|
}
|
|
|
this.UpdateView();
|
|
|
+ GetIsEnabledNewRecipe();
|
|
|
}
|
|
|
+ private void GetIsEnabledNewRecipe()
|
|
|
+ {
|
|
|
|
|
|
+ if (!IsSingleFile && ProcessTypeFileList != null && ProcessTypeFileList.FirstOrDefault() != null && ProcessTypeFileList.FirstOrDefault().FileListByProcessType != null && ProcessTypeFileList.FirstOrDefault().FileListByProcessType.Count > 0)
|
|
|
+ {
|
|
|
+ IsEnabledNewRecipe = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ IsEnabledNewRecipe = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
#region folder
|
|
|
|
|
|
public void SelectRecipeType()
|
|
@@ -831,6 +849,7 @@ namespace FurnaceUI.Views.Recipes
|
|
|
_recipeProvider.DeleteRecipeFolder(prefix, CurrentFileNode.Name);
|
|
|
|
|
|
ReloadRecipeFileList(CurrentChamberType, CurrentProcessType, "", false, true);
|
|
|
+ GetIsEnabledNewRecipe();
|
|
|
}
|
|
|
|
|
|
public void RenameFolder()
|
|
@@ -1407,8 +1426,8 @@ namespace FurnaceUI.Views.Recipes
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
public void EditRecipe()
|
|
|
{
|
|
|
CGlobal.RecipeProcessEditViewEnable = true;
|
|
@@ -1469,17 +1488,17 @@ namespace FurnaceUI.Views.Recipes
|
|
|
|
|
|
public void ExportRecipe()
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public void HistoryRecipe()
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
#endregion
|
|
@@ -1493,7 +1512,7 @@ namespace FurnaceUI.Views.Recipes
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
public void SavePermission()
|
|
|
{
|
|
|
CurrentRecipe.Clear();
|
|
@@ -1515,7 +1534,7 @@ namespace FurnaceUI.Views.Recipes
|
|
|
CurrentRecipe.RecipePermission = dialog.RecipePermission;
|
|
|
CurrentRecipe.Description = dialog.RecipeComment;
|
|
|
CurrentRecipe.RecipeLevel = CurrentFileNode.Level;
|
|
|
-
|
|
|
+
|
|
|
_recipeProvider.SaveRecipe(CurrentRecipe.PrefixPath, CurrentRecipe.Name, CurrentRecipe.GetXmlString());
|
|
|
|
|
|
//ReloadRecipeFileList(CurrentChamberType, CurrentProcessType, CurrentFileNode.FullPath, false);
|
|
@@ -1649,5 +1668,5 @@ namespace FurnaceUI.Views.Recipes
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|