Beispiel #1
0
        protected override void OnPageLoad()
        {
            base.OnPageLoad();

            if (string.IsNullOrEmpty(_currentPicture) || !File.Exists(_currentPicture))
            {
                ReturnToPreviousWindow();
                return;
            }

            _currentMetaData = PictureDatabase.GetExifFromDB(_currentPicture);
            if (_currentMetaData.IsEmpty())
            {
                _currentMetaData = PictureDatabase.GetExifFromFile(_currentPicture);
            }
            if (_currentMetaData.IsEmpty())
            {
                ReturnToPreviousWindow();
                return;
            }

            GUIPropertyManager.SetProperty("#pictures.exif.images.vertical", string.Empty);
            GUIPropertyManager.SetProperty("#pictures.exif.images.horizontal", string.Empty);

            SetExifGUIListItems();
            Update();
            Refresh();
        }
Beispiel #2
0
        protected override void OnShowContextMenu()
        {
            GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_MENU);

            if (dlg == null)
            {
                return;
            }

            dlg.Reset();
            dlg.SetHeading(498); // Menu

            // Dialog items
            dlg.AddLocalizedString(2168); // Update Exif

            // Show dialog menu
            dlg.DoModal(GetID);

            if (dlg.SelectedId == -1)
            {
                return;
            }

            switch (dlg.SelectedId)
            {
            case 2168: // Update Exif
                Log.Debug("GUIPicturesExif: Update Exif {0}: {1}", PictureDatabase.UpdatePicture(_currentPicture, -1), _currentPicture);
                _currentMetaData = PictureDatabase.GetExifFromDB(_currentPicture);
                SetExifGUIListItems();
                Update();
                Refresh();
                break;
            }
        }