|
@@ -22,6 +22,8 @@ using System.Diagnostics;
|
|
|
using Aitex.Core.RT.Routine;
|
|
|
using System.Xml.Linq;
|
|
|
using System.Windows.Forms;
|
|
|
+using ExcelLibrary.BinaryFileFormat;
|
|
|
+using Aitex.Core.UI.View.Common;
|
|
|
|
|
|
namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
@@ -78,7 +80,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
_LoadCommandPD ?? (_LoadCommandPD = new DelegateCommand<object>(OnLoadPd));
|
|
|
private DelegateCommand _SearchRecipeCommand;
|
|
|
public DelegateCommand SearchRecipeCommand =>
|
|
|
- _SearchRecipeCommand ?? (_SearchRecipeCommand = new DelegateCommand(SearchRecipe));
|
|
|
+ _SearchRecipeCommand ?? (_SearchRecipeCommand = new DelegateCommand(SearchRecipes));
|
|
|
private DelegateCommand<object> _PdParameterCheckCommand;
|
|
|
public DelegateCommand<object> PdParameterCheckCommand=>
|
|
|
_PdParameterCheckCommand??(_PdParameterCheckCommand=new DelegateCommand<object>(OnParameterCheck));
|
|
@@ -103,7 +105,6 @@ namespace Venus_MainPages.ViewModels
|
|
|
public ProcessHistoryViewModel()
|
|
|
{
|
|
|
ProcessChartData = new ProcessDataChartDataItem(60000);
|
|
|
-
|
|
|
Recipes = new ObservableCollection<RecipeItem>();
|
|
|
timer.Interval = TimeSpan.FromSeconds(0.5);
|
|
|
CheboxRecipes = new List<Recipeslist>();
|
|
@@ -145,11 +146,14 @@ namespace Venus_MainPages.ViewModels
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- public void SearchRecipe()
|
|
|
+ public void SearchRecipes()
|
|
|
{
|
|
|
-
|
|
|
- this.StartDateTime = this.view.wfTimeFrom.Value;
|
|
|
- this.EndDateTime = this.view.wfTimeTo.Value;
|
|
|
+ SearchRecipe(this.view.wfTimeFrom.Value, this.view.wfTimeTo.Value);
|
|
|
+ }
|
|
|
+ public void SearchRecipe(DateTime start,DateTime end )
|
|
|
+ {
|
|
|
+ this.StartDateTime = start;
|
|
|
+ this.EndDateTime = end;
|
|
|
Recipes.Clear();
|
|
|
|
|
|
try
|
|
@@ -195,9 +199,9 @@ namespace Venus_MainPages.ViewModels
|
|
|
item.SlotID = dbData.Rows[i]["slot_id"].ToString();
|
|
|
item.LotID = dbData.Rows[i]["lot_id"].ToString();
|
|
|
if (!dbData.Rows[i]["process_begin_time"].Equals(DBNull.Value))
|
|
|
- item.StartTime = ((DateTime)dbData.Rows[i]["process_begin_time"]).ToString("yyyy-MM-dd HH:mm:ss.fff");
|
|
|
+ item.StartTime = ((DateTime)dbData.Rows[i]["process_begin_time"]);
|
|
|
if (!dbData.Rows[i]["process_end_time"].Equals(DBNull.Value))
|
|
|
- item.EndTime = ((DateTime)dbData.Rows[i]["process_end_time"]).ToString("yyyy-MM-dd HH:mm:ss.fff");
|
|
|
+ item.EndTime = ((DateTime)dbData.Rows[i]["process_end_time"]);
|
|
|
Recipes.Add(item);
|
|
|
}
|
|
|
}));
|
|
@@ -425,14 +429,15 @@ namespace Venus_MainPages.ViewModels
|
|
|
// }
|
|
|
//}));
|
|
|
this.view.MyDrawGraphicsControl.ClearPlotPoints();
|
|
|
- DateTime dtFrom = Convert.ToDateTime(dataLog.StartTime);
|
|
|
+ DateTime dtFrom = dataLog.StartTime;
|
|
|
+ //DateTime dtFrom = Convert.ToDateTime(dataLog.StartTime);
|
|
|
DateTime dtTo = dtFrom.AddMinutes(10);
|
|
|
- if (!string.IsNullOrEmpty(dataLog.EndTime))
|
|
|
- {
|
|
|
- dtTo = Convert.ToDateTime(dataLog.EndTime);
|
|
|
- }
|
|
|
+ dtTo = dataLog.EndTime;
|
|
|
+ //if (!string.IsNullOrEmpty(dataLog.EndTime))
|
|
|
+ //{
|
|
|
+ // dtTo = Convert.ToDateTime(dataLog.EndTime);
|
|
|
+ //}
|
|
|
var result = GetData(keys.Distinct().ToList(), dtFrom, dtTo);
|
|
|
- //var result = GetData(keys.Distinct().ToList(), this.view.wfTimeFrom.Value, this.view.wfTimeTo.Value);
|
|
|
List<PointCollection> cls = new List<PointCollection>();
|
|
|
for (int i = 0; i < keys.Count; i++)
|
|
|
{
|
|
@@ -449,7 +454,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
this.view.MyDrawGraphicsControl.FitControl();
|
|
|
}
|
|
|
|
|
|
- private void OnDataGridSelectionChanged(object obj)
|
|
|
+ public void OnDataGridSelectionChanged(object obj)
|
|
|
{
|
|
|
selectedRecipeItem = obj as RecipeItem;
|
|
|
ParameterNodes = new ObservableCollection<ParameterNode>(_provider.GetParameters().Where(x => x.Name == selectedRecipeItem?.Chamber));
|
|
@@ -502,8 +507,8 @@ namespace Venus_MainPages.ViewModels
|
|
|
public string RecipeRunGuid { get; set; }
|
|
|
public string Chamber { get; set; }
|
|
|
public string Status { get; set; }
|
|
|
- public string StartTime { get; set; }
|
|
|
- public string EndTime { get; set; }
|
|
|
+ public DateTime StartTime { get; set; }
|
|
|
+ public DateTime EndTime { get; set; }
|
|
|
public string LotID { get; set; }
|
|
|
public string SlotID { get; set; }
|
|
|
}
|