Esempio n. 1
0
        private void BtnSub_OnClick(object sender, RoutedEventArgs e)
        {
            var win = new SubWindow {
                Owner = this
            };

            win.Show();
        }
Esempio n. 2
0
        public static SubWindow Create(string key)
        {
            if (string.IsNullOrWhiteSpace(key))
            {
                throw new ArgumentNullException("key");
            }

            if (CachedWindows.Any(w => w._key == key && !w.IsVisible))
            {
                return(CachedWindows.Last(w => w._key == key && !w.IsVisible));
            }

            var win = new SubWindow(key)
            {
                Title = key + GetOrder(key)
            };

            return(win);
        }