├── README.md ├── HrtzImageViewer ├── icon.ico ├── Graphics │ └── icon.ico ├── App.config ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ └── Annotations.cs ├── Helpers │ ├── FileHelpers.cs │ └── BitmapImageCheck.cs ├── Converters │ ├── MaxHeightConverter.cs │ ├── MaxWidthConverter.cs │ └── BooleanToVisibilityConverter.cs ├── Extensions │ ├── ButtonIcon.cs │ ├── ObservableObject.cs │ └── RelayCommand.cs ├── ViewModels │ ├── CurrentImageVm.cs │ └── ShellVm.cs ├── Models │ └── CurrentImage.cs ├── App.xaml ├── Styles │ ├── Icons.xaml │ ├── WindowStyle.xaml │ └── ButtonStyle.xaml ├── MainWindow.xaml.cs ├── App.xaml.cs ├── MainWindow.xaml └── HrtzImageViewer.csproj ├── HrtzImageViewer.sln.DotSettings ├── HrtzImageViewer.sln ├── LICENSE └── .gitignore /README.md: -------------------------------------------------------------------------------- 1 | # HrtzImageViewer 2 | A very simple image viewer 3 | -------------------------------------------------------------------------------- /HrtzImageViewer/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hertizch/HrtzImageViewer/master/HrtzImageViewer/icon.ico -------------------------------------------------------------------------------- /HrtzImageViewer/Graphics/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hertizch/HrtzImageViewer/master/HrtzImageViewer/Graphics/icon.ico -------------------------------------------------------------------------------- /HrtzImageViewer/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /HrtzImageViewer/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /HrtzImageViewer/Helpers/FileHelpers.cs: -------------------------------------------------------------------------------- 1 | namespace HrtzImageViewer.Helpers 2 | { 3 | public static class FileHelpers 4 | { 5 | public static bool IsValidImage(string filename) 6 | { 7 | var bic = new BitmapImageCheck(); 8 | return bic.IsExtensionSupported(filename); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /HrtzImageViewer.sln.DotSettings: -------------------------------------------------------------------------------- 1 | 2 | True -------------------------------------------------------------------------------- /HrtzImageViewer/Converters/MaxHeightConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace HrtzImageViewer.Converters 7 | { 8 | public class MaxHeightConverter : IValueConverter 9 | { 10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 11 | { 12 | return (int)value > SystemParameters.WorkArea.Height ? SystemParameters.WorkArea.Height : (int)value; 13 | } 14 | 15 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | throw new NotImplementedException(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /HrtzImageViewer/Converters/MaxWidthConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace HrtzImageViewer.Converters 7 | { 8 | public class MaxWidthConverter : IValueConverter 9 | { 10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 11 | { 12 | return (int) value > SystemParameters.WorkArea.Width ? SystemParameters.WorkArea.Width : (int) value; 13 | } 14 | 15 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | throw new NotImplementedException(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /HrtzImageViewer/Extensions/ButtonIcon.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Media; 3 | 4 | namespace HrtzImageViewer.Extensions 5 | { 6 | public class ButtonIcon 7 | { 8 | public static readonly DependencyProperty IconProperty = 9 | DependencyProperty.RegisterAttached("Icon", typeof (Geometry), typeof (ButtonIcon), 10 | new PropertyMetadata(default(Geometry))); 11 | 12 | public static void SetIcon(UIElement element, Geometry value) 13 | { 14 | element.SetValue(IconProperty, value); 15 | } 16 | 17 | public static Geometry GetIcon(UIElement element) 18 | { 19 | return (Geometry)element.GetValue(IconProperty); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /HrtzImageViewer/ViewModels/CurrentImageVm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | using System.Windows.Media.Imaging; 4 | using HrtzImageViewer.Extensions; 5 | using HrtzImageViewer.Models; 6 | 7 | namespace HrtzImageViewer.ViewModels 8 | { 9 | public class CurrentImageVm : ObservableObject 10 | { 11 | public CurrentImageVm() 12 | { 13 | CurrentImage = new CurrentImage(); 14 | } 15 | 16 | public static CurrentImageVm Instance { get; set; } = new CurrentImageVm(); 17 | 18 | private CurrentImage _currentImage; 19 | 20 | public CurrentImage CurrentImage 21 | { 22 | get { return _currentImage; } 23 | set { SetField(ref _currentImage, value); } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /HrtzImageViewer/Models/CurrentImage.cs: -------------------------------------------------------------------------------- 1 | using System.Net.Mime; 2 | using System.Windows.Media.Imaging; 3 | using HrtzImageViewer.Extensions; 4 | 5 | namespace HrtzImageViewer.Models 6 | { 7 | public class CurrentImage : ObservableObject 8 | { 9 | private BitmapImage _bitmapImage; 10 | private bool _loadError; 11 | private string _errorMessage; 12 | 13 | public BitmapImage BitmapImage 14 | { 15 | get { return _bitmapImage; } 16 | set { SetField(ref _bitmapImage, value); } 17 | } 18 | 19 | public bool LoadError 20 | { 21 | get { return _loadError; } 22 | set { SetField(ref _loadError, value); } 23 | } 24 | 25 | public string ErrorMessage 26 | { 27 | get { return _errorMessage; } 28 | set { SetField(ref _errorMessage, value); } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /HrtzImageViewer/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /HrtzImageViewer/Extensions/ObservableObject.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel; 3 | using System.Runtime.CompilerServices; 4 | using HrtzImageViewer.Annotations; 5 | 6 | namespace HrtzImageViewer.Extensions 7 | { 8 | public class ObservableObject : INotifyPropertyChanged 9 | { 10 | public event PropertyChangedEventHandler PropertyChanged; 11 | 12 | [NotifyPropertyChangedInvocator] 13 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) 14 | { 15 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 16 | } 17 | 18 | protected bool SetField(ref T field, T value, [CallerMemberName] string propertyName = null) 19 | { 20 | if (EqualityComparer.Default.Equals(field, value)) return false; 21 | field = value; 22 | OnPropertyChanged(propertyName); 23 | return true; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /HrtzImageViewer/Extensions/RelayCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Input; 3 | 4 | namespace HrtzImageViewer.Extensions 5 | { 6 | public class RelayCommand : ICommand 7 | { 8 | private readonly Action _execute; 9 | private readonly Func _canExecute; 10 | 11 | public event EventHandler CanExecuteChanged 12 | { 13 | add { CommandManager.RequerySuggested += value; } 14 | remove { CommandManager.RequerySuggested -= value; } 15 | } 16 | 17 | public RelayCommand(Action execute, Func canExecute = null) 18 | { 19 | _execute = execute; 20 | _canExecute = canExecute; 21 | } 22 | 23 | public bool CanExecute(object parameter) 24 | { 25 | return _canExecute == null || _canExecute(parameter); 26 | } 27 | 28 | public void Execute(object parameter) 29 | { 30 | _execute(parameter); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /HrtzImageViewer/Styles/Icons.xaml: -------------------------------------------------------------------------------- 1 | 3 | 4 | M810.667 170.667q18.333 0 30.5 12.167t12.167 30.5q0 18-12.333 30.333l-268.667 268.333 268.667 268.333q12.333 12.333 12.333 30.333 0 18.333-12.167 30.5t-30.5 12.167q-18 0-30.333-12.333l-268.333-268.667-268.333 268.667q-12.333 12.333-30.333 12.333-18.333 0-30.5-12.167t-12.167-30.5q0-18 12.333-30.333l268.667-268.333-268.667-268.333q-12.333-12.333-12.333-30.333 0-18.333 12.167-30.5t30.5-12.167q18 0 30.333 12.333l268.333 268.667 268.333-268.667q12.333-12.333 30.333-12.333z 5 | M14.016 3h6.984v6.984h-2.016v-3.563l-9.797 9.797-1.406-1.406 9.797-9.797h-3.563v-2.016zM18.984 18.984v-6.984h2.016v6.984c0 1.078-0.938 2.016-2.016 2.016h-13.969c-1.125 0-2.016-0.938-2.016-2.016v-13.969c0-1.078 0.891-2.016 2.016-2.016h6.984v2.016h-6.984v13.969h13.969z 6 | 7 | -------------------------------------------------------------------------------- /HrtzImageViewer.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25123.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HrtzImageViewer", "HrtzImageViewer\HrtzImageViewer.csproj", "{23469200-B289-48DC-B0AD-1AA8444C795C}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {23469200-B289-48DC-B0AD-1AA8444C795C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {23469200-B289-48DC-B0AD-1AA8444C795C}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {23469200-B289-48DC-B0AD-1AA8444C795C}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {23469200-B289-48DC-B0AD-1AA8444C795C}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /HrtzImageViewer/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace HrtzImageViewer.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /HrtzImageViewer/Styles/WindowStyle.xaml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 24 | 25 | -------------------------------------------------------------------------------- /HrtzImageViewer/ViewModels/ShellVm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.IO; 4 | using System.Windows; 5 | using HrtzImageViewer.Extensions; 6 | 7 | namespace HrtzImageViewer.ViewModels 8 | { 9 | public class ShellVm : ObservableObject 10 | { 11 | public ShellVm() 12 | { } 13 | 14 | private RelayCommand _cmdCloseApp; 15 | private RelayCommand _cmdOpenAsDialog; 16 | 17 | public RelayCommand CmdCloseApp 18 | { 19 | get 20 | { 21 | return _cmdCloseApp ?? 22 | (_cmdCloseApp = new RelayCommand(ExecuteCmd_CloseApp, p => true)); 23 | } 24 | } 25 | 26 | public RelayCommand CmdOpenAsDialog 27 | { 28 | get 29 | { 30 | return _cmdOpenAsDialog ?? 31 | (_cmdOpenAsDialog = new RelayCommand(p => ExecuteCmd_OpenAsDialog(p as Uri), p => p != null)); 32 | } 33 | } 34 | 35 | private static void ExecuteCmd_CloseApp(object obj) 36 | { 37 | Application.Current?.MainWindow?.Close(); 38 | } 39 | 40 | public static void ExecuteCmd_OpenAsDialog(Uri sourceUri) 41 | { 42 | var sourcePath = sourceUri.AbsolutePath.Replace('/', Path.DirectorySeparatorChar); 43 | var args = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "shell32.dll"); 44 | args += ",OpenAs_RunDLL " + sourcePath; 45 | 46 | try 47 | { 48 | Process.Start("rundll32.exe", args); 49 | } 50 | catch (Exception ex) 51 | { 52 | Console.WriteLine(ex); 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /HrtzImageViewer/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Input; 3 | 4 | namespace HrtzImageViewer 5 | { 6 | /// 7 | /// Interaction logic for MainWindow.xaml 8 | /// 9 | public partial class MainWindow : Window 10 | { 11 | public MainWindow() 12 | { 13 | InitializeComponent(); 14 | /* 15 | BitmapImageCheck bic = new BitmapImageCheck(); 16 | MessageBox.Show(bic.ToString()); 17 | */ 18 | } 19 | 20 | // this is the offset of the mouse cursor from the top left corner of the window 21 | private Point _offset; 22 | 23 | private void MainWindow_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e) 24 | { 25 | // capturing the mouse here will redirect all events to this window, even if 26 | // the mouse cursor should leave the window area 27 | Mouse.Capture(this, CaptureMode.Element); 28 | 29 | var cursorPos = PointToScreen(Mouse.GetPosition(this)); 30 | var windowPos = new Point(Left, Top); 31 | _offset = (Point)(cursorPos - windowPos); 32 | } 33 | 34 | private void MainWindow_OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e) 35 | { 36 | Mouse.Capture(null); 37 | } 38 | 39 | private void MainWindow_OnMouseMove(object sender, MouseEventArgs e) 40 | { 41 | if (!Equals(Mouse.Captured, this) || Mouse.LeftButton != MouseButtonState.Pressed) return; 42 | 43 | var cursorPos = PointToScreen(Mouse.GetPosition(this)); 44 | var newLeft = cursorPos.X - _offset.X; 45 | var newTop = cursorPos.Y - _offset.Y; 46 | Left = newLeft; 47 | Top = newTop; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /HrtzImageViewer/Converters/BooleanToVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace HrtzImageViewer.Converters 7 | { 8 | /// 9 | /// Converts Boolean Values to Control.Visibility values 10 | /// 11 | public class BooleanToVisibilityConverter : IValueConverter 12 | { 13 | //Set to true if you want to show control when boolean value is true 14 | //Set to false if you want to hide/collapse control when value is true 15 | public bool TriggerValue { get; set; } 16 | 17 | //Set to true if you just want to hide the control 18 | //else set to false if you want to collapse the control 19 | public bool IsHidden { get; set; } 20 | 21 | private object GetVisibility(object value) 22 | { 23 | if (!(value is bool)) 24 | return DependencyProperty.UnsetValue; 25 | 26 | var objValue = (bool)value; 27 | 28 | if ((objValue && TriggerValue && IsHidden) || (!objValue && !TriggerValue && IsHidden)) 29 | { 30 | return Visibility.Hidden; 31 | } 32 | 33 | if ((objValue && TriggerValue && !IsHidden) || (!objValue && !TriggerValue && !IsHidden)) 34 | { 35 | return Visibility.Collapsed; 36 | } 37 | 38 | return Visibility.Visible; 39 | } 40 | 41 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 42 | { 43 | return GetVisibility(value); 44 | } 45 | 46 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 47 | { 48 | throw new NotImplementedException(); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /HrtzImageViewer/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.Windows; 4 | using System.Windows.Media.Imaging; 5 | using HrtzImageViewer.Helpers; 6 | using HrtzImageViewer.ViewModels; 7 | 8 | namespace HrtzImageViewer 9 | { 10 | /// 11 | /// Interaction logic for App.xaml 12 | /// 13 | public partial class App 14 | { 15 | void App_Startup(object sender, StartupEventArgs e) 16 | { 17 | if (e != null && e.Args.Length > 0) 18 | { 19 | var imageSource = e.Args[0]; 20 | 21 | if (!string.IsNullOrEmpty(imageSource)) 22 | { 23 | if (FileHelpers.IsValidImage(imageSource)) 24 | { 25 | CurrentImageVm.Instance.CurrentImage.BitmapImage = new BitmapImage(new Uri(imageSource)); 26 | } 27 | else 28 | { 29 | Debug.WriteLine("Not a valid image file"); 30 | CurrentImageVm.Instance.CurrentImage.LoadError = true; 31 | CurrentImageVm.Instance.CurrentImage.ErrorMessage = "Not a valid image file"; 32 | } 33 | } 34 | else 35 | { 36 | Debug.WriteLine("No startup arguments provided"); 37 | CurrentImageVm.Instance.CurrentImage.LoadError = true; 38 | CurrentImageVm.Instance.CurrentImage.ErrorMessage = "No startup arguments provided"; 39 | } 40 | } 41 | else 42 | { 43 | Debug.WriteLine("No startup arguments provided"); 44 | CurrentImageVm.Instance.CurrentImage.LoadError = true; 45 | CurrentImageVm.Instance.CurrentImage.ErrorMessage = "No startup arguments provided"; 46 | } 47 | 48 | var mainWindow = new MainWindow(); 49 | mainWindow.Show(); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /HrtzImageViewer/Styles/ButtonStyle.xaml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 34 | 35 | -------------------------------------------------------------------------------- /HrtzImageViewer/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("HrtzImageViewer")] 11 | [assembly: AssemblyDescription("HrtzImageViewer")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("Hertizch")] 14 | [assembly: AssemblyProduct("HrtzImageViewer")] 15 | [assembly: AssemblyCopyright("MIT")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | //In order to begin building localizable applications, set 25 | //CultureYouAreCodingWith in your .csproj file 26 | //inside a . For example, if you are using US english 27 | //in your source files, set the to en-US. Then uncomment 28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | //the line below to match the UICulture setting in the project file. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] 42 | 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | -------------------------------------------------------------------------------- /HrtzImageViewer/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace HrtzImageViewer.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HrtzImageViewer.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /HrtzImageViewer/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |