public static int? ShowDialog(Window owner, string title, int current, int max)
        {
            ItemCountWindow form = new ItemCountWindow(title, current, max);
            form.Owner = owner;
            form.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            var dialogResult = form.ShowDialog();

            if (dialogResult != null && dialogResult.Value) {
                return form.result;
            }
            return null;
        }
Exemplo n.º 2
0
        public static int?ShowDialog(Window owner, string title, int current, int max)
        {
            ItemCountWindow form = new ItemCountWindow(title, current, max);

            form.Owner = owner;
            form.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            var dialogResult = form.ShowDialog();

            if (dialogResult != null && dialogResult.Value)
            {
                return(form.result);
            }
            return(null);
        }