Compare commits

..

14 Commits

Author SHA1 Message Date
6eb726c4db build: обновил версию пакета Lers.FW 2021-03-09 12:18:48 +10:00
lersbuild
5aed201278 После сборки обновления плагинов увеличена версия файлов 2020-10-09 11:44:32 +10:00
f26d9dbc13 Добавил настройки публикации модуля 2020-10-09 12:19:22 +10:00
b9b29019a6 Перевёл на SDK Style CSPROJ и взял ссылки на Lers.FW из NuGet 2020-08-28 16:25:19 +10:00
lersbuild
100de4315e После сборки обновления плагинов увеличена версия файлов 2020-07-29 14:07:04 +10:00
c817b4620a build: включил в сборку плагинов проект Lers.Http 2020-07-30 09:42:04 +10:00
lersbuild
e9e005042e После сборки обновления плагинов увеличена версия файлов 2020-05-26 08:41:57 +10:00
lersbuild
6f2f4ec773 После сборки обновления плагинов увеличена версия файлов 2020-02-28 11:06:49 +10:00
ba90e5f46e fix(Plugins): исправлена компиляция в версии 3.34 2020-02-28 11:11:34 +10:00
lersbuild
501b10d793 После сборки обновления плагинов увеличена версия файлов 2019-12-06 13:16:54 +10:00
898428367a fix: ошибка в случае если позиция курсора оказалась вне отображаемой строки
LERSU-8355
2019-11-27 10:44:40 +10:00
lersbuild
1d38d28f46 После сборки обновления плагинов увеличена версия файлов 2019-09-23 13:32:01 +10:00
lersbuild
14de2abd6c После сборки обновления плагинов увеличена версия файлов 2019-07-11 14:45:35 +10:00
lersbuild
d03bf94122 После сборки обновления плагинов увеличена версия файлов 2019-03-28 16:18:36 +10:00
9 changed files with 36 additions and 306 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
VKT5_RemoteConsole/.vs/
VKT5_RemoteConsole/obj/
/VKT5_RemoteConsole/bin/

View File

@ -11,7 +11,7 @@ using Lers.Plugins;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("ООО \"Хабаровский центр энергоресурсосбережения\" (www.lers.ru)")]
[assembly: AssemblyProduct("Система диспетчеризации ЛЭРС УЧЕТ")]
[assembly: AssemblyCopyright("© 2000-2019, ЛЭРС УЧЁТ")]
[assembly: AssemblyCopyright("© 2000-2020, ЛЭРС УЧЁТ")]
[assembly: AssemblyTrademark("Внимание: Данная компьютерная программа защищена законами об авторских правах и международными соглашениями. Незаконное воспроизведение или распространения данной программы или любой ее части влечет гражданскую и уголовную ответственность.")]
[assembly: AssemblyCulture("")]
@ -31,6 +31,6 @@ using Lers.Plugins;
// Т.к. мы можем забыть это сделать, то лучше чтобы версия увеличивалась сама. Звездочку можно задать только для версии сборки,
// для версии файла она не работает. Но если не указать версию файла, то она будет равна версии сборки.
[assembly: AssemblyVersion("3.29.48")]
[assembly: AssemblyVersion("3.37.50")]
//[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -19,7 +19,7 @@ namespace Vkt5_RemoteConsole.Properties {
// 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.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {

View File

@ -154,35 +154,27 @@ namespace Vkt5_RemoteConsole
/// <param name="request"></param>
/// <param name="responseLength"></param>
/// <param name="readHandler"></param>
private void SendRequest(byte[] request, int responseLength, VktDataReadEventHandler readHandler)
private async void SendRequest(byte[] request, int responseLength, VktDataReadEventHandler readHandler)
{
CommandSettings cmd = new CommandSettings("", 1000, responseLength, 10);
var cmd = new CommandSettings("", 1000, responseLength, 10);
this.handlers.AddLast(readHandler);
this.responseLength = responseLength;
this.remoteConsole.SendCommandAsync(request, cmd, 0, DataReadCallback, null);
}
private void DataReadCallback(Lers.AsyncOperation asyncOp)
{
try
{
// Завершаем операцию чтения данных
Lers.Networking.ExecuteRequestAsyncOperation execRequestAsyncOp
= (Lers.Networking.ExecuteRequestAsyncOperation)asyncOp;
execRequestAsyncOp.EndExecuteRequest();
await remoteConsole.SendCommandAsync(request, cmd, 0);
}
catch (Exception e)
{
// При ошибке отправки данных отключаемся от устройства
LogError("Ошибка чтения данных. " + e.Message);
}
}
private void remoteConsole_DeviceDataReceived(object sender, DeviceDataEventArgs args)
private async void remoteConsole_DeviceDataReceived(object sender, DeviceDataEventArgs args)
{
// Проверим, что консоль подключена к прибору
if (!this.remoteConsole.IsConnected)
@ -205,9 +197,9 @@ namespace Vkt5_RemoteConsole
// Отключаемся
try
{
this.remoteConsole.DisconnectAsync(null, null);
await remoteConsole.DisconnectAsync();
}
catch (Lers.PermissionDeniedException exc)
catch (LersException exc)
{
LogError("Ошибка отключения удалённого пульта. " + exc.Message);
}

View File

@ -337,10 +337,11 @@ namespace Vkt5_RemoteConsole
string showLine = this.displayLine;
if (this.displayCursor)
if (showLine.Length > 0 && cursorPos < showLine.Length && this.displayCursor)
{
showLine = showLine.Remove(this.cursorPos, 1);
showLine = showLine.Insert(this.cursorPos, cursorChar);
showLine = showLine
.Remove(this.cursorPos, 1)
.Insert(this.cursorPos, cursorChar);
}
this.txtLine1.Text = showLine.Substring(0, 16);
@ -379,4 +380,4 @@ namespace Vkt5_RemoteConsole
private bool isMenuBtnDown = false;
private DateTime menuBtnPressTime = DateTime.MinValue;
}
}
}

View File

@ -1,132 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{5622B98C-E274-4C99-BF9B-6FCC2E85EBD8}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Vkt5_RemoteConsole</RootNamespace>
<AssemblyName>Vkt5_RemoteConsole</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>C:\Program Files\LERS\Common\Plugins\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<Prefer32Bit>false</Prefer32Bit>
</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>
<UseVSHostingProcess>false</UseVSHostingProcess>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>
</ApplicationIcon>
<TargetFramework>net48</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>True</UseWindowsForms>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
</PropertyGroup>
<ItemGroup>
<Reference Include="Lers.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e7c6d6299713498c, processorArchitecture=MSIL" />
<Reference Include="Lers.Plugins.Attributes">
<Private>False</Private>
</Reference>
<Reference Include="Lers.Plugins">
<Private>False</Private>
</Reference>
<Reference Include="Lers.Serialization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e7c6d6299713498c, processorArchitecture=MSIL" />
<Reference Include="Lers.System">
<Private>False</Private>
</Reference>
<Reference Include="Lers.UI">
<Private>False</Private>
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<PackageReference Include="Lers.Plugins" Version="3.39.1" />
<PackageReference Include="System.Resources.Extensions" Version="4.6.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="Vkt5Console.cs" />
<Compile Include="Vkt5ConsoleControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Vkt5ConsoleControl.Designer.cs">
<DependentUpon>Vkt5ConsoleControl.cs</DependentUpon>
</Compile>
<Compile Include="Vkt5RemoteConsoleForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Plugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Vkt5ConsoleControl.resx">
<DependentUpon>Vkt5ConsoleControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="Resources\vkt5_icon.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\back.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\up.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\enter.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\left.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\down.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\right.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\menu.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\tab.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\PluginImage.png" />
</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>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
<ItemGroup>
<Compile Update="Vkt5ConsoleControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Update="Vkt5RemoteConsoleForm.cs">
<SubType>Form</SubType>
</Compile>
</ItemGroup>
</Project>

View File

@ -1,134 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{5622B98C-E274-4C99-BF9B-6FCC2E85EBD8}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Vkt5_RemoteConsole</RootNamespace>
<AssemblyName>Vkt5_RemoteConsole</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>C:\Program Files\LERS\Common\Plugins\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
</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>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>
</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Lers.Plugins, Version=3.0.0.0, Culture=neutral, PublicKeyToken=e7c6d6299713498c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Framework\Lers.Plugins\bin\Debug\Lers.Plugins.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Lers.Plugins.Attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e7c6d6299713498c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Framework\Lers.Plugins.Attributes\bin\Debug\Lers.Plugins.Attributes.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Lers.System, Version=3.0.0.0, Culture=neutral, PublicKeyToken=e7c6d6299713498c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Framework\Lers.System\bin\Debug\Lers.System.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Lers.UI, Version=3.0.0.0, Culture=neutral, PublicKeyToken=e7c6d6299713498c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Framework\Lers.UI\bin\Debug\Lers.UI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Vkt5Console.cs" />
<Compile Include="Vkt5ConsoleControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Vkt5ConsoleControl.Designer.cs">
<DependentUpon>Vkt5ConsoleControl.cs</DependentUpon>
</Compile>
<Compile Include="Vkt5RemoteConsoleForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Plugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Vkt5ConsoleControl.resx">
<DependentUpon>Vkt5ConsoleControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="Resources\vkt5_icon.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\back.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\up.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\enter.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\left.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\down.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\right.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\menu.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\tab.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\PluginImage.png" />
</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>

View File

@ -1,22 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vkt5_RemoteConsole_debug", "Vkt5_RemoteConsole_debug.csproj", "{5622B98C-E274-4C99-BF9B-6FCC2E85EBD8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5622B98C-E274-4C99-BF9B-6FCC2E85EBD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5622B98C-E274-4C99-BF9B-6FCC2E85EBD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5622B98C-E274-4C99-BF9B-6FCC2E85EBD8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5622B98C-E274-4C99-BF9B-6FCC2E85EBD8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal