Beispiel #1
0
        /// <summary>
        /// Method called on edit click event to navigate to an AclGroup edit window.
        /// </summary>
        /// <param name="sender">The object sender of the event.</param>
        /// <param name="e">Routed event arguments.</param>
        public override void EditItem_Click(object sender, RoutedEventArgs e)
        {
            // Check if an AclGroup is founded.
            if (SelectedItem != null)
            {
                // Show open file dialog box
                WindowFormAclGroupLayout dlg = new WindowFormAclGroupLayout(SelectedItem);
                bool?result = dlg.ShowDialog();

                // Process open file dialog box results
                if (result == true)
                {
                    NotifyChanged(dlg.NewFormData);
                }
                else
                {
                    NotifyCanceled(dlg.NewFormData);
                }
            }
            else
            {
                string message = string.Format("{0} not found !", nameof(AclGroupEntity));
                log.Warn(message);
                MessageBoxs.Warning(message);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Method called on add click event to add new AclGroup.
        /// </summary>
        /// <param name="sender">The object sender of the event.</param>
        /// <param name="e">Routed event arguments.</param>
        public override void AddItem_Click(object sender, RoutedEventArgs e)
        {
            // Show open file dialog box
            using (WindowFormAclGroupLayout dlg = new WindowFormAclGroupLayout())
            {
                bool?result = dlg.ShowDialog();

                // Process open file dialog box results
                if (result == true)
                {
                    NotifyAdded(dlg.NewFormData);
                }
                else
                {
                    NotifyCanceled(dlg.NewFormData);
                }
            }
        }