Exemple #1
0
        public override void OnStartup(IViewerApplication app)
        {
            // add the component to the menu
            app.AddMenuItem(new [] { Strings.View_Label, Strings.Attributes_label },
                            () => ShowAttributes(),
                            Resources.AttributesComponentIcon.ToBitmap());
            app.AddMenuItem(new[] { Strings.View_Label, "Exif" },
                            () => ShowExif(),
                            Resources.ExifComponentIcon.ToBitmap());

            app.AddLayoutDeserializeCallback(Deserialize);
        }
Exemple #2
0
        public override void OnStartup(IViewerApplication app)
        {
            app.AddMenuItem(new[] { Strings.Help_Label, Strings.Documentation_Label }, () =>
            {
                Process.Start("https://trylock.github.io/viewer/articles/intro.html");
            }, null);

            app.AddMenuItem(new [] { Strings.Help_Label, Strings.About_Label }, () =>
            {
                var form = new AboutForm();
                form.ShowDialog();
            }, null);
        }
        public override void OnStartup(IViewerApplication app)
        {
            base.OnStartup(app);

            app.AddLayoutDeserializeCallback(Deserialize);
            app.AddMenuItem(new [] { Strings.File_Label, Strings.Settings_Label }, OpenSettings, null);
        }
Exemple #4
0
        public override void OnStartup(IViewerApplication app)
        {
            app.AddMenuItem(new [] { Strings.View_Label, Strings.ErrorList_Label },
                            () => ShowErrorList(),
                            Resources.ErrorListIcon.ToBitmap());

            app.AddLayoutDeserializeCallback(Deserialize);
        }
        public override void OnStartup(IViewerApplication app)
        {
            // load all query views and watch query view directory for changes
            var path = Path.GetFullPath(
                Environment.ExpandEnvironmentVariables(Settings.Default.QueryViewDirectoryPath)
                );

            try
            {
                _queryViewManager.LoadDirectory(path);
            }
            catch (ArgumentException)
            {
                _dialogView.InvalidFileName(path);
            }
            catch (DirectoryNotFoundException)
            {
                _dialogView.DirectoryNotFound(path);
            }
            catch (PathTooLongException)
            {
                _dialogView.PathTooLong(path);
            }
            catch (IOException) // path is a file name
            {
                _dialogView.DirectoryNotFound(path);
            }
            catch (Exception e) when(e.GetType() == typeof(SecurityException) ||
                                     e.GetType() == typeof(UnauthorizedAccessException))
            {
                _dialogView.UnauthorizedAccess(path);
            }

            // add application menus
            app.AddMenuItem(new [] { Strings.View_Label, Strings.Query_Label }, () =>
            {
                _editor
                .OpenNew()
                .Show(Application.Panel, DockState.Document);
            }, Resources.QueryComponentIcon.ToBitmap());

            // deserialize editor windows
            app.AddLayoutDeserializeCallback(Deserialize);
        }
Exemple #6
0
 public override void OnStartup(IViewerApplication app)
 {
     app.AddMenuItem(new [] { Strings.View_Label, Strings.ExplorerWindowName },
                     () => ShowExplorer(), Resources.ExplorerComponentIcon.ToBitmap());
     app.AddLayoutDeserializeCallback(Deserialize);
 }