Beispiel #1
0
        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>
        /// Releases all resources used by the <see cref="EditConnectionInfo"/> class
        /// </summary>
        /// <param name="disposing">If true this is called by Dispose(), otherwise it is called by the finalizer</param>
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            // Free managed resources
            if (disposing)
            {
                if (_editDialog != null)
                {
                    // This event will handle the cleanup.
                    _editDialog.Close();
                }
            }

            // Add class finalizer if unmanaged resources are added to the class
            // Free unmanaged resources if there are any
            _disposed = true;
        }