Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reintroduced, adapted and tested "IE Browser" commands from sharpRPA …
…for the legacy browser lucky man. Added [crLF] to the WriteTextFileCommand. Corrected a couple of typos.
- Loading branch information
1 parent
896372e
commit 5659a3f
Showing
11 changed files
with
1,618 additions
and
839 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 |
---|---|---|
@@ -1,84 +1,92 @@ | ||
<?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>{3FC72D0C-D083-44C4-96E9-13FE599F8E0E}</ProjectGuid> | ||
<OutputType>WinExe</OutputType> | ||
<RootNamespace>taskt_updater</RootNamespace> | ||
<AssemblyName>taskt-updater</AssemblyName> | ||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<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' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.IO.Compression" /> | ||
<Reference Include="System.IO.Compression.FileSystem" /> | ||
<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="frmUpdating.cs"> | ||
<SubType>Form</SubType> | ||
</Compile> | ||
<Compile Include="frmUpdating.Designer.cs"> | ||
<DependentUpon>frmUpdating.cs</DependentUpon> | ||
</Compile> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<EmbeddedResource Include="frmUpdating.resx"> | ||
<DependentUpon>frmUpdating.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> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<?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>{3FC72D0C-D083-44C4-96E9-13FE599F8E0E}</ProjectGuid> | ||
<OutputType>WinExe</OutputType> | ||
<RootNamespace>taskt_updater</RootNamespace> | ||
<AssemblyName>taskt-updater</AssemblyName> | ||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<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' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> | ||
<PlatformTarget>x64</PlatformTarget> | ||
<OutputPath>bin\x64\Debug\</OutputPath> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> | ||
<PlatformTarget>x64</PlatformTarget> | ||
<OutputPath>bin\x64\Release\</OutputPath> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.IO.Compression" /> | ||
<Reference Include="System.IO.Compression.FileSystem" /> | ||
<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="frmUpdating.cs"> | ||
<SubType>Form</SubType> | ||
</Compile> | ||
<Compile Include="frmUpdating.Designer.cs"> | ||
<DependentUpon>frmUpdating.cs</DependentUpon> | ||
</Compile> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<EmbeddedResource Include="frmUpdating.resx"> | ||
<DependentUpon>frmUpdating.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> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
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 |
---|---|---|
@@ -1,31 +1,41 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.26730.10 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "taskt", "taskt\taskt.csproj", "{C1BE3204-94D1-4A9A-AE30-C3E302383182}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "taskt-updater", "taskt-updater\taskt-updater.csproj", "{3FC72D0C-D083-44C4-96E9-13FE599F8E0E}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{C1BE3204-94D1-4A9A-AE30-C3E302383182}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{C1BE3204-94D1-4A9A-AE30-C3E302383182}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{C1BE3204-94D1-4A9A-AE30-C3E302383182}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{C1BE3204-94D1-4A9A-AE30-C3E302383182}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{3FC72D0C-D083-44C4-96E9-13FE599F8E0E}.Debug|Any CPU.ActiveCfg = Release|Any CPU | ||
{3FC72D0C-D083-44C4-96E9-13FE599F8E0E}.Debug|Any CPU.Build.0 = Release|Any CPU | ||
{3FC72D0C-D083-44C4-96E9-13FE599F8E0E}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{3FC72D0C-D083-44C4-96E9-13FE599F8E0E}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {CF7B0F64-1C1B-4350-867B-E06CEB778E6F} | ||
EndGlobalSection | ||
EndGlobal | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.26730.10 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "taskt", "taskt\taskt.csproj", "{C1BE3204-94D1-4A9A-AE30-C3E302383182}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "taskt-updater", "taskt-updater\taskt-updater.csproj", "{3FC72D0C-D083-44C4-96E9-13FE599F8E0E}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Debug|x64 = Debug|x64 | ||
Release|Any CPU = Release|Any CPU | ||
Release|x64 = Release|x64 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{C1BE3204-94D1-4A9A-AE30-C3E302383182}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{C1BE3204-94D1-4A9A-AE30-C3E302383182}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{C1BE3204-94D1-4A9A-AE30-C3E302383182}.Debug|x64.ActiveCfg = Debug|x64 | ||
{C1BE3204-94D1-4A9A-AE30-C3E302383182}.Debug|x64.Build.0 = Debug|x64 | ||
{C1BE3204-94D1-4A9A-AE30-C3E302383182}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{C1BE3204-94D1-4A9A-AE30-C3E302383182}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{C1BE3204-94D1-4A9A-AE30-C3E302383182}.Release|x64.ActiveCfg = Release|x64 | ||
{C1BE3204-94D1-4A9A-AE30-C3E302383182}.Release|x64.Build.0 = Release|x64 | ||
{3FC72D0C-D083-44C4-96E9-13FE599F8E0E}.Debug|Any CPU.ActiveCfg = Release|Any CPU | ||
{3FC72D0C-D083-44C4-96E9-13FE599F8E0E}.Debug|Any CPU.Build.0 = Release|Any CPU | ||
{3FC72D0C-D083-44C4-96E9-13FE599F8E0E}.Debug|x64.ActiveCfg = Debug|x64 | ||
{3FC72D0C-D083-44C4-96E9-13FE599F8E0E}.Debug|x64.Build.0 = Debug|x64 | ||
{3FC72D0C-D083-44C4-96E9-13FE599F8E0E}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{3FC72D0C-D083-44C4-96E9-13FE599F8E0E}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{3FC72D0C-D083-44C4-96E9-13FE599F8E0E}.Release|x64.ActiveCfg = Release|x64 | ||
{3FC72D0C-D083-44C4-96E9-13FE599F8E0E}.Release|x64.Build.0 = Release|x64 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {CF7B0F64-1C1B-4350-867B-E06CEB778E6F} | ||
EndGlobalSection | ||
EndGlobal |
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 System; | ||
using System.Collections.Generic; | ||
using System.Windows.Forms; | ||
using System.Xml.Serialization; | ||
using taskt.UI.CustomControls; | ||
using taskt.UI.Forms; | ||
|
||
namespace taskt.Core.Automation.Commands | ||
{ | ||
[Serializable] | ||
[Attributes.ClassAttributes.Group("IE Browser Commands")] | ||
[Attributes.ClassAttributes.Description("This command allows you to close the associated IE web browser")] | ||
[Attributes.ClassAttributes.ImplementationDescription("This command implements the 'InternetExplorer' application object from SHDocVw.dll to achieve automation.")] | ||
public class IEBrowserCloseCommand : ScriptCommand | ||
{ | ||
[XmlAttribute] | ||
[Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] | ||
public string v_InstanceName { get; set; } | ||
|
||
public IEBrowserCloseCommand() | ||
{ | ||
this.CommandName = "IEBrowserCloseCommand"; | ||
this.SelectionName = "Close Browser"; | ||
this.CommandEnabled = true; | ||
this.v_InstanceName = "default"; | ||
this.CustomRendering = true; | ||
} | ||
|
||
public override void RunCommand(object sender) | ||
{ | ||
var engine = (Core.Automation.Engine.AutomationEngineInstance)sender; | ||
|
||
var vInstance = v_InstanceName.ConvertToUserVariable(engine); | ||
|
||
var browserObject = engine.GetAppInstance(vInstance); | ||
|
||
|
||
var browserInstance = (SHDocVw.InternetExplorer)browserObject; | ||
browserInstance.Quit(); | ||
|
||
engine.RemoveAppInstance(vInstance); | ||
} | ||
|
||
public override List<Control> Render(frmCommandEditor editor) | ||
{ | ||
base.Render(editor); | ||
|
||
RenderedControls.AddRange(CommandControls.CreateDefaultInputGroupFor("v_InstanceName", this, editor)); | ||
|
||
return RenderedControls; | ||
} | ||
|
||
public override string GetDisplayValue() | ||
{ | ||
return base.GetDisplayValue() + " [Instance Name: '" + v_InstanceName + "']"; | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.
5659a3f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Watch out: I realized that last pull deleted 3 lines in ScriptCommand.cs:
[XmlInclude(typeof(NLGCreateInstanceCommand))]
[XmlInclude(typeof(NLGSetParameterCommand))]
[XmlInclude(typeof(NLGGeneratePhraseCommand))]
5659a3f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VirtualFab Thank you, DEV should properly reflect all merged changes. Please let me know in case of any concern.