Ejemplo n.º 1
0
        public override void OnStartup(IViewerApplication app)
        {
            base.OnStartup(app);

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

            app.AddLayoutDeserializeCallback(Deserialize);
        }
Ejemplo n.º 3
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);
        }
Ejemplo n.º 4
0
        public override void OnStartup(IViewerApplication app)
        {
            app.AddLayoutDeserializeCallback(Deserialize);

            // add staus bar items
            _statusLabel         = app.CreateStatusBarItem(Strings.Done_Label, Resources.SearchStatus, ToolStripItemAlignment.Left);
            _selectionCountLabel = app.CreateStatusBarItem("", null, ToolStripItemAlignment.Right);
            _itemCountLabel      = app.CreateStatusBarItem("", null, ToolStripItemAlignment.Right);
            _thumbnailSize       = app.CreateStatusBarSlider("", Resources.ThumbnailSize, ToolStripItemAlignment.Right);
            _thumbnailSize.Value = Settings.Default.ThumbnailSize;

            // register event handlers
            _thumbnailSize.ValueChanged += ThumbnailSizeOnValueChanged;
            _selection.Changed          += SelectionOnChanged;
            _queryHistory.QueryExecuted += StateOnQueryExecuted;
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
 public override void OnStartup(IViewerApplication app)
 {
     app.AddLayoutDeserializeCallback(Deserialize);
 }
Ejemplo n.º 7
0
 public override void OnStartup(IViewerApplication app)
 {
     app.AddMenuItem(new [] { Strings.View_Label, Strings.ExplorerWindowName },
                     () => ShowExplorer(), Resources.ExplorerComponentIcon.ToBitmap());
     app.AddLayoutDeserializeCallback(Deserialize);
 }