Esempio n. 1
0
        private static AppBarButton NewButton(AppBarItem item)
        {
            switch (item)
            {
            case AppBarItem.CancelTouchAF:
                return(new AppBarButton()
                {
                    ContentTemplate = (DataTemplate)Application.Current.Resources["CancelIcon"], Label = SystemUtil.GetStringResource("AppBar_CancelTouchAf")
                });

            case AppBarItem.Close:
                return(new AppBarButton()
                {
                    Icon = new SymbolIcon(Symbol.Cancel), Label = SystemUtil.GetStringResource("AppBar_Close")
                });

            case AppBarItem.DeleteMultiple:
                return(new AppBarButton()
                {
                    Icon = new SymbolIcon(Symbol.Delete), Label = SystemUtil.GetStringResource("AppBar_Delete")
                });

            case AppBarItem.DownloadMultiple:
                return(new AppBarButton()
                {
                    Icon = new SymbolIcon(Symbol.Download), Label = SystemUtil.GetStringResource("AppBar_Download")
                });

            case AppBarItem.ShowDetailInfo:
                return(new AppBarButton()
                {
                    Icon = new SymbolIcon(Symbol.OpenPane)
                    {
                        RenderTransform = new ScaleTransform {
                            ScaleX = -1
                        }, RenderTransformOrigin = new Point {
                            X = 0.5, Y = 0.5
                        }
                    }, Label = SystemUtil.GetStringResource("ShowDetailInfo")
                });

            case AppBarItem.HideDetailInfo:
                return(new AppBarButton()
                {
                    Icon = new SymbolIcon(Symbol.ClosePane)
                    {
                        RenderTransform = new ScaleTransform {
                            ScaleX = -1
                        }, RenderTransformOrigin = new Point {
                            X = 0.5, Y = 0.5
                        }
                    }, Label = SystemUtil.GetStringResource("HideDetailInfo")
                });

            case AppBarItem.Ok:
                return(new AppBarButton()
                {
                    Icon = new SymbolIcon(Symbol.Accept), Label = SystemUtil.GetStringResource("AppBar_Exit")
                });

            case AppBarItem.Donation:
                return(new AppBarButton()
                {
                    Icon = new SymbolIcon(Symbol.Like), Label = SystemUtil.GetStringResource("Donation")
                });

            case AppBarItem.RotateLeft:
                return(new AppBarButton()
                {
                    Icon = new SymbolIcon(Symbol.Rotate)
                    {
                        RenderTransform = new ScaleTransform {
                            ScaleX = -1
                        }, RenderTransformOrigin = new Point {
                            X = 0.5, Y = 0.5
                        }
                    }, Label = SystemUtil.GetStringResource("RotateLeft")
                });

            case AppBarItem.RotateRight:
                return(new AppBarButton()
                {
                    Icon = new SymbolIcon(Symbol.Rotate), Label = SystemUtil.GetStringResource("RotateRight")
                });

            case AppBarItem.FNumberSlider:
                return(new AppBarButton()
                {
                    ContentTemplate = (DataTemplate)Application.Current.Resources["ApertureIcon"], Label = SystemUtil.GetStringResource("CommandBar_Fnumber")
                });

            case AppBarItem.ShutterSpeedSlider:
                return(new AppBarButton()
                {
                    ContentTemplate = (DataTemplate)Application.Current.Resources["SSIcon"], Label = SystemUtil.GetStringResource("CommandBar_SS")
                });

            case AppBarItem.IsoSlider:
                return(new AppBarButton()
                {
                    ContentTemplate = (DataTemplate)Application.Current.Resources["IsoIcon"], Label = SystemUtil.GetStringResource("CommandBar_ISO")
                });

            case AppBarItem.ProgramShiftSlider:
                return(new AppBarButton()
                {
                    ContentTemplate = (DataTemplate)Application.Current.Resources["ProgramShiftIcon"], Label = SystemUtil.GetStringResource("CommandBar_PShift")
                });

            case AppBarItem.EvSlider:
                return(new AppBarButton()
                {
                    ContentTemplate = (DataTemplate)Application.Current.Resources["EvIcon"], Label = SystemUtil.GetStringResource("CommandBar_EV")
                });

            case AppBarItem.Zoom:
                return(new AppBarButton()
                {
                    ContentTemplate = (DataTemplate)Application.Current.Resources["ZoomInIcon"], Label = SystemUtil.GetStringResource("CommandBar_Zoom")
                });

            case AppBarItem.Resume:
                return(new AppBarButton()
                {
                    Icon = new SymbolIcon(Symbol.Play), Label = SystemUtil.GetStringResource("AppBar_Play")
                });

            case AppBarItem.Pause:
                return(new AppBarButton()
                {
                    Icon = new SymbolIcon(Symbol.Pause), Label = SystemUtil.GetStringResource("AppBar_Pause")
                });

            case AppBarItem.LocalStorage:
                return(new AppBarButton()
                {
                    ContentTemplate = (DataTemplate)Application.Current.Resources["ic_phonelink_white"], Label = SystemUtil.GetStringResource("AppBar_LocalStorage")
                });

            case AppBarItem.RemoteStorage:
                return(new AppBarButton()
                {
                    Icon = new SymbolIcon(Symbol.MapDrive), Label = SystemUtil.GetStringResource("AppBar_RemoteStorage")
                });

            case AppBarItem.CancelSelection:
                return(new AppBarButton()
                {
                    Icon = new SymbolIcon(Symbol.Cancel), Label = SystemUtil.GetStringResource("AppBar_Cancel")
                });

            default:
                throw new NotImplementedException();
            }
        }
Esempio n. 2
0
 private static string FromIntervalTime(string val)
 {
     return(string.Format(SystemUtil.GetStringResource("Seconds"), val));
 }
Esempio n. 3
0
        public static string FlashNames(uint value)
        {
            switch (value)
            {
            case 0x0:
                return(SystemUtil.GetStringResource("Exif_Flash_NoFlash"));

            case 0x01:
            case 0x05:
            case 0x07:
                return(SystemUtil.GetStringResource("Exif_Flash_Fired"));

            case 0x08:
                return(SystemUtil.GetStringResource("Exif_Flash_On_NotFired"));

            case 0x09:
            case 0x0d:
            case 0x0f:
                return(SystemUtil.GetStringResource("Exif_Flash_On_Fired"));

            case 0x10:
            case 0x14:
                return(SystemUtil.GetStringResource("Exif_Flash_Off_NotFired"));

            case 0x18:
                return(SystemUtil.GetStringResource("Exif_Flash_Auto_NotFired"));

            case 0x19:
            case 0x1d:
            case 0x1f:
                return(SystemUtil.GetStringResource("Exif_Flash_Auto_Fired"));

            case 0x20:
                return(SystemUtil.GetStringResource("Exif_Flash_NoFlashFunction"));

            case 0x30:
                return(SystemUtil.GetStringResource("Exif_Flash_NoFlashFunction"));

            case 0x41:
            case 0x45:
            case 0x47:
                return(SystemUtil.GetStringResource("Exif_Flash_Fired_RedEyeReduction"));

            case 0x49:
            case 0x4d:
            case 0x4f:
                return(SystemUtil.GetStringResource("Exif_Flash_On_Fired_RedEyeReduction"));

            case 0x50:
                return(SystemUtil.GetStringResource("Exif_Flash_Off_NotFired_RedEyeReduction"));

            case 0x58:
                return(SystemUtil.GetStringResource("Exif_Flash_Auto_NotFired_RedEyeReduction"));

            case 0x59:
            case 0x5d:
            case 0x5f:
                return(SystemUtil.GetStringResource("Exif_Flash_Auto_Fired_RedEyeReduction"));

            default:
                return(SystemUtil.GetStringResource("Exif_Flash_Unknown"));
            }
        }
Esempio n. 4
0
 private static string FromViewAngle(int val)
 {
     return(string.Format(SystemUtil.GetStringResource("ViewAngleUnit"), val));
 }