Compare commits
3 Commits
f448cccbeb
...
3996b2175a
Author | SHA1 | Date | |
---|---|---|---|
3996b2175a | |||
52f128c8b7 | |||
a8c192848d |
@ -55,15 +55,9 @@ public sealed class RhSolutionsAddIn : IExcelAddIn
|
||||
|
||||
EventsUtil.Initialize();
|
||||
|
||||
bool isTesting = Environment.GetEnvironmentVariable("ISTESTING") switch
|
||||
if (Environment.GetEnvironmentVariable("ISTESTING") == "false")
|
||||
{
|
||||
"true" => true,
|
||||
"false" => false,
|
||||
_ => false
|
||||
};
|
||||
if (!isTesting)
|
||||
{
|
||||
//IntelliSenseServer.Install();
|
||||
IntelliSenseServer.Install();
|
||||
}
|
||||
|
||||
ServicePointManager.SecurityProtocol =
|
||||
@ -74,15 +68,9 @@ public sealed class RhSolutionsAddIn : IExcelAddIn
|
||||
{
|
||||
EventsUtil.Uninitialize();
|
||||
|
||||
bool isTesting = Environment.GetEnvironmentVariable("ISTESTING") switch
|
||||
if (Environment.GetEnvironmentVariable("ISTESTING") == "false")
|
||||
{
|
||||
"true" => true,
|
||||
"false" => false,
|
||||
_ => false
|
||||
};
|
||||
if (!isTesting)
|
||||
{
|
||||
//IntelliSenseServer.Uninstall();
|
||||
IntelliSenseServer.Uninstall();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,21 +20,21 @@ public class RibbonController : ExcelRibbon
|
||||
public override string GetCustomUI(string RibbonID)
|
||||
{
|
||||
return @"
|
||||
<customUI onLoad='RibbonLoad' xmlns='http://schemas.microsoft.com/office/2006/01/customui'>
|
||||
<customUI onLoad='RibbonLoad' xmlns='http://schemas.microsoft.com/office/2006/01/customui' loadImage='LoadImage'>
|
||||
<ribbon>
|
||||
<tabs>
|
||||
<tab id='rau' label='RhSolutions'>
|
||||
<group id='priceList' label='Прайс-лист'>
|
||||
<button id='export' getEnabled='GetExportEnabled' label='Экспорт в новый файл' size='normal' imageMso='PivotExportToExcel' onAction='OnToolPressed'/>
|
||||
<button id='export' getEnabled='GetExportEnabled' label='Экспорт в новый файл' size='normal' image='RhSolutions' onAction='OnToolPressed'/>
|
||||
<button id='convert' getEnabled='GetConvertEnabled' label='Актуализировать' size='normal' imageMso='FileUpdate' onAction='OnToolPressed'/>
|
||||
<button id='merge' label='Объединить' size='normal' imageMso='Copy' onAction='OnToolPressed'/>
|
||||
<button id='guess' getEnabled='GetGuessEnabled' label='Найти и экспортировать' size='normal' imageMso='ControlWizards' onAction='OnToolPressed'/>
|
||||
<button id='fillsleeves' getEnabled='GetFittingsCalcEnabled' label='Подобрать гильзы' size='normal' imageMso='CreateQueryFromWizard' onAction='OnToolPressed'/>
|
||||
<button id='fillcouplings' getEnabled='GetFittingsCalcEnabled' label='Подобрать муфты' size='normal' imageMso='CreateQueryFromWizard' onAction='OnToolPressed'/>
|
||||
<button id='dxfexport' getEnabled='GetDxfEnabled' label='Экспортировать в DXF' size='normal' imageMso='ExportExcel' onAction='OnToolPressed'/>
|
||||
<button id='dxfexport' getEnabled='GetDxfEnabled' label='Экспортировать в DXF' size='normal' image='DXF' onAction='OnToolPressed'/>
|
||||
</group>
|
||||
<group id='rausettings' getLabel='GetVersionLabel'>
|
||||
<button id='setPriceList' getLabel='GetPriceListPathLabel' size='large' imageMso='TableExcelSpreadsheetInsert' onAction='OnSetPricePressed'/>
|
||||
<button id='setPriceList' getLabel='GetPriceListPathLabel' size='large' image='RhSolutions' onAction='OnSetPricePressed'/>
|
||||
</group>
|
||||
</tab>
|
||||
</tabs>
|
||||
|
BIN
RhSolutions.AddIn/Images/DXF.png
Normal file
BIN
RhSolutions.AddIn/Images/DXF.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
RhSolutions.AddIn/Images/RhSolutions.png
Normal file
BIN
RhSolutions.AddIn/Images/RhSolutions.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
@ -23,4 +23,6 @@
|
||||
<Reference Path="System.Runtime.CompilerServices.Unsafe.dll" Pack="true" />
|
||||
<Reference Path="System.Threading.Tasks.Extensions.dll" Pack="true" />
|
||||
<Reference Path="System.ValueTuple.dll" Pack="true" />
|
||||
<Image Name='RhSolutions' Path='Images\RhSolutions.png' Pack='true' />
|
||||
<Image Name='DXF' Path='Images\DXF.png' Pack='true' />
|
||||
</DnaLibrary>
|
||||
|
@ -45,4 +45,12 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\RhSolutions.ProductSku\RhSolutions.ProductSku.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="Images\DXF.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Images\RhSolutions.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<RunSettings>
|
||||
<RunConfiguration>
|
||||
<EnvironmentVariables>
|
||||
<ISTESTING>true</ISTESTING>
|
||||
</EnvironmentVariables>
|
||||
</RunConfiguration>
|
||||
</RunSettings>
|
@ -13,6 +13,7 @@ public class CanDoGuess : IDisposable
|
||||
|
||||
public CanDoGuess()
|
||||
{
|
||||
Environment.SetEnvironmentVariable("ISTESTING", "true");
|
||||
_addIn = new();
|
||||
_addIn.AutoOpen();
|
||||
_guessReader = new GuessReader(Util.Application);
|
||||
|
@ -13,6 +13,7 @@ public class CanFillCouplings : IDisposable
|
||||
|
||||
public CanFillCouplings()
|
||||
{
|
||||
Environment.SetEnvironmentVariable("ISTESTING", "true");
|
||||
_addIn = new();
|
||||
_addIn.AutoOpen();
|
||||
_calculator = new CouplingsCalculator();
|
||||
|
@ -13,6 +13,7 @@ public class CanFillSleeves : IDisposable
|
||||
|
||||
public CanFillSleeves()
|
||||
{
|
||||
Environment.SetEnvironmentVariable("ISTESTING", "true");
|
||||
_addIn = new();
|
||||
_addIn.AutoOpen();
|
||||
_calculator = new SleevesCalculator();
|
||||
|
@ -12,6 +12,7 @@ public class CanReadProducts : IDisposable
|
||||
|
||||
public CanReadProducts()
|
||||
{
|
||||
Environment.SetEnvironmentVariable("ISTESTING", "true");
|
||||
_addIn = new();
|
||||
_testWorkbook = Util.Application.Workbooks.Add();
|
||||
_addIn.AutoOpen();
|
||||
|
@ -12,6 +12,7 @@ public class CanWriteProducts : IDisposable
|
||||
|
||||
public CanWriteProducts()
|
||||
{
|
||||
Environment.SetEnvironmentVariable("ISTESTING", "true");
|
||||
_addIn = new();
|
||||
_addIn.AutoOpen();
|
||||
_reader = new ExcelReader(Util.Application, RhSolutionsAddIn.Configuration);
|
||||
|
@ -12,6 +12,7 @@ public class RealPricelistTest : IDisposable
|
||||
|
||||
public RealPricelistTest()
|
||||
{
|
||||
Environment.SetEnvironmentVariable("ISTESTING", "true");
|
||||
_addIn = new();
|
||||
_addIn.AutoOpen();
|
||||
_reader = new ExcelReader(Util.Application, RhSolutionsAddIn.Configuration);
|
||||
|
@ -10,6 +10,7 @@ public class WorkbookValidationTests : IDisposable
|
||||
|
||||
public WorkbookValidationTests()
|
||||
{
|
||||
Environment.SetEnvironmentVariable("ISTESTING", "true");
|
||||
_addIn = new RhSolutionsAddIn();
|
||||
_addIn.AutoOpen();
|
||||
Util.Application.Workbooks.Add();
|
||||
|
Loading…
Reference in New Issue
Block a user