Initial Commit from codeplex archive

master
Harald Wolff 2021-09-24 22:49:31 +02:00
commit b3dbf35d51
138 changed files with 7022 additions and 0 deletions

2
.gitignore vendored 100644
View File

@ -0,0 +1,2 @@
*.[oa]
*~

View File

@ -0,0 +1,13 @@
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/contentModel.xml
/projectSettingsUpdater.xml
/modules.xml
/.idea.RDPAddins.iml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -0,0 +1,543 @@
<Activity mc:Ignorable="sad" x:Class="TfsBuild.Process" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mt="clr-namespace:Microsoft.TeamFoundation;assembly=Microsoft.TeamFoundation.Common" xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client" xmlns:mtbw="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwt="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Tracking;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mttbb="clr-namespace:Microsoft.TeamFoundation.TestImpact.BuildIntegration.BuildActivities;assembly=Microsoft.TeamFoundation.TestImpact.BuildIntegration" xmlns:mtvc="clr-namespace:Microsoft.TeamFoundation.VersionControl.Client;assembly=Microsoft.TeamFoundation.VersionControl.Client" xmlns:mtvco="clr-namespace:Microsoft.TeamFoundation.VersionControl.Common;assembly=Microsoft.TeamFoundation.VersionControl.Common" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:sad="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sad1="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sl="clr-namespace:System.Linq;assembly=System.Core" xmlns:this="clr-namespace:TfsBuild;" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:Members>
<x:Property Name="BuildSettings" Type="InArgument(mtbwa:BuildSettings)" />
<x:Property Name="TestSpecs" Type="InArgument(mtbwa:TestSpecList)" />
<x:Property Name="BuildNumberFormat" Type="InArgument(x:String)" />
<x:Property Name="SolutionSpecificBuildOutputs" Type="InArgument(x:Boolean)" />
<x:Property Name="CleanWorkspace" Type="InArgument(mtbwa:CleanWorkspaceOption)" />
<x:Property Name="RunCodeAnalysis" Type="InArgument(mtbwa:CodeAnalysisOption)" />
<x:Property Name="SourceAndSymbolServerSettings" Type="InArgument(mtbwa:SourceAndSymbolServerSettings)" />
<x:Property Name="AgentSettings" Type="InArgument(mtbwa:AgentSettings)" />
<x:Property Name="AssociateChangesetsAndWorkItems" Type="InArgument(x:Boolean)" />
<x:Property Name="CreateWorkItem" Type="InArgument(x:Boolean)" />
<x:Property Name="MSBuildArguments" Type="InArgument(x:String)" />
<x:Property Name="MSBuildPlatform" Type="InArgument(mtbwa:ToolPlatform)" />
<x:Property Name="MSBuildMultiProc" Type="InArgument(x:Boolean)" />
<x:Property Name="PerformTestImpactAnalysis" Type="InArgument(x:Boolean)" />
<x:Property Name="CreateLabel" Type="InArgument(x:Boolean)" />
<x:Property Name="DisableTests" Type="InArgument(x:Boolean)" />
<x:Property Name="GetVersion" Type="InArgument(x:String)" />
<x:Property Name="PrivateDropLocation" Type="InArgument(x:String)" />
<x:Property Name="Verbosity" Type="InArgument(mtbw:BuildVerbosity)" />
<x:Property Name="Metadata" Type="mtbw:ProcessParameterMetadataCollection" />
<x:Property Name="SupportedReasons" Type="mtbc:BuildReason" />
<x:Property Name="BuildProcessVersion" Type="x:String" />
</x:Members>
<this:Process.BuildSettings>[New Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings()]</this:Process.BuildSettings>
<this:Process.DisableTests>[False]</this:Process.DisableTests>
<this:Process.TestSpecs>[New Microsoft.TeamFoundation.Build.Workflow.Activities.TestSpecList(New Microsoft.TeamFoundation.Build.Workflow.Activities.AgileTestPlatformSpec("**\*test*.dll"))]</this:Process.TestSpecs>
<this:Process.BuildNumberFormat>["$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)"]</this:Process.BuildNumberFormat>
<this:Process.SolutionSpecificBuildOutputs>[False]</this:Process.SolutionSpecificBuildOutputs>
<this:Process.AssociateChangesetsAndWorkItems>[True]</this:Process.AssociateChangesetsAndWorkItems>
<this:Process.CreateWorkItem>[True]</this:Process.CreateWorkItem>
<this:Process.CleanWorkspace>[Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.All]</this:Process.CleanWorkspace>
<this:Process.MSBuildArguments>
<InArgument x:TypeArguments="x:String" />
</this:Process.MSBuildArguments>
<this:Process.RunCodeAnalysis>[Microsoft.TeamFoundation.Build.Workflow.Activities.CodeAnalysisOption.AsConfigured]</this:Process.RunCodeAnalysis>
<this:Process.MSBuildMultiProc>[True]</this:Process.MSBuildMultiProc>
<this:Process.MSBuildPlatform>[Microsoft.TeamFoundation.Build.Workflow.Activities.ToolPlatform.Auto]</this:Process.MSBuildPlatform>
<this:Process.PerformTestImpactAnalysis>[True]</this:Process.PerformTestImpactAnalysis>
<this:Process.SourceAndSymbolServerSettings>[New Microsoft.TeamFoundation.Build.Workflow.Activities.SourceAndSymbolServerSettings(True, Nothing)]</this:Process.SourceAndSymbolServerSettings>
<this:Process.CreateLabel>[True]</this:Process.CreateLabel>
<this:Process.GetVersion>
<InArgument x:TypeArguments="x:String" />
</this:Process.GetVersion>
<this:Process.AgentSettings>[New Microsoft.TeamFoundation.Build.Workflow.Activities.AgentSettings() With {.MaxWaitTime = New System.TimeSpan(4, 0, 0), .MaxExecutionTime = New System.TimeSpan(0, 0, 0), .TagComparison = Microsoft.TeamFoundation.Build.Workflow.Activities.TagComparison.MatchExactly }]</this:Process.AgentSettings>
<this:Process.Verbosity>[Microsoft.TeamFoundation.Build.Workflow.BuildVerbosity.Normal]</this:Process.Verbosity>
<this:Process.Metadata>
<mtbw:ProcessParameterMetadataCollection>
<mtbw:ProcessParameterMetadata BrowsableWhen="EditingDefinition" Category="#300 Advanced" DisplayName="MSBuild Multi-Proc" Description="Enable MSBuid Multi-proc to build your solutions' projects in parallel, when possible, using all available processors on the build server." ParameterName="MSBuildMultiProc" />
<mtbw:ProcessParameterMetadata BrowsableWhen="EditingDefinition" Category="#300 Advanced" DisplayName="Solution Specific Build Outputs" Description="True will put build outputs into folders based on the solution name. False will put all build outputs into the same folder." ParameterName="SolutionSpecificBuildOutputs" />
</mtbw:ProcessParameterMetadataCollection>
</this:Process.Metadata>
<this:Process.SupportedReasons>All</this:Process.SupportedReasons>
<this:Process.BuildProcessVersion>11.0</this:Process.BuildProcessVersion>
<mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<Sequence.Variables>
<Variable x:TypeArguments="mtbc:IBuildDetail" Name="BuildDetail" />
<Variable x:TypeArguments="x:String" Name="DropLocation" />
</Sequence.Variables>
<mtbwa:GetBuildDetail DisplayName="Get the Build" Result="[BuildDetail]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<Sequence DisplayName="Update Drop Location" mtbwt:BuildTrackingParticipant.Importance="Low">
<mtbwa:InvokeForReason DisplayName="Update Build Number for Triggered Builds" Reason="Triggered">
<mtbwa:UpdateBuildNumber BuildNumberFormat="[BuildNumberFormat]" DisplayName="Update Build Number" />
</mtbwa:InvokeForReason>
<If Condition="[(Not String.IsNullOrEmpty(BuildDetail.DropLocationRoot)) AndAlso (BuildDetail.Reason And Microsoft.TeamFoundation.Build.Client.BuildReason.Triggered) = BuildDetail.Reason]" DisplayName="If Build Reason is Triggered" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<Assign x:TypeArguments="x:String" mtbwt:BuildTrackingParticipant.Importance="None" Value="[BuildDropProvider.CombinePaths(BuildDetail.DropLocationRoot, BuildDetail.BuildDefinition.Name, BuildDetail.BuildNumber)]" To="[DropLocation]" />
<mtbwa:SetBuildProperties DisplayName="Set Drop Location" DropLocation="[DropLocation]" PropertiesToSet="DropLocation" mtbwt:BuildTrackingParticipant.Importance="Low" />
</Sequence>
</If.Then>
</If>
<If Condition="[(Not String.IsNullOrEmpty(PrivateDropLocation)) AndAlso BuildDetail.Reason = Microsoft.TeamFoundation.Build.Client.BuildReason.ValidateShelveset]" DisplayName="If Build Reason is ValidateShelveset" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<Assign x:TypeArguments="x:String" Value="[BuildDropProvider.CombinePaths(PrivateDropLocation, BuildDetail.BuildDefinition.Name, BuildDetail.BuildNumber)]" To="[DropLocation]" mtbwt:BuildTrackingParticipant.Importance="None" />
<mtbwa:SetBuildProperties DisplayName="Set Drop Location for Private Build" DropLocation="[DropLocation]" PropertiesToSet="DropLocation" mtbwt:BuildTrackingParticipant.Importance="Low" />
</Sequence>
</If.Then>
</If>
</Sequence>
<mtbwa:AgentScope DisplayName="Run On Agent" MaxExecutionTime="[AgentSettings.MaxExecutionTime]" MaxWaitTime="[AgentSettings.MaxWaitTime]" ReservationSpec="[AgentSettings.GetAgentReservationSpec()]">
<mtbwa:AgentScope.Variables>
<Variable x:TypeArguments="mtbc:IBuildAgent" Name="BuildAgent" />
<Variable x:TypeArguments="mtvc:Workspace" Name="Workspace" />
<Variable x:TypeArguments="x:String" Name="BuildDirectory" />
<Variable x:TypeArguments="x:String" Default="[BuildDetail.BuildNumber]" Name="LabelName" />
<Variable x:TypeArguments="x:String" Name="WorkspaceName" />
<Variable x:TypeArguments="x:String" Name="SourcesDirectory" />
<Variable x:TypeArguments="x:String" Name="BinariesDirectory" />
<Variable x:TypeArguments="x:String" Name="TestResultsDirectory" />
</mtbwa:AgentScope.Variables>
<Sequence DisplayName="Initialize Variables" mtbwt:BuildTrackingParticipant.Importance="Low">
<mtbwa:GetBuildAgent DisplayName="Get the Agent" Result="[BuildAgent]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<mtbwa:GetBuildDirectory DisplayName="Get the Build Directory" Result="[BuildDirectory]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<Assign x:TypeArguments="x:String" DisplayName="Initialize Workspace Name" To="[WorkspaceName]" Value="[String.Format(&quot;{0}_{1}_{2}&quot;, BuildDetail.BuildDefinition.Id, Microsoft.TeamFoundation.LinkingUtilities.DecodeUri(BuildAgent.Uri.AbsoluteUri).ToolSpecificId, BuildAgent.ServiceHost.Name)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<Assign x:TypeArguments="x:String" DisplayName="Initialize Sources Directory" To="[SourcesDirectory]" Value="[String.Format(&quot;{0}\Sources&quot;, BuildDirectory)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<Assign x:TypeArguments="x:String" DisplayName="Initialize Binaries Directory" To="[BinariesDirectory]" Value="[String.Format(&quot;{0}\Binaries&quot;, BuildDirectory)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<Assign x:TypeArguments="x:String" DisplayName="Initialize TestResults Directory" To="[TestResultsDirectory]" Value="[String.Format(&quot;{0}\TestResults&quot;, BuildDirectory)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[Not BuildSettings.HasPlatformConfigurations]" DisplayName="If Not BuildSettings.HasPlatformConfigurations" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<AddToCollection x:TypeArguments="mtbwa:PlatformConfiguration" DisplayName="Use Default Platform Configuration" Collection="[BuildSettings.PlatformConfigurations]" Item="[Microsoft.TeamFoundation.Build.Workflow.Activities.PlatformConfiguration.Default]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</If.Then>
</If>
<If Condition="[WorkspaceName.Length &gt; Microsoft.TeamFoundation.VersionControl.Common.RepositoryConstants.MaxWorkspaceNameSize]" DisplayName="If WorkspaceName &gt; MaxSize" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<mtbwa:WriteBuildWarning DisplayName="Write Workspace Size Warning" Message="[String.Format(&quot;The workspace name '{0}' exceeds the maximum allowed limit of '{1}' characters. Truncating it to match the maximum limit.&quot;, WorkspaceName, Microsoft.TeamFoundation.VersionControl.Common.RepositoryConstants.MaxWorkspaceNameSize)]" />
<Assign x:TypeArguments="x:String" DisplayName="Truncate WorkspaceName to MaxSize" To="[WorkspaceName]" Value="[WorkspaceName.Substring(0, Microsoft.TeamFoundation.VersionControl.Common.RepositoryConstants.MaxWorkspaceNameSize).TrimEnd()]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</Sequence>
</If.Then>
</If>
</Sequence>
<Sequence DisplayName="Initialize Workspace" mtbwt:BuildTrackingParticipant.Importance="Low">
<mtbwa:DeleteDirectory Directory="[TestResultsDirectory]" DisplayName="Delete Test Results Directory" Recursive="[True]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[Not CleanWorkspace = Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.None]" DisplayName="If Not CleanWorkspace = CleanWorkspaceOption.None" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:DeleteDirectory Directory="[BinariesDirectory]" DisplayName="Delete Binaries Directory" mtbwt:BuildTrackingParticipant.Importance="Low" />
</If.Then>
</If>
<If Condition="[CleanWorkspace = Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.All]" DisplayName="If CleanWorkspace = CleanWorkspaceOption.All" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence DisplayName="Delete Workspace and Sources Directory" mtbwt:BuildTrackingParticipant.Importance="Low">
<mtbwa:DeleteWorkspace DeleteLocalItems="[True]" DisplayName="Delete Workspace" Name="[WorkspaceName]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<mtbwa:DeleteDirectory Directory="[SourcesDirectory]" DisplayName="Delete Sources Directory" mtbwt:BuildTrackingParticipant.Importance="Low" />
</Sequence>
</If.Then>
</If>
<mtbwa:CreateWorkspace BuildDirectory="[BuildDirectory]" Comment="[&quot;Workspace Created by Team Build&quot;]" DisplayName="Create Workspace" Name="[WorkspaceName]" Result="[Workspace]" SourcesDirectory="[SourcesDirectory]" />
<If Condition="[CleanWorkspace = Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.Outputs]" DisplayName="If CleanWorkspace = CleanWorkspaceOption.Outputs" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<ForEach x:TypeArguments="mtbwa:PlatformConfiguration" DisplayName="For Each Configuration in BuildSettings.PlatformConfigurations" Values="[BuildSettings.PlatformConfigurations]" mtbwt:BuildTrackingParticipant.Importance="Low">
<ActivityAction x:TypeArguments="mtbwa:PlatformConfiguration">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="mtbwa:PlatformConfiguration" Name="platformConfiguration" />
</ActivityAction.Argument>
<Sequence DisplayName="Clean Configuration">
<If Condition="[BuildSettings.HasProjectsToBuild]" DisplayName="If BuildSettings.HasProjectsToBuild" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<ForEach x:TypeArguments="x:String" DisplayName="For Each Project in BuildSettings.ProjectsToBuild" Values="[BuildSettings.ProjectsToBuild]" mtbwt:BuildTrackingParticipant.Importance="Low">
<ActivityAction x:TypeArguments="x:String">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:String" Name="serverBuildProjectItem" />
</ActivityAction.Argument>
<Sequence DisplayName="Clean Project" mtbwt:BuildTrackingParticipant.Importance="Low">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="localBuildProjectItem" />
</Sequence.Variables>
<mtbwa:ConvertWorkspaceItem DisplayName="Convert Server Paths to Local Paths" Input="[serverBuildProjectItem]" Result="[localBuildProjectItem]" Workspace="[Workspace]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[System.IO.File.Exists(localBuildProjectItem)]" DisplayName="If File.Exists(Project)" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:MSBuild CommandLineArguments="[String.Format(&quot;/p:SkipInvalidConfigurations=true {0}&quot;, MSBuildArguments)]" Configuration="[platformConfiguration.Configuration]" DisplayName="Run MSBuild for Project" GenerateVSPropsFile="[True]" MaxProcesses="[If (MSBuildMultiProc, 0, 1)]" OutDir="[BinariesDirectory]" Platform="[platformConfiguration.Platform]" Project="[localBuildProjectItem]" Targets="[New String() { &quot;Clean&quot; }]" TargetsNotLogged="[New String() {&quot;GetNativeManifest&quot;, &quot;GetCopyToOutputDirectoryItems&quot;, &quot;GetTargetPath&quot;}]" ToolPlatform="[MSBuildPlatform]" Verbosity="[Verbosity]" />
</If.Then>
</If>
</Sequence>
</ActivityAction>
</ForEach>
</If.Then>
</If>
</Sequence>
</ActivityAction>
</ForEach>
</If.Then>
</If>
<mtbwa:SyncWorkspace DisplayName="Get Workspace" VersionOverride="[GetVersion]" Workspace="[Workspace]">
<mtbwa:SyncWorkspace.RequestsFailed>
<ActivityAction x:TypeArguments="scg:ICollection(mtbc:IQueuedBuild)">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="scg:ICollection(mtbc:IQueuedBuild)" Name="failedRequests" />
</ActivityAction.Argument>
<mtbwa:RetryRequests Behavior="[Microsoft.TeamFoundation.Build.Workflow.Activities.RetryBehavior.DoNotBatch]" DisplayName="Mark Requests for Retry" Requests="[failedRequests]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</ActivityAction>
</mtbwa:SyncWorkspace.RequestsFailed>
</mtbwa:SyncWorkspace>
</Sequence>
<If Condition="[CreateLabel]" DisplayName="If CreateLabel" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:InvokeForReason DisplayName="Create and Set Label for non-Shelveset Builds" Reason="Manual, IndividualCI, BatchedCI, Schedule, ScheduleForced, UserCreated">
<mtbwa:LabelWorkspace Comment="[&quot;Label Created by Team Build&quot;]" DisplayName="Create Label" Name="[LabelName]" Scope="[String.Format(&quot;$/{0}&quot;, BuildDetail.BuildDefinition.TeamProject)]" Workspace="[Workspace]" />
<mtbwa:SetBuildProperties DisplayName="Set Label on BuildDetail" LabelName="[String.Format(&quot;{0}@$/{1}&quot;, LabelName, BuildDetail.BuildDefinition.TeamProject)]" PropertiesToSet="LabelName" mtbwt:BuildTrackingParticipant.Importance="Low" />
</mtbwa:InvokeForReason>
</If.Then>
<If.Else>
<mtbwa:WriteBuildMessage DisplayName="Write Message" Message="Not Labeling sources" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" />
</If.Else>
</If>
<TryCatch DisplayName="Try Compile, Test, and Associate Changesets and Work Items" mtbwt:BuildTrackingParticipant.Importance="Low">
<TryCatch.Finally>
<Sequence DisplayName="Revert Workspace and Copy Files to Drop Location" mtbwt:BuildTrackingParticipant.Importance="Low">
<mtbwa:InvokeForReason DisplayName="Revert Workspace for Shelveset Builds" Reason="CheckInShelveset, ValidateShelveset">
<mtbwa:RevertWorkspace DisplayName="Revert Workspace" Workspace="[Workspace]" />
</mtbwa:InvokeForReason>
<If Condition="[Not String.IsNullOrEmpty(DropLocation)]" DisplayName="If DropLocation is Set" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:CopyDirectory DisplayName="Drop Files to Drop Location" Source="[BinariesDirectory]" Destination="[DropLocation]" />
</If.Then>
</If>
</Sequence>
</TryCatch.Finally>
<TryCatch.Try>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<Sequence.Variables>
<Variable x:TypeArguments="s:Exception" Name="compilationException" />
<Variable x:TypeArguments="scg:IList(mtvc:Changeset)" Name="associatedChangesets" />
<Variable x:TypeArguments="s:Boolean" Name="treatTestFailureAsBuildFailure" />
</Sequence.Variables>
<Parallel DisplayName="Compile, Test, and Associate Changesets and Work Items">
<TryCatch DisplayName="Try Compile and Test" mtbwt:BuildTrackingParticipant.Importance="Low">
<TryCatch.Try>
<Sequence DisplayName="Compile and Test">
<ForEach x:TypeArguments="mtbwa:PlatformConfiguration" DisplayName="For Each Configuration in BuildSettings.PlatformConfigurations" Values="[BuildSettings.PlatformConfigurations]" mtbwt:BuildTrackingParticipant.Importance="Low">
<ActivityAction x:TypeArguments="mtbwa:PlatformConfiguration">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="mtbwa:PlatformConfiguration" Name="platformConfiguration" />
</ActivityAction.Argument>
<Sequence DisplayName="Compile and Test for Configuration" mtbwt:BuildTrackingParticipant.Importance="Low">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="outputDirectory" />
<Variable x:TypeArguments="x:String" Name="logFileDropLocation" />
</Sequence.Variables>
<Sequence DisplayName="Initialize Variables" mtbwt:BuildTrackingParticipant.Importance="Low">
<Assign x:TypeArguments="x:String" DisplayName="Create OutputDirectory Per Platform and Configuration" To="[outputDirectory]" Value="[If (platformConfiguration.IsEmpty Or BuildSettings.PlatformConfigurations.Count = 1, BinariesDirectory, If (platformConfiguration.IsPlatformEmptyOrAnyCpu, BinariesDirectory + &quot;\&quot; + platformConfiguration.Configuration, BinariesDirectory + &quot;\&quot; + platformConfiguration.Platform + &quot;\&quot; + platformConfiguration.Configuration))]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[Not String.IsNullOrEmpty(DropLocation)]" DisplayName="If DropLocation is Set" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Assign x:TypeArguments="x:String" DisplayName="Initialize LogFile Drop Location" To="[logFileDropLocation]" Value="[If (platformConfiguration.IsEmpty Or BuildSettings.PlatformConfigurations.Count = 1, BuildDropProvider.CombinePaths(DropLocation, &quot;logs&quot;), If (platformConfiguration.IsPlatformEmptyOrAnyCpu, BuildDropProvider.CombinePaths(DropLocation, &quot;logs&quot;, platformConfiguration.Configuration), BuildDropProvider.CombinePaths(DropLocation, &quot;logs&quot;, platformConfiguration.Platform, platformConfiguration.Configuration)))]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</If.Then>
</If>
</Sequence>
<If Condition="[BuildSettings.HasProjectsToBuild]" DisplayName="If BuildSettings.HasProjectsToBuild" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<ForEach x:TypeArguments="x:String" DisplayName="For Each Project in BuildSettings.ProjectsToBuild" Values="[BuildSettings.ProjectsToBuild]" mtbwt:BuildTrackingParticipant.Importance="Low">
<ActivityAction x:TypeArguments="x:String">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:String" Name="serverBuildProjectItem" />
</ActivityAction.Argument>
<TryCatch DisplayName="Try to Compile the Project" mtbwt:BuildTrackingParticipant.Importance="Low">
<TryCatch.Try>
<Sequence DisplayName="Compile the Project" mtbwt:BuildTrackingParticipant.Importance="Low">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="localProject" />
<Variable x:TypeArguments="x:String" Name="outputDirectoryPerProject" Default="[outputDirectory]" />
</Sequence.Variables>
<mtbwa:ConvertWorkspaceItem DisplayName="Convert Server Path to Local Path" Input="[serverBuildProjectItem]" Result="[localProject]" Workspace="[Workspace]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[SolutionSpecificBuildOutputs]" DisplayName="If Build Outputs are Solution-Specific" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence DisplayName="Update Output Directory" mtbwt:BuildTrackingParticipant.Importance="Low">
<Assign x:TypeArguments="x:String" DisplayName="Set Solution-Specific Output Directory" To="[outputDirectoryPerProject]" Value="[System.IO.Path.Combine(outputDirectory, System.IO.Path.GetFileNameWithoutExtension(localProject))]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If DisplayName="If Output Directory Exists" Condition="[System.IO.Directory.Exists(outputDirectoryPerProject)]" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:WriteBuildWarning DisplayName="Write Duplicate Project Names Warning" Message="[String.Format(&quot;{0} conflicts with another solution/project. Build outputs for solutions/projects with the same name will be copied to the same directory. To separate the build outputs, change the name of one of the solutions/projects.&quot;, System.IO.Path.GetFileNameWithoutExtension(localProject))]" />
</If.Then>
</If>
</Sequence>
</If.Then>
</If>
<mtbwa:MSBuild CommandLineArguments="[String.Format(&quot;/p:SkipInvalidConfigurations=true {0}&quot;, MSBuildArguments)]" Configuration="[platformConfiguration.Configuration]" DisplayName="Run MSBuild for Project" GenerateVSPropsFile="[True]" LogFileDropLocation="[logFileDropLocation]" MaxProcesses="[If (MSBuildMultiProc, 0, 1)]" OutDir="[outputDirectoryPerProject]" Platform="[platformConfiguration.Platform]" Project="[localProject]" RunCodeAnalysis="[RunCodeAnalysis]" TargetsNotLogged="[New String() {&quot;GetNativeManifest&quot;, &quot;GetCopyToOutputDirectoryItems&quot;, &quot;GetTargetPath&quot;}]" ToolPlatform="[MSBuildPlatform]" Verbosity="[Verbosity]" />
</Sequence>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception">
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="ex" />
</ActivityAction.Argument>
<Sequence DisplayName="Handle Exception">
<Sequence.Variables>
<Variable x:TypeArguments="scg:ICollection(mtbc:IQueuedBuild)" Name="failedRequests" />
</Sequence.Variables>
<mtbwa:SetBuildProperties CompilationStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Failed]" DisplayName="Set CompilationStatus to Failed" PropertiesToSet="CompilationStatus" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[CreateWorkItem]" DisplayName="If CreateWorkItem" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:InvokeForReason DisplayName="Create Work Item for non-Shelveset Builds" Reason="Manual, IndividualCI, BatchedCI, Schedule, ScheduleForced, UserCreated">
<mtbwa:OpenWorkItem AssignedTo="[BuildDetail.RequestedFor]" Comment="[&quot;This work item was created by TFS Build on a build failure.&quot;]" CustomFields="[New Dictionary(Of String, String) From { {&quot;System.Reason&quot;, &quot;Build Failure&quot;}, {&quot;Microsoft.VSTS.TCM.ReproSteps&quot;, &quot;Start the build using TFS Build&quot;}, {&quot;Priority&quot;, &quot;1&quot;}, {&quot;Severity&quot;, &quot;1 - Critical&quot;} }]" DisplayName="Create Work Item" Title="[String.Format(&quot;Build Failure in Build: {0}&quot;, BuildDetail.BuildNumber)]" Type="[&quot;Bug&quot;]" />
</mtbwa:InvokeForReason>
</If.Then>
</If>
<mtbwa:GetApprovedRequests DisplayName="Get Requests Approved for Check In" Result="[failedRequests]" mtbwt:BuildTrackingParticipant.Importance="None" />
<mtbwa:RetryRequests Behavior="[Microsoft.TeamFoundation.Build.Workflow.Activities.RetryBehavior.DoNotBatch]" DisplayName="Mark Requests for Retry" Requests="[failedRequests]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<Rethrow DisplayName="Rethrow the exception so the build will stop" mtbwt:BuildTrackingParticipant.Importance="Low" />
</Sequence>
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
</ActivityAction>
</ForEach>
</If.Then>
</If>
<If Condition="[Not DisableTests]" DisplayName="If Not DisableTests" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence DisplayName="Run Tests" mtbwt:BuildTrackingParticipant.Importance="Low">
<If Condition="[Not TestSpecs Is Nothing]" DisplayName="If Not TestSpecs Is Nothing" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<ForEach x:TypeArguments="mtbwa:TestSpec" DisplayName="For Each TestSpec in TestSpecs" Values="[TestSpecs]" mtbwt:BuildTrackingParticipant.Importance="Low">
<ActivityAction x:TypeArguments="mtbwa:TestSpec">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="mtbwa:TestSpec" Name="spec" />
</ActivityAction.Argument>
<TryCatch DisplayName="Try Run Tests" mtbwt:BuildTrackingParticipant.Importance="Low">
<TryCatch.Try>
<If Condition="[TypeOf spec Is Microsoft.TeamFoundation.Build.Workflow.Activities.AgileTestPlatformSpec]" DisplayName="If spec Is AgileTestPlatformSpec" mtbwt:BuildTrackingParticipant.Importance="None">
<If.Then>
<Sequence DisplayName="Run Visual Studio Test Runner for Test Sources" mtbwt:BuildTrackingParticipant.Importance="Low">
<Sequence.Variables>
<Variable x:TypeArguments="mtbwa:AgileTestPlatformSpec" Name="agileTestPlatformAssembly" />
<Variable x:TypeArguments="scg:IEnumerable(x:String)" Name="agileTestPlatformAssemblies" />
</Sequence.Variables>
<Assign x:TypeArguments="mtbwa:AgileTestPlatformSpec" DisplayName="Assign spec to agileTestPlatformAssembly" To="[agileTestPlatformAssembly]" Value="[DirectCast(spec, Microsoft.TeamFoundation.Build.Workflow.Activities.AgileTestPlatformSpec)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<mtbwa:FindMatchingFiles DisplayName="Find Visual Studio Test Platform Test Assemblies" MatchPattern="[String.Format(&quot;{0}\{1}&quot;, outputDirectory, agileTestPlatformAssembly.AssemblyFileSpec)]" Result="[agileTestPlatformAssemblies]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[agileTestPlatformAssemblies.Count() &gt; 0]" DisplayName="If Visual Studio Test Platform Test Assemblies Found" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<If Condition="[agileTestPlatformAssembly.HasRunSettingsFile]" DisplayName="If agileTestPlatformAssembly.HasRunSettingsFile" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence DisplayName="Find Run Settings File And Run Visual Studio Test Runner" mtbwt:BuildTrackingParticipant.Importance="Low">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="localRunSettings" />
</Sequence.Variables>
<mtbwa:GenerateRunSettings DisplayName="Generate Run Settings File" RunSettingsForTestRun="[agileTestPlatformAssembly.RunSettingsForTestRun]" Result="[localRunSettings]" Workspace="[Workspace]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<mtbwa:RunTests DisplayName="Run Visual Studio Test Runner for Test Sources" RunName="[agileTestPlatformAssembly.RunName]" Flavor="[platformConfiguration.Configuration]" Platform="[platformConfiguration.Platform]" TestSources="[agileTestPlatformAssemblies]" RunSettings="[localRunSettings]" TestCaseFilter="[agileTestPlatformAssembly.TestCaseFilter]" ExecutionPlatform="[agileTestPlatformAssembly.ExecutionPlatform]" />
</Sequence>
</If.Then>
<If.Else>
<mtbwa:RunTests DisplayName="Run Visual Studio Test Runner for Test Sources" RunName="[agileTestPlatformAssembly.RunName]" Flavor="[platformConfiguration.Configuration]" Platform="[platformConfiguration.Platform]" TestSources="[agileTestPlatformAssemblies]" TestCaseFilter="[agileTestPlatformAssembly.TestCaseFilter]" ExecutionPlatform="[agileTestPlatformAssembly.ExecutionPlatform]" />
</If.Else>
</If>
</If.Then>
</If>
</Sequence>
</If.Then>
<If.Else>
<If Condition="[TypeOf spec Is Microsoft.TeamFoundation.Build.Workflow.Activities.TestMetadataFileSpec]" DisplayName="If spec Is TestMetadataFileSpec" mtbwt:BuildTrackingParticipant.Importance="None">
<If.Then>
<Sequence DisplayName="Run MSTest for Metadata File">
<Sequence.Variables>
<Variable x:TypeArguments="mtbwa:TestMetadataFileSpec" Name="testMetadataFile" />
<Variable x:TypeArguments="x:String" Name="localTestMetadata" />
</Sequence.Variables>
<Assign x:TypeArguments="mtbwa:TestMetadataFileSpec" DisplayName="Assign spec to testMetadataFile" To="[testMetadataFile]" Value="[DirectCast(spec, Microsoft.TeamFoundation.Build.Workflow.Activities.TestMetadataFileSpec)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<mtbwa:ConvertWorkspaceItem DisplayName="Convert Server Path to Local Path" Input="[testMetadataFile.MetadataFileName]" Result="[localTestMetadata]" Workspace="[Workspace]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<mtbwa:MSTest RunTitle="[testMetadataFile.RunName]" Category="[testMetadataFile.CategoryFilter]" DisplayName="Run MSTest for Metadata File" Flavor="[platformConfiguration.Configuration]" MaxPriority="[testMetadataFile.MaximumPriority]" MinPriority="[testMetadataFile.MinimumPriority]" PathToResultsFilesRoot="[TestResultsDirectory]" Platform="[platformConfiguration.Platform]" SearchPathRoot="[outputDirectory]" TestLists="[testMetadataFile.TestLists]" TestMetadata="[localTestMetadata]" TestSettings="[String.Empty]" CommandLineArguments="[testMetadataFile.MSTestCommandLineArgs]" />
</Sequence>
</If.Then>
<If.Else>
<Sequence DisplayName="Run MSTest for Test Assemblies" mtbwt:BuildTrackingParticipant.Importance="Low">
<Sequence.Variables>
<Variable x:TypeArguments="mtbwa:TestAssemblySpec" Name="testAssembly" />
<Variable x:TypeArguments="scg:IEnumerable(x:String)" Name="testAssemblies" />
<Variable x:TypeArguments="x:String" Default="[String.Empty]" Name="testFlavor" />
<Variable x:TypeArguments="x:String" Default="[String.Empty]" Name="testPlatform" />
</Sequence.Variables>
<Assign x:TypeArguments="mtbwa:TestAssemblySpec" DisplayName="Assign spec to testAssembly" To="[testAssembly]" Value="[DirectCast(spec, Microsoft.TeamFoundation.Build.Workflow.Activities.TestAssemblySpec)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<mtbwa:FindMatchingFiles DisplayName="Find Test Assemblies" MatchPattern="[String.Format(&quot;{0}\{1}&quot;, outputDirectory, testAssembly.AssemblyFileSpec)]" Result="[testAssemblies]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[testAssemblies.Count() &gt; 0]" DisplayName="If Test Assemblies Found" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<If Condition="[testAssembly.HasTestSettingsFile]" DisplayName="If testAssembly.HasTestSettingsFile" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence DisplayName="Find Test Settings File And Run MSTest" mtbwt:BuildTrackingParticipant.Importance="Low">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="localTestSettings" />
</Sequence.Variables>
<mtbwa:ConvertWorkspaceItem DisplayName="Convert Server Path to Local Path" Input="[testAssembly.TestSettingsFileName]" Result="[localTestSettings]" Workspace="[Workspace]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<mtbwa:MSTest RunTitle="[testAssembly.RunName]" Category="[testAssembly.CategoryFilter]" DisplayName="Run MSTest for Test Assemblies" Flavor="[platformConfiguration.Configuration]" MaxPriority="[testAssembly.MaximumPriority]" MinPriority="[testAssembly.MinimumPriority]" PathToResultsFilesRoot="[TestResultsDirectory]" Platform="[platformConfiguration.Platform]" SearchPathRoot="[outputDirectory]" TestContainers="[testAssemblies]" TestSettings="[localTestSettings]" CommandLineArguments="[testAssembly.MSTestCommandLineArgs]" />
</Sequence>
</If.Then>
<If.Else>
<mtbwa:MSTest RunTitle="[testAssembly.RunName]" Category="[testAssembly.CategoryFilter]" DisplayName="Run MSTest for Test Assemblies" Flavor="[platformConfiguration.Configuration]" MaxPriority="[testAssembly.MaximumPriority]" MinPriority="[testAssembly.MinimumPriority]" PathToResultsFilesRoot="[TestResultsDirectory]" Platform="[platformConfiguration.Platform]" SearchPathRoot="[outputDirectory]" TestContainers="[testAssemblies]" CommandLineArguments="[testAssembly.MSTestCommandLineArgs]" />
</If.Else>
</If>
</If.Then>
</If>
</Sequence>
</If.Else>
</If>
</If.Else>
</If>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception">
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="testException" />
</ActivityAction.Argument>
<Sequence DisplayName="Handle Test Run Exception">
<Sequence.Variables>
<Variable x:TypeArguments="scg:ICollection(mtbc:IQueuedBuild)" Name="failedRequests" />
</Sequence.Variables>
<If Condition="[Not (TypeOf testException Is Microsoft.TeamFoundation.Build.Workflow.Activities.TestFailureException)]" DisplayName="If testException is NOT TestFailureException" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:WriteBuildError DisplayName="Write Test Failure Message" Message="[testException.Message]" />
</If.Then>
</If>
<mtbwa:SetBuildProperties DisplayName="Set TestStatus to Failed" PropertiesToSet="TestStatus" TestStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Failed]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[spec.FailBuildOnFailure]" DisplayName="If spec.FailBuildOnFailure" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Assign x:TypeArguments="s:Boolean" DisplayName="Set treatTestFailureAsBuildFailure to True" To="[treatTestFailureAsBuildFailure]" Value="[True]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</If.Then>
</If>
<mtbwa:GetApprovedRequests DisplayName="Get Requests Approved for Check In" Result="[failedRequests]" mtbwt:BuildTrackingParticipant.Importance="None" />
<mtbwa:RetryRequests Behavior="[Microsoft.TeamFoundation.Build.Workflow.Activities.RetryBehavior.DoNotBatch]" DisplayName="Mark Requests for Retry" Requests="[failedRequests]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</Sequence>
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
</ActivityAction>
</ForEach>
</If.Then>
</If>
</Sequence>
</If.Then>
<If.Else>
<If Condition="[(Not TestSpecs Is Nothing) And (TestSpecs.Count > 0)]" DisplayName="If TestSpecs Is Not Nothing or Empty" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:WriteBuildWarning DisplayName="Write Warning" Message="No automated tests will be run for this build because tests have been disabled for this build definition. To enable these tests, edit this build definition and set the Disable Tests process parameter to false." />
</If.Then>
</If>
</If.Else>
</If>
</Sequence>
</ActivityAction>
</ForEach>
<If Condition="[BuildDetail.CompilationStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown]" DisplayName="If CompilationStatus = Unknown" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:SetBuildProperties CompilationStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Succeeded]" DisplayName="Set CompilationStatus to Succeeded" PropertiesToSet="CompilationStatus" mtbwt:BuildTrackingParticipant.Importance="Low" />
</If.Then>
</If>
<If Condition="[BuildDetail.TestStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown]" DisplayName="If TestStatus = Unknown" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:SetBuildProperties DisplayName="Set TestStatus to Succeeded" PropertiesToSet="TestStatus" TestStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Succeeded]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</If.Then>
</If>
<If Condition="[treatTestFailureAsBuildFailure And (BuildDetail.TestStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Failed)]" DisplayName="If TreatTestFailureAsBuildFailure And (TestStatus = Failed)" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:SetBuildProperties DisplayName="Set Status to Failed" PropertiesToSet="Status" Status="[Microsoft.TeamFoundation.Build.Client.BuildStatus.Failed]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</If.Then>
</If>
</Sequence>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception">
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="compilationExceptionArgument" />
</ActivityAction.Argument>
<Assign x:TypeArguments="s:Exception" DisplayName="Save the Compilation Exception" To="[compilationException]" Value="[compilationExceptionArgument]" mtbwt:BuildTrackingParticipant.Importance="None" />
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
<If Condition="[AssociateChangesetsAndWorkItems]" DisplayName="If AssociateChangesetsAndWorkItems" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<If Condition="[CreateLabel]" DisplayName="If CreateLabel and AssociateChangesetsAndWorkItems" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:InvokeForReason DisplayName="Associate Changesets and Work Items for non-Shelveset Builds" Reason="Manual, IndividualCI, BatchedCI, Schedule, ScheduleForced, UserCreated">
<mtbwa:AssociateChangesetsAndWorkItems DisplayName="Associate Changesets and Work Items" Result="[associatedChangesets]" />
</mtbwa:InvokeForReason>
</If.Then>
<If.Else>
<mtbwa:WriteBuildWarning DisplayName="Write Associate Changesets and Work Items Warning" Message="Cannot Associate Changesets and Work Items because the Label Sources option is set to False." />
</If.Else>
</If>
</If.Then>
</If>
</Parallel>
<If Condition="[Not compilationException Is Nothing]" DisplayName="If a Compilation Exception Occurred" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Throw DisplayName="Rethrow Compilation Exception" Exception="[compilationException]" mtbwt:BuildTrackingParticipant.Importance="Low" />
</If.Then>
</If>
<Parallel DisplayName="Get Impacted Tests, Index Sources and Publish Symbols">
<If Condition="[PerformTestImpactAnalysis]" DisplayName="If PerformTestImpactAnalysis" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<Sequence DisplayName="Get Impacted Tests" mtbwt:BuildTrackingParticipant.Importance="Low">
<Sequence.Variables>
<Variable x:TypeArguments="scg:IEnumerable(x:String)" Name="assemblies" />
</Sequence.Variables>
<mtbwa:FindMatchingFiles DisplayName="Find Build Outputs" MatchPattern="[String.Format(&quot;{0}\**\*.dll;{0}\**\*.exe&quot;, BinariesDirectory)]" Result="[assemblies]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<mttbb:GetImpactedTests Assemblies="[assemblies]" AssociatedChangesets="[associatedChangesets]" BinariesRoot="[BinariesDirectory]" Build="[BuildDetail]" CodeChanges="{x:Null}" DisplayName="Get Impacted Tests" ImpactedTests="{x:Null}" Workspace="[Workspace]" />
</Sequence>
</If.Then>
</If>
<If Condition="[SourceAndSymbolServerSettings.IndexSources Or SourceAndSymbolServerSettings.HasSymbolStorePath]" DisplayName="If SourceAndSymbolServerSettings.IndexSources Or SourceAndSymbolServerSettings.HasSymbolStorePath" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<mtbwa:InvokeForReason DisplayName="Index Sources and Publish Symbols for Triggered Builds" Reason="Triggered">
<mtbwa:InvokeForReason.Variables>
<Variable x:TypeArguments="scg:IEnumerable(x:String)" Name="symbolFiles" />
</mtbwa:InvokeForReason.Variables>
<mtbwa:FindMatchingFiles DisplayName="Find Symbol Files" MatchPattern="[String.Format(&quot;{0}\**\*.pdb&quot;, BinariesDirectory)]" Result="[symbolFiles]" mtbwt:BuildTrackingParticipant.Importance="Low" />
<If Condition="[SourceAndSymbolServerSettings.IndexSources]" DisplayName="If SourceAndSymbolServerSettings.IndexSources" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<TryCatch DisplayName="Try Index Sources" mtbwt:BuildTrackingParticipant.Importance="Low">
<TryCatch.Try>
<mtbwa:IndexSources DisplayName="Index Sources" FileList="[symbolFiles]" />
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception">
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
</ActivityAction.Argument>
<mtbwa:WriteBuildError DisplayName="Write Indexing Sources Error" Message="[exception.Message]" />
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
</If.Then>
</If>
<If Condition="[SourceAndSymbolServerSettings.HasSymbolStorePath]" DisplayName="If SourceAndSymbolServerSettings.HasSymbolStorePath" mtbwt:BuildTrackingParticipant.Importance="Low">
<If.Then>
<TryCatch DisplayName="Try Publish Symbols" mtbwt:BuildTrackingParticipant.Importance="Low">
<TryCatch.Try>
<mtbwa:SharedResourceScope DisplayName="Synchronize Access to Symbol Store" MaxExecutionTime="[TimeSpan.Zero]" MaxWaitTime="[New TimeSpan(1, 0, 0)]" ResourceName="[SourceAndSymbolServerSettings.SymbolStorePath]" mtbwt:BuildTrackingParticipant.Importance="Low">
<mtbwa:PublishSymbols DisplayName="Publish Symbols" FileList="[symbolFiles]" ProductName="[BuildDetail.BuildDefinition.Name]" StorePath="[SourceAndSymbolServerSettings.SymbolStorePath]" Version="[BuildDetail.BuildNumber]" />
</mtbwa:SharedResourceScope>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception">
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
</ActivityAction.Argument>
<mtbwa:WriteBuildError DisplayName="Write Publishing Symbols Error" Message="[exception.Message]" />
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
</If.Then>
</If>
</mtbwa:InvokeForReason>
</If.Then>
</If>
</Parallel>
</Sequence>
</TryCatch.Try>
</TryCatch>
</mtbwa:AgentScope>
<mtbwa:InvokeForReason DisplayName="Check In Gated Changes for CheckInShelveset Builds" Reason="CheckInShelveset">
<mtbwa:CheckInGatedChanges DisplayName="Check In Gated Changes" />
</mtbwa:InvokeForReason>
</Sequence>
</Activity>

View File

@ -0,0 +1,208 @@
<Activity mc:Ignorable="sads sap" x:Class="TfsBuild.Process" this:Process.LabWorkflowParameters="[New Microsoft.TeamFoundation.Lab.Workflow.Activities.LabWorkflowDetails()]" this:Process.Verbosity="[Microsoft.TeamFoundation.Build.Workflow.BuildVerbosity.Normal]" this:Process.BuildNumberFormat="[&quot;$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)&quot;]" this:Process.SupportedReasons="Manual, BatchedCI, Schedule, ScheduleForced" this:Process.TimeoutForDeploymentScriptInMinutes="30" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mt="clr-namespace:Microsoft.TeamFoundation;assembly=Microsoft.TeamFoundation.Common" xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client" xmlns:mtbc1="clr-namespace:Microsoft.TeamFoundation.Build.Common;assembly=Microsoft.TeamFoundation.Build.Common" xmlns:mtbp="clr-namespace:Microsoft.TeamFoundation.Build.ProcessComponents;assembly=Microsoft.TeamFoundation.Build.ProcessComponents" xmlns:mtbw="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbws="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Services;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtlc="clr-namespace:Microsoft.TeamFoundation.Lab.Client;assembly=Microsoft.TeamFoundation.Lab.Client" xmlns:mtltc="clr-namespace:Microsoft.TeamFoundation.Lab.TestIntegration.Client;assembly=Microsoft.TeamFoundation.Lab.TestIntegration.Client" xmlns:mtlwa="clr-namespace:Microsoft.TeamFoundation.Lab.Workflow.Activities;assembly=Microsoft.TeamFoundation.Lab.Workflow.Activities" xmlns:mtlwc="clr-namespace:Microsoft.TeamFoundation.Lab.WorkflowIntegration.Client;assembly=Microsoft.TeamFoundation.Lab.WorkflowIntegration.Client" xmlns:mttbb="clr-namespace:Microsoft.TeamFoundation.TestImpact.BuildIntegration.BuildActivities;assembly=Microsoft.TeamFoundation.TestImpact.BuildIntegration" xmlns:mttc="clr-namespace:Microsoft.TeamFoundation.TestManagement.Client;assembly=Microsoft.TeamFoundation.TestManagement.Client" xmlns:mtvc="clr-namespace:Microsoft.TeamFoundation.VersionControl.Client;assembly=Microsoft.TeamFoundation.VersionControl.Client" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:s1="clr-namespace:System;assembly=System" xmlns:s2="clr-namespace:System;assembly=System.Core" xmlns:s3="clr-namespace:System;assembly=System.ServiceModel" xmlns:s4="clr-namespace:System;assembly=System.ComponentModel.Composition" xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities" xmlns:sad="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sl="clr-namespace:System.Linq;assembly=System.Core" xmlns:this="clr-namespace:TfsBuild" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:Members>
<x:Property Name="BuildProcessVersion" Type="x:String" />
<x:Property Name="Metadata" Type="mtbw:ProcessParameterMetadataCollection" />
<x:Property Name="LabWorkflowParameters" Type="InArgument(mtlwa:LabWorkflowDetails)" />
<x:Property Name="Verbosity" Type="InArgument(mtbw:BuildVerbosity)" />
<x:Property Name="BuildNumberFormat" Type="InArgument(x:String)" />
<x:Property Name="SupportedReasons" Type="mtbc:BuildReason" />
<x:Property Name="TimeoutForDeploymentScriptInMinutes" Type="InArgument(x:Int32)">
<x:Property.Attributes>
<RequiredArgumentAttribute />
</x:Property.Attributes>
</x:Property>
</x:Members>
<this:Process.BuildProcessVersion>11.0</this:Process.BuildProcessVersion>
<this:Process.Metadata>
<mtbw:ProcessParameterMetadataCollection>
<mtbw:ProcessParameterMetadata BrowsableWhen="Always" Category="Misc" DisplayName="Timeout For Each Deployment Script (in Minutes)" ParameterName="TimeoutForDeploymentScriptInMinutes" />
</mtbw:ProcessParameterMetadataCollection>
</this:Process.Metadata>
<sap:VirtualizedContainerService.HintSize>920,3702</sap:VirtualizedContainerService.HintSize>
<mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings>
<Sequence DisplayName="Application Deployment Workflow" sad:XamlDebuggerXmlReader.FileName="D:\VSTLM\src\vset\LabManager\LabCustomActivities\Templates\LabDefaultTemplate.xaml" sap:VirtualizedContainerService.HintSize="880,3662" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
<Sequence.Variables>
<Variable x:TypeArguments="mtbc:IBuildDetail" Name="BuildDetail" />
<Variable x:TypeArguments="x:String" Name="LabEnvironmentUri" />
<Variable x:TypeArguments="x:String" Name="BuildLocation" />
<Variable x:TypeArguments="x:Int64" Name="SnapshotId" />
<Variable x:TypeArguments="x:Int32" Name="QueueBuildId" />
<Variable x:TypeArguments="mtbc:BuildStatus" Default="[Microsoft.TeamFoundation.Build.Client.BuildStatus.Succeeded]" Name="BuildStatus" />
<Variable x:TypeArguments="mtbc:IBuildDetail" Name="ChildBuildDetail" />
<Variable x:TypeArguments="mtbc:IBuildDetail" Name="SelectedBuildDetail" />
<Variable x:TypeArguments="x:String" Name="BuildNumber" />
<Variable x:TypeArguments="mtlc:LabEnvironment" Name="LabEnvironment" />
</Sequence.Variables>
<mtbwa:UpdateBuildNumber BuildNumberFormat="[BuildNumberFormat]" DisplayName="Update Build Number" sap:VirtualizedContainerService.HintSize="858,22" />
<mtbwa:GetBuildDetail DisplayName="Get Build Details" sap:VirtualizedContainerService.HintSize="858,22" Result="[BuildDetail]" />
<If Condition="[LabWorkflowParameters.BuildDetails.IsTeamSystemBuild = True AndAlso LabWorkflowParameters.BuildDetails.QueueNewBuild = True]" DisplayName="If Build is needed" sap:VirtualizedContainerService.HintSize="858,416">
<If.Then>
<Sequence DisplayName="Do Build" sap:VirtualizedContainerService.HintSize="301,308">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<mtlwa:RunWorkflow BuildController="{x:Null}" LabEnvironmentUri="{x:Null}" BuildDefinition="[LabWorkflowParameters.BuildDetails.BuildDefinitionName]" DisplayName="Start Build Workflow" sap:VirtualizedContainerService.HintSize="242,22" ProjectName="[BuildDetail.TeamProject]" Result="[QueueBuildId]" />
<mtlwa:WaitForWorkflow AllowPartiallySucceededBuild="True" BuildDetails="[ChildBuildDetail]" DisplayName="Wait For Build To Complete" sap:VirtualizedContainerService.HintSize="242,22" LabWorkflowType="[Microsoft.TeamFoundation.Lab.Workflow.Activities.WorkflowType.Build]" MaxConsecutiveFailuresToIgnoreDuringWaitForCompletion="[3]" MaxWaitTime="[TimeSpan.Zero]" QueueBuildId="[QueueBuildId]" RefreshInterval="[System.TimeSpan.FromMinutes(1)]" Result="[BuildStatus]" ThrowOnError="True" />
<Assign DisplayName="Set Build Location" sap:VirtualizedContainerService.HintSize="242,60">
<Assign.To>
<OutArgument x:TypeArguments="x:Uri">[LabWorkflowParameters.BuildDetails.BuildUri]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:Uri">[ChildBuildDetail.Uri]</InArgument>
</Assign.Value>
</Assign>
</Sequence>
</If.Then>
</If>
<mtlwa:WriteDeploymentInformation Url="{x:Null}" DeploymentInformationType="[Microsoft.TeamFoundation.Build.Common.DeploymentInformationTypes.Deploy]" DisplayName="Update Deployment Summary" sap:VirtualizedContainerService.HintSize="858,22" Message="[String.Format(&quot;Lab environment: {0}&quot;, LabWorkflowParameters.EnvironmentDetails.LabEnvironmentName)]" />
<mtlwa:GetBuildLocationAndBuildNumber BuildDetails="[LabWorkflowParameters.BuildDetails]" BuildNumber="[BuildNumber]" DisplayName="Get Build Location And Build Number" sap:VirtualizedContainerService.HintSize="858,22" Result="[BuildLocation]" SelectedBuild="[SelectedBuildDetail]" />
<If Condition="[LabWorkflowParameters.BuildDetails.IsTeamSystemBuild = True]" DisplayName="Compute build location needed" sap:VirtualizedContainerService.HintSize="858,208">
<If.Then>
<Assign DisplayName="Compute build path" sap:VirtualizedContainerService.HintSize="291,100">
<Assign.To>
<OutArgument x:TypeArguments="x:String">[BuildLocation]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:String">[If(LabWorkflowParameters.BuildDetails.Configuration Is Nothing, BuildLocation, If(LabWorkflowParameters.BuildDetails.Configuration.IsEmpty Or (SelectedBuildDetail.Information.GetNodesByType(Microsoft.TeamFoundation.Build.Common.InformationTypes.ConfigurationSummary, True)).Count = 1, BuildLocation, If(LabWorkflowParameters.BuildDetails.Configuration.IsPlatformEmptyOrAnyCpu, BuildLocation + "\" + LabWorkflowParameters.BuildDetails.Configuration.Configuration, BuildLocation + "\" + LabWorkflowParameters.BuildDetails.Configuration.Platform + "\" + LabWorkflowParameters.BuildDetails.Configuration.Configuration)))]</InArgument>
</Assign.Value>
</Assign>
</If.Then>
</If>
<If Condition="[LabWorkflowParameters.EnvironmentDetails.Disposition = Microsoft.TeamFoundation.Lab.Client.LabEnvironmentDisposition.Stored]" DisplayName="If user selected stored environment" sap:VirtualizedContainerService.HintSize="858,208">
<If.Then>
<Throw DisplayName="Indicate error" Exception="[New System.Exception(&quot;You have selected an environment that is stored in the library. Select an environment that is deployed on a team project host group.&quot;)]" sap:VirtualizedContainerService.HintSize="269,100" />
</If.Then>
</If>
<Assign DisplayName="Get Lab Environment Uri" sap:VirtualizedContainerService.HintSize="858,22" >
<Assign.To>
<OutArgument x:TypeArguments="x:String">[LabEnvironmentUri]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:String">[LabWorkflowParameters.EnvironmentDetails.LabEnvironmentUri.ToString()]</InArgument>
</Assign.Value>
</Assign>
<mtlwa:GetLabEnvironment DisplayName="Get Lab Environment" LabEnvironmentUri="[LabEnvironmentUri]" Result="[LabEnvironment]" />
<If Condition="[LabWorkflowParameters.EnvironmentDetails.RevertToSnapshot = True]" DisplayName=" If Restore Snapshot" sap:VirtualizedContainerService.HintSize="858,316">
<If.Then>
<Sequence DisplayName="Restore Snapshot" sap:VirtualizedContainerService.HintSize="231,208">
<mtlwa:GetLabEnvironmentSnapshotId DisplayName="Get Snapshot Details" sap:VirtualizedContainerService.HintSize="200,22" LabEnvironmentUri="[LabEnvironmentUri]" Result="[SnapshotId]" SnapshotName="[LabWorkflowParameters.EnvironmentDetails.SnapshotName]" />
<mtlwa:RestoreLabEnvironment DisplayName="Restore Lab Environment to Snapshot" sap:VirtualizedContainerService.HintSize="200,22" LabEnvironmentUri="[LabEnvironmentUri]" SnapshotId="[SnapshotId]" />
</Sequence>
</If.Then>
<If.Else>
<Sequence DisplayName="No Clean Snapshot" >
<If Condition="[Not String.Equals(Microsoft.TeamFoundation.Lab.Client.LabEnvironment.UnmanagedProvider, labEnvironment.LabProvider)]" DisplayName= "If Virtual Environment">
<If.Then>
<mtlwa:WriteDeploymentInformation Url="{x:Null}" DeploymentInformationType="[Microsoft.TeamFoundation.Build.Common.DeploymentInformationTypes.Deploy]" DisplayName="Clean snapshot not specified " sap:VirtualizedContainerService.HintSize="208,208" Message="Build definition did not specify a clean snapshot. It is a best practice to use clean snapshot when running the lab workflow." />
</If.Then>
</If>
</Sequence>
</If.Else>
</If>
<If Condition="[LabWorkflowParameters.DeploymentDetails.DeploymentNeeded = True or LabWorkflowParameters.TestParameters.RunTest = True]" DisplayName="If deployment or test needed" sap:VirtualizedContainerService.HintSize="858,1214">
<If.Then>
<mtlwa:WaitForEnvironmentReady DisplayName="Wait For Environment To Be Ready" sap:VirtualizedContainerService.HintSize="711,22" LabEnvironmentUri="[LabEnvironmentUri]" MaxWaitTime="[System.TimeSpan.FromMinutes(10)]" />
</If.Then>
</If>
<If Condition="[LabWorkflowParameters.DeploymentDetails.DeploymentNeeded = True]" DisplayName="If deployment needed" sap:VirtualizedContainerService.HintSize="858,1214">
<If.Then>
<Sequence DisplayName="Do deployment" sap:VirtualizedContainerService.HintSize="733,1106">
<mtlwa:ReserveEnvironmentForDeployment DisplayName="Reserve Environment For Deployment" sap:VirtualizedContainerService.HintSize="711,22" LabEnvironmentUri="[LabEnvironmentUri]" />
<TryCatch DisplayName="Deploy Build on Environment">
<TryCatch.Try>
<Sequence DisplayName="Deploying Build">
<ForEach x:TypeArguments="x:String" DisplayName="Run Deployment scripts" sap:VirtualizedContainerService.HintSize="711,254" Values="[LabWorkflowParameters.DeploymentDetails.Scripts]">
<ActivityAction x:TypeArguments="x:String">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:String" Name="deploymentConfigurationPair" />
</ActivityAction.Argument>
<mtlwa:RunDeploymentTask BuildLocation="[BuildLocation]" DeploymentScriptDetails="[deploymentConfigurationPair]" DisplayName="Run Deployment Task" sap:VirtualizedContainerService.HintSize="200,22" LabEnvironmentUri="[LabEnvironmentUri]" MaxWaitTime="[TimeSpan.FromMinutes(TimeoutForDeploymentScriptInMinutes)]" ThrowOnError="True" UseRoleForDeployment="[LabWorkflowParameters.DeploymentDetails.UseRoleForDeployment]" />
</ActivityAction>
</ForEach>
</Sequence>
</TryCatch.Try>
<TryCatch.Finally>
<mtlwa:ReleaseEnvironmentFromDeployment DisplayName="Release Environment From Deployment" sap:VirtualizedContainerService.HintSize="711,22" LabEnvironmentUri="[LabEnvironmentUri]" />
</TryCatch.Finally>
</TryCatch>
<mtlwa:WriteDeploymentInformation DeploymentInformationType="[Microsoft.TeamFoundation.Build.Common.DeploymentInformationTypes.Deploy]" DisplayName="Application Deployment Succeeded" sap:VirtualizedContainerService.HintSize="711,22" Message="[String.Format(&quot;The application was deployed successfully from the following build location:&quot;)]" Url="[BuildLocation]" />
<If Condition="[LabWorkflowParameters.DeploymentDetails.TakePostDeploymentSnapshot = True]" DisplayName="Post Deployment Snapshot" sap:VirtualizedContainerService.HintSize="711,626">
<If.Then>
<Sequence DisplayName="Take Post deployment Snapshot " sap:VirtualizedContainerService.HintSize="486,518">
<Sequence.Variables>
<Variable x:TypeArguments="x:Int64" Name="PostDeploymentSnapshotChainId" />
<Variable x:TypeArguments="x:String" Default="[String.Format(&quot;{0}_{1}&quot;, BuildDetail.BuildDefinition.Name, BuildDetail.BuildNumber)]" Name="PostDeploymentSnapshotName" />
</Sequence.Variables>
<If Condition="[String.IsNullOrEmpty(LabWorkflowParameters.DeploymentDetails.PostDeploymentSnapshotName) = False]" DisplayName="Check snapshot name" sap:VirtualizedContainerService.HintSize="464,208">
<If.Then>
<Assign sap:VirtualizedContainerService.HintSize="291,100">
<Assign.To>
<OutArgument x:TypeArguments="x:String">[PostDeploymentSnapshotName]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:String">[If(LabWorkflowParameters.BuildDetails.IsTeamSystemBuild = True,String.Format("{0}_{1}_{2}", LabWorkflowParameters.DeploymentDetails.PostDeploymentSnapshotName, BuildNumber,BuildDetail.BuildNumber),String.Format("{0}_{1}", LabWorkflowParameters.DeploymentDetails.PostDeploymentSnapshotName, BuildDetail.BuildNumber))]</InArgument>
</Assign.Value>
</Assign>
</If.Then>
</If>
<mtlwa:SnapshotLabEnvironment DisplayName="Taking Post Deployment snapshot" sap:VirtualizedContainerService.HintSize="464,22" LabEnvironmentUri="[LabEnvironmentUri]" SnapshotChainId="[PostDeploymentSnapshotChainId]" SnapshotName="[PostDeploymentSnapshotName]" />
<mtlwa:WriteDeploymentInformation Url="{x:Null}" DeploymentInformationType="[Microsoft.TeamFoundation.Build.Common.DeploymentInformationTypes.Deploy]" DisplayName="Taking Snapshot succeeded" sap:VirtualizedContainerService.HintSize="464,22" Message="[String.Format(&quot;The following snapshot was taken after the deployment was finished: {0}&quot;, PostDeploymentSnapshotName)]" />
<mtlwa:WriteDeploymentInformation DeploymentInformationType="[Microsoft.TeamFoundation.Build.Common.DeploymentInformationTypes.ConnectToSnapshot]" DisplayName="Added connection link to the Snapshot" sap:VirtualizedContainerService.HintSize="464,22" Message="[PostDeploymentSnapshotName]" Url="[PostDeploymentSnapshotChainId.ToString()]" />
</Sequence>
</If.Then>
<If.Else>
<Sequence DisplayName = "No Post Deployment Snapshot">
<If Condition="[Not String.Equals(Microsoft.TeamFoundation.Lab.Client.LabEnvironment.UnmanagedProvider, labEnvironment.LabProvider)]" DisplayName= "If Virtual Environment">
<If.Then>
<mtlwa:WriteDeploymentInformation Url="{x:Null}" DeploymentInformationType="[Microsoft.TeamFoundation.Build.Common.DeploymentInformationTypes.Deploy]" DisplayName="Post deployment snapshot not specified" sap:VirtualizedContainerService.HintSize="200,518" Message="Build definition did not specify a post deployment snapshot. It is a best practice to take post deployment snapshot when running the lab workflow." />
</If.Then>
</If>
</Sequence>
</If.Else>
</If>
</Sequence>
</If.Then>
</If>
<If Condition="[LabWorkflowParameters.TestParameters.RunTest = True]" DisplayName="Run Tests on Environment" sap:VirtualizedContainerService.HintSize="858,604">
<If.Then>
<Sequence DisplayName="Run Tests" sap:VirtualizedContainerService.HintSize="656,498">
<Sequence.Variables>
<Variable x:TypeArguments="mtltc:TestingCapabilityInformation" Name="TestCapabilityInfo" />
<Variable x:TypeArguments="x:String" Name="variable1" />
<Variable x:TypeArguments="mtlwa:TestRunStatistics" Default="[New Microsoft.TeamFoundation.Lab.Workflow.Activities.TestRunStatistics()]" Name="TestResults" />
</Sequence.Variables>
<mtlwa:ExecuteRemoteTestRun2 MaxWaitTime="{x:Null}" TestEnvironment="{x:Null}" BuildNumber="[BuildNumber]" BuildDefinitionName="[LabWorkflowParameters.BuildDetails.BuildDefinitionName]" DisplayName="Running Tests" sap:VirtualizedContainerService.HintSize="634,22" LabEnvironmentUri="[LabEnvironmentUri]" MaxConsecutiveFailuresToIgnoreDuringWaitForCompletion="[3]" RefreshInterval="[System.TimeSpan.FromMinutes(1)]" Result="[TestResults]" TestDirectory="[BuildLocation]" TestParameters="[LabWorkflowParameters.TestParameters]" Title="[String.Format(&quot;{0}&quot;, BuildDetail.BuildNumber)]" />
<If Condition="[TestResults.PassedTests &lt;&gt; TestResults.TotalTests Or TestResults.TestRunStatus &lt;&gt; TestManagement.Client.TestRunState.Completed]" DisplayName="If all tests have not passed" sap:VirtualizedContainerService.HintSize="634,312">
<If.Then>
<If Condition="[(LabWorkflowParameters.BuildDetails.IsTeamSystemBuild = True AndAlso LabWorkflowParameters.BuildDetails.QueueNewBuild = True) Or (LabWorkflowParameters.DeploymentDetails.DeploymentNeeded = True)]" DisplayName="Set build status" sap:VirtualizedContainerService.HintSize="509,206">
<If.Then>
<Assign DisplayName="Partially succeeded" sap:VirtualizedContainerService.HintSize="242,100">
<Assign.To>
<OutArgument x:TypeArguments="mtbc:BuildStatus">[BuildStatus]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="mtbc:BuildStatus">[Microsoft.TeamFoundation.Build.Client.BuildStatus.PartiallySucceeded]</InArgument>
</Assign.Value>
</Assign>
</If.Then>
<If.Else>
<Assign DisplayName="Failed" sap:VirtualizedContainerService.HintSize="242,100">
<Assign.To>
<OutArgument x:TypeArguments="mtbc:BuildStatus">[BuildStatus]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="mtbc:BuildStatus">[Microsoft.TeamFoundation.Build.Client.BuildStatus.Failed]</InArgument>
</Assign.Value>
</Assign>
</If.Else>
</If>
</If.Then>
</If>
</Sequence>
</If.Then>
</If>
<mtbwa:SetBuildProperties DisplayName="Set build status" sap:VirtualizedContainerService.HintSize="858,22" PropertiesToSet="Status" Status="[BuildStatus]" />
</Sequence>
</Activity>

View File

@ -0,0 +1,76 @@
<Activity mc:Ignorable="sad" x:Class="TfsBuild.Process" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client" xmlns:mtbw="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwt="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Tracking;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtvc="clr-namespace:Microsoft.TeamFoundation.VersionControl.Client;assembly=Microsoft.TeamFoundation.VersionControl.Client" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:sad="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sad1="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:this="clr-namespace:TfsBuild;" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:Members>
<x:Property Name="ConfigurationFolderPath" Type="InArgument(x:String)" />
<x:Property Name="AgentSettings" Type="InArgument(mtbwa:AgentSettings)" />
<x:Property Name="MSBuildArguments" Type="InArgument(x:String)" />
<x:Property Name="MSBuildPlatform" Type="InArgument(mtbwa:ToolPlatform)" />
<x:Property Name="DoNotDownloadBuildType" Type="InArgument(x:Boolean)" />
<x:Property Name="LogFilePerProject" Type="InArgument(x:Boolean)" />
<x:Property Name="SourcesSubdirectory" Type="InArgument(x:String)" />
<x:Property Name="BinariesSubdirectory" Type="InArgument(x:String)" />
<x:Property Name="TestResultsSubdirectory" Type="InArgument(x:String)" />
<x:Property Name="RecursionType" Type="InArgument(mtvc:RecursionType)" />
<x:Property Name="Verbosity" Type="InArgument(mtbw:BuildVerbosity)" />
<x:Property Name="Metadata" Type="mtbw:ProcessParameterMetadataCollection" />
<x:Property Name="SupportedReasons" Type="mtbc:BuildReason" />
</x:Members>
<this:Process.ConfigurationFolderPath>
<InArgument x:TypeArguments="x:String" />
</this:Process.ConfigurationFolderPath>
<this:Process.AgentSettings>[New Microsoft.TeamFoundation.Build.Workflow.Activities.AgentSettings() With {.MaxWaitTime = New System.TimeSpan(4, 0, 0), .MaxExecutionTime = New System.TimeSpan(0, 0, 0), .TagComparison = Microsoft.TeamFoundation.Build.Workflow.Activities.TagComparison.MatchExactly }]</this:Process.AgentSettings>
<this:Process.MSBuildArguments>
<InArgument x:TypeArguments="x:String" />
</this:Process.MSBuildArguments>
<this:Process.MSBuildPlatform>[Microsoft.TeamFoundation.Build.Workflow.Activities.ToolPlatform.Auto]</this:Process.MSBuildPlatform>
<this:Process.DoNotDownloadBuildType>[False]</this:Process.DoNotDownloadBuildType>
<this:Process.LogFilePerProject>[False]</this:Process.LogFilePerProject>
<this:Process.SourcesSubdirectory>
<InArgument x:TypeArguments="x:String" />
</this:Process.SourcesSubdirectory>
<this:Process.BinariesSubdirectory>
<InArgument x:TypeArguments="x:String" />
</this:Process.BinariesSubdirectory>
<this:Process.TestResultsSubdirectory>
<InArgument x:TypeArguments="x:String" />
</this:Process.TestResultsSubdirectory>
<this:Process.RecursionType>[Microsoft.TeamFoundation.VersionControl.Client.RecursionType.OneLevel]</this:Process.RecursionType>
<this:Process.Verbosity>[Microsoft.TeamFoundation.Build.Workflow.BuildVerbosity.Normal]</this:Process.Verbosity>
<this:Process.Metadata>
<mtbw:ProcessParameterMetadataCollection />
</this:Process.Metadata>
<this:Process.SupportedReasons>All</this:Process.SupportedReasons>
<mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<Sequence.Variables>
<Variable x:TypeArguments="mtbc:IBuildDetail" Name="BuildDetail" />
</Sequence.Variables>
<mtbwa:GetBuildDetail DisplayName="Get the Build" Result="[BuildDetail]" />
<mtbwa:InvokeForReason DisplayName="Update Build Number for Triggered Builds" Reason="Triggered">
<mtbwa:UpdateBuildNumber BuildNumberFormat="[&quot;$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)&quot;]" DisplayName="Update Build Number" />
</mtbwa:InvokeForReason>
<mtbwa:AgentScope DisplayName="Run On Agent" MaxExecutionTime="[AgentSettings.MaxExecutionTime]" MaxWaitTime="[AgentSettings.MaxWaitTime]" ReservationSpec="[AgentSettings.GetAgentReservationSpec()]">
<mtbwa:AgentScope.Variables>
<Variable x:TypeArguments="x:String" Name="buildDirectory" />
</mtbwa:AgentScope.Variables>
<mtbwa:GetBuildDirectory DisplayName="Get the Build Directory" Result="[buildDirectory]" />
<If Condition="[Not String.IsNullOrEmpty(ConfigurationFolderPath)]" DisplayName="If Not String.IsNullOrEmpty(ConfigurationFolderPath)">
<If.Then>
<mtbwa:TfsBuild BinariesSubdirectory="[BinariesSubdirectory]" BuildDirectory="[buildDirectory]" CommandLineArguments="[MSBuildArguments]" ConfigurationFolderPath="[ConfigurationFolderPath]" DisplayName="Run TfsBuild for Configuration Folder" DoNotDownloadBuildType="[DoNotDownloadBuildType]" LogFilePerProject="[LogFilePerProject]" RecursionType="[RecursionType]" SourcesSubdirectory="[SourcesSubdirectory]" TargetsNotLogged="[New String() {&quot;GetNativeManifest&quot;, &quot;GetCopyToOutputDirectoryItems&quot;, &quot;GetTargetPath&quot;}]" TestResultsSubdirectory="[TestResultsSubdirectory]" ToolPlatform="[MSBuildPlatform]" Verbosity="[Verbosity]" />
</If.Then>
</If>
<If Condition="[BuildDetail.CompilationStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown]" DisplayName="If CompilationStatus = Unknown">
<If.Then>
<mtbwa:SetBuildProperties CompilationStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Succeeded]" DisplayName="Set CompilationStatus to Succeeded" PropertiesToSet="CompilationStatus" />
</If.Then>
</If>
<If Condition="[BuildDetail.TestStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown]" DisplayName="If TestStatus = Unknown">
<If.Then>
<mtbwa:SetBuildProperties DisplayName="Set TestStatus to Succeeded" PropertiesToSet="TestStatus" TestStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Succeeded]" />
</If.Then>
</If>
</mtbwa:AgentScope>
<mtbwa:InvokeForReason Reason="CheckInShelveset">
<mtbwa:CheckInGatedChanges DisplayName="Check In Gated Changes" />
</mtbwa:InvokeForReason>
</Sequence>
</Activity>

View File

@ -0,0 +1,163 @@
namespace FileTransfer
{
partial class FileTransferAddin
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FileTransferAddin));
this.lvMain = new System.Windows.Forms.ListView();
this.chTime = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chFile = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.mnuLVContext = new System.Windows.Forms.ContextMenu();
this.mnuLVCOpen = new System.Windows.Forms.MenuItem();
this.mnuLVCSaveAs = new System.Windows.Forms.MenuItem();
this.ilMain = new System.Windows.Forms.ImageList(this.components);
this.mnuHolder = new System.Windows.Forms.ContextMenu();
this.mnuHSend = new System.Windows.Forms.MenuItem();
this.pbMain = new System.Windows.Forms.ProgressBar();
this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
this.btSend = new System.Windows.Forms.Button();
this.mnuHAuto = new System.Windows.Forms.MenuItem();
this.SuspendLayout();
//
// lvMain
//
this.lvMain.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.chTime,
this.chFile});
this.lvMain.ContextMenu = this.mnuLVContext;
resources.ApplyResources(this.lvMain, "lvMain");
this.lvMain.FullRowSelect = true;
this.lvMain.Name = "lvMain";
this.lvMain.SmallImageList = this.ilMain;
this.lvMain.UseCompatibleStateImageBehavior = false;
this.lvMain.View = System.Windows.Forms.View.Details;
this.lvMain.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lvMain_MouseDoubleClick);
//
// chTime
//
resources.ApplyResources(this.chTime, "chTime");
//
// chFile
//
resources.ApplyResources(this.chFile, "chFile");
//
// mnuLVContext
//
this.mnuLVContext.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.mnuLVCOpen,
this.mnuLVCSaveAs});
//
// mnuLVCOpen
//
this.mnuLVCOpen.Index = 0;
resources.ApplyResources(this.mnuLVCOpen, "mnuLVCOpen");
this.mnuLVCOpen.Click += new System.EventHandler(this.mnuLVCOpen_Click);
//
// mnuLVCSaveAs
//
this.mnuLVCSaveAs.Index = 1;
resources.ApplyResources(this.mnuLVCSaveAs, "mnuLVCSaveAs");
this.mnuLVCSaveAs.Click += new System.EventHandler(this.mnuLVCSaveAs_Click);
//
// ilMain
//
this.ilMain.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
resources.ApplyResources(this.ilMain, "ilMain");
this.ilMain.TransparentColor = System.Drawing.Color.Transparent;
//
// mnuHolder
//
this.mnuHolder.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.mnuHAuto,
this.mnuHSend});
//
// mnuHSend
//
this.mnuHSend.Index = 1;
resources.ApplyResources(this.mnuHSend, "mnuHSend");
this.mnuHSend.Click += new System.EventHandler(this.mnuHSend_Click);
//
// pbMain
//
resources.ApplyResources(this.pbMain, "pbMain");
this.pbMain.Maximum = 10000;
this.pbMain.Name = "pbMain";
//
// openFileDialog
//
resources.ApplyResources(this.openFileDialog, "openFileDialog");
//
// saveFileDialog
//
resources.ApplyResources(this.saveFileDialog, "saveFileDialog");
//
// btSend
//
resources.ApplyResources(this.btSend, "btSend");
this.btSend.Name = "btSend";
this.btSend.UseVisualStyleBackColor = true;
this.btSend.Click += new System.EventHandler(this.mnuHSend_Click);
//
// mnuHAuto
//
this.mnuHAuto.Index = 0;
resources.ApplyResources(this.mnuHAuto, "mnuHAuto");
this.mnuHAuto.Click += new System.EventHandler(this.mnuHAuto_Click);
//
// FileTransferAddin
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.lvMain);
this.Controls.Add(this.btSend);
this.Controls.Add(this.pbMain);
this.Name = "FileTransferAddin";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ListView lvMain;
private System.Windows.Forms.ColumnHeader chTime;
private System.Windows.Forms.ColumnHeader chFile;
public System.Windows.Forms.ProgressBar pbMain;
private System.Windows.Forms.ContextMenu mnuLVContext;
private System.Windows.Forms.ContextMenu mnuHolder;
private System.Windows.Forms.MenuItem mnuLVCOpen;
private System.Windows.Forms.MenuItem mnuLVCSaveAs;
internal System.Windows.Forms.ImageList ilMain;
private System.Windows.Forms.OpenFileDialog openFileDialog;
private System.Windows.Forms.SaveFileDialog saveFileDialog;
private System.Windows.Forms.MenuItem mnuHSend;
private System.Windows.Forms.Button btSend;
private System.Windows.Forms.MenuItem mnuHAuto;
}
}

View File

@ -0,0 +1,267 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using RDPAddins.Common;
using System.IO;
using System.IO.Compression;
using System.Threading.Tasks;
using System.ComponentModel.Composition;
using System.Diagnostics;
using System.Threading;
namespace FileTransfer
{
[AddinMetadata("File transfer", "FTFTA1",
ChannelOptions.Compress | ChannelOptions.PriorityLow)]
public partial class FileTransferAddin : UserControl, IAddin
{
public void Initialize(IChannel Channel)
{
this.Channel = Channel;
Channel.Connected += new EventHandler(FileTransferAddin_Connected);
Channel.Disconnected += new EventHandler(Channel_Disconnected);
Channel.UI.BalloonTipClicked += new BalloonTipClickedHandler((ui, context) => StartFile((string)context));
Channel.UI.MenuCreating += new MenuCreatingHandler(ui => mnuHolder);
Channel.UI.IconCreating += new IconCreatingHandler(ui => Properties.Resources.AddinIcon);
Channel.UI.ControlCreating += new ControlCreatingHandler(ui => this);
}
void Channel_Disconnected(object sender, EventArgs e)
{
if (stopWaiting != null)
{
stopWaiting.Cancel();
stopWaiting = null;
}
}
protected FileTransferAddin()
{
InitializeComponent();
}
IChannel Channel;
CancellationTokenSource stopWaiting;
void FileTransferAddin_Connected(object sender, EventArgs e)
{
stopWaiting = new CancellationTokenSource();
Task.Factory.StartNew(token =>
{
while (true)
{
try
{
string file = WaitForFile((CancellationToken)token);
NewFile(file);
}
catch (OperationCanceledException) { break; }
catch { }
}
}, stopWaiting.Token, stopWaiting.Token);
}
private void lvMain_MouseDoubleClick(object sender, MouseEventArgs e)
{
if (lvMain.SelectedItems.Count > 0)
{
StartFile(lvMain.SelectedItems[0].SubItems[1].Text);
}
}
void StartFile(string filename)
{
if (!string.IsNullOrWhiteSpace(filename))
Task.Factory.StartNew(() =>
{
try { System.Diagnostics.Process.Start(filename); }
catch { }
});
}
private void mnuLVCSaveAs_Click(object sender, EventArgs e)
{
if (lvMain.SelectedItems.Count > 0)
{
string fileSavePath = string.Empty;
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
fileSavePath = saveFileDialog.FileName;
try
{
System.IO.File.Copy(lvMain.SelectedItems[0].SubItems[1].Text, fileSavePath, true);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}
private void mnuLVCOpen_Click(object sender, EventArgs e)
{
lvMain_MouseDoubleClick(null, null);
}
Dictionary<string, int> icons = new Dictionary<string, int>();
int GetIconIndex(string filename, bool upload)
{
string ext = (upload ? "u" : "d") + Path.GetExtension(filename);
int iconindex = 0;
if (icons.ContainsKey(ext))
iconindex = icons[ext];
else
{
using (var icon = System.Drawing.Icon.ExtractAssociatedIcon(filename))
{
var bmp = icon.ToBitmap();
using (var gr = Graphics.FromImage(bmp))
{
using (var img = upload ? Properties.Resources.Uploaded : Properties.Resources.Downloaded)
{
gr.DrawImage(img, 0, 19, 12, 12);
}
}
ilMain.Images.Add(bmp);
iconindex = ilMain.Images.Count - 1;
if (!ext.Contains("exe"))
icons[ext] = iconindex;
}
}
return iconindex;
}
public void NewFile(string filename)
{
Channel.UI.DoOnUIThread(() => lvMain.Items.Add(new ListViewItem(new string[] { DateTime.Now.ToString(), filename }, GetIconIndex(filename, false))));
System.Media.SystemSounds.Exclamation.Play();
if (Properties.Settings.Default.AutoOpen)
StartFile(filename);
else
Channel.UI.ShowBalloonTip(2000, Channel.Metadata.AddinName, filename, ToolTipIcon.Info, filename);
}
public string WaitForFile(CancellationToken token)
{
byte[] buffer = new byte[0x1000];
int toreadhead = 12;
int readedonce = 0;
int readed = 0;
while (toreadhead > 0)
{
readedonce = Channel.Read(buffer, readed, toreadhead);
{
if (readedonce > 0)
{
readed += readedonce;
toreadhead -= readedonce;
}
}
token.ThrowIfCancellationRequested();
Thread.Sleep(100);
}
long toread = BitConverter.ToInt64(buffer, 0);
int toreadname = BitConverter.ToInt32(buffer, 8);
readed = 0;
while (toreadname > 0)
{
readedonce = Channel.Read(buffer, readed, toreadname);
if (readedonce > 0)
{
readed += readedonce;
toreadname -= readedonce;
}
token.ThrowIfCancellationRequested();
}
long maxread = toread;
Channel.UI.DoOnUIThread(() =>
{
pbMain.Value = 0;
pbMain.Visible = true;
});
string filename = Path.Combine(Path.GetTempPath(), System.Text.Encoding.UTF8.GetString(buffer, 0, readed));
using (FileStream fs = File.OpenWrite(filename))
{
while (toread > 0)
{
readedonce = Channel.Read(buffer, 0, buffer.Length);
if (readedonce > 0)
{
fs.Write(buffer, 0, readedonce);
toread -= readedonce;
Channel.UI.DoOnUIThread(()=> pbMain.Value = (int)(pbMain.Maximum * (maxread - toread) / (double)maxread));
}
token.ThrowIfCancellationRequested();
}
}
Channel.UI.DoOnUIThread(() => pbMain.Visible = false);
return filename;
}
private void mnuHSend_Click(object sender, EventArgs e)
{
btSend.Visible = false;
mnuHSend.Enabled = false;
string fileOpenPath = string.Empty;
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
fileOpenPath = openFileDialog.FileName;
byte[] filename = System.Text.Encoding.UTF8.GetBytes(Path.GetFileName(fileOpenPath));
Task.Factory.StartNew(() =>
{
byte[] buffer = new byte[1600];
int bytesRead = 0;
using (FileStream fs = File.OpenRead(fileOpenPath))
{
long readed = 0, maxread = fs.Length;
Channel.Write(BitConverter.GetBytes(maxread), 0, 8);
Channel.Write(BitConverter.GetBytes(filename.Length), 0, 4);
Channel.Write(filename, 0, filename.Length);
Channel.UI.DoOnUIThread(() =>
{
pbMain.Value = 0;
pbMain.Visible = true;
});
while ((bytesRead = fs.Read(buffer, 0, buffer.Length)) != 0)
{
Channel.Write(buffer, 0, bytesRead);
readed += bytesRead;
Channel.UI.DoOnUIThread(() => pbMain.Value = (int)(pbMain.Maximum * readed / (double)maxread));
}
Channel.UI.DoOnUIThread(() => pbMain.Visible = false);
}
Channel.UI.DoOnUIThread(() =>
{
lvMain.Items.Add(new ListViewItem(new string[] { DateTime.Now.ToString(), fileOpenPath }, GetIconIndex(fileOpenPath, true)));
btSend.Visible = true;
mnuHSend.Enabled = true;
});
});
}
else
{
btSend.Visible = true;
mnuHSend.Enabled = true;
}
}
private void mnuHAuto_Click(object sender, EventArgs e)
{
var menu = (MenuItem)sender;
menu.Checked = !menu.Checked;
Properties.Settings.Default.AutoOpen = mnuHAuto.Checked;
Properties.Settings.Default.Save();
}
}
}

View File

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{68857642-A724-46A4-85B3-DAE2BD80498E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FileTransfer</RootNamespace>
<AssemblyName>FileTransfer</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\bin\Debug\Plugins\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\bin\Release\Plugins\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="FileTransferAddin.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="FileTransferAddin.Designer.cs">
<DependentUpon>FileTransferAddin.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="FileTransferAddin.pl-PL.resx">
<DependentUpon>FileTransferAddin.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="FileTransferAddin.resx">
<DependentUpon>FileTransferAddin.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<None Include="Resources\AddinIcon.png" />
<None Include="Resources\Downloaded.png" />
<None Include="Resources\Uploaded.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\RDPAddins.Common\RDPAddins.Common.csproj">
<Project>{EC8481C3-F82F-4F3C-84E2-6732750B6542}</Project>
<Name>RDPAddins.Common</Name>
</ProjectReference>
</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

@ -0,0 +1,10 @@
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
}

View File

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="chTime.Text" xml:space="preserve">
<value>Czas</value>
</data>
<data name="chFile.Text" xml:space="preserve">
<value>Plik</value>
</data>
<data name="mnuLVCOpen.Text" xml:space="preserve">
<value>Otwórz</value>
</data>
<data name="mnuLVCSaveAs.Text" xml:space="preserve">
<value>Zapisz jako...</value>
</data>
<data name="mnuHAuto.Text" xml:space="preserve">
<value>Autootwieranie</value>
</data>
<data name="mnuHSend.Text" xml:space="preserve">
<value>Wyślij plik...</value>
</data>
<data name="openFileDialog.Filter" xml:space="preserve">
<value>Wszystkie pliki|*.*</value>
</data>
<data name="openFileDialog.Title" xml:space="preserve">
<value>Plik do wysłania...</value>
</data>
<data name="saveFileDialog.Filter" xml:space="preserve">
<value>Wszystkie pliki|*.*</value>
</data>
<data name="saveFileDialog.Title" xml:space="preserve">
<value>Zapisz jako...</value>
</data>
<data name="btSend.Text" xml:space="preserve">
<value>Wyślij plik...</value>
</data>
</root>

View File

@ -0,0 +1,339 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="chTime.Text" xml:space="preserve">
<value>Time</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="chTime.Width" type="System.Int32, mscorlib">
<value>130</value>
</data>
<data name="chFile.Text" xml:space="preserve">
<value>File</value>
</data>
<data name="chFile.Width" type="System.Int32, mscorlib">
<value>320</value>
</data>
<metadata name="mnuLVContext.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>215, 17</value>
</metadata>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="lvMain.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="lvMain.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="lvMain.Size" type="System.Drawing.Size, System.Drawing">
<value>474, 119</value>
</data>
<metadata name="ilMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>130, 17</value>
</metadata>
<data name="ilMain.ImageSize" type="System.Drawing.Size, System.Drawing">
<value>32, 32</value>
</data>
<data name="lvMain.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="&gt;&gt;lvMain.Name" xml:space="preserve">
<value>lvMain</value>
</data>
<data name="&gt;&gt;lvMain.Type" xml:space="preserve">
<value>System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lvMain.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;lvMain.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="mnuLVCOpen.Text" xml:space="preserve">
<value>Open</value>
</data>
<data name="mnuLVCSaveAs.Text" xml:space="preserve">
<value>Save As...</value>
</data>
<metadata name="mnuHolder.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="mnuHSend.Text" xml:space="preserve">
<value>Send file...</value>
</data>
<data name="pbMain.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="pbMain.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 142</value>
</data>
<data name="pbMain.Size" type="System.Drawing.Size, System.Drawing">
<value>474, 23</value>
</data>
<data name="pbMain.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="pbMain.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;pbMain.Name" xml:space="preserve">
<value>pbMain</value>
</data>
<data name="&gt;&gt;pbMain.Type" xml:space="preserve">
<value>System.Windows.Forms.ProgressBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pbMain.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;pbMain.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>347, 17</value>
</metadata>
<data name="openFileDialog.Filter" xml:space="preserve">
<value>All files|*.*</value>
</data>
<data name="openFileDialog.Title" xml:space="preserve">
<value>File to send...</value>
</data>
<metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>480, 17</value>
</metadata>
<data name="saveFileDialog.Filter" xml:space="preserve">
<value>All files|*.*</value>
</data>
<data name="saveFileDialog.Title" xml:space="preserve">
<value>Save As...</value>
</data>
<data name="btSend.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="btSend.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 119</value>
</data>
<data name="btSend.Size" type="System.Drawing.Size, System.Drawing">
<value>474, 23</value>
</data>
<data name="btSend.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="btSend.Text" xml:space="preserve">
<value>Send file...</value>
</data>
<data name="&gt;&gt;btSend.Name" xml:space="preserve">
<value>btSend</value>
</data>
<data name="&gt;&gt;btSend.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btSend.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;btSend.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="mnuHAuto.Text" xml:space="preserve">
<value>Auto-open</value>
</data>
<metadata name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>pl-PL</value>
</metadata>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 13</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>474, 165</value>
</data>
<data name="&gt;&gt;chTime.Name" xml:space="preserve">
<value>chTime</value>
</data>
<data name="&gt;&gt;chTime.Type" xml:space="preserve">
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;chFile.Name" xml:space="preserve">
<value>chFile</value>
</data>
<data name="&gt;&gt;chFile.Type" xml:space="preserve">
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;mnuLVContext.Name" xml:space="preserve">
<value>mnuLVContext</value>
</data>
<data name="&gt;&gt;mnuLVContext.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenu, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;mnuLVCOpen.Name" xml:space="preserve">
<value>mnuLVCOpen</value>
</data>
<data name="&gt;&gt;mnuLVCOpen.Type" xml:space="preserve">
<value>System.Windows.Forms.MenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;mnuLVCSaveAs.Name" xml:space="preserve">
<value>mnuLVCSaveAs</value>
</data>
<data name="&gt;&gt;mnuLVCSaveAs.Type" xml:space="preserve">
<value>System.Windows.Forms.MenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ilMain.Name" xml:space="preserve">
<value>ilMain</value>
</data>
<data name="&gt;&gt;ilMain.Type" xml:space="preserve">
<value>System.Windows.Forms.ImageList, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;mnuHolder.Name" xml:space="preserve">
<value>mnuHolder</value>
</data>
<data name="&gt;&gt;mnuHolder.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenu, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;mnuHSend.Name" xml:space="preserve">
<value>mnuHSend</value>
</data>
<data name="&gt;&gt;mnuHSend.Type" xml:space="preserve">
<value>System.Windows.Forms.MenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;openFileDialog.Name" xml:space="preserve">
<value>openFileDialog</value>
</data>
<data name="&gt;&gt;openFileDialog.Type" xml:space="preserve">
<value>System.Windows.Forms.OpenFileDialog, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;saveFileDialog.Name" xml:space="preserve">
<value>saveFileDialog</value>
</data>
<data name="&gt;&gt;saveFileDialog.Type" xml:space="preserve">
<value>System.Windows.Forms.SaveFileDialog, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;mnuHAuto.Name" xml:space="preserve">
<value>mnuHAuto</value>
</data>
<data name="&gt;&gt;mnuHAuto.Type" xml:space="preserve">
<value>System.Windows.Forms.MenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>FileTransferControl</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("FileTransferAddin")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RDPAddin")]
[assembly: AssemblyCopyright("© Selvin 2011. All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("b9af866a-cc59-46bd-8842-404c08e00a96")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]

View File

@ -0,0 +1,84 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace FileTransfer.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// 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.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FileTransfer.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
internal static System.Drawing.Bitmap AddinIcon {
get {
object obj = ResourceManager.GetObject("AddinIcon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Downloaded {
get {
object obj = ResourceManager.GetObject("Downloaded", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Uploaded {
get {
object obj = ResourceManager.GetObject("Uploaded", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@ -0,0 +1,130 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="AddinIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\addinicon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Downloaded" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\downloaded.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Uploaded" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\uploaded.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -0,0 +1,38 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace FileTransfer.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool AutoOpen {
get {
return ((bool)(this["AutoOpen"]));
}
set {
this["AutoOpen"] = value;
}
}
}
}

View File

@ -0,0 +1,9 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="FileRDPAddin.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="AutoOpen" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

Binary file not shown.

After

Width:  |  Height:  |  Size: 975 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="FileRDPAddin.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<FileRDPAddin.Properties.Settings>
<setting name="AutoOpen" serializeAs="String">
<value>False</value>
</setting>
</FileRDPAddin.Properties.Settings>
</userSettings>
</configuration>

View File

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")]

View File

@ -0,0 +1,4 @@
/home/haraldwolff/src/dotnet/RDPAddins/FileTransfer/FileTransferAddin/obj/Debug/FileTransferAddin.csprojAssemblyReference.cache
/home/haraldwolff/src/dotnet/RDPAddins/FileTransfer/FileTransferAddin/obj/Debug/FileTransfer.FileTransferAddin.resources
/home/haraldwolff/src/dotnet/RDPAddins/FileTransfer/FileTransferAddin/obj/Debug/FileTransfer.FileTransferAddin.pl-PL.resources
/home/haraldwolff/src/dotnet/RDPAddins/FileTransfer/FileTransferAddin/obj/Debug/FileTransferAddin.csproj.GenerateResource.cache

View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{DB1D00FA-A8A4-4F01-931E-52686F51265E}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FileTransfer</RootNamespace>
<AssemblyName>FileTransfer</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Compile Include="frmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmMain.Designer.cs">
<DependentUpon>frmMain.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="frmMain.resx">
<SubType>Designer</SubType>
<DependentUpon>frmMain.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="WtsApi32.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\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

@ -0,0 +1,10 @@
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
}

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Threading;
namespace FileTransfer
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
Application.Run(new frmMain());
//Thread.Sleep(10000);
}
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
MessageBox.Show(e.ExceptionObject.ToString());
}
}
}

View File

@ -0,0 +1,33 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("FileTransferServer")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FileTransferServer")]
[assembly: AssemblyCopyright("© Selvin 2011. All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("043fcaf1-e05c-4364-b530-5693f273b6fa")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]

View File

@ -0,0 +1,33 @@
using System;
using System.Runtime.InteropServices;
namespace FileTransfer
{
class WtsApi32
{
[DllImport("Wtsapi32.dll", SetLastError = true)]
public static extern bool WTSVirtualChannelWrite(IntPtr channelHandle, byte[] data, int length, ref int bytesWritten);
[DllImport("Wtsapi32.dll", SetLastError = true)]
public static extern bool WTSVirtualChannelRead(IntPtr channelHandle, uint TimeOut, byte[] data, int length, ref int bytesReaded);
[DllImport("Wtsapi32.dll")]
public static extern IntPtr WTSVirtualChannelOpen(IntPtr server, int sessionId, [MarshalAs(UnmanagedType.LPStr)] string virtualName);
[DllImport("Wtsapi32.dll")]
public static extern bool WTSVirtualChannelClose(IntPtr channelHandle);
public enum VirtualClass
{
ClientData,
FileHandle
};
[DllImport("Wtsapi32.dll", SetLastError = true)]
public static extern bool WTSVirtualChannelQuery(IntPtr channelHandle, VirtualClass virtualClass, out IntPtr buffer, ref uint bytesReturned);
[DllImport("Wtsapi32.dll", SetLastError = true)]
public static extern void WTSFreeMemory(IntPtr memory);
}
}

View File

@ -0,0 +1,71 @@
namespace FileTransfer
{
partial class frmMain
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.btLoadAndSend = new System.Windows.Forms.Button();
this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
this.SuspendLayout();
//
// btLoadAndSend
//
this.btLoadAndSend.Location = new System.Drawing.Point(12, 12);
this.btLoadAndSend.Name = "btLoadAndSend";
this.btLoadAndSend.Size = new System.Drawing.Size(147, 37);
this.btLoadAndSend.TabIndex = 0;
this.btLoadAndSend.Text = "Load && Send";
this.btLoadAndSend.UseVisualStyleBackColor = true;
this.btLoadAndSend.Click += new System.EventHandler(this.btLoadAndSend_Click);
//
// openFileDialog
//
this.openFileDialog.Filter = "All files|*.*";
//
// frmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(174, 60);
this.Controls.Add(this.btLoadAndSend);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "frmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "FileTransfer";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.frmMain_FormClosed);
this.Load += new System.EventHandler(this.frmMain_Load);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btLoadAndSend;
private System.Windows.Forms.OpenFileDialog openFileDialog;
}
}

View File

@ -0,0 +1,165 @@
using System;
using System.IO;
using System.Windows.Forms;
using System.IO.Compression;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Threading;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
namespace FileTransfer
{
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
}
IntPtr handle = IntPtr.Zero;
FileStream fileStream = null;
private void btLoadAndSend_Click(object sender, EventArgs e)
{
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
try
{
var fileOpenPath = openFileDialog.FileName;
btLoadAndSend.Enabled = false;
Task.Factory.StartNew(() =>
{
byte[] filename = System.Text.Encoding.UTF8.GetBytes(Path.GetFileName(fileOpenPath));
using (FileStream fs = File.OpenRead(fileOpenPath))
{
fileStream.Write(BitConverter.GetBytes(fs.Length), 0, 8);
fileStream.Write(BitConverter.GetBytes(filename.Length), 0, 4);
fileStream.Write(filename, 0, filename.Length);
fs.CopyTo(fileStream);
fileStream.Flush();
}
}).ContinueWith(task => { btLoadAndSend.Enabled = true; }, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Current);
}
catch (Exception ex)
{
btLoadAndSend.Enabled = true;
MessageBox.Show("Somethings gone wrong:\n" + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
static void StartFile(string filename)
{
Task.Factory.StartNew(() =>
{
try
{
System.Diagnostics.Process.Start(filename);
}
catch { }
});
}
private void frmMain_Load(object sender, EventArgs e)
{
handle = WtsApi32.WTSVirtualChannelOpen(IntPtr.Zero, -1, "FTFTA1");
Task.Factory.StartNew(() =>
{
IntPtr tempPointer = IntPtr.Zero;
uint pointerLen = 0;
if (WtsApi32.WTSVirtualChannelQuery(handle, WtsApi32.VirtualClass.FileHandle, out tempPointer, ref pointerLen))
{
IntPtr realPointer = Marshal.ReadIntPtr(tempPointer);
WtsApi32.WTSFreeMemory(tempPointer);
var fileHandle = new SafeFileHandle(realPointer, false);
fileStream = new FileStream(fileHandle, FileAccess.ReadWrite, 0x640, true);
var os = new ObjectState();
os.RDPStream = fileStream;
var iar = fileStream.BeginRead(os.Buffer, 0, 8, CallBack, os);
}
else
Close();
});
}
private void frmMain_FormClosed(object sender, FormClosedEventArgs e)
{
fileStream.Dispose();
bool ret = WtsApi32.WTSVirtualChannelClose(handle);
}
enum FileDownloadStatus
{
Length,
NameLength,
Name,
Body,
}
class ObjectState
{
public int NameLength = 0;
public string Name = string.Empty;
public long Length = 0;
public FileDownloadStatus State = FileDownloadStatus.Length;
public byte[] Buffer = new byte[0x640];
public FileStream File = null;
public FileStream RDPStream = null;
}
static void CallBack(IAsyncResult iar)
{
if (iar.IsCompleted || iar.CompletedSynchronously)
{
var os = iar.AsyncState as ObjectState;
int readed = 0;
try
{
readed = os.RDPStream.EndRead(iar);
}
catch (IOException ex) { MessageBox.Show(ex.Message); }
if (readed != 0)
{
switch (os.State)
{
case FileDownloadStatus.Length:
os.Length = BitConverter.ToInt64(os.Buffer, 0);
os.State = FileDownloadStatus.NameLength;
os.RDPStream.BeginRead(os.Buffer, 0, 4, CallBack, os);
break;
case FileDownloadStatus.NameLength:
os.NameLength = BitConverter.ToInt32(os.Buffer, 0);
os.State = FileDownloadStatus.Name;
os.RDPStream.BeginRead(os.Buffer, 0, os.NameLength, CallBack, os);
break;
case FileDownloadStatus.Name:
os.Name = Path.Combine(Path.GetTempPath(), System.Text.Encoding.UTF8.GetString(os.Buffer, 0, readed));
os.File = File.OpenWrite(os.Name);
os.State = FileDownloadStatus.Body;
os.RDPStream.BeginRead(os.Buffer, 0, Math.Min(os.Buffer.Length, (int)os.Length), CallBack, os);
break;
case FileDownloadStatus.Body:
os.Length -= readed;
os.File.Write(os.Buffer, 0, readed);
if (os.Length == 0)
{
os.File.Dispose();
StartFile(os.Name);
var newos = new ObjectState();
newos.RDPStream = os.RDPStream;
os.RDPStream.BeginRead(newos.Buffer, 0, 8, CallBack, newos);
}
else
{
if (!os.RDPStream.SafeFileHandle.IsInvalid)
os.RDPStream.BeginRead(os.Buffer, 0, Math.Min(os.Buffer.Length, (int)os.Length), CallBack, os);
}
break;
}
}
}
}
}
}

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")]

View File

@ -0,0 +1 @@
2deac5ab15653598329ce4791b68dd03874120cf

View File

@ -0,0 +1,8 @@
/home/haraldwolff/src/dotnet/RDPAddins/FileTransfer/FileTransferServer/bin/Debug/FileTransfer.exe
/home/haraldwolff/src/dotnet/RDPAddins/FileTransfer/FileTransferServer/bin/Debug/FileTransfer.pdb
/home/haraldwolff/src/dotnet/RDPAddins/FileTransfer/FileTransferServer/obj/Debug/FileTransferServer.csprojAssemblyReference.cache
/home/haraldwolff/src/dotnet/RDPAddins/FileTransfer/FileTransferServer/obj/Debug/FileTransfer.frmMain.resources
/home/haraldwolff/src/dotnet/RDPAddins/FileTransfer/FileTransferServer/obj/Debug/FileTransferServer.csproj.GenerateResource.cache
/home/haraldwolff/src/dotnet/RDPAddins/FileTransfer/FileTransferServer/obj/Debug/FileTransferServer.csproj.CoreCompileInputs.cache
/home/haraldwolff/src/dotnet/RDPAddins/FileTransfer/FileTransferServer/obj/Debug/FileTransfer.exe
/home/haraldwolff/src/dotnet/RDPAddins/FileTransfer/FileTransferServer/obj/Debug/FileTransfer.pdb

View File

@ -0,0 +1,85 @@
#define AppName "RDPAddins"
#define AppVersion GetFileVersion(AddBackslash(SourcePath) + "..\bin\Release\RDPAddins.Core.dll")
[Setup]
AppName={#AppName}
AppVerName={#AppName} {#AppVersion}
DefaultGroupName={#AppName}
AppPublisher=Selvin
AppVersion={#AppVersion}
AllowNoIcons=false
AppCopyright=Copyright © Selvin 2006-2010. All rights reserved.
PrivilegesRequired=admin
OutputBaseFilename={#AppName} {#AppVersion}
OutputDir=/
DefaultDirName={pf}\{#AppName}
ArchitecturesInstallIn64BitMode=x64
Compression=lzma2/ultra
InternalCompressLevel=ultra
SolidCompression=yes
VersionInfoVersion={#AppVersion}
VersionInfoCompany=Selvin
VersionInfoDescription={#AppName}
AppID={{9172FF56-431B-4836-AEB8-A1A12C96B293}
DisableDirPage=true
UsePreviousAppDir=false
AllowUNCPath=false
DisableProgramGroupPage=true
AppendDefaultGroupName=false
[Dirs]
Name: {app}\Plugins; Flags: uninsalwaysuninstall
[Files]
Source: ..\bin\Release\RDPAddins.Core.dll; DestDir: {app}; Components: Dll; Flags: ignoreversion; Check: not Is64BitInstallMode
Source: ..\bin\x64\Release\RDPAddins.Core.dll; DestDir: {app}; Components: Dll; Flags: ignoreversion; Check: Is64BitInstallMode
;Source: bin\Release\RDPAddins.Common.dll; DestDir: {app}; Components: Dll; Flags: ignoreversion gacinstall; StrongAssemblyName: RDPAddins.Common
Source: ..\bin\Release\RDPAddins.Common.dll; DestDir: {app}; Components: Dll; Flags: ignoreversion
Source: ..\bin\Release\RDPAddins.Common.xml; DestDir: {app}; Components: Dll
Source: ..\bin\Release\RDPAddins.exe; DestDir: {app}; Components: Dll; Flags: ignoreversion
Source: ..\bin\Release\pl-PL\RDPAddins.resources.dll; DestDir: {app}\pl-PL; Components: Dll; Flags: ignoreversion
Source: ..\bin\Release\Plugins\FileTransfer.dll; DestDir: {app}\Plugins; Components: FTP; Flags: ignoreversion
Source: ..\bin\Release\Plugins\pl-PL\FileTransfer.resources.dll; DestDir: {app}\Plugins\pl-PL; Components: FTP; Flags: ignoreversion
[Icons]
Name: {group}\{cm:UninstallProgram,{#AppName}}; Filename: {uninstallexe}
[Languages]
Name: Polski; MessagesFile: compiler:Languages\Polish.isl
Name: English; MessagesFile: compiler:Default.isl
[Registry]
Root: HKCU; Subkey: Software\Microsoft\Terminal Server Client\Default\AddIns\RDPAddins; Flags: uninsdeletekey noerror; ValueName: Name; ValueData: {app}\RDPAddins.Core.dll; ValueType: string
[Components]
Name: Dll; Description: {cm:DllDescription}; Flags: fixed; Languages: ; Types: custom compact full
Name: FTP; Description: {cm:FTPDescription}; Languages: ; Types: custom full
[CustomMessages]
Polski.dotnetmissing=Ten program wymaga .NET Framework v4.0. Proszê zainstalowaæ .NET Framework v4.0 i uruchomiæ instalator ponownie.
English.dotnetmissing=This setup requires the .NET Framework v4.0. Please install the .NET Framework v4.0 and run this setup again.
Polski.DllDescription=Instaluje wszystkie potrzebne biblioteki
English.DllDescription=Install all required libraries
Polski.FTPDescription=Instaluje dodatek do transferu plików z i do serwera terminali
English.FTPDescription=Install addins which will transfer files from and to terminal server
[Code]
function InitializeSetup(): Boolean;
var
NetFrameWorkInstalled : Boolean;
begin
NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v4.0');
if NetFrameWorkInstalled =true then
begin
Result := true;
end;
if NetFrameWorkInstalled =false then
begin
MsgBox(ExpandConstant('{cm:dotnetmissing}'), mbError, MB_OK);
Result:=false;
end;
end;

View File

@ -0,0 +1,85 @@
#define AppName "RDPAddins"
#define AppVersion GetFileVersion(AddBackslash(SourcePath) + "..\bin\Release\RDPAddins.Core.dll")
[Setup]
AppName={#AppName}
AppVerName={#AppName} {#AppVersion}
DefaultGroupName={#AppName}
AppPublisher=Selvin
AppVersion={#AppVersion}
AllowNoIcons=false
AppCopyright=Copyright © Selvin 2006-2010. All rights reserved.
PrivilegesRequired=admin
OutputBaseFilename={#AppName} {#AppVersion}
OutputDir=/
DefaultDirName={pf}\{#AppName}
ArchitecturesInstallIn64BitMode=x64
Compression=lzma2/ultra
InternalCompressLevel=ultra
SolidCompression=yes
VersionInfoVersion={#AppVersion}
VersionInfoCompany=Selvin
VersionInfoDescription={#AppName}
AppID={{9172FF56-431B-4836-AEB8-A1A12C96B293}
DisableDirPage=true
UsePreviousAppDir=false
AllowUNCPath=false
DisableProgramGroupPage=true
AppendDefaultGroupName=false
[Dirs]
Name: {app}\Plugins; Flags: uninsalwaysuninstall
[Files]
Source: ..\bin\Release\RDPAddins.CoreC.dll; DestDir: {app}; Components: Dll; Flags: ignoreversion; Check: not Is64BitInstallMode
Source: ..\bin\x64\Release\RDPAddins.CoreC.dll; DestDir: {app}; Components: Dll; Flags: ignoreversion; Check: Is64BitInstallMode
;Source: bin\Release\RDPAddins.Common.dll; DestDir: {app}; Components: Dll; Flags: ignoreversion gacinstall; StrongAssemblyName: RDPAddins.Common
Source: ..\bin\Release\RDPAddins.Common.dll; DestDir: {app}; Components: Dll; Flags: ignoreversion
Source: ..\bin\Release\RDPAddins.Common.xml; DestDir: {app}; Components: Dll
Source: ..\bin\Release\RDPAddins.exe; DestDir: {app}; Components: Dll; Flags: ignoreversion
Source: ..\bin\Release\pl-PL\RDPAddins.resources.dll; DestDir: {app}\pl-PL; Components: Dll; Flags: ignoreversion
Source: ..\bin\Release\Plugins\FileTransfer.dll; DestDir: {app}\Plugins; Components: FTP; Flags: ignoreversion
Source: ..\bin\Release\Plugins\pl-PL\FileTransfer.resources.dll; DestDir: {app}\Plugins\pl-PL; Components: FTP; Flags: ignoreversion
[Icons]
Name: {group}\{cm:UninstallProgram,{#AppName}}; Filename: {uninstallexe}
[Languages]
Name: Polski; MessagesFile: compiler:Languages\Polish.isl
Name: English; MessagesFile: compiler:Default.isl
[Registry]
Root: HKCU; Subkey: Software\Microsoft\Terminal Server Client\Default\AddIns\RDPAddins; Flags: uninsdeletekey noerror; ValueName: Name; ValueData: {app}\RDPAddins.CoreC.dll; ValueType: string
[Components]
Name: Dll; Description: {cm:DllDescription}; Flags: fixed; Languages: ; Types: custom compact full
Name: FTP; Description: {cm:FTPDescription}; Languages: ; Types: custom full
[CustomMessages]
Polski.dotnetmissing=Ten program wymaga .NET Framework v4.0. Proszê zainstalowaæ .NET Framework v4.0 i uruchomiæ instalator ponownie.
English.dotnetmissing=This setup requires the .NET Framework v4.0. Please install the .NET Framework v4.0 and run this setup again.
Polski.DllDescription=Instaluje wszystkie potrzebne biblioteki
English.DllDescription=Install all required libraries
Polski.FTPDescription=Instaluje dodatek do transferu plików z i do serwera terminali
English.FTPDescription=Install addins which will transfer files from and to terminal server
[Code]
function InitializeSetup(): Boolean;
var
NetFrameWorkInstalled : Boolean;
begin
NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v4.0');
if NetFrameWorkInstalled =true then
begin
Result := true;
end;
if NetFrameWorkInstalled =false then
begin
MsgBox(ExpandConstant('{cm:dotnetmissing}'), mbError, MB_OK);
Result:=false;
end;
end;

View File

@ -0,0 +1,113 @@
using System;
using System.Drawing;
using System.ComponentModel.Composition;
namespace RDPAddins.Common
{
/// <summary>
/// Provides addin's metadata
/// </summary>
public interface IAddinMetadata
{
/// <summary>
/// Gets addin name
/// </summary>
string AddinName { get; }
/// <summary>
/// Get addin channel name
/// </summary>
string ChannelName { get; }
/// <summary>
/// Gets channel options
/// </summary>
ChannelOptions ChannelOptions { get; }
}
/// <summary>
/// Inherited from System.ComponentModel.Composition.ExportAttribute.
/// Every addins should have one as an addin description.
/// </summary>
[MetadataAttribute]
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public class AddinMetadataAttribute : ExportAttribute
{
/// <summary>
/// Initializes a new instance of the AddinMetadataAttribute class, exporting the type or member marked with this attribute with the specified name, channel name and channel options.
/// </summary>
/// <param name="AddinName">Name of the addin.</param>
/// <param name="ChannelName">!!! should be less than 7 chars !!! Channel name.</param>
/// <param name="ChannelOptions">Specified channel's options</param>
public AddinMetadataAttribute(string AddinName, string ChannelName, ChannelOptions ChannelOptions)
: base(typeof(IAddin))
{
this.AddinName = AddinName;
this.ChannelName = ChannelName;
this.ChannelOptions = ChannelOptions;
}
/// <summary>
/// Gets addin name
/// </summary>
public string AddinName { get; private set; }
/// <summary>
/// Get addin channel name
/// </summary>
public string ChannelName { get; private set; }
/// <summary>
/// Gets channel options
/// </summary>
public ChannelOptions ChannelOptions { get; private set; }
}
/// <summary>
/// Specifies the options for this virtual channel.
/// </summary>
[Flags]
public enum ChannelOptions : uint
{
/// <summary>
/// The channel is initialized.
/// </summary>
Initialized = 0x80000000,
/// <summary>
/// Encrypt client-to-server data.
/// </summary>
EncryptRDP = 0x40000000,
/// <summary>
/// Encrypt server-to-client data.
/// </summary>
EncryptSC = 0x20000000,
/// <summary>
/// Encrypt client-to-server data.
/// </summary>
EncryptCS = 0x10000000,
/// <summary>
/// Channel data should be sent with high Multipoint Communications Services (MCS) priority.
/// </summary>
PriorityHigh = 0x08000000,
/// <summary>
/// Channel data should be sent with medium MCS priority.
/// </summary>
PriorityMedium = 0x04000000,
/// <summary>
/// Channel data should be sent with low MCS priority.
/// </summary>
PriorityLow = 0x02000000,
/// <summary>
/// Virtual channel data should be compressed if RDP data is being compressed.
/// </summary>
CompressRDP = 0x00800000,
/// <summary>
/// Virtual channel data should be compressed, regardless of Remote Desktop Protocol (RDP) compression.
/// </summary>
Compress = 0x00400000,
/// <summary>
/// Affects how data sent by the IChannel.Write function is received at the server end. If this value is set, each data block is preceded by a CHANNEL_PDU_HEADER structure. If this value is not set, the data block includes only the data specified to IChannel.Write.
/// </summary>
ShowProtocol = 0x00200000
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace RDPAddins.Common
{
/// <summary>
/// Defines an addin interface.
/// </summary>
public interface IAddin
{
/// <summary>
/// Initializing addin with specific channel
/// </summary>
/// <param name="Channel">Channel created for this addin.</param>
void Initialize(IChannel Channel);
}
}

View File

@ -0,0 +1,104 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace RDPAddins.Common
{
/// <summary>
/// Represents RDS Channel
/// </summary>
public interface IChannel
{
/// <summary>
/// Occurs when VirtualChannelInitEventProc(VirtualChannelInitEvent in RDS API) was called with ChannelEvents.Initialized(CHANNEL_EVENT_INITIALIZED in RDS API)
/// </summary>
event EventHandler Initialized;
/// <summary>
/// Occurs when VirtualChannelInitEventProc(VirtualChannelInitEvent in RDS API) was called with ChannelEvents.Connected(CHANNEL_EVENT_CONNECTED in RDS API)
/// </summary>
event EventHandler Connected;
/// <summary>
/// Occurs when VirtualChannelInitEventProc(VirtualChannelInitEvent in RDS API) was called with ChannelEvents.Disconnected(CHANNEL_EVENT_DISCONNECTED in RDS API)
/// </summary>
event EventHandler Disconnected;
/// <summary>
/// Occurs when VirtualChannelInitEventProc(VirtualChannelInitEvent in RDS API) was called with ChannelEvents.Terminated(CHANNEL_EVENT_TERMINATED in RDS API)
/// </summary>
event EventHandler Terminated;
/// <summary>
/// Occurs when VirtualChannelOpenEvent(VirtualChannelOpenEvent in RDS API) was called with ChannelEvents.DataRecived(CHANNEL_EVENT_DATA_RECEIVED in RDS API)
/// </summary>
event DataArrivedHandler DataArrived;
/// <summary>
/// Works similar to System.IO.Stream.Read
/// </summary>
/// <param name="buffer">An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the channel.</param>
/// <param name="offset">The zero-based byte offset in buffer at which to begin storing the data read from the channel.</param>
/// <param name="count">The maximum number of bytes to be read from the channel.</param>
/// <returns>The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available(including 0).</returns>
int Read(byte[] buffer, int offset, int count);
/// <summary>
/// Works similar to System.IO.Stream.Write
/// </summary>
/// <param name="data">An array of bytes. This method sends bytes from buffer through channel.</param>
/// <param name="offset">The zero-based byte offset in buffer at which to begin sending bytes through channel.</param>
/// <param name="count">The number of bytes to be sent through channel.</param>
void Write(byte[] data, int offset, int count);
/// <summary>
/// Creataes and returns stream. Stream is disposed when Disconnect event occurs.
/// </summary>
/// <returns>Retuns stream</returns>
Stream GetStream();
/// <summary>
/// Gets Addin metadata
/// </summary>
IAddinMetadata Metadata { get; }
/// <summary>
/// Get IUI interface
/// </summary>
IUI UI { get; }
}
/// <summary>
/// Represents the method that will handle the DataArrived event of a IChannel.
/// </summary>
/// <param name="dataLength">Specifies the size, in bytes, of the data. Use Read method of IChannel to read the data.</param>
/// <param name="totalLength">Specifies the total size, in bytes, of the data written by a single write operation to the server end of the virtual channel.</param>
/// <param name="dataFlags">Provides information about the chunk of data being received.</param>
public delegate void DataArrivedHandler(uint dataLength, uint totalLength, DataParts dataFlags);
/// <summary>
/// Specifies constants that define which part of data chunk was sent.
/// </summary>
public enum DataParts
{
/// <summary>
/// The chunk is the beginning of the data written by a single write operation.
/// </summary>
First = 0x01,
/// <summary>
/// The chunk is the end of the data written by a single write operation.
/// </summary>
Last = 0x02,
/// <summary>
/// The chunk is in the middle of a block of data written by a single write operation.
/// </summary>
Middle = 0,
/// <summary>
/// Combines the DataParts.First and DataParts.Last values. The chunk contains all the data from a single write operation.
/// </summary>
Only = First | Last,
}
}

View File

@ -0,0 +1,98 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
namespace RDPAddins.Common
{
/// <summary>
/// Represents UI parts of the IChannel
/// </summary>
public interface IUI
{
/// <summary>
/// Occurs when the balloon tip is clicked.
/// </summary>
event BalloonTipClickedHandler BalloonTipClicked;
/// <summary>
/// Occurs when the hannel is trying create addin's control. If not hooked addin will not have control.
/// </summary>
event ControlCreatingHandler ControlCreating;
/// <summary>
/// Occurs when Channel is trying create addin's menu. If not hooked addin will not have menu.
/// </summary>
event MenuCreatingHandler MenuCreating;
/// <summary>
/// Occurs when Channel is trying create addin's tray menu. If not hooked addin will not have tray menu.
/// </summary>
event MenuCreatingHandler TrayMenuCreating;
/// <summary>
/// Occurs when Channel is trying to get addin's icon. Only appears when addin has control. If not hooked addin and addin has control then addin will have default icon.
/// </summary>
event IconCreatingHandler IconCreating;
/// <summary>
/// Get UI's channel
/// </summary>
IChannel Parent { get; }
/// <summary>
/// Displays the balloon tip in the taskbar.
/// </summary>
/// <param name="timeout">The time period, in milliseconds, the balloon tip should display.</param>
/// <param name="tipTitle">The title to display on the balloon tip.</param>
/// <param name="tipText">The text to display on the balloon tip.</param>
/// <param name="tipIcon">One of the System.Windows.Forms.ToolTipIcon values.</param>
/// <param name="context">This object will sent to BalloonTipClicked event.</param>
void ShowBalloonTip(int timeout, string tipTitle, string tipText, ToolTipIcon tipIcon, object context);
/// <summary>
/// Shows main form and selct tab with addin's control(if exists).
/// </summary>
void ShowControl();
/// <summary>
/// Executes a action on the UI thread. (It calls System.Windows.Forms.Form.Invoke).
/// </summary>
/// <param name="action">The action delegate.</param>
void DoOnUIThread(Action action);
/// <summary>
/// Gets or sets visibility of addin's control(if exists).
/// </summary>
bool Visible { get; set; }
}
/// <summary>
/// Represents the method that will handle the BalloonTipClicked event of a IUI.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="context">Parameter sent by IUI.ShowBalloonTip method.</param>
public delegate void BalloonTipClickedHandler(IUI sender, object context);
/// <summary>
/// Represents the method that will handle the ControlCreating event of a IUI.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <returns>Should returns addin's control if needed.</returns>
public delegate Control ControlCreatingHandler(IUI sender);
/// <summary>
/// Represents the method that will handle the MenuCreating and TrayMenuCreating event of a IUI.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <returns>Should returns addin's menu or tray menu if needed.</returns>
public delegate Menu MenuCreatingHandler(IUI sender);
/// <summary>
/// Represents the method that will handle the IconCreating event of a IUI.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <returns>Should returns addin's icon if needed.</returns>
public delegate Image IconCreatingHandler(IUI sender);
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("RDPAddins.Common")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RDPAddins")]
[assembly: AssemblyCopyright("© Selvin 2011. All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("275b6dd3-a087-4b86-a815-18c884480564")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.2.1.0")]
[assembly: AssemblyFileVersion("0.2.1.0")]

View File

@ -0,0 +1,79 @@
<?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>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{EC8481C3-F82F-4F3C-84E2-6732750B6542}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>RDPAddins.Common</RootNamespace>
<AssemblyName>RDPAddins.Common</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>..\bin\Debug\RDPAddins.Common.xml</DocumentationFile>
</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>
<DocumentationFile>..\bin\Release\RDPAddins.Common.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>..\RDPAddins.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup>
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Include="AddinMetadata.cs" />
<Compile Include="IAddin.cs" />
<Compile Include="IChannel.cs" />
<Compile Include="IUI.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<!-- 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

@ -0,0 +1,10 @@
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
}

View File

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")]

View File

@ -0,0 +1 @@
1d31ddd67b4711a4859baa021df55aa8e9aadba8

View File

@ -0,0 +1,7 @@
/home/haraldwolff/src/dotnet/RDPAddins/bin/Debug/RDPAddins.Common.xml
/home/haraldwolff/src/dotnet/RDPAddins/bin/Debug/RDPAddins.Common.dll
/home/haraldwolff/src/dotnet/RDPAddins/bin/Debug/RDPAddins.Common.pdb
/home/haraldwolff/src/dotnet/RDPAddins/RDPAddins.Common/obj/Debug/RDPAddins.Common.csprojAssemblyReference.cache
/home/haraldwolff/src/dotnet/RDPAddins/RDPAddins.Common/obj/Debug/RDPAddins.Common.csproj.CoreCompileInputs.cache
/home/haraldwolff/src/dotnet/RDPAddins/RDPAddins.Common/obj/Debug/RDPAddins.Common.dll
/home/haraldwolff/src/dotnet/RDPAddins/RDPAddins.Common/obj/Debug/RDPAddins.Common.pdb

View File

@ -0,0 +1,49 @@
using System;
using System.Reflection;
using System.Threading;
using System.IO;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
namespace RDPAddins.Core
{
class EntryPoint
{
static readonly string AssemblyName = "RDPAddins.exe";
static readonly string AssemblyPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
static readonly string AssemblyFullPath = Path.Combine(AssemblyPath, AssemblyName);
static readonly string ConfigFileFullPath = string.Format("{0}.config", AssemblyFullPath);
[ExportDll("VirtualChannelEntry", CallingConvention.StdCall)]
public static bool VirtualChannelEntry(IntPtr entry)
{
try
{
ManualResetEvent wait = new ManualResetEvent(false);
AppDomain app = null;
var thread = new Thread(() =>
{
app = AppDomain.CreateDomain(AssemblyName, null,
new AppDomainSetup()
{
ApplicationBase = AssemblyName,
ApplicationName = AssemblyPath,
ConfigurationFile = ConfigFileFullPath
});
app.SetData("entry", entry);
app.SetData("event", wait);
app.ExecuteAssembly(AssemblyFullPath);
});
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
wait.WaitOne();
return (bool)app.GetData("ret");
}
catch (Exception ex)
{
return false;
}
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("RDPAddins.Core")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RDPAddins")]
[assembly: AssemblyCopyright("© Selvin 2011. All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("c5571e1f-2df8-490c-9ed0-6a3d9ca518bc")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.2.1.0")]
[assembly: AssemblyFileVersion("0.2.1.0")]

View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{7017A40B-F535-4E3F-972D-BB89F3A44640}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>RDPAddins.Core</RootNamespace>
<AssemblyName>RDPAddins.Core</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<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'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>..\bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
</PropertyGroup>
<PropertyGroup>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>..\RDPAddins.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="ExportDllAttribute">
<HintPath>..\Tools\ExportDllAttribute.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="EntryPoint.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>"$(SolutionDir)Tools\ExportDll.exe" "$(TargetPath)" /$(ConfigurationName) /$(PlatformName)
"$(FrameworkSDKDir)Bin\sn.exe" -R "$(TargetPath)" "$(ProjectDir)..\RDPAddins.snk"</PostBuildEvent>
</PropertyGroup>
<!-- 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

@ -0,0 +1,10 @@
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
}

View File

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")]

View File

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")]

View File

@ -0,0 +1 @@
1f0e69ff174c1a04a91442210a793ab6eeb80766

View File

@ -0,0 +1,7 @@
/home/haraldwolff/src/dotnet/RDPAddins/bin/x64/Debug/RDPAddins.Core.dll
/home/haraldwolff/src/dotnet/RDPAddins/bin/x64/Debug/RDPAddins.Core.pdb
/home/haraldwolff/src/dotnet/RDPAddins/RDPAddins.Core/obj/x64/Debug/RDPAddins.Core.csprojAssemblyReference.cache
/home/haraldwolff/src/dotnet/RDPAddins/RDPAddins.Core/obj/x64/Debug/RDPAddins.Core.csproj.CoreCompileInputs.cache
/home/haraldwolff/src/dotnet/RDPAddins/RDPAddins.Core/obj/x64/Debug/RDPAddins.Core.csproj.CopyComplete
/home/haraldwolff/src/dotnet/RDPAddins/RDPAddins.Core/obj/x64/Debug/RDPAddins.Core.dll
/home/haraldwolff/src/dotnet/RDPAddins/RDPAddins.Core/obj/x64/Debug/RDPAddins.Core.pdb

View File

@ -0,0 +1,90 @@
#define _WIN32_WINNT 0x501
#include <SDKDDKVer.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tchar.h>
#include <metahost.h>
#include <CChannel.h>
static HINSTANCE hDynImageBase = NULL;
WCHAR clrversion[] = L"v4.0.30319";
WCHAR dllname[] = L"RDPAddins.exe";
WCHAR classname[] = L"RDPAddins.Program";
WCHAR functionname[] = L"MainC";
TCHAR path[MAX_PATH];
ICLRRuntimeHost* runtimeHost = NULL;
ICLRRuntimeInfo* runtimeInfo = NULL;
ICLRMetaHost* metaHost = NULL;
BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
{
HRESULT hr = CLRCreateInstance(CLSID_CLRMetaHost, IID_ICLRMetaHost, (LPVOID*)&metaHost);
if(SUCCEEDED(hr))
{
hr = metaHost->GetRuntime(clrversion, IID_ICLRRuntimeInfo,(LPVOID*)&runtimeInfo);
if (SUCCEEDED(hr))
{
hr = runtimeInfo->GetInterface(CLSID_CLRRuntimeHost, IID_ICLRRuntimeHost, (LPVOID*) &runtimeHost);
if (SUCCEEDED(hr))
{
hr = runtimeHost->Start();
if (SUCCEEDED(hr))
{
DWORD retCode = 0;
WCHAR entry[255];
unsigned int r = (unsigned int)pEntryPoints;
int c = -1;
do
{
entry[++c] = r % 10 + 48;
r = r / 10;
}
while(r > 0);
entry[++c] = L'\0';
GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, (LPCWSTR)&hDynImageBase, &hDynImageBase);
DWORD ret = GetModuleFileName(hDynImageBase, path, MAX_PATH);
while(path[ret] != L'\\')
ret--;
c = -1;
do
{
path[++ret] = dllname[++c];
}
while(dllname[c]);
path[++ret] = L'\0';
hr = runtimeHost->ExecuteInDefaultAppDomain(path, classname, functionname, entry, &retCode);
if(SUCCEEDED(hr))
return retCode;
}
}
}
}
return FALSE;
}
extern "C" BOOL WINAPI _DllMainCRTStartup(HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
if(runtimeHost != NULL)
{
runtimeHost->Stop();
runtimeHost->Release();
}
if(runtimeInfo!= NULL)
runtimeInfo->Release();
if(metaHost!=NULL)
metaHost->Release();
break;
}
return TRUE;
}

View File

@ -0,0 +1,3 @@
LIBRARY
EXPORTS
VirtualChannelEntry

Binary file not shown.

View File

@ -0,0 +1,178 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{EE62637C-C9C7-42ED-A13D-92076B41B494}</ProjectGuid>
<SccProjectName>SAK</SccProjectName>
<SccAuxPath>SAK</SccAuxPath>
<SccLocalPath>SAK</SccLocalPath>
<SccProvider>SAK</SccProvider>
<Keyword>Win32Proj</Keyword>
<RootNamespace>RDPAddinsCoreC</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<GenerateManifest>false</GenerateManifest>
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<GenerateManifest>false</GenerateManifest>
<OutDir>$(SolutionDir)bin\x64\$(Configuration)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;RDPADDINSCOREC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BufferSecurityCheck>false</BufferSecurityCheck>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>RDPAddins.CoreC.def</ModuleDefinitionFile>
<AdditionalDependencies>mscoree.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;RDPADDINSCOREC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BufferSecurityCheck>false</BufferSecurityCheck>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>RDPAddins.CoreC.def</ModuleDefinitionFile>
<AdditionalDependencies>mscoree.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;RDPADDINSCOREC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>RDPAddins.CoreC.def</ModuleDefinitionFile>
<AdditionalDependencies>mscoree.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;RDPADDINSCOREC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>RDPAddins.CoreC.def</ModuleDefinitionFile>
<AdditionalDependencies>mscoree.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="RDPAddins.CoreC.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="RDPAddins.CoreC.def" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="RDPAddins.CoreC.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="RDPAddins.CoreC.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="RDPAddins.CoreC.def">
<Filter>Source Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="RDPAddins.CoreC.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,10 @@
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
}

View File

@ -0,0 +1,14 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by RDPAddins.CoreC.rc
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

174
RDPAddins.sln 100644
View File

@ -0,0 +1,174 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RDPAddins.Core", "RDPAddins.Core\RDPAddins.Core.csproj", "{7017A40B-F535-4E3F-972D-BB89F3A44640}"
ProjectSection(ProjectDependencies) = postProject
{EC8481C3-F82F-4F3C-84E2-6732750B6542} = {EC8481C3-F82F-4F3C-84E2-6732750B6542}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RDPAddins.Common", "RDPAddins.Common\RDPAddins.Common.csproj", "{EC8481C3-F82F-4F3C-84E2-6732750B6542}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RDPAddins", "RDPAddins\RDPAddins.csproj", "{4345A357-B6D6-49A8-98CD-7D0D6708AC17}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FileTransfer", "FileTransfer", "{BDBFE621-A03E-4887-8E5A-516C35595AAB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{73B5FCE1-65EB-4B1E-BC5B-43FDCE94DECC}"
ProjectSection(SolutionItems) = preProject
Tools\ExportDll.exe = Tools\ExportDll.exe
Tools\ExportDll.exe.config = Tools\ExportDll.exe.config
Tools\ExportDllAttribute.dll = Tools\ExportDllAttribute.dll
Tools\README.txt = Tools\README.txt
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileTransferAddin", "FileTransfer\FileTransferAddin\FileTransferAddin.csproj", "{68857642-A724-46A4-85B3-DAE2BD80498E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileTransferServer", "FileTransfer\FileTransferServer\FileTransferServer.csproj", "{DB1D00FA-A8A4-4F01-931E-52686F51265E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Installer", "Installer", "{FDCEC69D-3E1B-4EA1-BADE-30228114087D}"
ProjectSection(SolutionItems) = preProject
Installer\RDPAddins.iss = Installer\RDPAddins.iss
Installer\RDPAddinsC.iss = Installer\RDPAddinsC.iss
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{63EFA535-ACBB-4265-9241-7BECB3989B1E}"
ProjectSection(SolutionItems) = preProject
RDPAddins.snk = RDPAddins.snk
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RDPAddins.CoreC", "RDPAddins.CoreC\RDPAddins.CoreC.vcxproj", "{EE62637C-C9C7-42ED-A13D-92076B41B494}"
EndProject
Global
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 7
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccTeamFoundationServer = https://tfs.codeplex.com/tfs/tfs21
SccLocalPath0 = .
SccProjectUniqueName1 = FileTransfer\\FileTransferAddin\\FileTransferAddin.csproj
SccProjectTopLevelParentUniqueName1 = RDPAddins.sln
SccProjectName1 = FileTransfer/FileTransferAddin
SccLocalPath1 = FileTransfer\\FileTransferAddin
SccProjectUniqueName2 = FileTransfer\\FileTransferServer\\FileTransferServer.csproj
SccProjectTopLevelParentUniqueName2 = RDPAddins.sln
SccProjectName2 = FileTransfer/FileTransferServer
SccLocalPath2 = FileTransfer\\FileTransferServer
SccProjectUniqueName3 = RDPAddins.Common\\RDPAddins.Common.csproj
SccProjectName3 = RDPAddins.Common
SccLocalPath3 = RDPAddins.Common
SccProjectUniqueName4 = RDPAddins.Core\\RDPAddins.Core.csproj
SccProjectName4 = RDPAddins.Core
SccLocalPath4 = RDPAddins.Core
SccProjectUniqueName5 = RDPAddins\\RDPAddins.csproj
SccProjectName5 = RDPAddins
SccLocalPath5 = RDPAddins
SccProjectUniqueName6 = RDPAddins.CoreC\\RDPAddins.CoreC.vcxproj
SccProjectName6 = RDPAddins.CoreC
SccLocalPath6 = RDPAddins.CoreC
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7017A40B-F535-4E3F-972D-BB89F3A44640}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7017A40B-F535-4E3F-972D-BB89F3A44640}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7017A40B-F535-4E3F-972D-BB89F3A44640}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
{7017A40B-F535-4E3F-972D-BB89F3A44640}.Debug|Mixed Platforms.Build.0 = Debug|x64
{7017A40B-F535-4E3F-972D-BB89F3A44640}.Debug|Win32.ActiveCfg = Debug|x64
{7017A40B-F535-4E3F-972D-BB89F3A44640}.Debug|Win32.Build.0 = Debug|x64
{7017A40B-F535-4E3F-972D-BB89F3A44640}.Debug|x64.ActiveCfg = Debug|x64
{7017A40B-F535-4E3F-972D-BB89F3A44640}.Debug|x64.Build.0 = Debug|x64
{7017A40B-F535-4E3F-972D-BB89F3A44640}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7017A40B-F535-4E3F-972D-BB89F3A44640}.Release|Any CPU.Build.0 = Release|Any CPU
{7017A40B-F535-4E3F-972D-BB89F3A44640}.Release|Mixed Platforms.ActiveCfg = Release|x64
{7017A40B-F535-4E3F-972D-BB89F3A44640}.Release|Mixed Platforms.Build.0 = Release|x64
{7017A40B-F535-4E3F-972D-BB89F3A44640}.Release|Win32.ActiveCfg = Release|x64
{7017A40B-F535-4E3F-972D-BB89F3A44640}.Release|x64.ActiveCfg = Release|x64
{7017A40B-F535-4E3F-972D-BB89F3A44640}.Release|x64.Build.0 = Release|x64
{EC8481C3-F82F-4F3C-84E2-6732750B6542}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EC8481C3-F82F-4F3C-84E2-6732750B6542}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC8481C3-F82F-4F3C-84E2-6732750B6542}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{EC8481C3-F82F-4F3C-84E2-6732750B6542}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{EC8481C3-F82F-4F3C-84E2-6732750B6542}.Debug|Win32.ActiveCfg = Debug|Any CPU
{EC8481C3-F82F-4F3C-84E2-6732750B6542}.Debug|Win32.Build.0 = Debug|Any CPU
{EC8481C3-F82F-4F3C-84E2-6732750B6542}.Debug|x64.ActiveCfg = Debug|Any CPU
{EC8481C3-F82F-4F3C-84E2-6732750B6542}.Debug|x64.Build.0 = Debug|Any CPU
{EC8481C3-F82F-4F3C-84E2-6732750B6542}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EC8481C3-F82F-4F3C-84E2-6732750B6542}.Release|Any CPU.Build.0 = Release|Any CPU
{EC8481C3-F82F-4F3C-84E2-6732750B6542}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{EC8481C3-F82F-4F3C-84E2-6732750B6542}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{EC8481C3-F82F-4F3C-84E2-6732750B6542}.Release|Win32.ActiveCfg = Release|Any CPU
{EC8481C3-F82F-4F3C-84E2-6732750B6542}.Release|x64.ActiveCfg = Release|Any CPU
{EC8481C3-F82F-4F3C-84E2-6732750B6542}.Release|x64.Build.0 = Release|Any CPU
{4345A357-B6D6-49A8-98CD-7D0D6708AC17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4345A357-B6D6-49A8-98CD-7D0D6708AC17}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4345A357-B6D6-49A8-98CD-7D0D6708AC17}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{4345A357-B6D6-49A8-98CD-7D0D6708AC17}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{4345A357-B6D6-49A8-98CD-7D0D6708AC17}.Debug|Win32.ActiveCfg = Debug|Any CPU
{4345A357-B6D6-49A8-98CD-7D0D6708AC17}.Debug|Win32.Build.0 = Debug|Any CPU
{4345A357-B6D6-49A8-98CD-7D0D6708AC17}.Debug|x64.ActiveCfg = Debug|Any CPU
{4345A357-B6D6-49A8-98CD-7D0D6708AC17}.Debug|x64.Build.0 = Debug|Any CPU
{4345A357-B6D6-49A8-98CD-7D0D6708AC17}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4345A357-B6D6-49A8-98CD-7D0D6708AC17}.Release|Any CPU.Build.0 = Release|Any CPU
{4345A357-B6D6-49A8-98CD-7D0D6708AC17}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{4345A357-B6D6-49A8-98CD-7D0D6708AC17}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{4345A357-B6D6-49A8-98CD-7D0D6708AC17}.Release|Win32.ActiveCfg = Release|Any CPU
{4345A357-B6D6-49A8-98CD-7D0D6708AC17}.Release|x64.ActiveCfg = Release|Any CPU
{4345A357-B6D6-49A8-98CD-7D0D6708AC17}.Release|x64.Build.0 = Release|Any CPU
{68857642-A724-46A4-85B3-DAE2BD80498E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{68857642-A724-46A4-85B3-DAE2BD80498E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{68857642-A724-46A4-85B3-DAE2BD80498E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{68857642-A724-46A4-85B3-DAE2BD80498E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{68857642-A724-46A4-85B3-DAE2BD80498E}.Debug|Win32.ActiveCfg = Debug|Any CPU
{68857642-A724-46A4-85B3-DAE2BD80498E}.Debug|Win32.Build.0 = Debug|Any CPU
{68857642-A724-46A4-85B3-DAE2BD80498E}.Debug|x64.ActiveCfg = Debug|Any CPU
{68857642-A724-46A4-85B3-DAE2BD80498E}.Debug|x64.Build.0 = Debug|Any CPU
{68857642-A724-46A4-85B3-DAE2BD80498E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{68857642-A724-46A4-85B3-DAE2BD80498E}.Release|Any CPU.Build.0 = Release|Any CPU
{68857642-A724-46A4-85B3-DAE2BD80498E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{68857642-A724-46A4-85B3-DAE2BD80498E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{68857642-A724-46A4-85B3-DAE2BD80498E}.Release|Win32.ActiveCfg = Release|Any CPU
{68857642-A724-46A4-85B3-DAE2BD80498E}.Release|x64.ActiveCfg = Release|Any CPU
{DB1D00FA-A8A4-4F01-931E-52686F51265E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DB1D00FA-A8A4-4F01-931E-52686F51265E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DB1D00FA-A8A4-4F01-931E-52686F51265E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{DB1D00FA-A8A4-4F01-931E-52686F51265E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{DB1D00FA-A8A4-4F01-931E-52686F51265E}.Debug|Win32.ActiveCfg = Debug|Any CPU
{DB1D00FA-A8A4-4F01-931E-52686F51265E}.Debug|Win32.Build.0 = Debug|Any CPU
{DB1D00FA-A8A4-4F01-931E-52686F51265E}.Debug|x64.ActiveCfg = Debug|Any CPU
{DB1D00FA-A8A4-4F01-931E-52686F51265E}.Debug|x64.Build.0 = Debug|Any CPU
{DB1D00FA-A8A4-4F01-931E-52686F51265E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DB1D00FA-A8A4-4F01-931E-52686F51265E}.Release|Any CPU.Build.0 = Release|Any CPU
{DB1D00FA-A8A4-4F01-931E-52686F51265E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{DB1D00FA-A8A4-4F01-931E-52686F51265E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{DB1D00FA-A8A4-4F01-931E-52686F51265E}.Release|Win32.ActiveCfg = Release|Any CPU
{DB1D00FA-A8A4-4F01-931E-52686F51265E}.Release|x64.ActiveCfg = Release|Any CPU
{EE62637C-C9C7-42ED-A13D-92076B41B494}.Debug|Any CPU.ActiveCfg = Debug|Win32
{EE62637C-C9C7-42ED-A13D-92076B41B494}.Debug|Any CPU.Build.0 = Debug|Win32
{EE62637C-C9C7-42ED-A13D-92076B41B494}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{EE62637C-C9C7-42ED-A13D-92076B41B494}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{EE62637C-C9C7-42ED-A13D-92076B41B494}.Debug|Win32.ActiveCfg = Debug|Win32
{EE62637C-C9C7-42ED-A13D-92076B41B494}.Debug|Win32.Build.0 = Debug|Win32
{EE62637C-C9C7-42ED-A13D-92076B41B494}.Debug|x64.ActiveCfg = Debug|x64
{EE62637C-C9C7-42ED-A13D-92076B41B494}.Debug|x64.Build.0 = Debug|x64
{EE62637C-C9C7-42ED-A13D-92076B41B494}.Release|Any CPU.ActiveCfg = Release|Win32
{EE62637C-C9C7-42ED-A13D-92076B41B494}.Release|Any CPU.Build.0 = Release|Win32
{EE62637C-C9C7-42ED-A13D-92076B41B494}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{EE62637C-C9C7-42ED-A13D-92076B41B494}.Release|Mixed Platforms.Build.0 = Release|Win32
{EE62637C-C9C7-42ED-A13D-92076B41B494}.Release|Win32.ActiveCfg = Release|Win32
{EE62637C-C9C7-42ED-A13D-92076B41B494}.Release|Win32.Build.0 = Release|Win32
{EE62637C-C9C7-42ED-A13D-92076B41B494}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{68857642-A724-46A4-85B3-DAE2BD80498E} = {BDBFE621-A03E-4887-8E5A-516C35595AAB}
{DB1D00FA-A8A4-4F01-931E-52686F51265E} = {BDBFE621-A03E-4887-8E5A-516C35595AAB}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,3 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=FileTransfer_002FFileTransferServer_002FfrmMain/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/ResxEditorPersonal/Initialized/@EntryValue">True</s:Boolean></wpf:ResourceDictionary>

BIN
RDPAddins.snk 100644

Binary file not shown.

10
RDPAddins.vssscc 100644
View File

@ -0,0 +1,10 @@
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT"
}

86
RDPAddins/About.Designer.cs generated 100644
View File

@ -0,0 +1,86 @@
namespace RDPAddins
{
partial class frmAbout
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmAbout));
this.btOK = new System.Windows.Forms.Button();
this.lblName = new System.Windows.Forms.Label();
this.lblRights = new System.Windows.Forms.Label();
this.lblWer = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// btOK
//
this.btOK.DialogResult = System.Windows.Forms.DialogResult.Cancel;
resources.ApplyResources(this.btOK, "btOK");
this.btOK.Name = "btOK";
//
// lblName
//
resources.ApplyResources(this.lblName, "lblName");
this.lblName.Name = "lblName";
//
// lblRights
//
resources.ApplyResources(this.lblRights, "lblRights");
this.lblRights.Name = "lblRights";
//
// lblWer
//
resources.ApplyResources(this.lblWer, "lblWer");
this.lblWer.Name = "lblWer";
//
// frmAbout
//
this.CancelButton = this.btOK;
resources.ApplyResources(this, "$this");
this.Controls.Add(this.btOK);
this.Controls.Add(this.lblWer);
this.Controls.Add(this.lblRights);
this.Controls.Add(this.lblName);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmAbout";
this.ShowInTaskbar = false;
this.TopMost = true;
this.Load += new System.EventHandler(this.frmAbout_Load);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label lblName;
private System.Windows.Forms.Label lblRights;
private System.Windows.Forms.Label lblWer;
private System.Windows.Forms.Button btOK;
}
}

22
RDPAddins/About.cs 100644
View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace RDPAddins
{
partial class frmAbout : Form
{
public frmAbout()
{
InitializeComponent();
}
private void frmAbout_Load(object sender, System.EventArgs e)
{
this.lblWer.Text += System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
}
}
}

View File

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="lblRights.Text" xml:space="preserve">
<value>© 2010 Selvin. Wszelkie prawa zastrzeżone.</value>
</data>
<data name="lblWer.Text" xml:space="preserve">
<value>Wersja: </value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>O programie.....</value>
</data>
</root>

View File

@ -0,0 +1,237 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btOK.Location" type="System.Drawing.Point, System.Drawing">
<value>208, 9</value>
</data>
<data name="btOK.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="btOK.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="btOK.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="&gt;&gt;btOK.Name" xml:space="preserve">
<value>btOK</value>
</data>
<data name="&gt;&gt;btOK.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btOK.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;btOK.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="lblName.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 9</value>
</data>
<data name="lblName.Size" type="System.Drawing.Size, System.Drawing">
<value>120, 16</value>
</data>
<data name="lblName.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="lblName.Text" xml:space="preserve">
<value>RDPAddins Framework</value>
</data>
<data name="&gt;&gt;lblName.Name" xml:space="preserve">
<value>lblName</value>
</data>
<data name="&gt;&gt;lblName.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblName.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;lblName.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="lblRights.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 41</value>
</data>
<data name="lblRights.Size" type="System.Drawing.Size, System.Drawing">
<value>283, 16</value>
</data>
<data name="lblRights.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="lblRights.Text" xml:space="preserve">
<value>© 2010 Selvin. All right reserved.</value>
</data>
<data name="&gt;&gt;lblRights.Name" xml:space="preserve">
<value>lblRights</value>
</data>
<data name="&gt;&gt;lblRights.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblRights.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;lblRights.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="lblWer.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 25</value>
</data>
<data name="lblWer.Size" type="System.Drawing.Size, System.Drawing">
<value>128, 16</value>
</data>
<data name="lblWer.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="lblWer.Text" xml:space="preserve">
<value>Version: </value>
</data>
<data name="&gt;&gt;lblWer.Name" xml:space="preserve">
<value>lblWer</value>
</data>
<data name="&gt;&gt;lblWer.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblWer.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;lblWer.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>303, 70</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
<value>CenterParent</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>About...</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>frmAbout</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View File

@ -0,0 +1,318 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Drawing;
using Win32.WtsApi32;
using System.Threading;
using System.ComponentModel;
using RDPAddins.Common;
namespace RDPAddins
{
internal class Channel: IChannel, IUI
{
uint openChannel = 0;
ChannelOpenEventDelegate channelOpenEventDelegate;
ManualResetEvent write = new ManualResetEvent(true);
internal object tooltipconext = null;
Queue<MemoryChunk> buffers = new Queue<MemoryChunk>();
object readlock = new object();
public event EventHandler Connected;
public event EventHandler Disconnected;
public event EventHandler Terminated;
public event DataArrivedHandler DataArrived;
public event BalloonTipClickedHandler BalloonTipClicked;
public Lazy<IAddin, IAddinMetadata> Addin;
public Channel(RDPClient client, Lazy<IAddin, IAddinMetadata> addin)
{
Client = client;
Addin = addin;
Addin.Value.Initialize(this);
ChannelDef = new ChannelDef(){name = Metadata.ChannelName, options = Metadata.ChannelOptions };
channelOpenEventDelegate = new ChannelOpenEventDelegate(VirtualChannelOpenEvent);
}
internal ChannelDef ChannelDef;
public IChannel Parent { get { return this; } }
public bool Visible
{
get
{
if (Page != null)
return TabCtrl.TabPages.Contains(Page);
return false;
}
set
{
if (Page != null)
{
if (value)
{
if (!TabCtrl.TabPages.Contains(Page))
TabCtrl.TabPages.Add(Page);
}
else
{
if (TabCtrl.TabPages.Contains(Page))
TabCtrl.TabPages.Remove(Page);
}
}
}
}
private void VirtualChannelOpenEvent(uint openHandle, ChannelEvents openEvent, byte[] data, uint dataLength, uint totalLength, ChannelFlags dataFlags)
{
switch (openEvent)
{
case ChannelEvents.DataRecived:
int flag = (int)(dataFlags & ChannelFlags.Only);
WriteCore(data, dataLength);
OnDataArrived(dataLength, totalLength, (DataParts)flag);
break;
case ChannelEvents.WriteComplete:
write.Set();
break;
}
}
void WriteCore(byte[] data, uint count)
{
var mem = AllocateMemoryChunk(count);
Buffer.BlockCopy(data, 0, mem.Buffer, 0, (int)count);
lock (readlock)
{
buffers.Enqueue(mem);
AvailableDataLength += count;
}
}
public void Write(byte[] data, int offset, int count)
{
byte[] buff = data;
if (offset != 0)
{
buff = new byte[count];
Buffer.BlockCopy(data, offset, buff, 0, count);
}
write.Reset();
ChannelReturnCodes ret = Client.EntryPoint.VirtualChannelWrite(openChannel, buff, (uint)count, IntPtr.Zero);
write.WaitOne();
}
public int Read(byte[] buffer, int offset, int count)
{
if (AvailableDataLength > 0)
{
int toread = 0;
lock (readlock)
{
if (buffers.Count != 0)
{
var buf = buffers.Peek();
toread = buf.Buffer.Length - buf.Offset;
int off = buf.Offset;
if (count >= toread)
buffers.Dequeue();
else
{
toread = count;
buf.Offset += toread;
}
Buffer.BlockCopy(buf.Buffer, off, buffer, offset, toread);
AvailableDataLength -= (uint)toread;
}
return toread;
}
}
return 0;
}
TabPage Page = null;
TabControl TabCtrl = null;
RDPClient Client = null;
public uint AvailableDataLength { get; private set; }
internal ChannelReturnCodes ConnectedInternal(IntPtr Handle)
{
ChannelReturnCodes ret = Client.EntryPoint.VirtualChannelOpen(Handle, ref openChannel, Addin.Metadata.ChannelName, channelOpenEventDelegate);
if (ret == ChannelReturnCodes.Ok)
OnConnected(this, new EventArgs());
return ret;
}
internal void DisconnectedInternal()
{
openChannel = 0;
OnDisconnected(this, new EventArgs());
if (Stream != null)
{
Stream.Dispose();
Stream = null;
}
}
protected virtual void OnConnected(object sender, EventArgs e)
{
if (Connected != null)
DoOnUIThread(() => Connected(sender, e));
}
protected virtual void OnDisconnected(object sender, EventArgs e)
{
if (Disconnected != null)
DoOnUIThread(() => Disconnected(sender, e));
}
protected virtual void OnTerminated(object sender, EventArgs e)
{
if (Terminated != null)
DoOnUIThread(() => Terminated(sender, e));
}
internal void TerminatedInternal()
{
OnTerminated(this, new EventArgs());
}
protected virtual void OnInitialized(object sender, EventArgs e)
{
if (Initialized != null)
DoOnUIThread(() => Initialized(sender, e));
}
internal void InitializedInternal()
{
OnInitialized(this, new EventArgs());
}
public void ShowControl()
{
if (Page != null)
{
Client.MainForm.Visible = true;
Client.MainForm.Tab.SelectTab(Page);
}
}
public void DoOnUIThread(Action action)
{
if (Client.MainForm.InvokeRequired)
Client.MainForm.Invoke(action);
else
action();
}
public void ShowBalloonTip(int timeout, string tipTitle, string tipText, ToolTipIcon tipIcon, object context)
{
tooltipconext = context;
Client.MainForm.ShowToolTip(timeout, tipTitle, tipText, tipIcon, this);
}
protected virtual void OnDataArrived(uint dataLength, uint totalLength, DataParts dataFlags)
{
if (DataArrived != null)
DoOnUIThread(() => DataArrived(dataLength, totalLength, dataFlags));
}
internal protected virtual void OnBalloonTipClicked(object sender, EventArgs e)
{
if (BalloonTipClicked != null)
DoOnUIThread(() => BalloonTipClicked(this, tooltipconext));
}
private MemoryChunk AllocateMemoryChunk(uint newSize)
{
MemoryChunk chunk = new MemoryChunk(newSize);
return chunk;
}
ChannelStream Stream = null;
private class MemoryChunk
{
internal byte[] Buffer;
internal int Offset = 0;
internal MemoryChunk(uint bufferSize)
{
Buffer = new byte[bufferSize];
Offset = 0;
}
}
public event EventHandler Initialized;
public Stream GetStream()
{
Stream = Stream ?? new ChannelStream(this);
return Stream;
}
public IAddinMetadata Metadata { get { return Addin.Metadata; } }
public IUI UI { get { return this; } }
public event ControlCreatingHandler ControlCreating;
public event MenuCreatingHandler MenuCreating;
public event MenuCreatingHandler TrayMenuCreating;
public event IconCreatingHandler IconCreating;
internal void CreateUI()
{
if (ControlCreating != null)
{
var control = ControlCreating(this);
if (control != null)
{
Page = new TabPage(Metadata.AddinName);
TabCtrl = Page.Parent as TabControl;
control.Dock = DockStyle.Fill;
Page.Controls.Add(control);
Client.MainForm.Tab.TabPages.Add(Page);
Image icon = null;
if (IconCreating != null)
icon = IconCreating(this);
Page.ImageIndex = Client.MainForm.AddImage(icon);
}
}
if (MenuCreating != null)
{
var menu = MenuCreating(this);
if (menu != null)
{
var parentmenu = new MenuItem(Metadata.AddinName);
parentmenu.MenuItems.AddRange(menu.MenuItems.Cast<MenuItem>().ToArray());
Client.MainForm.MenuAddins.MenuItems.Add(parentmenu);
}
}
if (TrayMenuCreating != null)
{
var menu = TrayMenuCreating(this);
if (menu != null)
{
var parentmenu = new MenuItem(Metadata.AddinName);
parentmenu.MenuItems.AddRange(menu.MenuItems.Cast<MenuItem>().ToArray());
Client.MainForm.mnuAddinsContext.MenuItems.Add(parentmenu);
}
}
}
}
}

View File

@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using RDPAddins.Common;
using System.Runtime;
namespace RDPAddins
{
internal class ChannelStream: Stream
{
public ChannelStream(IChannel channel) : base() { Channel = channel; }
IChannel Channel;
public override bool CanRead { get { return true; } }
public override bool CanSeek { get { return false; } }
public override bool CanWrite { get { return true; } }
public override void Flush() { }
public override long Length { get { throw new NotImplementedException(); } }
public override long Seek(long offset, SeekOrigin origin) { throw new NotImplementedException(); }
public override void SetLength(long value) { throw new NotImplementedException(); }
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public override int Read(byte[] buffer, int offset, int count) { return Channel.Read(buffer, offset, count); }
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public override void Write(byte[] buffer, int offset, int count) { Channel.Write(buffer, offset, count); }
public override long Position
{
get { throw new NotImplementedException(); }
set { throw new NotImplementedException(); }
}
}
}

74
RDPAddins/MasterMode.Designer.cs generated 100644
View File

@ -0,0 +1,74 @@
namespace RDPAddins
{
partial class MasterMode
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(114, 66);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(139, 13);
this.label1.TabIndex = 0;
this.label1.Text = "some day it will be a setup...";
//
// button1
//
this.button1.Location = new System.Drawing.Point(267, 141);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 1;
this.button1.Text = "button1";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(545, 358);
this.Controls.Add(this.button1);
this.Controls.Add(this.label1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
}
}

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace RDPAddins
{
internal partial class MasterMode : Form
{
public MasterMode()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,97 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Security.Principal;
using System.Diagnostics;
using System.ComponentModel;
using Win32.WtsApi32;
using System.Reflection;
using System.Threading;
using System.IO;
namespace RDPAddins
{
public class Program
{
static System.Configuration.Configuration Configuration = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Configuration.ConfigurationUserLevel.None);
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
public static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var entry = AppDomain.CurrentDomain.GetData("entry");
if (entry != null)
{
var Client = new RDPClient();
Client.MainForm = new SlaveMode(Client);
Client.MainForm.Load += new EventHandler((sender, e) =>
{
ChannelReturnCodes ret = Client.Initialize(Assembly.GetExecutingAssembly().Location, (IntPtr)entry);
AppDomain.CurrentDomain.SetData("ret", ret == ChannelReturnCodes.Ok);
((ManualResetEvent)AppDomain.CurrentDomain.GetData("event")).Set();
if (ret != ChannelReturnCodes.Ok)
{
MessageBox.Show("VirtualChannelInit error.\n" + ret.ToString(), "RDPAddins", MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
}
});
Application.Run(Client.MainForm);
}
else
{
//WindowsPrincipal pricipal = new WindowsPrincipal(WindowsIdentity.GetCurrent());
//if (!pricipal.IsInRole(WindowsBuiltInRole.Administrator))
//{
// ProcessStartInfo processInfo = new ProcessStartInfo();
// processInfo.Verb = "runas";
// processInfo.Arguments = string.Join(" ", args);
// processInfo.FileName = Application.ExecutablePath;
// try
// {
// Process.Start(processInfo);
// }
// catch (Win32Exception)
// {
// }
//}
//else
Application.Run(new MasterMode());
}
}
[STAThread]
public static int MainC(string args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var entry = new IntPtr(long.Parse(new string(args.Reverse().ToArray())));
ManualResetEvent wait = new ManualResetEvent(false);
int mainret = 1;
var thread = new Thread(() =>
{
var Client = new RDPClient();
Client.MainForm = new SlaveMode(Client);
Client.MainForm.Load += new EventHandler((sender, e) =>
{
ChannelReturnCodes ret = Client.Initialize(Assembly.GetExecutingAssembly().Location, entry);
wait.Set();
if (ret != ChannelReturnCodes.Ok)
{
mainret = 0;
MessageBox.Show("VirtualChannelInit error.\n" + ret.ToString(), "RDPAddins", MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
}
});
Application.Run(Client.MainForm);
});
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
wait.WaitOne();
return mainret;
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("RDPAddins")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RDPAddins")]
[assembly: AssemblyCopyright("© Selvin 2011. All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("4a49ae38-0071-4836-b31d-a6009d719495")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.2.1.0")]
[assembly: AssemblyFileVersion("0.2.1.0")]

View File

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace RDPAddins.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// 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.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RDPAddins.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,122 @@
<?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)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{4345A357-B6D6-49A8-98CD-7D0D6708AC17}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>RDPAddins</RootNamespace>
<AssemblyName>RDPAddins</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<OutputPath>..\bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<OutputPath>..\bin\Release\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>..\RDPAddins.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Channel.cs" />
<Compile Include="ChannelStream.cs" />
<Compile Include="MasterMode.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MasterMode.Designer.cs">
<DependentUpon>MasterMode.cs</DependentUpon>
</Compile>
<Compile Include="About.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="About.Designer.cs">
<DependentUpon>About.cs</DependentUpon>
</Compile>
<Compile Include="SlaveMode.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SlaveMode.Designer.cs">
<DependentUpon>SlaveMode.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RDPClient.cs" />
<Compile Include="WtsApi32.cs" />
<EmbeddedResource Include="MasterMode.resx">
<DependentUpon>MasterMode.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="About.pl-PL.resx">
<DependentUpon>About.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="About.resx">
<DependentUpon>About.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SlaveMode.pl-PL.resx">
<DependentUpon>SlaveMode.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SlaveMode.resx">
<DependentUpon>SlaveMode.cs</DependentUpon>
<SubType>Designer</SubType>
</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>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\RDPAddins.Common\RDPAddins.Common.csproj">
<Project>{EC8481C3-F82F-4F3C-84E2-6732750B6542}</Project>
<Name>RDPAddins.Common</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Resources\AddinIcon.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>

Some files were not shown because too many files have changed in this diff Show More