Permalink
Browse files

Add PasswordBoxSection to Eto.Test app

  • Loading branch information...
cwensley committed Feb 28, 2012
1 parent 3bb82bc commit 67e90611de50f74152e2a0d2b0b4bb17979d1c8b
Showing with 168 additions and 117 deletions.
  1. +118 −117 Source/Eto.Test/Eto.Test/Eto.Test.csproj
  2. +50 −0 Source/Eto.Test/Eto.Test/Sections/Controls/PasswordBoxSection.cs
@@ -1,119 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>10.0.0</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{F8F400B8-A2F6-4342-82F6-D6D8B544A7E5}</ProjectGuid>
- <OutputType>Library</OutputType>
- <RootNamespace>Eto.Test</RootNamespace>
- <AssemblyName>Eto.Test</AssemblyName>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug</OutputPath>
- <DefineConstants>DEBUG</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <ConsolePause>false</ConsolePause>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>none</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Release</OutputPath>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <ConsolePause>false</ConsolePause>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\x86\Debug\</OutputPath>
- <DefineConstants>DEBUG</DefineConstants>
- <DebugType>full</DebugType>
- <PlatformTarget>x86</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <Optimize>false</Optimize>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
- <OutputPath>bin\x86\Release\</OutputPath>
- <PlatformTarget>x86</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <DebugType>none</DebugType>
- <WarningLevel>4</WarningLevel>
- <Optimize>false</Optimize>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <ItemGroup>
- <Compile Include="Log.cs" />
- <Compile Include="Sections\Dialogs\ColorDialogSection.cs" />
- <Compile Include="Sections\Dialogs\SelectFolderSection.cs" />
- <Compile Include="Sections\Drawing\BitmapSection.cs" />
- <Compile Include="Sections\Drawing\AntialiasSection.cs" />
- <Compile Include="Sections\Drawing\PathSection.cs" />
- <Compile Include="Sections\Layouts\TableLayoutSection\RuntimeSection.cs" />
- <Compile Include="Sections\Layouts\TableLayoutSection\SpacingSection.cs" />
- <Compile Include="TestApplication.cs" />
- <Compile Include="MainForm.cs" />
- <Compile Include="Dialogs\About.cs" />
- <Compile Include="Actions\About.cs" />
- <Compile Include="Actions\Quit.cs" />
- <Compile Include="Actions\Close.cs" />
- <Compile Include="Sections\Controls\ButtonSection.cs" />
- <Compile Include="Sections\Controls\CheckBoxSection.cs" />
- <Compile Include="Sections\Controls\ComboBoxSection.cs" />
- <Compile Include="Sections\Controls\DateTimePickerSection.cs" />
- <Compile Include="Sections\Controls\DrawableSection.cs" />
- <Compile Include="Sections\Dialogs\FileDialogSection.cs" />
- <Compile Include="Sections\Controls\GroupBoxSection.cs" />
- <Compile Include="Sections\Controls\LabelSection.cs" />
- <Compile Include="Sections\Controls\ListBoxSection.cs" />
- <Compile Include="Sections\Controls\NumericUpDownSection.cs" />
- <Compile Include="Sections\Controls\RadioButtonSection.cs" />
- <Compile Include="Sections\Controls\ScrollableSection.cs" />
- <Compile Include="Sections\Controls\SliderSection.cs" />
- <Compile Include="Sections\Controls\TabControlSection.cs" />
- <Compile Include="Sections\Controls\TextAreaSection.cs" />
- <Compile Include="Sections\Controls\TreeViewSection.cs" />
- <Compile Include="Sections\Controls\WebViewSection.cs" />
- <Compile Include="Sections\Controls\XamlSection.cs" />
- <Compile Include="Sections\Controls\TextBoxSection.cs" />
- <Compile Include="Sections\Behaviors\MouseEventsSection.cs" />
- <Compile Include="SectionList.cs" />
- <Compile Include="Sections\Behaviors\AllControlsBase.cs" />
- <Compile Include="Sections\Behaviors\FocusEventsSection.cs" />
- <Compile Include="Sections\Behaviors\KeyEventsSection.cs" />
- <Compile Include="Sections\Behaviors\ContextMenuSection.cs" />
- <Compile Include="Xaml\Test.cs" />
- <Compile Include="Sections\Drawing\IndexedBitmapSection.cs" />
- <Compile Include="Sections\Controls\GridViewSection.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\Eto\Eto.csproj">
- <Project>{16289D2F-044C-49EF-83E9-9391AFF8FD2B}</Project>
- <Name>Eto</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="TestIcon.ico" />
- <EmbeddedResource Include="Xaml\Test.xaml">
- <SubType>Designer</SubType>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="TestImage.png" />
- </ItemGroup>
- <ItemGroup />
- <ItemGroup />
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{F8F400B8-A2F6-4342-82F6-D6D8B544A7E5}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>Eto.Test</RootNamespace>
+ <AssemblyName>Eto.Test</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Optimize>false</Optimize>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <DebugType>none</DebugType>
+ <WarningLevel>4</WarningLevel>
+ <Optimize>false</Optimize>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <Compile Include="Log.cs" />
+ <Compile Include="Sections\Controls\PasswordBoxSection.cs" />
+ <Compile Include="Sections\Dialogs\ColorDialogSection.cs" />
+ <Compile Include="Sections\Dialogs\SelectFolderSection.cs" />
+ <Compile Include="Sections\Drawing\BitmapSection.cs" />
+ <Compile Include="Sections\Drawing\AntialiasSection.cs" />
+ <Compile Include="Sections\Drawing\PathSection.cs" />
+ <Compile Include="Sections\Layouts\TableLayoutSection\RuntimeSection.cs" />
+ <Compile Include="Sections\Layouts\TableLayoutSection\SpacingSection.cs" />
+ <Compile Include="TestApplication.cs" />
+ <Compile Include="MainForm.cs" />
+ <Compile Include="Dialogs\About.cs" />
+ <Compile Include="Actions\About.cs" />
+ <Compile Include="Actions\Quit.cs" />
+ <Compile Include="Actions\Close.cs" />
+ <Compile Include="Sections\Controls\ButtonSection.cs" />
+ <Compile Include="Sections\Controls\CheckBoxSection.cs" />
+ <Compile Include="Sections\Controls\ComboBoxSection.cs" />
+ <Compile Include="Sections\Controls\DateTimePickerSection.cs" />
+ <Compile Include="Sections\Controls\DrawableSection.cs" />
+ <Compile Include="Sections\Dialogs\FileDialogSection.cs" />
+ <Compile Include="Sections\Controls\GroupBoxSection.cs" />
+ <Compile Include="Sections\Controls\LabelSection.cs" />
+ <Compile Include="Sections\Controls\ListBoxSection.cs" />
+ <Compile Include="Sections\Controls\NumericUpDownSection.cs" />
+ <Compile Include="Sections\Controls\RadioButtonSection.cs" />
+ <Compile Include="Sections\Controls\ScrollableSection.cs" />
+ <Compile Include="Sections\Controls\SliderSection.cs" />
+ <Compile Include="Sections\Controls\TabControlSection.cs" />
+ <Compile Include="Sections\Controls\TextAreaSection.cs" />
+ <Compile Include="Sections\Controls\TreeViewSection.cs" />
+ <Compile Include="Sections\Controls\WebViewSection.cs" />
+ <Compile Include="Sections\Controls\XamlSection.cs" />
+ <Compile Include="Sections\Controls\TextBoxSection.cs" />
+ <Compile Include="Sections\Behaviors\MouseEventsSection.cs" />
+ <Compile Include="SectionList.cs" />
+ <Compile Include="Sections\Behaviors\AllControlsBase.cs" />
+ <Compile Include="Sections\Behaviors\FocusEventsSection.cs" />
+ <Compile Include="Sections\Behaviors\KeyEventsSection.cs" />
+ <Compile Include="Sections\Behaviors\ContextMenuSection.cs" />
+ <Compile Include="Xaml\Test.cs" />
+ <Compile Include="Sections\Drawing\IndexedBitmapSection.cs" />
+ <Compile Include="Sections\Controls\GridViewSection.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Eto\Eto.csproj">
+ <Project>{16289D2F-044C-49EF-83E9-9391AFF8FD2B}</Project>
+ <Name>Eto</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="TestIcon.ico" />
+ <EmbeddedResource Include="Xaml\Test.xaml">
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="TestImage.png" />
+ </ItemGroup>
+ <ItemGroup />
+ <ItemGroup />
</Project>
@@ -0,0 +1,50 @@
+using System;
+using Eto.Forms;
+using Eto.Drawing;
+
+namespace Eto.Test.Sections.Controls
+{
+ public class PasswordBoxSection : Panel
+ {
+ public PasswordBoxSection ()
+ {
+ var layout = new DynamicLayout (this);
+
+ layout.AddRow (new Label { Text = "Default" }, Default ());
+ layout.AddRow (new Label { Text = "Read Only" }, ReadOnly ());
+ layout.AddRow (new Label { Text = "Disabled" }, Disabled ());
+
+ // growing space at end is blank!
+ layout.Add (null);
+ }
+
+ Control Default ()
+ {
+ var control = new PasswordBox { Text = "Some Text" };
+ LogEvents (control);
+ return control;
+ }
+
+ Control ReadOnly ()
+ {
+ var control = new PasswordBox { Text = "Read only text", ReadOnly = true };
+ LogEvents (control);
+ return control;
+ }
+
+ Control Disabled ()
+ {
+ var control = Default ();
+ control.Enabled = false;
+ return control;
+ }
+
+ void LogEvents (PasswordBox control)
+ {
+ control.TextChanged += delegate {
+ Log.Write (control, "TextChanged, Text: {0}", control.Text);
+ };
+ }
+ }
+}
+

0 comments on commit 67e9061

Please sign in to comment.