14 changed files with 200 additions and 53 deletions
@ -0,0 +1,9 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>net6.0</TargetFramework> |
|||
<ImplicitUsings>enable</ImplicitUsings> |
|||
<Nullable>enable</Nullable> |
|||
</PropertyGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,22 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace ConsoleDisplay.Driver |
|||
{ |
|||
|
|||
public interface IDisplay |
|||
{ |
|||
int Width { get; } |
|||
int Height { get; } |
|||
|
|||
bool IsEnabled { get; } |
|||
void Reset(); |
|||
void Set(int iX, int iY, bool bState); |
|||
|
|||
bool Get(int iX, int iY); |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,20 @@ |
|||
namespace ConsoleDisplay.Driver.Virtual |
|||
{ |
|||
internal class VirtualBulb |
|||
{ |
|||
public VirtualBulb( |
|||
int x, |
|||
int y, |
|||
bool isEnabled = false) |
|||
{ |
|||
X = x; |
|||
Y = y; |
|||
IsEnabled = isEnabled; |
|||
} |
|||
|
|||
public int X { get; set; } |
|||
public int Y { get; set; } |
|||
public bool IsEnabled { get; set; } |
|||
|
|||
} |
|||
} |
|||
@ -1,14 +1,13 @@ |
|||
|
|||
namespace ConsoleDisplay.ExternalDomain |
|||
namespace ConsoleDisplay.Driver.Virtual |
|||
{ |
|||
internal class VirtualDisplay : IDisplay |
|||
public class VirtualDisplay : IDisplay |
|||
{ |
|||
private List<VirtualBulb> BulbList; |
|||
|
|||
public VirtualDisplay(int iWidth, int iHeight) |
|||
{ |
|||
this.Width = iWidth; |
|||
this.Height = iHeight; |
|||
Width = iWidth; |
|||
Height = iHeight; |
|||
|
|||
BulbList = new List<VirtualBulb>(); |
|||
h_Init(iWidth, iHeight); |
|||
@ -1,22 +0,0 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace ConsoleDisplay.ExternalDomain |
|||
{ |
|||
|
|||
internal interface IDisplay |
|||
{ |
|||
int Width { get; } |
|||
int Height { get; } |
|||
|
|||
bool IsEnabled { get; } |
|||
void Reset(); |
|||
void Set(int iX, int iY, bool bState); |
|||
|
|||
bool Get(int iX, int iY); |
|||
|
|||
} |
|||
} |
|||
@ -1,21 +0,0 @@ |
|||
|
|||
namespace ConsoleDisplay.ExternalDomain |
|||
{ |
|||
internal class VirtualBulb |
|||
{ |
|||
public VirtualBulb( |
|||
int x, |
|||
int y, |
|||
bool isEnabled = false) |
|||
{ |
|||
X = x; |
|||
Y = y; |
|||
IsEnabled = isEnabled; |
|||
} |
|||
|
|||
public int X { get; set; } |
|||
public int Y { get; set; } |
|||
public bool IsEnabled { get; set; } |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace ConsoleDisplay.Model |
|||
{ |
|||
internal class CSmartLetterPoint |
|||
{ |
|||
internal int X; |
|||
internal int Y; |
|||
} |
|||
|
|||
internal class CSmartLetter |
|||
{ |
|||
private List<CSmartLetterPoint> Points = new List<CSmartLetterPoint>(); |
|||
} |
|||
} |
|||
@ -0,0 +1,68 @@ |
|||
|
|||
#region Using
|
|||
|
|||
using System; |
|||
|
|||
#endregion
|
|||
|
|||
namespace ConsoleDisplay.Model |
|||
{ |
|||
#region Class CSmartAlphabet
|
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// Шрифт
|
|||
/// </summary>
|
|||
internal class CSmartAlphabet |
|||
{ |
|||
// TODO: загрузка алфавита
|
|||
string s1 = @"
|
|||
.......0....... |
|||
.......0....... |
|||
......00....... |
|||
.....0.0....... |
|||
.......0....... |
|||
.......0....... |
|||
.......0....... |
|||
.......0....... |
|||
";
|
|||
|
|||
string s2 = @"
|
|||
....00000...... |
|||
...0....0...... |
|||
..........0.... |
|||
.........0..... |
|||
.......00...... |
|||
.....000....... |
|||
....0.......... |
|||
...0000000..... |
|||
";
|
|||
|
|||
|
|||
#region Variables
|
|||
|
|||
#endregion
|
|||
|
|||
#region constructor
|
|||
|
|||
#endregion
|
|||
|
|||
#region Properties
|
|||
|
|||
#endregion
|
|||
|
|||
#region Public methods
|
|||
|
|||
#endregion
|
|||
|
|||
#region Help methods
|
|||
|
|||
#endregion
|
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<OutputType>Exe</OutputType> |
|||
<TargetFramework>net6.0</TargetFramework> |
|||
<ImplicitUsings>enable</ImplicitUsings> |
|||
<Nullable>enable</Nullable> |
|||
</PropertyGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,10 @@ |
|||
namespace Display.Driver |
|||
{ |
|||
internal class Program |
|||
{ |
|||
static void Main(string[] args) |
|||
{ |
|||
Console.WriteLine("Hello, World!"); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue