private void AddTypeCommand_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            AddType dialog = new AddType(this.AddTypeCallback, this.Types);

            dialog.Owner = Application.Current.MainWindow;
            dialog.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            dialog.Height    = 490;
            dialog.Width     = 350;
            dialog.MinHeight = 420;
            dialog.MinWidth  = 280;
            dialog.ShowDialog();
        }
        private void AddTypeButton_Click(object sender, RoutedEventArgs e)
        {
            AddType addTypeDialog = new AddType(AddTypeCallback, Types);

            addTypeDialog.Owner = Application.Current.MainWindow;
            addTypeDialog.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            addTypeDialog.Height    = 490;
            addTypeDialog.Width     = 350;
            addTypeDialog.MinHeight = 420;
            addTypeDialog.MinWidth  = 280;

            this.AddTypeDemonDialog = addTypeDialog;

            addTypeDialog.ShowDialog();

            if (addTypeDialog.DialogResult.HasValue && addTypeDialog.DialogResult.Value)
            {
                Scroller.ScrollToBottom();
                this.UpdateLayout();
                this.typeClicked(addTypeDialog.newType.Id);
            }
        }