/// <summary> /// 子窗口数据传递事件 /// </summary> private void window_ReceiveConnectionValues(object sender, CloudConnectionEventArgs connectionArgs) { if (connectionArgs.IsNewRow) { UI.Connections.Rows.Add(connectionArgs.GetRow); UI.Connections.RefreshDataTable(); SQLiteHelper.SaveDataTable(UI.Connections, nameof(UI.Connections)); } else { // SQLiteHelper.UpdateDataTable(UI.Connections, nameof(UI.Connections)); } }
private void button_ConnectionSaved_Click(object sender, RoutedEventArgs e) { if (textBox_Addr.Text != "") { m_CurrentRow[1] = textBox_Addr.Text; } if (textBox_User.Text != "") { m_CurrentRow[2] = textBox_User.Text; } if (textBox_Pass.Text != "") { m_CurrentRow[3] = textBox_Pass.Text; } CloudConnectionEventArgs args = new CloudConnectionEventArgs(m_CurrentRow, m_NewRow); if (CloudConnectionEvent == null) { Close(); } CloudConnectionEvent(this, args); Close(); }