diff --git a/Trunk/Components/CzokoŚmieciarka.DataModels/CzokoŚmieciarka.DataModels.csproj b/Trunk/Components/CzokoŚmieciarka.DataModels/CzokoŚmieciarka.DataModels.csproj index edceb74..b1e3973 100644 --- a/Trunk/Components/CzokoŚmieciarka.DataModels/CzokoŚmieciarka.DataModels.csproj +++ b/Trunk/Components/CzokoŚmieciarka.DataModels/CzokoŚmieciarka.DataModels.csproj @@ -31,6 +31,8 @@ 4 + + @@ -54,7 +56,6 @@ - diff --git a/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Map.cs b/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Map.cs deleted file mode 100644 index d852af3..0000000 --- a/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Map.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CzokoŚmieciarka.DataModels.Interfaces; - -namespace CzokoŚmieciarka.DataModels.Models -{ - public class Map - { - public Map(Rectangle mapRectangle, IEnumerable garbageLocalizations=null) - { - this.MapRectangle = mapRectangle; - this.GarbageLocalizations = garbageLocalizations; - } - - Rectangle MapRectangle { get; } - - IEnumerable GarbageLocalizations { get; } - } -} diff --git a/Trunk/CzokoŚmieciarka.WPF/App.config b/Trunk/CzokoŚmieciarka.WPF/App.config new file mode 100644 index 0000000..731f6de --- /dev/null +++ b/Trunk/CzokoŚmieciarka.WPF/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Trunk/CzokoŚmieciarka.WPF/App.xaml b/Trunk/CzokoŚmieciarka.WPF/App.xaml new file mode 100644 index 0000000..321ffef --- /dev/null +++ b/Trunk/CzokoŚmieciarka.WPF/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/Trunk/CzokoŚmieciarka.WPF/App.xaml.cs b/Trunk/CzokoŚmieciarka.WPF/App.xaml.cs new file mode 100644 index 0000000..65591e4 --- /dev/null +++ b/Trunk/CzokoŚmieciarka.WPF/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace CzokoŚmieciarka.WPF +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/Trunk/CzokoŚmieciarka.WPF/CzokoŚmieciarka.WPF.csproj b/Trunk/CzokoŚmieciarka.WPF/CzokoŚmieciarka.WPF.csproj new file mode 100644 index 0000000..6c5ebd1 --- /dev/null +++ b/Trunk/CzokoŚmieciarka.WPF/CzokoŚmieciarka.WPF.csproj @@ -0,0 +1,111 @@ + + + + + Debug + AnyCPU + {AFCA9593-EF6B-4860-95F5-4F56F2AF221B} + WinExe + CzokoŚmieciarka.WPF + CzokoŚmieciarka.WPF + v4.6.1 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + {f2e11fee-c5ac-47d2-ba9c-819909b6dff7} + CzokoŚmieciarka.DataModels + + + + + Always + + + + \ No newline at end of file diff --git a/Trunk/CzokoŚmieciarka.WPF/Images/dirt.jpg b/Trunk/CzokoŚmieciarka.WPF/Images/dirt.jpg new file mode 100644 index 0000000..c3a679d Binary files /dev/null and b/Trunk/CzokoŚmieciarka.WPF/Images/dirt.jpg differ diff --git a/Trunk/CzokoŚmieciarka.WPF/MainWindow.xaml b/Trunk/CzokoŚmieciarka.WPF/MainWindow.xaml new file mode 100644 index 0000000..10a4e3f --- /dev/null +++ b/Trunk/CzokoŚmieciarka.WPF/MainWindow.xaml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + diff --git a/Trunk/CzokoŚmieciarka.WPF/MainWindow.xaml.cs b/Trunk/CzokoŚmieciarka.WPF/MainWindow.xaml.cs new file mode 100644 index 0000000..3f021f8 --- /dev/null +++ b/Trunk/CzokoŚmieciarka.WPF/MainWindow.xaml.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using CzokoŚmieciarka.WPF.Models; + +namespace CzokoŚmieciarka.WPF +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + + this.DataContext = new Board(10, 10); + } + } +} diff --git a/Trunk/CzokoŚmieciarka.WPF/Models/Board.cs b/Trunk/CzokoŚmieciarka.WPF/Models/Board.cs new file mode 100644 index 0000000..a731223 --- /dev/null +++ b/Trunk/CzokoŚmieciarka.WPF/Models/Board.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Controls; +using System.Windows.Media; +using CzokoŚmieciarka.DataModels.Interfaces; + +namespace CzokoŚmieciarka.WPF.Models +{ + public class Board + { + int _rows; + int _columns; + List _tiles = new List(); + + public Board(int rows, int columns) + { + _rows = rows; + _columns = columns; + + for (int r = 0; r < rows; r++) + { + for (int c = 0; c < columns; c++) + { + string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Images\dirt.jpg"); + var Bitmap = new Bitmap(path); + _tiles.Add(new Tile() + { + Data = string.Format("Tile {0}", r*10+c), + Img = Bitmap + }); + } + } + } + + public int Rows + { + get { return _rows; } + set { _rows = value; } + } + + public int Columns + { + get { return _columns; } + set { _columns = value; } + } + + public List Tiles + { + get { return _tiles; } + set { _tiles = value; } + } + } + + public class Tile + { + public string Data { get; set; } + public Bitmap Img { get; set; } + } +} diff --git a/Trunk/CzokoŚmieciarka.WPF/Properties/AssemblyInfo.cs b/Trunk/CzokoŚmieciarka.WPF/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..d80f65d --- /dev/null +++ b/Trunk/CzokoŚmieciarka.WPF/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("CzokoŚmieciarka.WPF")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CzokoŚmieciarka.WPF")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Trunk/CzokoŚmieciarka.WPF/Properties/Resources.Designer.cs b/Trunk/CzokoŚmieciarka.WPF/Properties/Resources.Designer.cs new file mode 100644 index 0000000..bc2fe6a --- /dev/null +++ b/Trunk/CzokoŚmieciarka.WPF/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace CzokoŚmieciarka.WPF.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CzokoŚmieciarka.WPF.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Trunk/CzokoŚmieciarka.WPF/Properties/Resources.resx b/Trunk/CzokoŚmieciarka.WPF/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Trunk/CzokoŚmieciarka.WPF/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Trunk/CzokoŚmieciarka.WPF/Properties/Settings.Designer.cs b/Trunk/CzokoŚmieciarka.WPF/Properties/Settings.Designer.cs new file mode 100644 index 0000000..c7d73f4 --- /dev/null +++ b/Trunk/CzokoŚmieciarka.WPF/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace CzokoŚmieciarka.WPF.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Trunk/CzokoŚmieciarka.WPF/Properties/Settings.settings b/Trunk/CzokoŚmieciarka.WPF/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/Trunk/CzokoŚmieciarka.WPF/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Trunk/CzokoŚmieciarka.sln b/Trunk/CzokoŚmieciarka.sln index 158c32e..09f9f36 100644 --- a/Trunk/CzokoŚmieciarka.sln +++ b/Trunk/CzokoŚmieciarka.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 15.0.28307.136 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CzokoŚmieciarka.DataModels", "Components\CzokoŚmieciarka.DataModels\CzokoŚmieciarka.DataModels.csproj", "{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CzokoŚmieciarka.WPF", "CzokoŚmieciarka.WPF\CzokoŚmieciarka.WPF.csproj", "{AFCA9593-EF6B-4860-95F5-4F56F2AF221B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +17,10 @@ Global {F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Debug|Any CPU.Build.0 = Debug|Any CPU {F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Release|Any CPU.ActiveCfg = Release|Any CPU {F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Release|Any CPU.Build.0 = Release|Any CPU + {AFCA9593-EF6B-4860-95F5-4F56F2AF221B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AFCA9593-EF6B-4860-95F5-4F56F2AF221B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AFCA9593-EF6B-4860-95F5-4F56F2AF221B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AFCA9593-EF6B-4860-95F5-4F56F2AF221B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE