1
0
mirror of https://github.com/SergeyMironchuk/1CAddin.git synced 2024-11-21 10:45:51 +02:00

Пример файлов реализации

This commit is contained in:
Sergey Mironchuk 2016-09-20 17:52:35 +03:00
parent 22e8ee816d
commit 57d474fd72
3 changed files with 31 additions and 0 deletions

View File

@ -59,6 +59,8 @@
</ItemGroup>
<ItemGroup>
<Compile Include="AddIn.cs" />
<Compile Include="Component.cs" />
<Compile Include="IComponent.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RussianNameAttribute.cs" />
</ItemGroup>

16
Component.cs Normal file
View File

@ -0,0 +1,16 @@
using System;
using System.Runtime.InteropServices;
namespace System1C.AddIn
{
/// <summary>Класс, реализующий пользовательские методы компоненты</summary>
[ProgId("AddIn.1C_Component")]
[ClassInterface(ClassInterfaceType.None)]
public class Component : AddIn, IComponent
{
public int Procedure(int parameter)
{
throw new NotImplementedException();
}
}
}

13
IComponent.cs Normal file
View File

@ -0,0 +1,13 @@
using System.Runtime.InteropServices;
namespace System1C.AddIn
{
/// <summary>Èíòåðôåéñ ñ îáúÿâëåíèÿìè ïîëüçîâàòåëüñêèõ ìåòîäîâ è ñâîéñòâ êîìïîíåíòû</summary>
///
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IComponent
{
[RussianName("ÌåòîäÍàÐóññêîìßçûêå")]
int Procedure(int parameter);
}
}