任务计划修改增加图表
This commit is contained in:
1 parent
5e64b1a3cb
commit
6188bfb6ef
10 files changed
+352
-62
No files matched your search
@@ -109,7 +109,9 @@ namespace SunlightCentralizedControlManagement_SCCM_.WindowsView
|
||||
SQLiteHelpers.Open(); //打开数据库
|
||||
SQLiteHelpers.Delete("USER", "Name='" + name + "'", null);
|
||||
SQLiteHelpers.InsertData("USER", USER_new);// 执行插入
|
||||
DataGriduser.ItemsSource = SQLiteHelpers.ExecuteDataSet("select * from USER order by Name desc", null).Tables[0].DefaultView;
|
||||
SQLiteHelpers.Close();
|
||||
_Name.Text = null;
|
||||
}
|
||||
|
||||
private void Button_Delete(object sender, RoutedEventArgs e)//删除按钮事件
|
||||
@@ -117,7 +119,9 @@ namespace SunlightCentralizedControlManagement_SCCM_.WindowsView
|
||||
SQLiteHelpers = new UserClass.SqliteHelper.SQLiteHelper(DBAddress); //数据库连接路径
|
||||
SQLiteHelpers.Open(); //打开数据库
|
||||
SQLiteHelpers.Delete("USER", "Name='" + _Name.Text + "'", null);
|
||||
DataGriduser.ItemsSource = SQLiteHelpers.ExecuteDataSet("select * from USER order by Name desc", null).Tables[0].DefaultView;
|
||||
SQLiteHelpers.Close();
|
||||
_Name.Text = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Forms;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace SunlightCentralizedControlManagement_SCCM_.WindowsView
|
||||
{
|
||||
@@ -30,6 +31,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.WindowsView
|
||||
public delegate void AddressUpdateHandler(object sender, AddressUpdateEventArgs e);
|
||||
//声明一个更新Address的事件
|
||||
public event AddressUpdateHandler AddressUpdated;
|
||||
bool m = false;
|
||||
|
||||
public ViewStep(string Numder ,string P1D,string P2D,string P3D,string P4D,string P5D)
|
||||
{
|
||||
@@ -38,6 +40,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.WindowsView
|
||||
Form1_Load();
|
||||
// FocusManager.SetFocusedElement(boxNAME, boxNAME);
|
||||
boxNAME.Focus();
|
||||
if(!String.IsNullOrEmpty(Numder))m= true;
|
||||
boxNAME.Text = Numder;
|
||||
|
||||
P1.Text = P1D;
|
||||
@@ -200,14 +203,22 @@ namespace SunlightCentralizedControlManagement_SCCM_.WindowsView
|
||||
if (P4N.Visibility == Visibility.Visible) name += P4N.Text + ":[" + P4.Text + "]";
|
||||
if (P5N.Visibility == Visibility.Visible) name += P5N.Text + ":[" + P5.Text + "]";
|
||||
|
||||
var args = new AddressUpdateEventArgs(data, boxNAME.Text, boxID.Text, name.ToString(), P1.Text, P2.Text, P3.Text, P4.Text, P5.Text);
|
||||
var args = new AddressUpdateEventArgs(true,data, boxNAME.Text, boxID.Text, name.ToString(), P1.Text, P2.Text, P3.Text, P4.Text, P5.Text);
|
||||
AddressUpdated(this, args);
|
||||
this.Close(); //关闭窗口
|
||||
}
|
||||
|
||||
private void NO_Click(object sender, RoutedEventArgs e)//关闭
|
||||
{
|
||||
this.Close(); //关闭窗口
|
||||
if (m)
|
||||
{ this.Close(); }
|
||||
else
|
||||
{
|
||||
string name = " ";
|
||||
var args = new AddressUpdateEventArgs(false, data, boxNAME.Text, boxID.Text, name.ToString(), P1.Text, P2.Text, P3.Text, P4.Text, P5.Text);
|
||||
AddressUpdated(this, args);
|
||||
this.Close(); //关闭窗口
|
||||
}
|
||||
}
|
||||
|
||||
private void Set(int a) //参数显示
|
||||
@@ -527,8 +538,9 @@ namespace SunlightCentralizedControlManagement_SCCM_.WindowsView
|
||||
|
||||
public class AddressUpdateEventArgs : System.EventArgs
|
||||
{
|
||||
public AddressUpdateEventArgs(string dStep, string dStepID, string dStepNAME, string dPNAME, string dP1, string dP2, string dP3, string dP4, string dP5)
|
||||
public AddressUpdateEventArgs(bool M, string dStep, string dStepID, string dStepNAME, string dPNAME, string dP1, string dP2, string dP3, string dP4, string dP5)
|
||||
{
|
||||
this.Mode = M;
|
||||
this.StepID = dStepID;
|
||||
this.Step = dStep;
|
||||
this.StepNAME = dStepNAME;
|
||||
@@ -540,6 +552,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.WindowsView
|
||||
this.P5 = dP5;
|
||||
}
|
||||
|
||||
public bool Mode { get; set; }
|
||||
public string Step { get; set; }
|
||||
public string StepID { get; set; }
|
||||
public string StepNAME { get; set; }
|
||||
|
||||
Reference in new issue
Block a user