Merge branch 'master' of http://www.scserverddns.top:13000/sc/DyeingComputer
This commit is contained in:
commit
37516e883e
4 files changed
+66
-20
No files matched your search
@@ -12,7 +12,8 @@
|
||||
d:DesignHeight="630" d:DesignWidth="1280">
|
||||
<Grid Focusable="True">
|
||||
<DataGrid x:Name="Grid" AlternationCount="2" IsReadOnly="True" SelectionChanged="Grid_SelectionChanged"
|
||||
Margin="630,40,0,0" d:ItemsSource="{d:SampleData ItemCount=90}" AutoGenerateColumns="False" MinColumnWidth="30"
|
||||
Margin="630,40,0,0" d:ItemsSource="{d:SampleData ItemCount=90}" AutoGenerateColumns="False" MinColumnWidth="30"
|
||||
ItemsSource="{Binding Path=TechnologicalProcess_View,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="{x:Null}"
|
||||
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" Grid.ColumnSpan="2" AllowDrop="False"
|
||||
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False"
|
||||
|
||||
@@ -4,6 +4,8 @@ using DyeingComputer.Windows;
|
||||
using ScottPlot;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -20,7 +22,9 @@ using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Threading;
|
||||
using static DyeingComputer.UserClass.SqliteHelper;
|
||||
using static DyeingComputer.ViewModel.MainWindowViewModel;
|
||||
using static DyeingComputer.Windows.ViewStep;
|
||||
using static System.Net.WebRequestMethods;
|
||||
|
||||
namespace DyeingComputer.View
|
||||
{
|
||||
@@ -49,7 +53,6 @@ namespace DyeingComputer.View
|
||||
public static SQLiteHelper SQLiteHelpers = null; //定义数据库
|
||||
public static readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
|
||||
public static DataSet sql; //内存数据缓存
|
||||
|
||||
private void TechnologicalProcess_Import()
|
||||
{
|
||||
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||
@@ -98,7 +101,7 @@ namespace DyeingComputer.View
|
||||
|
||||
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// FocusManager.SetFocusedElement(Grid, Grid);
|
||||
// FocusManager.SetFocusedElement(Grid, Grid);
|
||||
// Grid.DataContext = new MainWindowViewModel();
|
||||
if (workName != null)
|
||||
{
|
||||
@@ -300,7 +303,7 @@ namespace DyeingComputer.View
|
||||
{
|
||||
DispatcherTimer timer1s = new DispatcherTimer//初始化循环,每1秒调用一次Tick
|
||||
{
|
||||
Interval = TimeSpan.FromSeconds(1)//秒
|
||||
Interval = TimeSpan.FromSeconds(3)//秒
|
||||
};
|
||||
timer1s.Tick += Tick_Event_1S;
|
||||
timer1s.Start();
|
||||
@@ -310,7 +313,12 @@ namespace DyeingComputer.View
|
||||
if (MainWindowViewModel.WORK_RUN == 2) Grid.SelectedIndex = MainWindowViewModel.RUN_STEPID - 1;//设定图表显示
|
||||
if (sql != null)
|
||||
{
|
||||
Grid.ItemsSource = sql.Tables[0].DefaultView; //转换显示计划表
|
||||
// sqlDefaultView = sql.Tables[0].DefaultView;
|
||||
// Grid.ItemsSource = null;
|
||||
dt_TP= sql.Tables[0];
|
||||
// MainWindowViewModel.TechnologicalProcess_View = MainWindowViewModel.ToObservableCollection<TechnologicalProcess>(sql.Tables[0]);
|
||||
|
||||
// Grid.ItemsSource = dt_m.DE sql.Tables[0].DefaultView; //转换显示计划表
|
||||
name.Text = Program_Name;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user