Merge branch 'master' of http://www.scserverddns.top:13000/sc/formula_manage
This commit is contained in:
commit
ae35c93165
3 files changed
+28
-37
No files matched your search
+1
-1
@@ -50,7 +50,7 @@
|
|||||||
</MenuItem>
|
</MenuItem>
|
||||||
</Menu>
|
</Menu>
|
||||||
|
|
||||||
<TextBox x:Name="USERTIME" HorizontalAlignment="Right" Height="30" Margin="0,0,5,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="150" FontSize="14"
|
<TextBox x:Name="USERTIME" Text="{Binding Sys_Time, Source={StaticResource MainWindowViewModel}}" HorizontalAlignment="Right" Height="30" Margin="0,0,5,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="150" FontSize="14"
|
||||||
Background="{x:Null}" BorderBrush="{x:Null}" SelectionBrush="{x:Null}" IsReadOnly="True" IsUndoEnabled="False" MaxLines="1" IsEnabled="False"/>
|
Background="{x:Null}" BorderBrush="{x:Null}" SelectionBrush="{x:Null}" IsReadOnly="True" IsUndoEnabled="False" MaxLines="1" IsEnabled="False"/>
|
||||||
<TextBox x:Name="USER" HorizontalAlignment="Right" Height="30" Margin="0,0,155,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="100" FontSize="14"
|
<TextBox x:Name="USER" HorizontalAlignment="Right" Height="30" Margin="0,0,155,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="100" FontSize="14"
|
||||||
Background="{x:Null}" BorderBrush="{x:Null}" SelectionBrush="{x:Null}" IsReadOnly="True" IsUndoEnabled="False" MaxLines="1" IsEnabled="False"/>
|
Background="{x:Null}" BorderBrush="{x:Null}" SelectionBrush="{x:Null}" IsReadOnly="True" IsUndoEnabled="False" MaxLines="1" IsEnabled="False"/>
|
||||||
|
|||||||
+2
-17
@@ -58,6 +58,7 @@ namespace formula_manage
|
|||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
DataContext =new MainWindowViewModel();
|
DataContext =new MainWindowViewModel();
|
||||||
|
|
||||||
int ID_N = 1;
|
int ID_N = 1;
|
||||||
|
|
||||||
WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
||||||
@@ -106,7 +107,6 @@ namespace formula_manage
|
|||||||
|
|
||||||
sql_();
|
sql_();
|
||||||
Permissions_(); //权限管理
|
Permissions_(); //权限管理
|
||||||
CountDown();//执行循环方法
|
|
||||||
|
|
||||||
DataRow row = RRODUCTdataTable.NewRow(); //ID列
|
DataRow row = RRODUCTdataTable.NewRow(); //ID列
|
||||||
row["ID"] = ID_N;
|
row["ID"] = ID_N;
|
||||||
@@ -124,7 +124,7 @@ namespace formula_manage
|
|||||||
Grid_RRODUCT.ItemsSource = RRODUCTdataTable.DefaultView;
|
Grid_RRODUCT.ItemsSource = RRODUCTdataTable.DefaultView;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void sql_()
|
private void sql_()
|
||||||
{
|
{
|
||||||
UserClass.IniFile.IniFiles Configini = new UserClass.IniFile.IniFiles(INIPath);//生效配置读取
|
UserClass.IniFile.IniFiles Configini = new UserClass.IniFile.IniFiles(INIPath);//生效配置读取
|
||||||
TEXT_SQLIP = Configini.IniReadvalue("SQL_SERVER", "SQL1"); //读配置文件
|
TEXT_SQLIP = Configini.IniReadvalue("SQL_SERVER", "SQL1"); //读配置文件
|
||||||
@@ -227,21 +227,6 @@ namespace formula_manage
|
|||||||
wr.Close();
|
wr.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private DispatcherTimer disTimer = new DispatcherTimer();//循环功能
|
|
||||||
|
|
||||||
public void DisTimer_Tick(object sender, EventArgs e)//循环事件
|
|
||||||
{
|
|
||||||
USERTIME.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CountDown()
|
|
||||||
{
|
|
||||||
//设置定时器
|
|
||||||
disTimer.Tick += new EventHandler(DisTimer_Tick);//每一秒执行的方法
|
|
||||||
disTimer.Interval = new TimeSpan(1000000); //时间间隔为一秒。
|
|
||||||
disTimer.Start();//计时开始
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SearchBox_OnKeyDownd(object sender, System.Windows.Input.KeyEventArgs e) //回车跳转功能
|
private void SearchBox_OnKeyDownd(object sender, System.Windows.Input.KeyEventArgs e) //回车跳转功能
|
||||||
{
|
{
|
||||||
if (e.Key == Key.Enter)
|
if (e.Key == Key.Enter)
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public class MainWindowViewModel : ViewModelBase
|
|||||||
DataTable RecipedataTable = new DataTable(); //建立Recipe缓存
|
DataTable RecipedataTable = new DataTable(); //建立Recipe缓存
|
||||||
|
|
||||||
public string INIPath = Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "formula.ini"; //配置文件路径
|
public string INIPath = Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "formula.ini"; //配置文件路径
|
||||||
|
public string Sys_Time; //显示系统时间
|
||||||
|
|
||||||
string TEXT_SQLIP;
|
string TEXT_SQLIP;
|
||||||
string TEXT_SQLNAME;
|
string TEXT_SQLNAME;
|
||||||
@@ -144,6 +145,30 @@ public class MainWindowViewModel : ViewModelBase
|
|||||||
return lst;
|
return lst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 循环事件设定
|
||||||
|
/// </summary>
|
||||||
|
public void CountDown()
|
||||||
|
{
|
||||||
|
//products = new ProductProvider().Select();
|
||||||
|
DispatcherTimer timer = new DispatcherTimer//初始化循环,每0.5秒调用一次Tick_Event
|
||||||
|
{
|
||||||
|
Interval = TimeSpan.FromSeconds(0.1)
|
||||||
|
};
|
||||||
|
timer.Tick += Tick_Event;
|
||||||
|
timer.Start();
|
||||||
|
|
||||||
|
//设置定时器
|
||||||
|
// disTimer.Tick += new EventHandler(DisTimer_Tick);//每一秒执行的方法
|
||||||
|
// disTimer.Interval = new TimeSpan(10000000); //时间间隔为一秒。
|
||||||
|
// disTimer.Start();//计时开始
|
||||||
|
}
|
||||||
|
|
||||||
|
void Tick_Event(object sender, EventArgs e)//Tick_Event周期执行事件
|
||||||
|
{
|
||||||
|
Sys_Time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Product //stuff_Product
|
public class Product //stuff_Product
|
||||||
@@ -181,24 +206,5 @@ public class MainWindowViewModel : ViewModelBase
|
|||||||
return DissolveName;
|
return DissolveName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
|
||||||
/// StuffViewModeldl
|
|
||||||
/// </summary>
|
|
||||||
/* public RRODUCTiewModel()
|
|
||||||
{
|
|
||||||
//products = new ProductProvider().Select();
|
|
||||||
DispatcherTimer timer = new DispatcherTimer//初始化循环,每0.5秒调用一次Tick_Event
|
|
||||||
{
|
|
||||||
Interval = TimeSpan.FromSeconds(0.1)
|
|
||||||
};
|
|
||||||
timer.Tick += Tick_Event;
|
|
||||||
timer.Start();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Tick_Event(object sender, EventArgs e)//Tick_Event周期执行事件
|
|
||||||
{
|
|
||||||
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user