/// <summary> /// Initializes a new instance of the <see cref="EditConnectionInfo"/> class. /// </summary> /// <param name="workbookGuid">Guid of the workbook used.</param> /// <param name="workbookFilePath">The workbook full path name.</param> /// <param name="wbConnectionId">Workbench Connection id to recover the information required to connect to the MySQL database.</param> /// <param name="schema">Name of the Schema used by the <see cref="EditConnectionInfo"/> object.</param> /// <param name="table">Name of the table used by the <see cref="EditConnectionInfo"/> object.</param> public EditConnectionInfo(string workbookGuid, string workbookFilePath, string wbConnectionId, string schema, string table) { _disposed = false; _editDialog = null; ConnectionId = wbConnectionId; SchemaName = schema; TableName = table; WorkbookGuid = workbookGuid; WorkbookFilePath = workbookFilePath; }
/// <summary> /// Handles the <see cref="EditDataDialog.Closed"/> event. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> private void EditDialog_Closed(object sender, EventArgs e) { if (_editDialog == null) { return; } _editDialog.Closed -= EditDialog_Closed; _editDialog = null; }
protected void EditData() { EditDataDialog dialog = new EditDataDialog(); EditUserDataViewModel vm = new EditUserDataViewModel(LoggedUser) { FirstName = FirstName, LastName = LastName, Email = Email, CompanyName = CompanyName }; dialog.DataContext = vm; vm.RequestClose += (x, e) => dialog.Close(); dialog.ShowDialog(); ReloadData?.Invoke(this, EventArgs.Empty); //email! }
/// <summary> /// DO NOT REMOVE. Default constructor required for serialization-deserialization. /// </summary> public EditConnectionInfo() { _editDialog = null; }