diff --git a/BasicGraphics.C/BasicGraphicFromFile.cs b/BasicGraphics.C/BasicGraphicFromFile.cs
new file mode 100644
index 0000000..e1ee094
--- /dev/null
+++ b/BasicGraphics.C/BasicGraphicFromFile.cs
@@ -0,0 +1,17 @@
+using System;
+using System.IO;
+
+namespace Igtampe.BasicGraphics{
+
+ /// Holds a BasicGraphic from a file
+ public class BasicGraphicFromFile:BasicGraphic {
+
+ /// Generates a BasicGraphic item from a file
+ public BasicGraphicFromFile(String Filename) {
+ if(!File.Exists(Filename)) { throw new FileNotFoundException(); }
+ Name = Filename;
+ Contents = File.ReadAllLines(Filename);
+ }
+
+ }
+}
diff --git a/BasicGraphics.C/BasicGraphicFromResource.cs b/BasicGraphics.C/BasicGraphicFromResource.cs
new file mode 100644
index 0000000..6307dc8
--- /dev/null
+++ b/BasicGraphics.C/BasicGraphicFromResource.cs
@@ -0,0 +1,16 @@
+using System;
+
+namespace Igtampe.BasicGraphics {
+ /// Holds a BasicGraphic from a Resource
+ public class BasicGraphicFromResource:BasicGraphic {
+
+ public BasicGraphicFromResource(byte[] Resource):this("Graphic From Resource",Resource) { }
+
+ /// Generates a BasicGraphic item from a file
+ public BasicGraphicFromResource(String Name, byte[] Resource) {
+ this.Name = Name;
+ Contents = GraphicUtils.ResourceToStringArray(Resource);
+ }
+
+ }
+}
diff --git a/BasicGraphics.C/ExampleGraphics/Cloud.cs b/BasicGraphics.C/ExampleGraphics/Cloud.cs
new file mode 100644
index 0000000..2dee12d
--- /dev/null
+++ b/BasicGraphics.C/ExampleGraphics/Cloud.cs
@@ -0,0 +1,31 @@
+//Look ma! No dependencies!
+
+namespace Igtampe.BasicGraphics.ExampleGraphics {
+ /// A Cloud graphic, used for testing.
+ public class Cloud:BasicGraphic {
+
+ public Cloud() {
+
+ string[] Cloud = {
+ "111111111111111111111111",
+ "111111111111111111111111",
+ "111111111111111111111111",
+ "111111111111111111111111",
+ "111111177771111111111111",
+ "111117777777711111111111",
+ "111177777777777777111111",
+ "111777777777777777771111",
+ "117777777777777777777711",
+ "111111111111111111111111",
+ "111111111111111111111111",
+ "111111111111111111111111",
+ "111111111111111111111111",
+ };
+
+ Contents = Cloud;
+ Name = "Cloud Graphic";
+ }
+
+
+ }
+}
diff --git a/BasicGraphics.C/GraphicUtils.cs b/BasicGraphics.C/GraphicUtils.cs
index 81195e5..c1dd132 100644
--- a/BasicGraphics.C/GraphicUtils.cs
+++ b/BasicGraphics.C/GraphicUtils.cs
@@ -1,4 +1,6 @@
-using System;
+using Igtampe.BasicGraphics.Properties;
+using System;
+using System.Text;
namespace Igtampe.BasicGraphics{
public static class GraphicUtils {
@@ -67,5 +69,8 @@ public static ConsoleColor ColorCharToConsoleColor(char ColorChar) {
}
+ /// Turns a resource into a string array split by lines
+ public static String[] ResourceToStringArray(byte[] Resource) {return Encoding.ASCII.GetString(Resource).Split('\n');}
+
}
}
diff --git a/BasicGraphics.C/HiColorGraphicFromFile.cs b/BasicGraphics.C/HiColorGraphicFromFile.cs
new file mode 100644
index 0000000..be104a8
--- /dev/null
+++ b/BasicGraphics.C/HiColorGraphicFromFile.cs
@@ -0,0 +1,17 @@
+using System;
+using System.IO;
+
+namespace Igtampe.BasicGraphics {
+ /// Holds a HiColorGraphic from a file
+ public class HiColorGraphicFromFile:HiColorGraphic {
+
+ /// Generates a HiColorGraphic item from a file
+ public HiColorGraphicFromFile(String Filename) {
+
+ if(!File.Exists(Filename)) { throw new FileNotFoundException(); }
+ Name = Filename;
+ Contents = File.ReadAllLines(Filename);
+ }
+ }
+
+}
diff --git a/BasicGraphics.C/HiColorGraphicFromResource.cs b/BasicGraphics.C/HiColorGraphicFromResource.cs
new file mode 100644
index 0000000..606b658
--- /dev/null
+++ b/BasicGraphics.C/HiColorGraphicFromResource.cs
@@ -0,0 +1,17 @@
+using System;
+
+namespace Igtampe.BasicGraphics {
+
+ /// Holds a HiColorGraphic from a resource
+ public class HiColorGraphicFromResource:HiColorGraphic {
+
+ public HiColorGraphicFromResource(byte[] Resource) : this("Graphic From Resource",Resource) { }
+
+ /// Generates a BasicGraphic item from a file
+ public HiColorGraphicFromResource(String Name,byte[] Resource) {
+ this.Name = Name;
+ Contents = GraphicUtils.ResourceToStringArray(Resource);
+ }
+
+ }
+}
diff --git a/BasicGraphics.C/Igtampe.BasicGraphics.csproj b/BasicGraphics.C/Igtampe.BasicGraphics.csproj
index dbb3dc0..4143f26 100644
--- a/BasicGraphics.C/Igtampe.BasicGraphics.csproj
+++ b/BasicGraphics.C/Igtampe.BasicGraphics.csproj
@@ -7,8 +7,8 @@
{41DBF856-B2E6-4A1C-A06A-A211186D2ACD}
Library
Properties
- BasicGraphics.C
- BasicGraphics.C
+ Igtampe.BasicGraphics
+ BasicGraphics
v4.7.2
512
true
@@ -42,10 +42,20 @@
+
+
+
+
+
+
+ True
+ True
+ Resources.resx
+
@@ -53,5 +63,11 @@
Igtampe.BasicRender
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
\ No newline at end of file
diff --git a/BasicGraphics.C/Properties/Resources.Designer.cs b/BasicGraphics.C/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..389ac54
--- /dev/null
+++ b/BasicGraphics.C/Properties/Resources.Designer.cs
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+//
+// 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 Igtampe.BasicGraphics.Properties {
+ using System;
+
+
+ ///
+ /// 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", "16.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 (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Igtampe.BasicGraphics.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/BasicWindow.VBNET/My Project/Resources.resx b/BasicGraphics.C/Properties/Resources.resx
similarity index 90%
rename from BasicWindow.VBNET/My Project/Resources.resx
rename to BasicGraphics.C/Properties/Resources.resx
index af7dbeb..1af7de1 100644
--- a/BasicWindow.VBNET/My Project/Resources.resx
+++ b/BasicGraphics.C/Properties/Resources.resx
@@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
- : System.Serialization.Formatters.Binary.BinaryFormatter
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
-->
+
@@ -68,9 +69,10 @@
-
+
+
@@ -85,9 +87,10 @@
-
+
+
@@ -109,9 +112,9 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
\ No newline at end of file
diff --git a/BasicGraphics.VBNET/BasicGraphics.VBNET.vbproj b/BasicGraphics.VBNET/BasicGraphics.VBNET.vbproj
deleted file mode 100644
index f24516d..0000000
--- a/BasicGraphics.VBNET/BasicGraphics.VBNET.vbproj
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {80E7B7C4-AC86-4F43-A16E-A8BC85A58833}
- Library
- BasicGraphics.VBNET
- BasicGraphics.VBNET
- 512
- Windows
- v4.7.2
- true
-
-
- true
- full
- true
- true
- bin\Debug\
- BasicGraphics.VBNET.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- pdbonly
- false
- true
- true
- bin\Release\
- BasicGraphics.VBNET.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- On
-
-
- Binary
-
-
- Off
-
-
- On
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- Application.myapp
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
-
-
- VbMyResourcesResXFileCodeGenerator
- Resources.Designer.vb
- My.Resources
- Designer
-
-
-
-
- MyApplicationCodeGenerator
- Application.Designer.vb
-
-
- SettingsSingleFileGenerator
- My
- Settings.Designer.vb
-
-
-
-
\ No newline at end of file
diff --git a/BasicGraphics.VBNET/Class1.vb b/BasicGraphics.VBNET/Class1.vb
deleted file mode 100644
index 875798b..0000000
--- a/BasicGraphics.VBNET/Class1.vb
+++ /dev/null
@@ -1,3 +0,0 @@
-Public Class Class1
-
-End Class
diff --git a/BasicGraphics.VBNET/My Project/Application.Designer.vb b/BasicGraphics.VBNET/My Project/Application.Designer.vb
deleted file mode 100644
index 88dd01c..0000000
--- a/BasicGraphics.VBNET/My Project/Application.Designer.vb
+++ /dev/null
@@ -1,13 +0,0 @@
-'------------------------------------------------------------------------------
-'
-' 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.
-'
-'------------------------------------------------------------------------------
-
-Option Strict On
-Option Explicit On
-
diff --git a/BasicGraphics.VBNET/My Project/Application.myapp b/BasicGraphics.VBNET/My Project/Application.myapp
deleted file mode 100644
index 758895d..0000000
--- a/BasicGraphics.VBNET/My Project/Application.myapp
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- false
- false
- 0
- true
- 0
- 1
- true
-
diff --git a/BasicGraphics.VBNET/My Project/AssemblyInfo.vb b/BasicGraphics.VBNET/My Project/AssemblyInfo.vb
deleted file mode 100644
index d14c0ae..0000000
--- a/BasicGraphics.VBNET/My Project/AssemblyInfo.vb
+++ /dev/null
@@ -1,35 +0,0 @@
-Imports System
-Imports System.Reflection
-Imports System.Runtime.InteropServices
-
-' 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.
-
-' Review the values of the assembly attributes
-
-
-
-
-
-
-
-
-
-
-'The following GUID is for the ID of the typelib if this project is exposed to COM
-
-
-' 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:
-'
-
-
-
diff --git a/BasicGraphics.VBNET/My Project/Resources.Designer.vb b/BasicGraphics.VBNET/My Project/Resources.Designer.vb
deleted file mode 100644
index 821d574..0000000
--- a/BasicGraphics.VBNET/My Project/Resources.Designer.vb
+++ /dev/null
@@ -1,62 +0,0 @@
-'------------------------------------------------------------------------------
-'
-' 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.
-'
-'------------------------------------------------------------------------------
-
-Option Strict On
-Option Explicit On
-
-
-Namespace My.Resources
-
- '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.
- '''
- ''' A strongly-typed resource class, for looking up localized strings, etc.
- '''
- _
- Friend Module Resources
-
- Private resourceMan As Global.System.Resources.ResourceManager
-
- Private resourceCulture As Global.System.Globalization.CultureInfo
-
- '''
- ''' Returns the cached ResourceManager instance used by this class.
- '''
- _
- Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
- Get
- If Object.ReferenceEquals(resourceMan, Nothing) Then
- Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("BasicGraphics.VBNET.Resources", GetType(Resources).Assembly)
- resourceMan = temp
- End If
- Return resourceMan
- End Get
- End Property
-
- '''
- ''' Overrides the current thread's CurrentUICulture property for all
- ''' resource lookups using this strongly typed resource class.
- '''
- _
- Friend Property Culture() As Global.System.Globalization.CultureInfo
- Get
- Return resourceCulture
- End Get
- Set(ByVal value As Global.System.Globalization.CultureInfo)
- resourceCulture = value
- End Set
- End Property
- End Module
-End Namespace
diff --git a/BasicGraphics.VBNET/My Project/Settings.Designer.vb b/BasicGraphics.VBNET/My Project/Settings.Designer.vb
deleted file mode 100644
index 8e8c8ca..0000000
--- a/BasicGraphics.VBNET/My Project/Settings.Designer.vb
+++ /dev/null
@@ -1,73 +0,0 @@
-'------------------------------------------------------------------------------
-'
-' 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.
-'
-'------------------------------------------------------------------------------
-
-Option Strict On
-Option Explicit On
-
-
-Namespace My
-
- _
- Partial Friend NotInheritable Class MySettings
- Inherits Global.System.Configuration.ApplicationSettingsBase
-
- Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
-
-#Region "My.Settings Auto-Save Functionality"
-#If _MyType = "WindowsForms" Then
- Private Shared addedHandler As Boolean
-
- Private Shared addedHandlerLockObject As New Object
-
- _
- Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
- If My.Application.SaveMySettingsOnExit Then
- My.Settings.Save()
- End If
- End Sub
-#End If
-#End Region
-
- Public Shared ReadOnly Property [Default]() As MySettings
- Get
-
-#If _MyType = "WindowsForms" Then
- If Not addedHandler Then
- SyncLock addedHandlerLockObject
- If Not addedHandler Then
- AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
- addedHandler = True
- End If
- End SyncLock
- End If
-#End If
- Return defaultInstance
- End Get
- End Property
- End Class
-End Namespace
-
-Namespace My
-
- _
- Friend Module MySettingsProperty
-
- _
- Friend ReadOnly Property Settings() As Global.BasicGraphics.VBNET.My.MySettings
- Get
- Return Global.BasicGraphics.VBNET.My.MySettings.Default
- End Get
- End Property
- End Module
-End Namespace
diff --git a/BasicGraphics.VBNET/My Project/Settings.settings b/BasicGraphics.VBNET/My Project/Settings.settings
deleted file mode 100644
index 85b890b..0000000
--- a/BasicGraphics.VBNET/My Project/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/BasicRender.VBNET/BasicRender.VBNET.vbproj b/BasicRender.VBNET/BasicRender.VBNET.vbproj
deleted file mode 100644
index 132faa2..0000000
--- a/BasicRender.VBNET/BasicRender.VBNET.vbproj
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {4344148B-CEC3-44C2-8AC7-0822D696F387}
- Library
- BasicRender.VBNET
- BasicRender.VBNET
- 512
- Windows
- v4.7.2
- true
-
-
- true
- full
- true
- true
- bin\Debug\
- BasicRender.VBNET.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- pdbonly
- false
- true
- true
- bin\Release\
- BasicRender.VBNET.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- On
-
-
- Binary
-
-
- Off
-
-
- On
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- Application.myapp
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
-
-
- VbMyResourcesResXFileCodeGenerator
- Resources.Designer.vb
- My.Resources
- Designer
-
-
-
-
- MyApplicationCodeGenerator
- Application.Designer.vb
-
-
- SettingsSingleFileGenerator
- My
- Settings.Designer.vb
-
-
-
-
\ No newline at end of file
diff --git a/BasicRender.VBNET/Class1.vb b/BasicRender.VBNET/Class1.vb
deleted file mode 100644
index 875798b..0000000
--- a/BasicRender.VBNET/Class1.vb
+++ /dev/null
@@ -1,3 +0,0 @@
-Public Class Class1
-
-End Class
diff --git a/BasicRender.VBNET/My Project/Application.Designer.vb b/BasicRender.VBNET/My Project/Application.Designer.vb
deleted file mode 100644
index 88dd01c..0000000
--- a/BasicRender.VBNET/My Project/Application.Designer.vb
+++ /dev/null
@@ -1,13 +0,0 @@
-'------------------------------------------------------------------------------
-'
-' 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.
-'
-'------------------------------------------------------------------------------
-
-Option Strict On
-Option Explicit On
-
diff --git a/BasicRender.VBNET/My Project/Application.myapp b/BasicRender.VBNET/My Project/Application.myapp
deleted file mode 100644
index 758895d..0000000
--- a/BasicRender.VBNET/My Project/Application.myapp
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- false
- false
- 0
- true
- 0
- 1
- true
-
diff --git a/BasicRender.VBNET/My Project/AssemblyInfo.vb b/BasicRender.VBNET/My Project/AssemblyInfo.vb
deleted file mode 100644
index 09ff39f..0000000
--- a/BasicRender.VBNET/My Project/AssemblyInfo.vb
+++ /dev/null
@@ -1,35 +0,0 @@
-Imports System
-Imports System.Reflection
-Imports System.Runtime.InteropServices
-
-' 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.
-
-' Review the values of the assembly attributes
-
-
-
-
-
-
-
-
-
-
-'The following GUID is for the ID of the typelib if this project is exposed to COM
-
-
-' 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:
-'
-
-
-
diff --git a/BasicRender.VBNET/My Project/Resources.Designer.vb b/BasicRender.VBNET/My Project/Resources.Designer.vb
deleted file mode 100644
index cc15dbb..0000000
--- a/BasicRender.VBNET/My Project/Resources.Designer.vb
+++ /dev/null
@@ -1,62 +0,0 @@
-'------------------------------------------------------------------------------
-'
-' 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.
-'
-'------------------------------------------------------------------------------
-
-Option Strict On
-Option Explicit On
-
-
-Namespace My.Resources
-
- '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.
- '''
- ''' A strongly-typed resource class, for looking up localized strings, etc.
- '''
- _
- Friend Module Resources
-
- Private resourceMan As Global.System.Resources.ResourceManager
-
- Private resourceCulture As Global.System.Globalization.CultureInfo
-
- '''
- ''' Returns the cached ResourceManager instance used by this class.
- '''
- _
- Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
- Get
- If Object.ReferenceEquals(resourceMan, Nothing) Then
- Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("BasicRender.VBNET.Resources", GetType(Resources).Assembly)
- resourceMan = temp
- End If
- Return resourceMan
- End Get
- End Property
-
- '''
- ''' Overrides the current thread's CurrentUICulture property for all
- ''' resource lookups using this strongly typed resource class.
- '''
- _
- Friend Property Culture() As Global.System.Globalization.CultureInfo
- Get
- Return resourceCulture
- End Get
- Set(ByVal value As Global.System.Globalization.CultureInfo)
- resourceCulture = value
- End Set
- End Property
- End Module
-End Namespace
diff --git a/BasicRender.VBNET/My Project/Resources.resx b/BasicRender.VBNET/My Project/Resources.resx
deleted file mode 100644
index af7dbeb..0000000
--- a/BasicRender.VBNET/My Project/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 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/BasicRender.VBNET/My Project/Settings.Designer.vb b/BasicRender.VBNET/My Project/Settings.Designer.vb
deleted file mode 100644
index 9f66397..0000000
--- a/BasicRender.VBNET/My Project/Settings.Designer.vb
+++ /dev/null
@@ -1,73 +0,0 @@
-'------------------------------------------------------------------------------
-'
-' 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.
-'
-'------------------------------------------------------------------------------
-
-Option Strict On
-Option Explicit On
-
-
-Namespace My
-
- _
- Partial Friend NotInheritable Class MySettings
- Inherits Global.System.Configuration.ApplicationSettingsBase
-
- Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
-
-#Region "My.Settings Auto-Save Functionality"
-#If _MyType = "WindowsForms" Then
- Private Shared addedHandler As Boolean
-
- Private Shared addedHandlerLockObject As New Object
-
- _
- Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
- If My.Application.SaveMySettingsOnExit Then
- My.Settings.Save()
- End If
- End Sub
-#End If
-#End Region
-
- Public Shared ReadOnly Property [Default]() As MySettings
- Get
-
-#If _MyType = "WindowsForms" Then
- If Not addedHandler Then
- SyncLock addedHandlerLockObject
- If Not addedHandler Then
- AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
- addedHandler = True
- End If
- End SyncLock
- End If
-#End If
- Return defaultInstance
- End Get
- End Property
- End Class
-End Namespace
-
-Namespace My
-
- _
- Friend Module MySettingsProperty
-
- _
- Friend ReadOnly Property Settings() As Global.BasicRender.VBNET.My.MySettings
- Get
- Return Global.BasicRender.VBNET.My.MySettings.Default
- End Get
- End Property
- End Module
-End Namespace
diff --git a/BasicRender.VBNET/My Project/Settings.settings b/BasicRender.VBNET/My Project/Settings.settings
deleted file mode 100644
index 85b890b..0000000
--- a/BasicRender.VBNET/My Project/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/BasicRender.sln b/BasicRender.sln
index 8929d44..bdf8ec3 100644
--- a/BasicRender.sln
+++ b/BasicRender.sln
@@ -9,7 +9,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Example_CSharp", "BasicRend
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Igtampe.BasicGraphics", "BasicGraphics.C\Igtampe.BasicGraphics.csproj", "{41DBF856-B2E6-4A1C-A06A-A211186D2ACD}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Igtampe.BasicWindow", "BasicWindow.C\Igtampe.BasicWindow.csproj", "{DE8C90F9-94C4-4264-805C-144F819F3197}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Igtampe.BasicWindows", "BasicWindow.C\Igtampe.BasicWindows.csproj", "{DE8C90F9-94C4-4264-805C-144F819F3197}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/BasicRender/Igtampe.BasicRender.csproj b/BasicRender/Igtampe.BasicRender.csproj
index 55d33c7..fa177bd 100644
--- a/BasicRender/Igtampe.BasicRender.csproj
+++ b/BasicRender/Igtampe.BasicRender.csproj
@@ -7,7 +7,7 @@
{CD2D4436-5B3E-458C-B17A-A6822C25635F}
Library
Properties
- BasicRender
+ Igtampe.BasicRender
BasicRender
v4.7.2
512
diff --git a/BasicRenderShowcase/Example_CSharp.csproj b/BasicRenderShowcase/Example_CSharp.csproj
index 8fba296..b396ffb 100644
--- a/BasicRenderShowcase/Example_CSharp.csproj
+++ b/BasicRenderShowcase/Example_CSharp.csproj
@@ -6,7 +6,7 @@
AnyCPU
{84B6FFC2-B9E9-45E2-B9A9-56C00157F845}
Exe
- BasicRenderShowcase
+ Igtampe.BasicRenderShowcase
BasicRenderShowcase
v4.7.2
512
@@ -45,9 +45,15 @@
+
+ True
+ True
+ Resources.resx
+
+
@@ -58,10 +64,16 @@
{cd2d4436-5b3e-458c-b17a-a6822c25635f}
Igtampe.BasicRender
-
+
{de8c90f9-94c4-4264-805c-144f819f3197}
- Igtampe.BasicWindow
+ Igtampe.BasicWindows
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
\ No newline at end of file
diff --git a/BasicRenderShowcase/Program.cs b/BasicRenderShowcase/Program.cs
index c04654c..c8b7e0f 100644
--- a/BasicRenderShowcase/Program.cs
+++ b/BasicRenderShowcase/Program.cs
@@ -1,12 +1,33 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using Igtampe.BasicRender;
+using Igtampe.BasicGraphics;
+using Igtampe.BasicWindows;
+using Igtampe.BasicGraphics.ExampleGraphics;
+using Igtampe.BasicRenderShowcase.Properties;
+using Igtampe.BasicWindows.ExampleWindows;
-namespace BasicRenderShowcase {
+namespace Igtampe.BasicRenderShowcase {
class Program {
static void Main(string[] args) {
+ RenderUtils.Echo("Hello");
+ RenderUtils.Pause();
+
+ Console.Clear();
+
+ new Cloud().draw(2,2);
+ RenderUtils.Pause();
+
+ Console.Clear();
+
+ Graphic LPLogo = new BasicGraphicFromResource(Resources.LandingPadLogo);
+ LPLogo.draw(1,1);
+ RenderUtils.Pause();
+
+ RenderUtils.Color(ConsoleColor.DarkCyan,ConsoleColor.White);
+ Console.Clear();
+
+ HelloWorldWindow Hello = new HelloWorldWindow();
+ Hello.Execute();
}
diff --git a/BasicRenderShowcase/Properties/Resources.Designer.cs b/BasicRenderShowcase/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..297bd97
--- /dev/null
+++ b/BasicRenderShowcase/Properties/Resources.Designer.cs
@@ -0,0 +1,73 @@
+//------------------------------------------------------------------------------
+//
+// 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 Igtampe.BasicRenderShowcase.Properties {
+ using System;
+
+
+ ///
+ /// 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", "16.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 (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Igtampe.BasicRenderShowcase.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;
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Byte[].
+ ///
+ internal static byte[] LandingPadLogo {
+ get {
+ object obj = ResourceManager.GetObject("LandingPadLogo", resourceCulture);
+ return ((byte[])(obj));
+ }
+ }
+ }
+}
diff --git a/BasicGraphics.VBNET/My Project/Resources.resx b/BasicRenderShowcase/Properties/Resources.resx
similarity index 85%
rename from BasicGraphics.VBNET/My Project/Resources.resx
rename to BasicRenderShowcase/Properties/Resources.resx
index af7dbeb..cc218f9 100644
--- a/BasicGraphics.VBNET/My Project/Resources.resx
+++ b/BasicRenderShowcase/Properties/Resources.resx
@@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
- : System.Serialization.Formatters.Binary.BinaryFormatter
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
-->
+
@@ -68,9 +69,10 @@
-
+
+
@@ -85,9 +87,10 @@
-
+
+
@@ -109,9 +112,13 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ ..\Resources\LP.df;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
\ No newline at end of file
diff --git a/BasicRenderShowcase/Resources/LP.df b/BasicRenderShowcase/Resources/LP.df
new file mode 100644
index 0000000..5cddd14
--- /dev/null
+++ b/BasicRenderShowcase/Resources/LP.df
@@ -0,0 +1,11 @@
+123456789ABCDEF
+123456789ABCDEF F F F F FF FFF F F FF
+123456789ABCDEF F F F FF F F F F FF F F
+123456789ABCDEF F FFF F FF F F F F FF F F
+123456789ABCDEF FFF F F F F FF FFF F F FFF
+123456789ABCDEF
+123456789ABCDEF FFF F FF FF FFF
+123456789ABCDEF F F F F F F F F F
+123456789ABCDEF FFF FFF F F F F F
+123456789ABCDEF F F F FF FFF F FFF
+123456789ABCDEF
diff --git a/BasicWindow.C/Class1.cs b/BasicWindow.C/Class1.cs
deleted file mode 100644
index 21e0ebe..0000000
--- a/BasicWindow.C/Class1.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Igtampe.BasicWindow
-{
- public class Class1
- {
- }
-}
diff --git a/BasicWindow.C/ExampleWindows/HelloWorldWindow.cs b/BasicWindow.C/ExampleWindows/HelloWorldWindow.cs
new file mode 100644
index 0000000..ff50768
--- /dev/null
+++ b/BasicWindow.C/ExampleWindows/HelloWorldWindow.cs
@@ -0,0 +1,20 @@
+using System;
+using Igtampe.BasicWindows.WindowElements;
+
+namespace Igtampe.BasicWindows.ExampleWindows {
+ public class HelloWorldWindow:Window {
+ public HelloWorldWindow() : base(true,true,ConsoleColor.Gray,ConsoleColor.DarkBlue,ConsoleColor.White,HeaderPosition.CENTER,"Hello World!",20,6,-1,-1) {
+
+ AllElements.Add(new Icon(this,Icon.IconType.INFORMATION,1,2));
+ AllElements.Add(new Label(this,"Hello World!",ConsoleColor.Gray,ConsoleColor.Black,6,2));
+
+ Button OKButton = new CloseButton(this,"[ OK ]",ConsoleColor.DarkGray,ConsoleColor.White,ConsoleColor.DarkBlue,6,4);
+ AllElements.Add(OKButton);
+
+ HighlightedElement = OKButton;
+ OKButton.setHighlighted(true);
+
+ }
+
+ }
+}
diff --git a/BasicWindow.C/Igtampe.BasicWindow.csproj b/BasicWindow.C/Igtampe.BasicWindows.csproj
similarity index 76%
rename from BasicWindow.C/Igtampe.BasicWindow.csproj
rename to BasicWindow.C/Igtampe.BasicWindows.csproj
index a6036cb..4257512 100644
--- a/BasicWindow.C/Igtampe.BasicWindow.csproj
+++ b/BasicWindow.C/Igtampe.BasicWindows.csproj
@@ -7,8 +7,8 @@
{DE8C90F9-94C4-4264-805C-144F819F3197}
Library
Properties
- BasicWindow.C
- BasicWindow.C
+ Igtampe.BasicWindows
+ BasicWindows
v4.7.2
512
true
@@ -41,10 +41,21 @@
-
+
+
+
+
+
+
+
+
+
+ {41dbf856-b2e6-4a1c-a06a-a211186d2acd}
+ Igtampe.BasicGraphics
+
{cd2d4436-5b3e-458c-b17a-a6822c25635f}
Igtampe.BasicRender
diff --git a/BasicWindow.C/Window.cs b/BasicWindow.C/Window.cs
new file mode 100644
index 0000000..23d39ff
--- /dev/null
+++ b/BasicWindow.C/Window.cs
@@ -0,0 +1,182 @@
+using System;
+using System.Collections;
+using Igtampe.BasicRender;
+
+namespace Igtampe.BasicWindows
+{
+
+ public enum HeaderPosition { LEFT, CENTER, RIGHT }
+
+ public abstract class Window {
+
+ public const ConsoleColor WindowClearColor = ConsoleColor.DarkCyan;
+
+ private Boolean Animated;
+ private Boolean Shadowed;
+
+ protected int LeftPos;
+ protected int TopPos;
+ protected int Length;
+ protected int Height;
+
+ protected String Title;
+
+ protected ConsoleColor MainBG;
+ protected ConsoleColor HeaderBG;
+ protected ConsoleColor HeaderFG;
+ protected HeaderPosition HeadPos;
+
+ protected WindowElement HighlightedElement;
+
+ protected ArrayList AllElements;
+
+ /// Creates a window.
+ ///
+ ///
+ ///
+ ///
+ /// Left Position (Specify -1 for centered)
+ /// Top Position (Specify -1 for centered
+ public Window(Boolean Animated,Boolean Shadowed,ConsoleColor MainBG,ConsoleColor HeaderBG,ConsoleColor HeaderFG,HeaderPosition HeadPos,String Title,int Length,int Height,int LeftPos,int TopPos) {
+
+ this.Animated = Animated;
+ this.Shadowed = Shadowed;
+
+ this.MainBG = MainBG;
+ this.HeaderBG = HeaderBG;
+ this.HeaderFG = HeaderFG;
+ this.HeadPos = HeadPos;
+
+ this.Title = Title;
+ this.Length = Length;
+ this.Height = Height;
+
+ if(LeftPos == -1) { this.LeftPos = ((Console.WindowWidth) - Length) / 2; } else { this.LeftPos = LeftPos; }
+ if(TopPos == -1) { this.TopPos = ((Console.WindowHeight) - Height) / 2; } else { this.TopPos = TopPos; }
+
+ AllElements = new ArrayList();
+ }
+
+ public void Execute() {
+ DrawWindow(Animated);
+
+ //OnKeyPress returns true if we should continue execution.
+ while(onKeyPress(Console.ReadKey(true))) { }
+ }
+
+ private void DrawWindow(Boolean Animated) {
+
+ //Render the shadow
+ if(Shadowed) { Draw.Box(ConsoleColor.Black,Length,Height - 1,LeftPos + 2,TopPos + 2); }
+
+ //Do the animation
+ if(Animated) {
+ int SmallHeight = 1;
+
+ for(int SmallLength = 0; SmallLength < Length; SmallLength++) {
+ if(SmallHeight != Height) { SmallHeight++; }
+ Draw.Box(MainBG,SmallLength,SmallHeight,LeftPos,TopPos);
+ }
+ }
+
+ //draw the main box
+ Draw.Box(MainBG,Length,Height,LeftPos,TopPos);
+
+ //draw the header
+ Draw.Row(HeaderBG,Length,LeftPos,TopPos);
+
+ RenderUtils.SetPos(LeftPos,TopPos);
+
+ RenderUtils.Color(HeaderBG,HeaderFG);
+
+ //Draw the header text.
+ switch(HeadPos) {
+ case HeaderPosition.LEFT:
+ RenderUtils.Echo("═ " + Title + " ");
+ for(int i = 3 + Title.Length; i < Length; i++) { RenderUtils.Echo("═"); }
+ break;
+ case HeaderPosition.CENTER:
+ //calculate lengths of the two side bars.
+ int SidesLength = (Length - (Title.Length + 2)) / 2;
+
+ //Do the first side
+ for(int i = 0; i < SidesLength; i++) { RenderUtils.Echo("="); }
+
+ //Echo the title
+ RenderUtils.Echo(" " + Title + " ");
+
+ //Do the other side
+ for(int i = 0; i < SidesLength; i++) { RenderUtils.Echo("="); }
+
+ break;
+ case HeaderPosition.RIGHT:
+ for(int i = 0; i < Length - 3 + Title.Length; i++) { RenderUtils.Echo("═"); }
+ RenderUtils.Echo(" " + Title + " =");
+ break;
+ default:
+ break;
+ }
+
+ //Draw the footer
+ RenderUtils.Color(MainBG,HeaderFG);
+ RenderUtils.SetPos(LeftPos,TopPos + Height - 1);
+ for(int i = 0; i < Length; i++) { RenderUtils.Echo("═"); }
+
+ //Draw each subelement.
+ foreach(WindowElement element in AllElements) { element.DrawElement(LeftPos,TopPos); }
+ }
+
+ public bool onKeyPress(ConsoleKeyInfo PressedKey) {
+
+ if(PressedKey.Modifiers == ConsoleModifiers.Control && PressedKey.Key == ConsoleKey.W) { Close(); return false; }
+ switch(HighlightedElement.OnKeyPress(PressedKey)) {
+ case KeyPressReturn.NOTHING:
+ break;
+ case KeyPressReturn.NEXT_ELEMENT:
+ if(HighlightedElement.GetNextElement() != null) {
+ HighlightedElement.setHighlighted(false);
+ HighlightedElement = HighlightedElement.GetNextElement();
+ HighlightedElement.setHighlighted(true);
+ }
+ break;
+ case KeyPressReturn.PREV_ELEMENT:
+ if(HighlightedElement.GetPrevElement() != null) {
+ HighlightedElement.setHighlighted(false);
+ HighlightedElement = HighlightedElement.GetPrevElement();
+ HighlightedElement.setHighlighted(true);
+ }
+ break;
+ case KeyPressReturn.CLOSE:
+ Close(); return false;
+ default:
+ break;
+ }
+ return true;
+
+ }
+
+ /// Redraws the window without animations
+ public void Redraw() { DrawWindow(true); }
+
+ /// Closes the window
+ public void Close() {
+ //Do the animation
+ if(Animated) {
+ int SmallHeight = 1;
+
+ for(int SmallLength = 0; SmallLength < Length; SmallLength++) {
+ if(SmallHeight != Height) { SmallHeight++; }
+ Draw.Box(WindowClearColor,SmallLength,SmallHeight,LeftPos,TopPos);
+ }
+ }
+
+ //Delete the mainbox.
+ Draw.Box(WindowClearColor,Length,Height,LeftPos,TopPos);
+
+ //if shadowed, delete the main shadow
+ if(Shadowed) { Draw.Box(WindowClearColor,Length,Height - 1,LeftPos + 2,TopPos + 2); }
+
+ }
+ }
+
+}
diff --git a/BasicWindow.C/WindowElement.cs b/BasicWindow.C/WindowElement.cs
new file mode 100644
index 0000000..5ddaa32
--- /dev/null
+++ b/BasicWindow.C/WindowElement.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Igtampe.BasicWindows {
+ public enum KeyPressReturn { NOTHING, NEXT_ELEMENT, PREV_ELEMENT, CLOSE, PROCEED }
+
+ /// Generic WindowElement
+ public abstract class WindowElement {
+
+ protected WindowElement NextElement;
+ protected WindowElement PreviousElement;
+ protected Window Parent;
+
+ protected int LeftPos;
+ protected int TopPos;
+ protected Boolean Highlighted;
+
+ public WindowElement(Window Parent) { this.Parent = Parent; }
+
+ public WindowElement GetNextElement() { return NextElement; }
+ public WindowElement GetPrevElement() { return PreviousElement; }
+ public void SetNextElement(WindowElement NextElement) { this.NextElement = NextElement; }
+ public void SetPrevElement(WindowElement PrevElement) { this.PreviousElement = PrevElement; }
+
+ public virtual KeyPressReturn OnKeyPress(ConsoleKeyInfo Key) { return KeyPressReturn.NOTHING; }
+ public void setHighlighted(Boolean Highlighted) { this.Highlighted = Highlighted; }
+ public abstract void DrawElement(int WindowLeft,int WindowTop);
+
+ }
+}
diff --git a/BasicWindow.C/WindowElements/Box.cs b/BasicWindow.C/WindowElements/Box.cs
new file mode 100644
index 0000000..cf70adc
--- /dev/null
+++ b/BasicWindow.C/WindowElements/Box.cs
@@ -0,0 +1,24 @@
+using System;
+using Igtampe.BasicRender;
+
+namespace Igtampe.BasicWindows.WindowElements {
+ /// Image that holds a BasicRenderGraphic
+ public class Box:WindowElement {
+
+ private int Length;
+ private int Height;
+ private ConsoleColor Color;
+
+
+ public Box(Window Parent,ConsoleColor Color,int Length,int Height,int LeftPos,int TopPos) : base(Parent) {
+ this.Length = Length;
+ this.Color = Color;
+ this.Height = Height;
+ this.LeftPos = LeftPos;
+ this.TopPos = TopPos;
+ }
+
+ public override void DrawElement(int WindowLeft,int WindowTop) { Draw.Box(Color,Length,Height,WindowLeft + LeftPos,WindowTop + TopPos); }
+
+ }
+}
diff --git a/BasicWindow.C/WindowElements/Button.cs b/BasicWindow.C/WindowElements/Button.cs
new file mode 100644
index 0000000..272e977
--- /dev/null
+++ b/BasicWindow.C/WindowElements/Button.cs
@@ -0,0 +1,36 @@
+using System;
+using Igtampe.BasicRender;
+
+namespace Igtampe.BasicWindows.WindowElements {
+ /// Button, though it may as well be a clickable link.
+ public abstract class Button:WindowElement {
+ protected ConsoleColor HighlightedBG;
+ protected ConsoleColor BG;
+ protected ConsoleColor FG;
+ protected String Text;
+
+ public Button(Window Parent,String Text,ConsoleColor BG,ConsoleColor FG,ConsoleColor HighlightedBG,int LeftPos,int TopPos) : base(Parent) {
+ this.Text = Text;
+ this.BG = BG;
+ this.FG = FG;
+ this.HighlightedBG = HighlightedBG;
+ this.LeftPos = LeftPos;
+ this.TopPos = TopPos;
+ }
+
+ public override void DrawElement(int WindowLeft,int WindowTop) {
+ if(Highlighted) { Draw.Sprite(Text,HighlightedBG,FG,WindowLeft + LeftPos,WindowTop + TopPos); } else { Draw.Sprite(Text,BG,FG,WindowLeft + LeftPos,WindowTop + TopPos); }
+ }
+
+ public override KeyPressReturn OnKeyPress(ConsoleKeyInfo Key) { if(Key.Key == ConsoleKey.Enter) { return Action(); } else { return KeyPressReturn.NOTHING; } }
+ public abstract KeyPressReturn Action();
+ }
+
+ /// Button that signals the window to close when pressed.
+ public class CloseButton:Button {
+ public CloseButton(Window Parent,string Text,ConsoleColor BG,ConsoleColor FG,ConsoleColor HighlightedBG,int LeftPos,int TopPos) : base(Parent,Text,BG,FG,HighlightedBG,LeftPos,TopPos) { }
+ public override KeyPressReturn Action() { return KeyPressReturn.CLOSE; }
+ }
+
+
+}
diff --git a/BasicWindow.C/WindowElements/Icon.cs b/BasicWindow.C/WindowElements/Icon.cs
new file mode 100644
index 0000000..59e66e4
--- /dev/null
+++ b/BasicWindow.C/WindowElements/Icon.cs
@@ -0,0 +1,43 @@
+using System;
+using Igtampe.BasicRender;
+
+namespace Igtampe.BasicWindows.WindowElements {
+
+ /// Icon element for dialogboxes (Exclamation, Error, information, or question)
+ public class Icon:WindowElement {
+
+ public enum IconType { ERROR, EXCLAMATION, INFORMATION, QUESTION }
+
+ private readonly IconType Type;
+
+ public Icon(Window Parent,IconType Type,int LeftPos,int TopPos) : base(Parent) {
+ this.Type = Type;
+
+ this.LeftPos = LeftPos;
+ this.TopPos = TopPos;
+ }
+
+ public override void DrawElement(int WindowLeft,int WindowTop) {
+ switch(Type) {
+ case IconType.ERROR:
+ Draw.Box(ConsoleColor.Red,3,3,WindowLeft + LeftPos,WindowTop + TopPos);
+ Draw.Sprite("X",ConsoleColor.Red,ConsoleColor.White,WindowLeft + LeftPos + 1,WindowTop + TopPos + 1);
+ break;
+ case IconType.EXCLAMATION:
+ Draw.Box(ConsoleColor.Yellow,3,3,WindowLeft + LeftPos,WindowTop + TopPos);
+ Draw.Sprite("!",ConsoleColor.Yellow,ConsoleColor.Black,WindowLeft + LeftPos + 1,WindowTop + TopPos + 1);
+ break;
+ case IconType.INFORMATION:
+ Draw.Box(ConsoleColor.DarkBlue,3,3,WindowLeft + LeftPos,WindowTop + TopPos);
+ Draw.Sprite("i",ConsoleColor.DarkBlue,ConsoleColor.White,WindowLeft + LeftPos + 1,WindowTop + TopPos + 1);
+ break;
+ default:
+ Draw.Box(ConsoleColor.DarkBlue,3,3,WindowLeft + LeftPos,WindowTop + TopPos);
+ Draw.Sprite("?",ConsoleColor.DarkBlue,ConsoleColor.White,WindowLeft + LeftPos + 1,WindowTop + TopPos + 1);
+ break;
+ }
+
+ }
+ }
+}
+
diff --git a/BasicWindow.C/WindowElements/Image.cs b/BasicWindow.C/WindowElements/Image.cs
new file mode 100644
index 0000000..02f5e14
--- /dev/null
+++ b/BasicWindow.C/WindowElements/Image.cs
@@ -0,0 +1,19 @@
+using Igtampe.BasicGraphics;
+
+namespace Igtampe.BasicWindows.WindowElements {
+
+ /// Image that holds a BasicRenderGraphic
+ public class Image:WindowElement {
+
+ private readonly Graphic Graphic;
+
+ public Image(Window Parent, Graphic Graphic,int LeftPos,int TopPos) : base(Parent) {
+ this.Graphic = Graphic;
+ this.LeftPos = LeftPos;
+ this.TopPos = TopPos;
+ }
+
+ public override void DrawElement(int WindowLeft,int WindowTop) { Graphic.draw(WindowLeft + LeftPos,WindowTop + TopPos); }
+
+ }
+}
diff --git a/BasicWindow.C/WindowElements/Label.cs b/BasicWindow.C/WindowElements/Label.cs
new file mode 100644
index 0000000..fd0bcaa
--- /dev/null
+++ b/BasicWindow.C/WindowElements/Label.cs
@@ -0,0 +1,21 @@
+using System;
+using Igtampe.BasicRender;
+
+namespace Igtampe.BasicWindows.WindowElements {
+ /// Label that holds text
+ public class Label:WindowElement {
+ private String Text;
+ private ConsoleColor BG;
+ private ConsoleColor FG;
+
+ public Label(Window Parent,string Text,ConsoleColor BG,ConsoleColor FG,int LeftPos,int TopPos) : base(Parent) {
+ this.Text = Text;
+ this.BG = BG;
+ this.FG = FG;
+ this.LeftPos = LeftPos;
+ this.TopPos = TopPos;
+ }
+
+ public override void DrawElement(int WindowLeft,int WindowTop) { Draw.Sprite(Text,BG,FG,WindowLeft + LeftPos,WindowTop + TopPos); }
+ }
+}
diff --git a/BasicWindow.VBNET/BasicWindow.VBNET.vbproj b/BasicWindow.VBNET/BasicWindow.VBNET.vbproj
deleted file mode 100644
index 952c2eb..0000000
--- a/BasicWindow.VBNET/BasicWindow.VBNET.vbproj
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {3DC49CAE-54B1-4904-8413-EA25458DA816}
- Library
- BasicWindow.VBNET
- BasicWindow.VBNET
- 512
- Windows
- v4.7.2
- true
-
-
- true
- full
- true
- true
- bin\Debug\
- BasicWindow.VBNET.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- pdbonly
- false
- true
- true
- bin\Release\
- BasicWindow.VBNET.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- On
-
-
- Binary
-
-
- Off
-
-
- On
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- Application.myapp
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
-
-
- VbMyResourcesResXFileCodeGenerator
- Resources.Designer.vb
- My.Resources
- Designer
-
-
-
-
- MyApplicationCodeGenerator
- Application.Designer.vb
-
-
- SettingsSingleFileGenerator
- My
- Settings.Designer.vb
-
-
-
-
\ No newline at end of file
diff --git a/BasicWindow.VBNET/Class1.vb b/BasicWindow.VBNET/Class1.vb
deleted file mode 100644
index 875798b..0000000
--- a/BasicWindow.VBNET/Class1.vb
+++ /dev/null
@@ -1,3 +0,0 @@
-Public Class Class1
-
-End Class
diff --git a/BasicWindow.VBNET/My Project/Application.Designer.vb b/BasicWindow.VBNET/My Project/Application.Designer.vb
deleted file mode 100644
index 88dd01c..0000000
--- a/BasicWindow.VBNET/My Project/Application.Designer.vb
+++ /dev/null
@@ -1,13 +0,0 @@
-'------------------------------------------------------------------------------
-'
-' 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.
-'
-'------------------------------------------------------------------------------
-
-Option Strict On
-Option Explicit On
-
diff --git a/BasicWindow.VBNET/My Project/Application.myapp b/BasicWindow.VBNET/My Project/Application.myapp
deleted file mode 100644
index 758895d..0000000
--- a/BasicWindow.VBNET/My Project/Application.myapp
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- false
- false
- 0
- true
- 0
- 1
- true
-
diff --git a/BasicWindow.VBNET/My Project/AssemblyInfo.vb b/BasicWindow.VBNET/My Project/AssemblyInfo.vb
deleted file mode 100644
index a3fd789..0000000
--- a/BasicWindow.VBNET/My Project/AssemblyInfo.vb
+++ /dev/null
@@ -1,35 +0,0 @@
-Imports System
-Imports System.Reflection
-Imports System.Runtime.InteropServices
-
-' 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.
-
-' Review the values of the assembly attributes
-
-
-
-
-
-
-
-
-
-
-'The following GUID is for the ID of the typelib if this project is exposed to COM
-
-
-' 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:
-'
-
-
-
diff --git a/BasicWindow.VBNET/My Project/Resources.Designer.vb b/BasicWindow.VBNET/My Project/Resources.Designer.vb
deleted file mode 100644
index de52301..0000000
--- a/BasicWindow.VBNET/My Project/Resources.Designer.vb
+++ /dev/null
@@ -1,62 +0,0 @@
-'------------------------------------------------------------------------------
-'
-' 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.
-'
-'------------------------------------------------------------------------------
-
-Option Strict On
-Option Explicit On
-
-
-Namespace My.Resources
-
- '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.
- '''
- ''' A strongly-typed resource class, for looking up localized strings, etc.
- '''
- _
- Friend Module Resources
-
- Private resourceMan As Global.System.Resources.ResourceManager
-
- Private resourceCulture As Global.System.Globalization.CultureInfo
-
- '''
- ''' Returns the cached ResourceManager instance used by this class.
- '''
- _
- Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
- Get
- If Object.ReferenceEquals(resourceMan, Nothing) Then
- Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("BasicWindow.VBNET.Resources", GetType(Resources).Assembly)
- resourceMan = temp
- End If
- Return resourceMan
- End Get
- End Property
-
- '''
- ''' Overrides the current thread's CurrentUICulture property for all
- ''' resource lookups using this strongly typed resource class.
- '''
- _
- Friend Property Culture() As Global.System.Globalization.CultureInfo
- Get
- Return resourceCulture
- End Get
- Set(ByVal value As Global.System.Globalization.CultureInfo)
- resourceCulture = value
- End Set
- End Property
- End Module
-End Namespace
diff --git a/BasicWindow.VBNET/My Project/Settings.Designer.vb b/BasicWindow.VBNET/My Project/Settings.Designer.vb
deleted file mode 100644
index 084efa5..0000000
--- a/BasicWindow.VBNET/My Project/Settings.Designer.vb
+++ /dev/null
@@ -1,73 +0,0 @@
-'------------------------------------------------------------------------------
-'
-' 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.
-'
-'------------------------------------------------------------------------------
-
-Option Strict On
-Option Explicit On
-
-
-Namespace My
-
- _
- Partial Friend NotInheritable Class MySettings
- Inherits Global.System.Configuration.ApplicationSettingsBase
-
- Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
-
-#Region "My.Settings Auto-Save Functionality"
-#If _MyType = "WindowsForms" Then
- Private Shared addedHandler As Boolean
-
- Private Shared addedHandlerLockObject As New Object
-
- _
- Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
- If My.Application.SaveMySettingsOnExit Then
- My.Settings.Save()
- End If
- End Sub
-#End If
-#End Region
-
- Public Shared ReadOnly Property [Default]() As MySettings
- Get
-
-#If _MyType = "WindowsForms" Then
- If Not addedHandler Then
- SyncLock addedHandlerLockObject
- If Not addedHandler Then
- AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
- addedHandler = True
- End If
- End SyncLock
- End If
-#End If
- Return defaultInstance
- End Get
- End Property
- End Class
-End Namespace
-
-Namespace My
-
- _
- Friend Module MySettingsProperty
-
- _
- Friend ReadOnly Property Settings() As Global.BasicWindow.VBNET.My.MySettings
- Get
- Return Global.BasicWindow.VBNET.My.MySettings.Default
- End Get
- End Property
- End Module
-End Namespace
diff --git a/BasicWindow.VBNET/My Project/Settings.settings b/BasicWindow.VBNET/My Project/Settings.settings
deleted file mode 100644
index 85b890b..0000000
--- a/BasicWindow.VBNET/My Project/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-