Ejemplo n.º 1
0
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (_goingToAnotherVersion)
            {
                DocumentWindow documentWindow = new DocumentWindow(_document, _followingVersion, _readingInTheDeveloperMode, _readingFromEditDocumentWindow, _readingFromUserDetailsWindow, _userWhoReads, _userWhoWatchedWhoReads);

                documentWindow.Show();
            }
            else if (_readingFromUserDetailsWindow)
            {
                UserDetailsWindow userDetailsWindow = new UserDetailsWindow(_userWhoReads, _userWhoWatchedWhoReads);

                userDetailsWindow.Show();
            }
            else if (_readingFromEditDocumentWindow && _readingInTheDeveloperMode)
            {
                EditDocumentWindow editDocumentWindow = new EditDocumentWindow(_document, _userWhoReads);

                editDocumentWindow.Show();
            }
            else if (_readingInTheDeveloperMode)
            {
                AllDocumentsWindow allDocumentsWindow = new AllDocumentsWindow(_userWhoReads);

                allDocumentsWindow.Show();
            }
            else
            {
                AllDocumentsWindow allDocumentsWindow = new AllDocumentsWindow();

                allDocumentsWindow.Show();
            }
        }
Ejemplo n.º 2
0
        private void ShowDocumentsButton_Click(object sender, RoutedEventArgs e)
        {
            AllDocumentsWindow allDocumentsWindow = new AllDocumentsWindow();

            allDocumentsWindow.Show();

            Close();
        }
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (_showingVersion)
            {
                DocumentWindow documentWindow = new DocumentWindow(_document, _versionForShowing, true, true, false, _user);

                documentWindow.Show();
            }
            else
            {
                AllDocumentsWindow allDocumentsWindow = new AllDocumentsWindow(_user);

                allDocumentsWindow.Show();
            }
        }