/// <summary> /// Launch an icon/image selector dialog box and set the entity's icon to the result. /// </summary> /// <param name="sender">The changeIconButton.</param> /// <param name="eventArgs">The event arguments</param> private void OnChangeIconButtonClick(object sender, RoutedEventArgs eventArgs) { WindowIconChooser iconChooser = new WindowIconChooser(); iconChooser.Closed += this.OnIconChooserClosed; iconChooser.Show(); Win32Interop.DisableWindow(this); }
/// <summary> /// Add permission to the current entity to a new user/group. /// </summary> /// <param name="sender">The security tab's Add... button</param> /// <param name="eventArgs">The event arguments (unused).</param> private void OnAddPermissionGroup(object sender, RoutedEventArgs eventArgs) { WindowFindUser windowAddUserAccess = new WindowFindUser(); windowAddUserAccess.Owner = this; windowAddUserAccess.Closed += this.OnFindUserClose; windowAddUserAccess.Show(); Win32Interop.DisableWindow(this); }
/// <summary> /// Handle the edit commission schedule command. /// </summary> /// <param name="source">The edit commission schedule button.</param> /// <param name="eventArgs">The event arguments.</param> private void OnEditCommissionSchedule(object source, ExecutedRoutedEventArgs eventArgs) { WindowPaymentSchedule dialog = new WindowPaymentSchedule(); dialog.Owner = this; dialog.Entity = this.Entity as Blotter; dialog.Show(); dialog.Closed += (s, e) => Win32Interop.EnableWindow(this); Win32Interop.DisableWindow(this); }
/// <summary> /// Open the rules manager. /// </summary> /// <param name="sender">The manage rules button.</param> /// <param name="eventArgs">The event arguments.</param> private void OnManageRules(object sender, RoutedEventArgs eventArgs) { WindowDebtRuleManager manager = new WindowDebtRuleManager(); manager.Owner = this; manager.Entity = this.Entity; //manager.DebtRule = this.debtRule.SelectedItem as DebtRule; manager.Closed += this.OnRuleManagerClosed; manager.Show(); Win32Interop.DisableWindow(this); }
/// <summary> /// Handle the New command being executed. /// </summary> /// <param name="sender">The object the properties command was executed by.</param> /// <param name="eventArgs">The event arguments.</param> private void OnNew(object sender, ExecutedRoutedEventArgs eventArgs) { WindowFindUser dialog = new WindowFindUser() { IncludeGroups = false }; dialog.Owner = this.Owner; dialog.Closed += this.OnFindUserClose; dialog.Show(); Win32Interop.DisableWindow(this.Owner); }