private void AddCollectionButton_Click(object sender, EventArgs e) { AddCollection AddCollectionDialog = new AddCollection(); if (AddCollectionDialog.ShowDialog() == DialogResult.OK) { Service.CreateCollection(AddCollectionDialog.NewCollection); LoadFromServer(); } }
public void AddItem() { var dbConnection = DbConnections.CurrentConnection; AddCollection adcol = new AddCollection(); adcol.Owner = Application.Current.MainWindow; adcol.ShowDialog(); MainService.UpdateCollections(); dgCollections.ItemsSource = dbConnection.LiteDatabase.GetCollectionNames(); }
private void button_Update_Click(object sender, EventArgs e) { AlarmParameter temp = new AlarmParameter(); temp.fuc = "update"; temp.Title = "update"; temp.selectIndex = dataGridView1.CurrentCell.RowIndex; string nodeName = dataGridView1.Rows[temp.selectIndex].Cells["Device_Name"].Value.ToString(); AddCollection add = new AddCollection(temp, this); add.Owner = this; if (add.ShowDialog() == DialogResult.OK) { if (add.newDeviceName != nodeName) { TreeExXML.TreeExXMLCls xt2 = new TreeExXML.TreeExXMLCls(); xt2.UpdateXmlNodeByXPath("D:\\MyVidio\\myxml.xml", add.newDeviceName, nodeName); fath.ReloadTreeView(); } } }