diff --git a/ConvertMoels/StatenToImageConvert.cs b/ConvertMoels/StatenToImageConvert.cs
index 77d50aa..a89ce58 100644
--- a/ConvertMoels/StatenToImageConvert.cs
+++ b/ConvertMoels/StatenToImageConvert.cs
@@ -59,14 +59,16 @@ namespace DyeingComputer.ConvertMoels
return new BitmapImage(new Uri("/Lmage/ID064.png", UriKind.Relative));//
case "065":
return new BitmapImage(new Uri("/Lmage/ID065.png", UriKind.Relative));//
+ case "066":
+ return new BitmapImage(new Uri("/Lmage/ID066.png", UriKind.Relative));//
case "067":
return new BitmapImage(new Uri("/Lmage/ID067.png", UriKind.Relative));//
- case "068":
- return new BitmapImage(new Uri("/Lmage/ID068.png", UriKind.Relative));//
case "090":
return new BitmapImage(new Uri("/Lmage/ID090.png", UriKind.Relative));//
case "091":
return new BitmapImage(new Uri("/Lmage/ID091.png", UriKind.Relative));//
+ case "093":
+ return new BitmapImage(new Uri("/Lmage/ID093.png", UriKind.Relative));//
case "094":
return new BitmapImage(new Uri("/Lmage/ID094.png", UriKind.Relative));//
default:
diff --git a/DyeingComputer.csproj b/DyeingComputer.csproj
index f0b23c6..677bece 100644
--- a/DyeingComputer.csproj
+++ b/DyeingComputer.csproj
@@ -428,6 +428,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Lmage/00.png b/Lmage/00.png
new file mode 100644
index 0000000..d0d2f33
Binary files /dev/null and b/Lmage/00.png differ
diff --git a/Lmage/ID007.png b/Lmage/ID007.png
new file mode 100644
index 0000000..3daaa58
Binary files /dev/null and b/Lmage/ID007.png differ
diff --git a/Lmage/ID008.png b/Lmage/ID008.png
new file mode 100644
index 0000000..3c137f8
Binary files /dev/null and b/Lmage/ID008.png differ
diff --git a/Lmage/ID013.png b/Lmage/ID013.png
new file mode 100644
index 0000000..615a8ff
Binary files /dev/null and b/Lmage/ID013.png differ
diff --git a/Lmage/ID015.png b/Lmage/ID015.png
new file mode 100644
index 0000000..a8734b8
Binary files /dev/null and b/Lmage/ID015.png differ
diff --git a/Lmage/ID017.png b/Lmage/ID017.png
new file mode 100644
index 0000000..322063f
Binary files /dev/null and b/Lmage/ID017.png differ
diff --git a/Lmage/ID020.png b/Lmage/ID020.png
new file mode 100644
index 0000000..464be3c
Binary files /dev/null and b/Lmage/ID020.png differ
diff --git a/Lmage/ID022.png b/Lmage/ID022.png
new file mode 100644
index 0000000..4b2d312
Binary files /dev/null and b/Lmage/ID022.png differ
diff --git a/Lmage/ID031 (2).png b/Lmage/ID031 (2).png
new file mode 100644
index 0000000..3f8a6ee
Binary files /dev/null and b/Lmage/ID031 (2).png differ
diff --git a/Lmage/ID031 (3).png b/Lmage/ID031 (3).png
new file mode 100644
index 0000000..5e46feb
Binary files /dev/null and b/Lmage/ID031 (3).png differ
diff --git a/Lmage/ID031.png b/Lmage/ID031.png
new file mode 100644
index 0000000..c7acdd2
Binary files /dev/null and b/Lmage/ID031.png differ
diff --git a/Lmage/ID0311 (2).png b/Lmage/ID0311 (2).png
new file mode 100644
index 0000000..c7acdd2
Binary files /dev/null and b/Lmage/ID0311 (2).png differ
diff --git a/Lmage/ID0311.png b/Lmage/ID0311.png
new file mode 100644
index 0000000..4e5c54e
Binary files /dev/null and b/Lmage/ID0311.png differ
diff --git a/Lmage/ID035.png b/Lmage/ID035.png
new file mode 100644
index 0000000..7b4f82e
Binary files /dev/null and b/Lmage/ID035.png differ
diff --git a/Lmage/ID036.png b/Lmage/ID036.png
new file mode 100644
index 0000000..48f366c
Binary files /dev/null and b/Lmage/ID036.png differ
diff --git a/Lmage/ID040.png b/Lmage/ID040.png
new file mode 100644
index 0000000..5ca541f
Binary files /dev/null and b/Lmage/ID040.png differ
diff --git a/Lmage/ID041.png b/Lmage/ID041.png
new file mode 100644
index 0000000..247bf78
Binary files /dev/null and b/Lmage/ID041.png differ
diff --git a/Lmage/ID049.png b/Lmage/ID049.png
new file mode 100644
index 0000000..3eddb3e
Binary files /dev/null and b/Lmage/ID049.png differ
diff --git a/Lmage/ID054.png b/Lmage/ID054.png
new file mode 100644
index 0000000..0afd5c9
Binary files /dev/null and b/Lmage/ID054.png differ
diff --git a/Lmage/ID055.png b/Lmage/ID055.png
new file mode 100644
index 0000000..0afd5c9
Binary files /dev/null and b/Lmage/ID055.png differ
diff --git a/Lmage/ID056.png b/Lmage/ID056.png
new file mode 100644
index 0000000..062034b
Binary files /dev/null and b/Lmage/ID056.png differ
diff --git a/Lmage/ID066.png b/Lmage/ID066.png
new file mode 100644
index 0000000..1d4e348
Binary files /dev/null and b/Lmage/ID066.png differ
diff --git a/Lmage/ID067.png b/Lmage/ID067.png
new file mode 100644
index 0000000..e08b584
Binary files /dev/null and b/Lmage/ID067.png differ
diff --git a/Lmage/ID090.png b/Lmage/ID090.png
new file mode 100644
index 0000000..5d156b1
Binary files /dev/null and b/Lmage/ID090.png differ
diff --git a/Lmage/ID091.png b/Lmage/ID091.png
new file mode 100644
index 0000000..43ddc0a
Binary files /dev/null and b/Lmage/ID091.png differ
diff --git a/Lmage/ID093.png b/Lmage/ID093.png
new file mode 100644
index 0000000..c026f27
Binary files /dev/null and b/Lmage/ID093.png differ
diff --git a/Lmage/ID094.png b/Lmage/ID094.png
new file mode 100644
index 0000000..e422e25
Binary files /dev/null and b/Lmage/ID094.png differ
diff --git a/Lmage/去除图片线条.png b/Lmage/去除图片线条.png
deleted file mode 100644
index ed4b788..0000000
Binary files a/Lmage/去除图片线条.png and /dev/null differ
diff --git a/UserClass/SQLDATA.cs b/UserClass/SQLDATA.cs
index 69f92a2..77819f0 100644
--- a/UserClass/SQLDATA.cs
+++ b/UserClass/SQLDATA.cs
@@ -81,19 +81,19 @@ namespace DyeingComputer.UserClass
SQLiteHelpers.Open(); //打开数据库
int r = 0;
string sql_script = "select * from WorkorderSteps where ProgramID = '" + workName + "'";
- if (TechnologicalProcessView.sql != null) TechnologicalProcessView.sql.Clear(); //清空缓存
- TechnologicalProcessView.sql = SQLiteHelpers.ExecuteDataSet(sql_script, null); //读取表写入缓存
+ // if (TechnologicalProcessView.sql != null) TechnologicalProcessView.sql.Clear(); //清空缓存
+ MainWindowViewModel.dt_TP = SQLiteHelpers.ExecuteDataSet(sql_script, null).Tables[0]; //读取表写入缓存
MainWindowViewModel.ProgramName = SQLiteHelpers.ExecuteScalar("select ProgramName from Workorder where ProgramID = '" + workName + "'", null).ToString();
SQLiteHelpers.Delete("RUN", null, null); //删除run信息
DataTable data_t = new DataTable();
- data_t = TechnologicalProcessView.sql.Tables[0].Clone();
+ data_t = MainWindowViewModel.dt_TP.Clone();
data_t.Columns.Add("DYELOT", typeof(string)); //添加列
- int a = TechnologicalProcessView.sql.Tables[0].Rows.Count;
+ int a = MainWindowViewModel.dt_TP.Rows.Count;
for (int i = 0; i < a; i++)
{
data_t.Clear();//清空
- DataRow dt = TechnologicalProcessView.sql.Tables[0].Rows[i];//行转
+ DataRow dt = MainWindowViewModel.dt_TP.Rows[i];//行转
DataRow dr = data_t.NewRow();
dr.ItemArray = dt.ItemArray;
dr.BeginEdit(); //添加订单号
diff --git a/View/TechnologicalProcessView.xaml b/View/TechnologicalProcessView.xaml
index 4f8b596..621c5a2 100644
--- a/View/TechnologicalProcessView.xaml
+++ b/View/TechnologicalProcessView.xaml
@@ -87,26 +87,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/View/TechnologicalProcessView.xaml.cs b/View/TechnologicalProcessView.xaml.cs
index 71ba1f3..0f8ce27 100644
--- a/View/TechnologicalProcessView.xaml.cs
+++ b/View/TechnologicalProcessView.xaml.cs
@@ -268,13 +268,12 @@ namespace DyeingComputer.View
public static object workName;
public static SQLiteHelper SQLiteHelpers = null; //定义数据库
public static readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
- public static DataSet sql; //内存数据缓存
+ //public static DataSet sql; //内存数据缓存
string Numder = null;
string ID = null;
string P1 = "0", P2 = "0", P3 = "0", P4 = "0", P5 = "0";
- object P1_S1, P2_S1, P3_S1, P4_S1, P5_S1, P1_S2, P2_S2, P3_S2, P4_S2, P5_S2, P1_S3, P2_S3, P3_S3, P4_S3, P5_S3;
-
- private void TechnologicalProcess_Import()
+
+ /* private void TechnologicalProcess_Import()
{
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
SQLiteHelpers.Open(); //打开数据库
@@ -304,7 +303,7 @@ namespace DyeingComputer.View
r = SQLiteHelpers.InsertData("RUN", SQLiteHelpers.DataTableToDictionary(data_t));//行插入
}
SQLiteHelpers.Close(); //关闭连接
- }
+ }*/
private void TechnologicalProcess_sql()
{
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
@@ -343,7 +342,7 @@ namespace DyeingComputer.View
ID = null;
if (e.PNAME != "")
{
- DataRow dr = sql.Tables[0].Rows[n - 1];
+ DataRow dr = MainWindowViewModel.dt_TP.Rows[n - 1];
dr.BeginEdit();
dr["StepID"] = e.StepID;
dr["StepName"] = e.StepNAME;
@@ -355,7 +354,7 @@ namespace DyeingComputer.View
dr["Parameter5"] = e.P5;
dr.EndEdit();
- MainWindowViewModel.dt_TP = sql.Tables[0];
+ // MainWindowViewModel.dt_TP = sql.Tables[0];
GridSTEP.SelectedIndex = -1;
}
else
@@ -436,13 +435,39 @@ namespace DyeingComputer.View
SQLiteHelpers.Close();
if (ID != null) { d = Convert.ToInt16(ID); } else { return; }
- DataRow dr = MainWindowViewModel.dt_TP.NewRow();//添加表数据
+ DataRow dr = MainWindowViewModel.dt_TP.NewRow();//添加表数据
+ //
+ dr["WorkOrder"] = MainWindowViewModel.WorkNumder;
dr["ProgramID"] = ProgramID;
- dr["Program"] = ProgramNAME;
+ dr["Program"] = ProgramNAME;
+ dr["Parameter1"] = 0;
+ dr["Parameter2"] = 0;
+ dr["Parameter3"] = 0;
+ dr["Parameter4"] = 0;
+ dr["Parameter5"] = 0;
+ dr["Parameter6"] = 0;
+ dr["Parameter7"] = 0;
+ dr["Parameter8"] = 0;
+ dr["Parameter9"] = 0;
+ dr["Parameter10"] = 0;
+ dr["Parameter1_S1"] = 0;
+ dr["Parameter2_S1"] = 0;
+ dr["Parameter3_S1"] = 0;
+ dr["Parameter4_S1"] = 0;
+ dr["Parameter5_S1"] = 0;
+ dr["Parameter1_S2"] = 0;
+ dr["Parameter2_S2"] = 0;
+ dr["Parameter3_S2"] = 0;
+ dr["Parameter4_S2"] = 0;
+ dr["Parameter5_S2"] = 0;
+ dr["Parameter1_S3"] = 0;
+ dr["Parameter2_S3"] = 0;
+ dr["Parameter3_S3"] = 0;
+ dr["Parameter4_S3"] = 0;
+ dr["Parameter5_S3"] = 0;
MainWindowViewModel.dt_TP.Rows.InsertAt(dr, d - 1);
// ID = null;
Dat();
-
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "UserActions", "Insert", "STEP = "+ID);
if (ID == null) return;// ID = MainWindowViewModel.dt_TP.Rows.Count.ToString();
ViewStep viewstop = new ViewStep(null, MainWindowViewModel.dt_TP.Select("STEP = " + ID).First());
@@ -458,7 +483,7 @@ namespace DyeingComputer.View
ID = null;
if (e.PNAME != "")
{
- DataRow dr = sql.Tables[0].Rows[n - 1];
+ DataRow dr = MainWindowViewModel.dt_TP.Rows[n - 1];
dr.BeginEdit();
dr["StepID"] = e.StepID;
dr["StepName"] = e.StepNAME;
@@ -470,7 +495,7 @@ namespace DyeingComputer.View
dr["Parameter5"] = e.P5;
dr.EndEdit();
- MainWindowViewModel.dt_TP = sql.Tables[0];
+ // MainWindowViewModel.dt_TP = sql.Tables[0];
GridSTEP.SelectedIndex = -1;
}
else
@@ -504,7 +529,7 @@ namespace DyeingComputer.View
private void ProgramgroupView_Jump_Click(object sender, RoutedEventArgs e)
{
int n = Convert.ToInt16(ID);
- DataRow dr = sql.Tables[0].Rows[n - 1];
+ DataRow dr = MainWindowViewModel.dt_TP.Rows[n - 1];
dr.BeginEdit();
dr["RUN"] = 2;
dr.EndEdit();
@@ -528,23 +553,7 @@ namespace DyeingComputer.View
P2 = (GridSTEP.Columns[7].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第7列,
P3 = (GridSTEP.Columns[8].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第8列,
P4 = (GridSTEP.Columns[9].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第9列,
- P5 = (GridSTEP.Columns[10].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第10列,
-
- P1_S1 = (GridSTEP.Columns[16].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;
- P2_S1 = (GridSTEP.Columns[17].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
- P3_S1 = (GridSTEP.Columns[18].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
- P4_S1 = (GridSTEP.Columns[19].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
- P5_S1 = (GridSTEP.Columns[20].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
- P1_S2 = (GridSTEP.Columns[21].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;
- P2_S2 = (GridSTEP.Columns[22].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
- P3_S2 = (GridSTEP.Columns[23].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
- P4_S2 = (GridSTEP.Columns[24].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
- P5_S2 = (GridSTEP.Columns[25].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
- P1_S3 = (GridSTEP.Columns[26].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
- P2_S3 = (GridSTEP.Columns[27].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//,
- P3_S3 = (GridSTEP.Columns[28].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//,
- P4_S3 = (GridSTEP.Columns[29].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
- P5_S3 = (GridSTEP.Columns[30].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;
+ P5 = (GridSTEP.Columns[10].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第10列,
}
}
diff --git a/ViewModel/MainWindowViewModel.cs b/ViewModel/MainWindowViewModel.cs
index 2e2675e..40944c4 100644
--- a/ViewModel/MainWindowViewModel.cs
+++ b/ViewModel/MainWindowViewModel.cs
@@ -880,7 +880,7 @@ namespace DyeingComputer.ViewModel
updata_RUN.Clear();
updata_RUN.Add("RUN", 1);
SQLiteHelpers.Update("RUN", updata_RUN, "Step ='"+ RUN_STEPID + "'", null);//更新
- dt_TP = SQLiteHelpers.ExecuteDataSet("select * from RUN WHERE Mode = 0", null).Tables[0];
+ dt_TP = SQLiteHelpers.ExecuteDataSet("select * from RUN", null).Tables[0];
SQLiteHelpers.Close();//关闭数据库
}
@@ -1186,14 +1186,16 @@ namespace DyeingComputer.ViewModel
}
}
}
+ if (errTabler.Rows.Count == 0) Status_Str = Resources.Washing + "(" + Properties.Resources.WaterLevel + ")";
}
else { STEP_finish = true; }
break;//批次水位水洗
case "015":
+ if (errTabler.Rows.Count == 0) Status_Str = Resources.Washing + "(" + Resources.Overflow + ")";
break;//溢流水洗
case "017":
-
+ if (errTabler.Rows.Count == 0) Status_Str = Resources.Washing + "(" + Properties.Resources.Cooling + ")";
break;//降温水洗
case "020":
if (STEP_P1.ToString() == "1")
@@ -1752,7 +1754,7 @@ namespace DyeingComputer.ViewModel
{
if (STEP_finish)
{
- RUN_STEPID++;
+ RUN_STEPID = dt_TP.Select("RUN ='1'").First().Field("Step") +1;
DataRow[] arrRows = dt_TP.Select("STEP ='" + RUN_STEPID + "'");
string T_ID = arrRows[0]["StepID"].ToString();
double T_P1 = Convert.ToDouble(arrRows[0]["Parameter1"].ToString());
@@ -2293,7 +2295,7 @@ namespace DyeingComputer.ViewModel
dt_m = SQLiteHelpers.ExecuteDataSet("select * from IOName where type='M' order by ID", null).Tables[0];
dt_ParameterSet = SQLiteHelpers.ExecuteDataSet("select * from Parameters order by ParameterID asc", null).Tables[0];
dt_SysSet = SQLiteHelpers.ExecuteDataSet("select * from System order by ParameterID asc", null).Tables[0];
- dt_TP = SQLiteHelpers.ExecuteDataSet("select * from RUN WHERE Mode = 0", null).Tables[0];
+ dt_TP = SQLiteHelpers.ExecuteDataSet("select * from RUN", null).Tables[0];
SQLiteHelpers.Close();
dt_d.RowChanged += new DataRowChangeEventHandler(ROW_changed_D);//添加行改变触发事件
diff --git a/Windows/ViewStep.xaml.cs b/Windows/ViewStep.xaml.cs
index b0e7b6c..cd48925 100644
--- a/Windows/ViewStep.xaml.cs
+++ b/Windows/ViewStep.xaml.cs
@@ -42,11 +42,11 @@ namespace DyeingComputer.Windows
boxNAME.Focus();
boxNAME.Text = Numder;
- P1.Text = DAT.Field("Parameter1");
- P2.Text = DAT.Field("Parameter2");
- P3.Text = DAT.Field("Parameter3");
- P4.Text = DAT.Field("Parameter4");
- P5.Text = DAT.Field("Parameter5");
+ P1.Text = DAT.Field("Parameter1").ToString();
+ P2.Text = DAT.Field("Parameter2").ToString();
+ P3.Text = DAT.Field("Parameter3").ToString();
+ P4.Text = DAT.Field("Parameter4").ToString();
+ P5.Text = DAT.Field("Parameter5").ToString();
/* P1.Visibility = Visibility.Collapsed;
P1N.Visibility = Visibility.Collapsed;
P2.Visibility = Visibility.Collapsed;