Skip to content

Commit

Permalink
Initial merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Hari committed Aug 12, 2015
1 parent 0cca2eb commit 6f6cb35
Show file tree
Hide file tree
Showing 3,540 changed files with 297,260 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
63 changes: 63 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
642 changes: 642 additions & 0 deletions .gitignore

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions Accessibility/FetchTimer/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>
96 changes: 96 additions & 0 deletions Accessibility/FetchTimer/FetchTimer.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{ED2C7FF2-A9C0-44C9-8154-877F82B2E58A}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FetchTimer</RootNamespace>
<AssemblyName>FetchTimer</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="UIAutomationClient" />
<Reference Include="UIAutomationClientsideProviders" />
<Reference Include="UIAutomationProvider" />
<Reference Include="UIAutomationTypes" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="FetchTimerForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FetchTimerForm.designer.cs">
<DependentUpon>FetchTimerForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UIAutomationFetcher.cs" />
<EmbeddedResource Include="FetchTimerForm.resx">
<DependentUpon>FetchTimerForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 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>
116 changes: 116 additions & 0 deletions Accessibility/FetchTimer/FetchTimerForm.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
// // Copyright (c) Microsoft. All rights reserved.
// // Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Threading;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Forms;

namespace FetchTimer
{
public partial class FetchTimerForm : Form
{
public delegate void OutputDelegate(string results);

private TreeScope _cacheScope;
private AutomationElementMode _elementMode;
private UiAutomationFetcher _fetcher;
// Member variables.
private Point _targetPoint;
private Thread _workerThread;
public OutputDelegate OutputMethodInstance;

/// <summary>
/// Constructor.
/// </summary>
public FetchTimerForm()
{
InitializeComponent();
OutputMethodInstance = OutputResults;
}

/// <summary>
/// Enables/disables Children check box when Descendants changed, since
/// Descendants includes Children.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void cbDescendants_CheckedChanged(object sender, EventArgs e)
{
var box = sender as CheckBox;
cbChildren.Enabled = !box.Checked;
}

/// <summary>
/// Prints information to the text box.
/// </summary>
/// <param name="output">String to print.</param>
public void OutputResults(string output)
{
tbOutput.AppendText(output);
}

/// <summary>
/// Clears the output box.
/// </summary>
/// <param name="sender">Object that raised the event.</param>
/// <param name="e">Event arguments.</param>
private void btnClear_Click(object sender, EventArgs e)
{
tbOutput.Clear();
}

/// <summary>
/// Responds to button click; saves options and starts
/// the UI Automation worker thread.
/// </summary>
/// <param name="sender">Object that raised the event.</param>
/// <param name="e">Event arguments.</param>
private void btnProps_Click(object sender, EventArgs e)
{
// Convert Drawing.Point to Windows.Point.
var drawingPoint = Cursor.Position;
_targetPoint = new Point(drawingPoint.X, drawingPoint.Y);

// Save caching settings in member variables so UI isn't accessed
// directly by the other thread.

_elementMode = rbFull.Checked ? AutomationElementMode.Full : AutomationElementMode.None;

// For simplicity, always include Element in scope.
_cacheScope = TreeScope.Element;
if (cbDescendants.Checked)
{
_cacheScope |= TreeScope.Descendants;
}
// Note: if descendants are specified, children
// are automatically included.
else if (cbChildren.Checked)
{
_cacheScope |= TreeScope.Children;
}

_fetcher = new UiAutomationFetcher(this, _targetPoint,
_cacheScope, _elementMode);

// Start another thread to do the UI Automation work.
var threadDelegate = new ThreadStart(StartWorkerThread);
_workerThread = new Thread(threadDelegate) {Priority = ThreadPriority.Highest};
_workerThread.Start();
OutputResults("Wait..." + Environment.NewLine);
}

/// <summary>
/// Delegated method for ThreadStart.
/// </summary>
/// <remarks>
/// UI Automation must be called on a separate thread if the client application
/// itself might be a target.
/// </remarks>
private void StartWorkerThread()
{
_fetcher.DoWork();
}
} // Form class
} // Namespace
Loading

0 comments on commit 6f6cb35

Please sign in to comment.