Skip to content

Commit

Permalink
Merge pull request #163 from dotnet/Editing
Browse files Browse the repository at this point in the history
Moved Editing area
  • Loading branch information
anjali-wpf committed Sep 18, 2023
2 parents e8600b3 + d259962 commit c89fa95
Show file tree
Hide file tree
Showing 1,261 changed files with 516,970 additions and 65 deletions.
10 changes: 10 additions & 0 deletions Microsoft.DotNet.Wpf.Test.sln
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DrtMil2D", "src\Test\mil\DR
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DrtEditing", "src\Test\Editing\DRT\DrtEditing.csproj", "{B0DE4B6C-BA25-4AB0-8C4D-F2F51A21911C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EditingTest", "src\Test\Editing\FeatureTests\ExeTarget\EditingTest.csproj", "{B88948C0-6BD5-4D9E-BEAA-9E858D7BA5C2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EditingTestLib", "src\Test\Editing\FeatureTests\Common\library\EditingTestLib.csproj", "{CF7E018F-8DAF-48D4-9871-ECF8C83C16FF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EditingTestPart1", "src\Test\Editing\FeatureTests\Part1\EditingTestPart1.csproj", "{F931E029-8046-4ADC-963A-441B0FC143A3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EditingData", "src\Test\Editing\FeatureTests\Data\EditingData.csproj", "{9E08BEB6-256E-4990-AF12-8FD403FC1E23}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EditingOrcasTest", "src\Test\Editing\FeatureTests\Orcas\EditingOrcasTest.csproj", "{0AF769AC-8693-4D44-A47D-02C9068BD1A9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DrtControls", "src\Test\Controls\DRT\Controls\DRT\DrtControls.csproj", "{E1F76AC7-5BC6-4E3A-882F-167BCCEFCE06}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ListView2app", "src\Test\Controls\DRT\Controls\2-app\ListView\ListView2app.csproj", "{7BDB4347-7CA4-410E-8273-37044ABB887A}"
Expand Down
81 changes: 81 additions & 0 deletions src/Test/BranchCommon/data/DiscoveryInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,87 @@
</DefaultTestInfo>
</Target>

<!-- Editing -->
<Target Adaptor="TestAttributeAdaptor" Path="FeatureTests\Editing\EditingTest.exe">
<DefaultTestInfo Area="Editing" Disabled="False" Priority="1" Type="Functional" UacElevation="Elevated">
<Driver Executable="sti.exe" />
<SupportFiles>
<SupportFile Source="FeatureTests\Editing\*" />
<SupportFile Source="Common\AssemblyLinker\%PROCESSOR_ARCHITECTURE%\al.exe" />
<SupportFile Source="Common\AssemblyLinker\%PROCESSOR_ARCHITECTURE%\alink.dll" />
<SupportFile Source="Common\AssemblyLinker\%PROCESSOR_ARCHITECTURE%\alinkui.dll" />
</SupportFiles>
<Deployments>
<Deployment>FeatureTests\Editing\EditingTestLib.deployment</Deployment>
</Deployments>
<DriverParameters DefaultResult="Pass" SecurityLevel="FullTrust" />
<Versions>
<Version>3.0+</Version>
<Version>4.0Client+</Version>
</Versions>
</DefaultTestInfo>
</Target>

<!-- Editing -->
<Target Adaptor="TestAttributeAdaptor" Path="FeatureTests\Editing\EditingOrcasTest.exe">
<DefaultTestInfo Area="Editing" Disabled="False" Priority="1" Type="Functional" UacElevation="Elevated">
<Driver Executable="sti.exe" />
<SupportFiles>
<SupportFile Source="FeatureTests\Editing\*" />
<SupportFile Source="FeatureTests\Editing\EditingOrcasTest.deployment" />
</SupportFiles>
<Deployments>
<Deployment>FeatureTests\Editing\EditingTestLib.deployment</Deployment>
<Deployment>FeatureTests\Editing\EditingOrcasTest.deployment</Deployment>
</Deployments>
<DriverParameters DefaultResult="Pass" SecurityLevel="FullTrust" />
<Versions>
<Version>3.0SP1+</Version>
<Version>4.0Client+</Version>
</Versions>
</DefaultTestInfo>
</Target>

<!-- Editing -->
<Target Adaptor="TestAttributeAdaptor" Path="FeatureTests\Editing\EditingTestPart1.exe">
<DefaultTestInfo Area="Editing" Disabled="False" Priority="1" Type="Functional" UacElevation="Elevated">
<Driver Executable="sti.exe" />
<SupportFiles>
<SupportFile Source="FeatureTests\Editing\EditingTestPart1.exe" />
<SupportFile Source="FeatureTests\Editing\EditingTestLib.dll" />
<SupportFile Source="FeatureTests\Editing\EditingTestLib.deployment" />
<SupportFile Source="FeatureTests\Editing\EditingTestPart1.deployment" />
</SupportFiles>
<Deployments>
<Deployment>FeatureTests\Editing\EditingTestLib.deployment</Deployment>
<Deployment>FeatureTests\Editing\EditingTestPart1.deployment</Deployment>
</Deployments>
<DriverParameters DefaultResult="Pass" SecurityLevel="FullTrust" />
<Versions>
<Version>4.0+</Version>
<Version>4.0Client+</Version>
</Versions>
</DefaultTestInfo>
</Target>

<!-- Editing -->
<Target Adaptor="XtcAdaptor" Path="FeatureTests\Editing\*.xtc">
<DefaultTestInfo Area="Editing" Disabled="False" Priority="1" Type="Functional" UacElevation="Elevated">
<Driver Executable="sti.exe" />
<SupportFiles>
<SupportFile Source="FeatureTests\Editing\*" />
</SupportFiles>
<Deployments>
<Deployment>FeatureTests\Editing\EditingTestLib.deployment</Deployment>
</Deployments>
<DriverParameters DefaultResult="Pass" SecurityLevel="FullTrust" />
<Versions>
<Version>3.0+</Version>
<Version>4.0Client+</Version>
</Versions>
</DefaultTestInfo>
</Target>

<!-- Area : ElementLayout -->
<Target Adaptor="TestAttributeAdaptor" Path="FeatureTests\ElementLayout\ElementLayoutLibrary.dll">
<DefaultTestInfo Area="ElementLayout" Type="Functional" ExecutionGroupingLevel="SharedAppDomains">
Expand Down
10 changes: 10 additions & 0 deletions src/Test/Editing/Common/EditingExaminer/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

// This file specifies various assembly level attributes.

using System;
using System.Security;

[assembly:AllowPartiallyTrustedCallers]
95 changes: 95 additions & 0 deletions src/Test/Editing/Common/EditingExaminer/ColorSelectionItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

/*******************************************************************************
*
* Description: ColorSelectionItem.cs implement the immediate window with the following
* features:
* 1. Define the ColorComboBoxItem.
*
*******************************************************************************/
#region Using directives

using System;
using System.Windows;
using System.Windows.Shapes;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Media;
using System.Collections;
using System.Globalization;

#endregion

namespace EditingExaminer
{
/// <summary>
/// Define a item for chosing text color
/// </summary>
public class ColorComboBoxItem : System.Windows.Controls.ListBoxItem, IFontChooserComboBoxItem
{
private SolidColorBrush _brush;
private string _colorName;

public ColorComboBoxItem(string ColorName, SolidColorBrush brush)
{
_brush = brush;

StackPanel panel = new StackPanel();
panel.Height = double.NaN; // _height;
panel.Orientation = Orientation.Horizontal;

Rectangle colorSwatch = new Rectangle();
colorSwatch.Height = double.NaN; // _height;
colorSwatch.Width = 25;
colorSwatch.Fill = brush;
colorSwatch.StrokeThickness = 1;
colorSwatch.Stroke = Brushes.DarkGray;
colorSwatch.Margin = new Thickness(1, 1, 1, 1);

TextBlock colorName = new TextBlock();
colorName.Text = " " + ColorName.Trim();
colorName.Height = double.NaN; // auto height
colorName.Width = double.NaN; // auto width
colorName.Margin = new Thickness(1, 1, 1, 1);

panel.Children.Add(colorSwatch);
panel.Children.Add(colorName);

Content = panel;
_colorName = ColorName;
}

/// <summary>
/// return the name of a color
/// </summary>
/// <returns></returns>
public override string ToString()
{
return _colorName;
}

/// <summary>
/// Return the color as a solid colorBrush
/// </summary>
public SolidColorBrush Brush
{
get
{
return _brush;
}
}

public int CompareWithString(string value)
{
return String.Compare(_colorName, value, true, CultureInfo.InvariantCulture);
}

public bool RestrictToListedValues()
{
return true; // Only available fonts may be selected
}
}
}
Loading

0 comments on commit c89fa95

Please sign in to comment.