コード例 #1
0
        protected void OnClosingWindow(ClosingWindowEventHandlerArgs args)
        {
            var handler = ClosingWindow;

            if (handler != null)
            {
                handler(this, args);
            }
        }
コード例 #2
0
        private void CloseClick(object sender, RoutedEventArgs e)
        {
            var closingWindowEventHandlerArgs = new ClosingWindowEventHandlerArgs();

            OnClosingWindow(closingWindowEventHandlerArgs);

            if (closingWindowEventHandlerArgs.Cancelled)
            {
                return;
            }

            var parentWindow = GetParentWindow();

            if (parentWindow != null)
            {
                parentWindow.Close();
            }
        }
コード例 #3
0
ファイル: WindowCommands.cs プロジェクト: jcw-/sparrowtoolkit
        private void CloseClick(object sender, RoutedEventArgs e)
        {
            var closingWindowEventHandlerArgs = new ClosingWindowEventHandlerArgs();
            OnClosingWindow(closingWindowEventHandlerArgs);

            if (closingWindowEventHandlerArgs.Cancelled)
                return;

            var parentWindow = GetParentWindow();
            if (parentWindow != null)
            {
                parentWindow.Close();
            }
        }
コード例 #4
0
ファイル: WindowCommands.cs プロジェクト: jcw-/sparrowtoolkit
 protected void OnClosingWindow(ClosingWindowEventHandlerArgs args)
 {
     var handler = ClosingWindow;
     if (handler != null)
         handler(this, args);
 }