-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9760a3d
commit bc3e1d7
Showing
54 changed files
with
3,600 additions
and
611 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> | ||
</startup> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using KCore; | ||
using KCore.Graphics; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
namespace Editor | ||
{ | ||
public class ConsoleControl : Form | ||
{ | ||
private object sync = new object(); | ||
public static ConsoleRequestPack ConsoleThreadRequest; | ||
public static ConsoleRequestPack MainFormThreadRequest; | ||
public static bool RequestSended; | ||
|
||
public ConsoleControl() : base() | ||
{ | ||
AllowedDashboard = false; | ||
Bind(new DelegateRequest(this, form => true, form => | ||
{ | ||
Program.GetWindowRect(Program.ConsoleHandler, ref Program.ConsoleRect); | ||
Program.MainForm.MoveRequest = true; | ||
})); | ||
Bind(new DelegateRequest(this, form => RequestSended, form => | ||
{ | ||
lock (sync) ConsoleThreadRequest = MainFormThreadRequest; | ||
RequestSended = false; | ||
})); | ||
Bind(new DelegateRequest(this, form => | ||
{ | ||
lock (sync) return ConsoleThreadRequest != null; | ||
}, form => | ||
{ | ||
lock (sync) | ||
{ | ||
ConsoleThreadRequest.Invoke(); | ||
ConsoleThreadRequest = null; | ||
} | ||
})); | ||
} | ||
|
||
protected override void OnOpening() | ||
{ | ||
while (Program.MainForm == null) | ||
Thread.Sleep(100); | ||
} | ||
|
||
protected override void OnKeyDown(byte key) | ||
{ | ||
if (key == 1) | ||
if (Program.MainForm != null) | ||
Program.MainForm.ClickRequest = true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using KCore.Graphics.Widgets; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Editor | ||
{ | ||
public abstract class ConsoleRequestPack | ||
{ | ||
public abstract void Invoke(); | ||
public void Send() | ||
{ | ||
ConsoleControl.MainFormThreadRequest = this; | ||
ConsoleControl.RequestSended = true; | ||
} | ||
} | ||
|
||
public class SimpleRequest : ConsoleRequestPack | ||
{ | ||
public SimpleRequest(Action action) => Action = action; | ||
public Action Action { get; set; } | ||
public override void Invoke() | ||
{ | ||
Action.Invoke(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{7450C379-DD7C-410E-A122-A96EF8082F37}</ProjectGuid> | ||
<OutputType>Exe</OutputType> | ||
<RootNamespace>Editor</RootNamespace> | ||
<AssemblyName>Editor</AssemblyName> | ||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
<Deterministic>true</Deterministic> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>..\bin\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>..\bin\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<StartupObject /> | ||
</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.Deployment" /> | ||
<Reference Include="System.Drawing" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Windows.Forms" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="ConsoleControl.cs" /> | ||
<Compile Include="ConsoleRequestPack.cs" /> | ||
<Compile Include="MainForm.cs"> | ||
<SubType>Form</SubType> | ||
</Compile> | ||
<Compile Include="MainForm.Designer.cs"> | ||
<DependentUpon>MainForm.cs</DependentUpon> | ||
</Compile> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<EmbeddedResource Include="MainForm.resx"> | ||
<DependentUpon>MainForm.cs</DependentUpon> | ||
</EmbeddedResource> | ||
<EmbeddedResource Include="Properties\Resources.resx"> | ||
<Generator>ResXFileCodeGenerator</Generator> | ||
<LastGenOutput>Resources.Designer.cs</LastGenOutput> | ||
<SubType>Designer</SubType> | ||
</EmbeddedResource> | ||
<Compile Include="Properties\Resources.Designer.cs"> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>Resources.resx</DependentUpon> | ||
</Compile> | ||
<None Include="Properties\Settings.settings"> | ||
<Generator>SettingsSingleFileGenerator</Generator> | ||
<LastGenOutput>Settings.Designer.cs</LastGenOutput> | ||
</None> | ||
<Compile Include="Properties\Settings.Designer.cs"> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>Settings.settings</DependentUpon> | ||
<DesignTimeSharedInput>True</DesignTimeSharedInput> | ||
</Compile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="App.config" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\KCore\KCore.csproj"> | ||
<Project>{FE2FBEFB-28CC-4928-B11B-D22BD7DFE137}</Project> | ||
<Name>KCore</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<PropertyGroup> | ||
<PreBuildEvent>../building/IncEditorRevision.bat</PreBuildEvent> | ||
</PropertyGroup> | ||
</Project> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.