示例#1
0
        private void MenuItem_FunnyImg_OnClick(object sender, RoutedEventArgs e)
        {
            if (_funnyImageWindow != null) _funnyImageWindow.Focus();
            else
            {
                _funnyImageWindow = new FunnyImg();
                _funnyImageWindow.Owner = this;
                _funnyImageWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;

                _funnyImageWindow.CloseEvent += FunnyImageClosed;

                _funnyImageWindow.Show();
            }
        }
示例#2
0
 private void FunnyImageClosed(object sender, EventArgs e)
 {
     _funnyImageWindow = null;
     Focus();
 }