コード例 #1
0
ファイル: EventLogViewer.cs プロジェクト: sakpung/webstudy
        private void HandleLogDetailsRequest
        (
            LogViewController ViewController
        )
        {
            try
            {
                ShowLogDetails(ViewController);
            }
            catch (Exception exception)
            {
                System.Diagnostics.Debug.Assert(false);

                throw exception;
            }
        }
コード例 #2
0
ファイル: EventLogViewer.cs プロジェクト: sakpung/webstudy
        private void ImportDICOMServerLogs()
        {
            try
            {
                // LoggingModuleConfigurationManager loggingConfigManager = ServiceLocator.Retrieve <LoggingModuleConfigurationManager> ( ) ;

                LogViewController x = this.m_DICOMServerViewController;

                LogsOpenFileDialog.InitialDirectory = PathLogDump;
                if (!string.IsNullOrEmpty(LogsOpenFileDialog.FileName))
                {
                    LogsOpenFileDialog.InitialDirectory = Path.GetDirectoryName(LogsOpenFileDialog.FileName);
                }

                LogsOpenFileDialog.FileName = string.Empty;   // PathLogDump;
                if (DialogResult.OK == LogsOpenFileDialog.ShowDialog( ))
                {
                    Cursor.Current = Cursors.WaitCursor;

                    string root = Path.GetDirectoryName(LogsOpenFileDialog.FileName);

                    // We only want file names of all digits with an extension '.txt'
                    List <string> files = new List <string>();

                    foreach (string fname in LogsOpenFileDialog.FileNames)
                    {
                        if (fname.EndsWith(".txt", StringComparison.OrdinalIgnoreCase))
                        {
                            // if (IsDigitsOnly(Path.GetFileNameWithoutExtension(fname)))
                            files.Add(Path.Combine(root, fname));
                        }
                    }

                    __DICOMServerViewController.ImportAsync(files);
                }
            }
            catch (Exception exception)
            {
                System.Diagnostics.Debug.Assert(false);

                throw exception;
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }
コード例 #3
0
ファイル: EventLogViewer.cs プロジェクト: sakpung/webstudy
        private void ShowLogDetails
        (
            LogViewController ViewController
        )
        {
            try
            {
                ViewController.ViewSelectedLogDetail( );
            }
            catch
            {
                System.Diagnostics.Debug.Assert(false);

                MessageBox.Show(Constants.Messages.MessageBox.DetailsDialogShowFailed,
                                Constants.Messages.MessageBox.ErrorCaption,
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error);
            }
        }
コード例 #4
0
 private void ResetRootViewController ()
 {
     var authManager = ServiceContainer.Resolve<AuthManager> ();
     UIViewController vc = null;
     bool emptyStack = ViewControllers.Length < 1;
     if (authManager.IsAuthenticated && (emptyStack || ViewControllers [0] is WelcomeViewController)) {
         vc = new LogViewController ();
     } else if (emptyStack || ! (ViewControllers [0] is WelcomeViewController)) {
         vc = new WelcomeViewController ();
     }
     if (vc != null) {
         SetViewControllers (new [] { vc }, ViewControllers.Length > 0);
     }
 }
コード例 #5
0
        private void ResetRootViewController ()
        {
            var authManager = ServiceContainer.Resolve<AuthManager> ();
            if (authManager.IsAuthenticated) {
                if (ViewControllers.Length < 1 || ViewControllers [0] is WelcomeViewController) {
                    // Determine the default root view controller
                    UIViewController activeController;
                    var preferredView = ServiceContainer.Resolve<SettingsStore> ().PreferredStartView;
                    if (preferredView == "recent") {
                        activeController = new RecentViewController ();
                    } else {
                        activeController = new LogViewController ();
                    }

                    SetViewControllers (new [] { activeController }, ViewControllers.Length > 0);
                }
            } else {
                if (ViewControllers.Length < 1 || !(ViewControllers [0] is WelcomeViewController)) {
                    SetViewControllers (new [] { new WelcomeViewController () }, ViewControllers.Length > 0);
                }
            }
        }