Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions Source/ConsoleDraw.sln
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
# Visual Studio 15
VisualStudioVersion = 15.0.26730.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleDraw", "ConsoleDraw\ConsoleDraw.csproj", "{5978DE85-3FB9-4BAB-965F-95E4398309A2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InlineTestApp", "InlineTestApp\InlineTestApp.csproj", "{06F8AAFC-0F1A-444F-B83C-A09600C22D14}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApp", "TestApp\TestApp.csproj", "{09CC30E4-7830-4CF4-A15E-0DB02BB84F17}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestAppCore", "TestAppCore\TestAppCore.csproj", "{34A44C85-C59E-414F-AA59-76C6A1F4B851}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleDraw", "ConsoleDraw\ConsoleDraw.csproj", "{6BDA9A64-00C4-49DA-A92A-BDDB7CF081AA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5978DE85-3FB9-4BAB-965F-95E4398309A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5978DE85-3FB9-4BAB-965F-95E4398309A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5978DE85-3FB9-4BAB-965F-95E4398309A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5978DE85-3FB9-4BAB-965F-95E4398309A2}.Release|Any CPU.Build.0 = Release|Any CPU
{06F8AAFC-0F1A-444F-B83C-A09600C22D14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{06F8AAFC-0F1A-444F-B83C-A09600C22D14}.Debug|Any CPU.Build.0 = Debug|Any CPU
{06F8AAFC-0F1A-444F-B83C-A09600C22D14}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -27,8 +25,19 @@ Global
{09CC30E4-7830-4CF4-A15E-0DB02BB84F17}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09CC30E4-7830-4CF4-A15E-0DB02BB84F17}.Release|Any CPU.ActiveCfg = Release|Any CPU
{09CC30E4-7830-4CF4-A15E-0DB02BB84F17}.Release|Any CPU.Build.0 = Release|Any CPU
{34A44C85-C59E-414F-AA59-76C6A1F4B851}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{34A44C85-C59E-414F-AA59-76C6A1F4B851}.Debug|Any CPU.Build.0 = Debug|Any CPU
{34A44C85-C59E-414F-AA59-76C6A1F4B851}.Release|Any CPU.ActiveCfg = Release|Any CPU
{34A44C85-C59E-414F-AA59-76C6A1F4B851}.Release|Any CPU.Build.0 = Release|Any CPU
{6BDA9A64-00C4-49DA-A92A-BDDB7CF081AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6BDA9A64-00C4-49DA-A92A-BDDB7CF081AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6BDA9A64-00C4-49DA-A92A-BDDB7CF081AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6BDA9A64-00C4-49DA-A92A-BDDB7CF081AA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A2CC9091-31F8-47D8-999A-E002E00AA7A6}
EndGlobalSection
EndGlobal
87 changes: 11 additions & 76 deletions Source/ConsoleDraw/ConsoleDraw.csproj
Original file line number Diff line number Diff line change
@@ -1,80 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{5978DE85-3FB9-4BAB-965F-95E4398309A2}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ConsoleDraw</RootNamespace>
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<AssemblyName>ConsoleDraw</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RootNamespace>ConsoleDraw</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Cursor.cs" />
<Compile Include="DialogResult.cs" />
<Compile Include="Inputs\Base\IInput.cs" />
<Compile Include="Inputs\Base\Input.cs" />
<Compile Include="Inputs\ProgressBar.cs" />
<Compile Include="Inputs\RadioButton.cs" />
<Compile Include="Inputs\CheckBox.cs" />
<Compile Include="Inputs\Button.cs" />
<Compile Include="Inputs\Dropdown\Dropdown.cs" />
<Compile Include="Inputs\Dropdown\DropdownItem.cs" />
<Compile Include="Inputs\Dropdown\DropdownSpread.cs" />
<Compile Include="Inputs\FileBrowser.cs" />
<Compile Include="Inputs\Label.cs" />
<Compile Include="Inputs\Menu\Menu.cs" />
<Compile Include="Inputs\Menu\MenuDropdown.cs" />
<Compile Include="Inputs\Menu\MenuItem.cs" />
<Compile Include="Inputs\TextArea.cs" />
<Compile Include="Inputs\TextBox.cs" />
<Compile Include="ProgramInfo.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="WindowManager.cs" />
<Compile Include="Windows\Alert.cs" />
<Compile Include="Windows\Base\FullWindow.cs" />
<Compile Include="Windows\Base\IWindow.cs" />
<Compile Include="Windows\Base\PopupWindow.cs" />
<Compile Include="Windows\Base\Window.cs" />
<Compile Include="Windows\Confirm.cs" />
<Compile Include="Windows\LoadMenu.cs" />
<Compile Include="Windows\SaveMenu.cs" />

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Threading.Timer">
<Version>4.3.0</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

</Project>
8 changes: 3 additions & 5 deletions Source/ConsoleDraw/Cursor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Timers;

namespace ConsoleDraw
{
Expand All @@ -26,9 +26,7 @@ public void PlaceCursor(int x, int y, char letter, ConsoleColor background = Con
_background = background;
WindowManager.WirteText("_", x, y, ConsoleColor.White, background);

blink = new Timer(500);
blink.Elapsed += new ElapsedEventHandler(BlinkCursor);
blink.Enabled = true;
blink = new Timer(BlinkCursor, null, 500, 500);
}

public void RemoveCursor()
Expand All @@ -43,7 +41,7 @@ public void RemoveCursor()

}

void BlinkCursor(object sender, ElapsedEventArgs e)
void BlinkCursor(object state)
{
if (_cursorShow)
{
Expand Down
8 changes: 4 additions & 4 deletions Source/ConsoleDraw/Inputs/Button.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ namespace ConsoleDraw.Inputs
{
public class Button : Input
{
private String Text;
public String Text;
public ConsoleColor BackgroundColour = ConsoleColor.Gray;
private ConsoleColor TextColour = ConsoleColor.Black;
public ConsoleColor TextColour = ConsoleColor.Black;

private ConsoleColor SelectedBackgroundColour = ConsoleColor.DarkGray;
private ConsoleColor SelectedTextColour = ConsoleColor.White;
public ConsoleColor SelectedBackgroundColour = ConsoleColor.DarkGray;
public ConsoleColor SelectedTextColour = ConsoleColor.White;

private bool Selected = false;

Expand Down
6 changes: 3 additions & 3 deletions Source/ConsoleDraw/Inputs/CheckBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ namespace ConsoleDraw.Inputs
public class CheckBox : Input
{
public ConsoleColor BackgroundColour = ConsoleColor.Gray;
private ConsoleColor TextColour = ConsoleColor.Black;
public ConsoleColor TextColour = ConsoleColor.Black;

private ConsoleColor SelectedBackgroundColour = ConsoleColor.DarkGray;
private ConsoleColor SelectedTextColour = ConsoleColor.White;
public ConsoleColor SelectedBackgroundColour = ConsoleColor.DarkGray;
public ConsoleColor SelectedTextColour = ConsoleColor.White;

private bool Selected = false;
public bool Checked = false;
Expand Down
8 changes: 4 additions & 4 deletions Source/ConsoleDraw/Inputs/Dropdown/Dropdown.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ namespace ConsoleDraw.Inputs
{
public class Dropdown : Input
{
private ConsoleColor TextColour = ConsoleColor.Black;
private ConsoleColor BackgroudColour = ConsoleColor.Gray;
private ConsoleColor SelectedTextColour = ConsoleColor.White;
private ConsoleColor SelectedBackgroundColour = ConsoleColor.DarkGray;
public ConsoleColor TextColour = ConsoleColor.Black;
public ConsoleColor BackgroudColour = ConsoleColor.Gray;
public ConsoleColor SelectedTextColour = ConsoleColor.White;
public ConsoleColor SelectedBackgroundColour = ConsoleColor.DarkGray;

private bool Selected = false;
public List<DropdownItem> DropdownItems = new List<DropdownItem>();
Expand Down
8 changes: 4 additions & 4 deletions Source/ConsoleDraw/Inputs/Dropdown/DropdownItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ namespace ConsoleDraw.Inputs
public class DropdownItem : Input
{
public String Text = "";
private ConsoleColor TextColour = ConsoleColor.White;
private ConsoleColor BackgroudColour = ConsoleColor.DarkGray;
private ConsoleColor SelectedTextColour = ConsoleColor.Black;
private ConsoleColor SelectedBackgroundColour = ConsoleColor.Gray;
public ConsoleColor TextColour = ConsoleColor.White;
public ConsoleColor BackgroudColour = ConsoleColor.DarkGray;
public ConsoleColor SelectedTextColour = ConsoleColor.Black;
public ConsoleColor SelectedBackgroundColour = ConsoleColor.Gray;

private bool Selected = false;
public Action Action;
Expand Down
10 changes: 5 additions & 5 deletions Source/ConsoleDraw/Inputs/FileBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ public class FileBrowser : Input
public bool IncludeFiles;
public String FilterByExtension = "*";

private ConsoleColor BackgroundColour = ConsoleColor.DarkGray;
private ConsoleColor TextColour = ConsoleColor.Black;
private ConsoleColor SelectedTextColour = ConsoleColor.White;
private ConsoleColor SelectedBackgroundColour = ConsoleColor.Gray;
public ConsoleColor BackgroundColour = ConsoleColor.DarkGray;
public ConsoleColor TextColour = ConsoleColor.Black;
public ConsoleColor SelectedTextColour = ConsoleColor.White;
public ConsoleColor SelectedBackgroundColour = ConsoleColor.Gray;

private int cursorX;
private int CursorX { get { return cursorX; } set { cursorX = value; GetCurrentlySelectedFileName(); SetOffset(); } }
Expand All @@ -43,7 +43,7 @@ public FileBrowser(int x, int y, int width, int height, String path, String iD,
CurrentlySelectedFile = "";
IncludeFiles = includeFiles;
FilterByExtension = filterByExtension;
Drives = Directory.GetLogicalDrives().ToList();
Drives = DriveInfo.GetDrives().Select(d => d.Name).ToList();

GetFileNames();
Selectable = true;
Expand Down
2 changes: 1 addition & 1 deletion Source/ConsoleDraw/Inputs/Label.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace ConsoleDraw.Inputs
public class Label : Input
{
private String Text = "";
private ConsoleColor TextColour = ConsoleColor.Black;
public ConsoleColor TextColour = ConsoleColor.Black;
public ConsoleColor BackgroundColour = ConsoleColor.Gray;

public Label(String text, int x, int y, String iD, Window parentWindow) : base(x, y, 1, text.Count(), parentWindow, iD)
Expand Down
10 changes: 5 additions & 5 deletions Source/ConsoleDraw/Inputs/Menu/Menu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ namespace ConsoleDraw.Inputs
{
public class Menu : Input
{
private String Text = "";
private ConsoleColor TextColour = ConsoleColor.Black;
private ConsoleColor BackgroudColour = ConsoleColor.Gray;
private ConsoleColor SelectedTextColour = ConsoleColor.White;
private ConsoleColor SelectedBackgroundColour = ConsoleColor.DarkGray;
public String Text = "";
public ConsoleColor TextColour = ConsoleColor.Black;
public ConsoleColor BackgroudColour = ConsoleColor.Gray;
public ConsoleColor SelectedTextColour = ConsoleColor.White;
public ConsoleColor SelectedBackgroundColour = ConsoleColor.DarkGray;

private bool Selected = false;
public List<MenuItem> MenuItems = new List<MenuItem>();
Expand Down
8 changes: 4 additions & 4 deletions Source/ConsoleDraw/Inputs/Menu/MenuItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ namespace ConsoleDraw.Inputs
public class MenuItem : Input
{
private String Text = "";
private ConsoleColor TextColour = ConsoleColor.White;
private ConsoleColor BackgroudColour = ConsoleColor.DarkGray;
private ConsoleColor SelectedTextColour = ConsoleColor.Black;
private ConsoleColor SelectedBackgroundColour = ConsoleColor.Gray;
public ConsoleColor TextColour = ConsoleColor.White;
public ConsoleColor BackgroudColour = ConsoleColor.DarkGray;
public ConsoleColor SelectedTextColour = ConsoleColor.Black;
public ConsoleColor SelectedBackgroundColour = ConsoleColor.Gray;

private bool Selected = false;
public Action Action;
Expand Down
1 change: 1 addition & 0 deletions Source/ConsoleDraw/Inputs/ProgressBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public override void Draw()


WindowManager.WirteText("".PadRight(widthCompleted, '█'), Xpostion, Ypostion, BarColour, BackgroundColour);

WindowManager.WirteText("".PadRight(widthUncompleted, '▒'), Xpostion, Ypostion + widthCompleted, BarColour, BackgroundColour);
}

Expand Down
6 changes: 3 additions & 3 deletions Source/ConsoleDraw/Inputs/RadioButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ namespace ConsoleDraw.Inputs
public class RadioButton : Input
{
public ConsoleColor BackgroundColour = ConsoleColor.Gray;
private ConsoleColor TextColour = ConsoleColor.Black;
public ConsoleColor TextColour = ConsoleColor.Black;

private ConsoleColor SelectedBackgroundColour = ConsoleColor.DarkGray;
private ConsoleColor SelectedTextColour = ConsoleColor.White;
public ConsoleColor SelectedBackgroundColour = ConsoleColor.DarkGray;
public ConsoleColor SelectedTextColour = ConsoleColor.White;

private bool Selected = false;
public bool Checked = false;
Expand Down
2 changes: 1 addition & 1 deletion Source/ConsoleDraw/Inputs/TextArea.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private String Text {
}
private String TextWithoutNewLine { get { return RemoveNewLine(Text); } }

private ConsoleColor TextColour = ConsoleColor.White;
public ConsoleColor TextColour = ConsoleColor.White;
public ConsoleColor BackgroundColour = ConsoleColor.Blue;

private Cursor cursor = new Cursor();
Expand Down
4 changes: 2 additions & 2 deletions Source/ConsoleDraw/Inputs/TextBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public class TextBox : Input
private int Offset = 0;
private String Text = "";

private ConsoleColor TextColour = ConsoleColor.White;
private ConsoleColor BackgroundColour = ConsoleColor.DarkGray;
public ConsoleColor TextColour = ConsoleColor.White;
public ConsoleColor BackgroundColour = ConsoleColor.DarkGray;

private Cursor cursor = new Cursor();

Expand Down
36 changes: 0 additions & 36 deletions Source/ConsoleDraw/Properties/AssemblyInfo.cs

This file was deleted.

Loading