summaryrefslogtreecommitdiff
path: root/cs/demo/Ice/wpf
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2009-10-02 02:23:52 +0200
committerJose <jose@zeroc.com>2009-10-02 02:23:52 +0200
commit1d9f29e281770ecdad4a245271f2b828bd64a32f (patch)
treeac083f28b06a444e484c24f8fcf1b12a36202c84 /cs/demo/Ice/wpf
parentUpdated demo README (diff)
downloadice-1d9f29e281770ecdad4a245271f2b828bd64a32f.tar.bz2
ice-1d9f29e281770ecdad4a245271f2b828bd64a32f.tar.xz
ice-1d9f29e281770ecdad4a245271f2b828bd64a32f.zip
3772. Recovering from Glacier2 / Ice router session failure.
Diffstat (limited to 'cs/demo/Ice/wpf')
-rw-r--r--cs/demo/Ice/wpf/App.xaml18
-rw-r--r--cs/demo/Ice/wpf/App.xaml.cs25
-rw-r--r--cs/demo/Ice/wpf/Hello.ice24
-rw-r--r--cs/demo/Ice/wpf/HelloWindow.xaml91
-rw-r--r--cs/demo/Ice/wpf/HelloWindow.xaml.cs358
-rw-r--r--cs/demo/Ice/wpf/Ice.wpf.client.csproj154
-rwxr-xr-xcs/demo/Ice/wpf/Properties/AssemblyInfo.cs55
-rwxr-xr-xcs/demo/Ice/wpf/Properties/Resources.Designer.cs71
-rwxr-xr-xcs/demo/Ice/wpf/Properties/Resources.resx117
-rwxr-xr-xcs/demo/Ice/wpf/Properties/Settings.Designer.cs30
-rwxr-xr-xcs/demo/Ice/wpf/Properties/Settings.settings7
-rw-r--r--cs/demo/Ice/wpf/config.client45
12 files changed, 995 insertions, 0 deletions
diff --git a/cs/demo/Ice/wpf/App.xaml b/cs/demo/Ice/wpf/App.xaml
new file mode 100644
index 00000000000..1495236cb4e
--- /dev/null
+++ b/cs/demo/Ice/wpf/App.xaml
@@ -0,0 +1,18 @@
+<!--
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+-->
+<Application x:Class="Ice.wpf.client.App"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ StartupUri="HelloWindow.xaml">
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/demo/Ice/wpf/App.xaml.cs b/cs/demo/Ice/wpf/App.xaml.cs
new file mode 100644
index 00000000000..4f42b9a436a
--- /dev/null
+++ b/cs/demo/Ice/wpf/App.xaml.cs
@@ -0,0 +1,25 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Windows;
+
+namespace Ice.wpf.client
+{
+ /// <summary>
+ /// Interaction logic for App.xaml
+ /// </summary>
+ public partial class App : System.Windows.Application
+ {
+ }
+}
diff --git a/cs/demo/Ice/wpf/Hello.ice b/cs/demo/Ice/wpf/Hello.ice
new file mode 100644
index 00000000000..b5c9e4a599e
--- /dev/null
+++ b/cs/demo/Ice/wpf/Hello.ice
@@ -0,0 +1,24 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef HELLO_ICE
+#define HELLO_ICE
+
+module Demo
+{
+
+interface Hello
+{
+ ["ami"] idempotent void sayHello(int delay);
+ ["ami"] void shutdown();
+};
+
+};
+
+#endif
diff --git a/cs/demo/Ice/wpf/HelloWindow.xaml b/cs/demo/Ice/wpf/HelloWindow.xaml
new file mode 100644
index 00000000000..7202bf843ab
--- /dev/null
+++ b/cs/demo/Ice/wpf/HelloWindow.xaml
@@ -0,0 +1,91 @@
+<!--
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+-->
+<Window x:Class="Ice.wpf.client.HelloWindow"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ Title="Ice - Hello World!" SizeToContent="WidthAndHeight" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
+ Loaded="Window_Loaded" Closed="Window_Closed" Width="300" Height="190" MinWidth="300" MinHeight="190">
+ <Grid Margin="10">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+
+ <Grid Grid.Row="0" Grid.Column="0">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*"/>
+ <ColumnDefinition Width="2*"/>
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" MinHeight="23" />
+ <RowDefinition Height="Auto" MinHeight="23" />
+ <RowDefinition Height="Auto" MinHeight="28" />
+ <RowDefinition Height="Auto" MinHeight="23" />
+ </Grid.RowDefinitions>
+ <Label Grid.Row="0" Grid.Column="0" Name="label4" VerticalAlignment="Top" HorizontalAlignment="Left" Width="70" >Hostname</Label>
+ <Label Grid.Row="1" Grid.Column="0" Name="label2" VerticalAlignment="Top" HorizontalAlignment="Left" Width="70">Mode</Label>
+ <Label Grid.Row="2" Grid.Column="0" Name="label1" Height="28" HorizontalAlignment="Left" VerticalAlignment="Top" Width="70">Timeout</Label>
+ <Label Grid.Row="3" Grid.Column="0" Name="label3" VerticalAlignment="Top" HorizontalAlignment="Left" Width="70">Delay</Label>
+
+ <TextBox Grid.Row="0" Grid.Column="1" Name="hostname" VerticalAlignment="Top">127.0.0.1</TextBox>
+ <ComboBox Grid.Row="1" Grid.Column="1" Name="deliveryMode" VerticalAlignment="Top" IsReadOnly="True" SelectedIndex="0">
+ <ComboBoxItem>Twoway</ComboBoxItem>
+ <ComboBoxItem>Twoway Secure</ComboBoxItem>
+ <ComboBoxItem>Oneway</ComboBoxItem>
+ <ComboBoxItem>Oneway Batch</ComboBoxItem>
+ <ComboBoxItem>Oneway Secure</ComboBoxItem>
+ <ComboBoxItem>Oneway Secure Batch</ComboBoxItem>
+ <ComboBoxItem>Datagram</ComboBoxItem>
+ <ComboBoxItem>Datagram Batch</ComboBoxItem>
+ </ComboBox>
+ <Grid Grid.Row="2" Grid.Column="1">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="4*"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+ <Slider Grid.Row="0" Grid.Column="0" Name="timeoutSlider" VerticalAlignment="Top" Maximum="5000" Height="22" ValueChanged="timeoutSlider_ValueChanged" />
+ <Label Grid.Row="0" Grid.Column="1" Name="timeoutLabel" VerticalAlignment="Top" HorizontalAlignment="Left">0.0</Label>
+ </Grid>
+ <Grid Grid.Row="3" Grid.Column="1">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="4*"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+ <Slider Grid.Row="0" Grid.Column="0" Name="delaySlider" VerticalAlignment="Top" Maximum="5000" Height="22" ValueChanged="delaySlider_ValueChanged" />
+ <Label Grid.Row="0" Grid.Column="1" Name="delayLabel" VerticalAlignment="Top" HorizontalAlignment="Left">0.0</Label>
+ </Grid>
+ </Grid>
+ <Grid Grid.Row="1" Grid.Column="0" Margin="0 10 0 5">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*"/>
+ <ColumnDefinition Width="*"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+ <Button Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center" Name="sayHello" Click="sayHello_Click">Hello World!</Button>
+ <Button Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Name="shutdown" Click="shutdown_Click">Shutdown</Button>
+ <Button Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center" Name="flush" Click="flush_Click">Flush</Button>
+ </Grid>
+ <Label Grid.Row="2" Grid.Column="0" Name="status">Ready</Label>
+ </Grid>
+</Window>
diff --git a/cs/demo/Ice/wpf/HelloWindow.xaml.cs b/cs/demo/Ice/wpf/HelloWindow.xaml.cs
new file mode 100644
index 00000000000..ed71cad4e14
--- /dev/null
+++ b/cs/demo/Ice/wpf/HelloWindow.xaml.cs
@@ -0,0 +1,358 @@
+// **********************************************************************
+//
+// Copyright(c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+using System.Diagnostics;
+
+namespace Ice.wpf.client
+{
+ /// <summary>
+ /// Interaction logic for HelloWindow.xaml
+ /// </summary>
+ public partial class HelloWindow : Window
+ {
+ public HelloWindow()
+ {
+ InitializeComponent();
+ locateOnScreen(this);
+ }
+
+ static String TWOWAY = "Twoway";
+ static String TWOWAY_SECURE = "Twoway Secure";
+ static String ONEWAY = "Oneway";
+ static String ONEWAY_BATCH = "Oneway Batch";
+ static String ONEWAY_SECURE = "Oneway Secure";
+ static String ONEWAY_SECURE_BATCH = "Oneway Secure Batch";
+ static String DATAGRAM = "Datagram";
+ static String DATAGRAM_BATCH = "Datagram Batch";
+
+ private void Window_Loaded(object sender, EventArgs e)
+ {
+ try
+ {
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties();
+ initData.properties.load("config.client");
+ _communicator = Ice.Util.initialize(initData);
+ }
+ catch(Ice.LocalException ex)
+ {
+ handleException(ex);
+ }
+ }
+
+ private void Window_Closed(object sender, EventArgs e)
+ {
+ if(_communicator == null)
+ {
+ return;
+ }
+
+ _communicator.destroy();
+ _communicator = null;
+ }
+
+ private bool deliveryModeIsBatch()
+ {
+ return deliveryMode.Text.Equals(ONEWAY_BATCH) ||
+ deliveryMode.Text.Equals(ONEWAY_SECURE_BATCH) ||
+ deliveryMode.Text.Equals(DATAGRAM_BATCH);
+ }
+
+ private Ice.ObjectPrx deliveryModeApply(Ice.ObjectPrx prx)
+ {
+ if(deliveryMode.Text.Equals(TWOWAY))
+ {
+ prx = prx.ice_twoway();
+ }
+ else if(deliveryMode.Text.Equals(TWOWAY_SECURE))
+ {
+ prx = prx.ice_twoway().ice_secure(true);
+ }
+ else if(deliveryMode.Text.Equals(ONEWAY))
+ {
+ prx = prx.ice_oneway();
+ }
+ else if(deliveryMode.Text.Equals(ONEWAY_BATCH))
+ {
+ prx = prx.ice_batchOneway();
+ }
+ else if(deliveryMode.Text.Equals(ONEWAY_SECURE))
+ {
+ prx = prx.ice_oneway().ice_secure(true);
+ }
+ else if(deliveryMode.Text.Equals(ONEWAY_SECURE_BATCH))
+ {
+ prx = prx.ice_batchOneway().ice_secure(true);
+ }
+ else if(deliveryMode.Text.Equals(DATAGRAM))
+ {
+ prx = prx.ice_datagram();
+ }
+ else if(deliveryMode.Text.Equals(DATAGRAM_BATCH))
+ {
+ prx = prx.ice_batchDatagram();
+ }
+
+ return prx;
+ }
+
+ class SayHelloI : Demo.AMI_Hello_sayHello, Ice.AMISentCallback
+ {
+ public SayHelloI(HelloWindow window)
+ {
+ _window = window;
+ }
+
+ public override void ice_response()
+ {
+ lock(this)
+ {
+ Debug.Assert(!_response);
+ _response = true;
+ _window.Dispatcher.BeginInvoke(DispatcherPriority.Normal,(Action)delegate()
+ {
+ _window.status.Content = "Ready";
+ });
+ }
+ }
+
+ public override void ice_exception(Exception ex)
+ {
+ lock(this)
+ {
+ Debug.Assert(!_response);
+ _response = true;
+ _window.Dispatcher.BeginInvoke(DispatcherPriority.Normal,(Action)delegate()
+ {
+ _window.handleException(ex);
+ });
+ }
+ }
+
+ #region AMISentCallback Members
+
+ public void ice_sent()
+ {
+ lock(this)
+ {
+ if(_response)
+ {
+ return;
+ }
+ _window.Dispatcher.BeginInvoke(DispatcherPriority.Normal,(Action)delegate()
+ {
+ if(_window.deliveryMode.Text.Equals(TWOWAY) || _window.deliveryMode.Text.Equals(TWOWAY_SECURE))
+ {
+ _window.status.Content = "Waiting for response";
+ }
+ else
+ {
+ _window.status.Content = "Ready";
+ }
+ });
+ }
+ }
+
+ #endregion
+
+ private bool _response = false;
+ private HelloWindow _window;
+ }
+
+ private void sayHello_Click(object sender, RoutedEventArgs e)
+ {
+ Demo.HelloPrx hello = createProxy();
+ if(hello == null)
+ {
+ return;
+ }
+
+ int delay =(int)delaySlider.Value;
+ try
+ {
+ if(!deliveryModeIsBatch())
+ {
+ if(hello.sayHello_async(new SayHelloI(this), delay))
+ {
+ if(deliveryMode.Text.Equals(TWOWAY) || deliveryMode.Text.Equals(TWOWAY_SECURE))
+ {
+ status.Content = "Waiting for response";
+ }
+ }
+ else
+ {
+ status.Content = "Sending request";
+ }
+ }
+ else
+ {
+ flush.IsEnabled = true;
+ hello.sayHello(delay);
+ status.Content = "Queued sayHello request";
+ }
+ }
+ catch(Ice.LocalException ex)
+ {
+ handleException(ex);
+ }
+ }
+
+ private void handleException(Exception ex)
+ {
+ this.Dispatcher.BeginInvoke(DispatcherPriority.Normal,(Action)delegate()
+ {
+ status.Content = ex.GetType();
+ });
+ }
+
+ class ShutdownI : Demo.AMI_Hello_shutdown
+ {
+ public ShutdownI(HelloWindow window)
+ {
+ _window = window;
+ }
+
+ public override void ice_response()
+ {
+ lock(this)
+ {
+ _window.Dispatcher.BeginInvoke(DispatcherPriority.Normal,(Action)delegate()
+ {
+ _window.status.Content = "Ready";
+ });
+ }
+ }
+
+ public override void ice_exception(Exception ex)
+ {
+ lock(this)
+ {
+ _window.Dispatcher.BeginInvoke(DispatcherPriority.Normal,(Action)delegate()
+ {
+ _window.handleException(ex);
+ });
+ }
+ }
+
+ private HelloWindow _window;
+ }
+
+ private void shutdown_Click(object sender, RoutedEventArgs e)
+ {
+ Demo.HelloPrx hello = createProxy();
+ if(hello == null)
+ {
+ return;
+ }
+
+ int delay =(int)delaySlider.Value;
+
+ try
+ {
+ if(!deliveryModeIsBatch())
+ {
+ if(hello.shutdown_async(new ShutdownI(this)))
+ {
+ if(deliveryMode.Text.Equals("Twoway") || deliveryMode.Text.Equals("Twoway Secure"))
+ {
+ status.Content = "Waiting for response";
+ }
+ }
+ else
+ {
+ status.Content = "Sending request";
+ }
+ }
+ else
+ {
+ flush.IsEnabled = true;
+ hello.shutdown();
+ status.Content = "Queued shutdown request";
+ }
+ }
+ catch(Ice.LocalException ex)
+ {
+ handleException(ex);
+ }
+ }
+
+ private void flush_Click(object sender, RoutedEventArgs e)
+ {
+ new System.Threading.Thread(new System.Threading.ThreadStart(delegate()
+ {
+ try
+ {
+ _communicator.flushBatchRequests();
+ }
+ catch(Ice.LocalException ex)
+ {
+ this.Dispatcher.BeginInvoke(DispatcherPriority.Normal,(Action)delegate()
+ {
+ handleException(ex);
+ });
+ }
+ })).Start();
+ flush.IsEnabled = false;
+ status.Content = "Flushed batch requests";
+ }
+
+ Demo.HelloPrx
+ createProxy()
+ {
+ String host = hostname.Text.Trim();
+ if(host.Length == 0)
+ {
+ status.Content = "No hostname";
+ return null;
+ }
+
+ String s = "hello:tcp -h " + host + " -p 10000:ssl -h " + host + " -p 10001:udp -h " + host + " -p 10000";
+ Ice.ObjectPrx prx = _communicator.stringToProxy(s);
+ prx = deliveryModeApply(prx);
+ int timeout =(int)timeoutSlider.Value;
+ if(timeout != 0)
+ {
+ prx = prx.ice_timeout(timeout);
+ }
+ return Demo.HelloPrxHelper.uncheckedCast(prx);
+ }
+
+ private void timeoutSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
+ {
+ timeoutLabel.Content =(timeoutSlider.Value / 1000.0).ToString("F1");
+ }
+
+ private void delaySlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
+ {
+ delayLabel.Content =(delaySlider.Value / 1000.0).ToString("F1");
+ }
+
+ static private void locateOnScreen(System.Windows.Window window)
+ {
+ window.Left =(System.Windows.SystemParameters.PrimaryScreenWidth - window.Width) / 2;
+ window.Top =(System.Windows.SystemParameters.PrimaryScreenHeight - window.Height) / 2;
+ }
+
+ private Ice.Communicator _communicator = null;
+ }
+}
diff --git a/cs/demo/Ice/wpf/Ice.wpf.client.csproj b/cs/demo/Ice/wpf/Ice.wpf.client.csproj
new file mode 100644
index 00000000000..8332c86fbf4
--- /dev/null
+++ b/cs/demo/Ice/wpf/Ice.wpf.client.csproj
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{1EB710F0-E760-499B-BFD6-24E3B7A132E8}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Ice.wpf.client</RootNamespace>
+ <AssemblyName>client</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <WarningLevel>4</WarningLevel>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.\</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>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.51.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\Ice.dll</HintPath>
+ </Reference>
+ <Reference Include="IceSSL, Version=3.4.51.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\IceSSL.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </ApplicationDefinition>
+ <Page Include="HelloWindow.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="HelloWindow.xaml.cs">
+ <DependentUpon>HelloWindow.xaml</DependentUpon>
+ <SubType>Code</SubType>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Hello.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <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>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <None Include="Hello.ice" />
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ <AppDesigner Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </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>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <UserProperties ZerocIce_Home="..\..\..\.." ZerocIce_HomeExpanded="..\..\..\.." ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/demo/Ice/wpf/Properties/AssemblyInfo.cs b/cs/demo/Ice/wpf/Properties/AssemblyInfo.cs
new file mode 100755
index 00000000000..83b624aa550
--- /dev/null
+++ b/cs/demo/Ice/wpf/Properties/AssemblyInfo.cs
@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// 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("Ice.wpf.client")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Ice.wpf.client")]
+[assembly: AssemblyCopyright("Copyright © 2009")]
+[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)]
+
+//In order to begin building localizable applications, set
+//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
+//inside a <PropertyGroup>. For example, if you are using US english
+//in your source files, set the <UICulture> to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
+
+
+// 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.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/demo/Ice/wpf/Properties/Resources.Designer.cs b/cs/demo/Ice/wpf/Properties/Resources.Designer.cs
new file mode 100755
index 00000000000..f40e7d965b2
--- /dev/null
+++ b/cs/demo/Ice/wpf/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.1433
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Ice.wpf.client.Properties
+{
+
+
+ /// <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", "2.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 ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Ice.wpf.client.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;
+ }
+ }
+ }
+}
diff --git a/cs/demo/Ice/wpf/Properties/Resources.resx b/cs/demo/Ice/wpf/Properties/Resources.resx
new file mode 100755
index 00000000000..ffecec851ab
--- /dev/null
+++ b/cs/demo/Ice/wpf/Properties/Resources.resx
@@ -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> \ No newline at end of file
diff --git a/cs/demo/Ice/wpf/Properties/Settings.Designer.cs b/cs/demo/Ice/wpf/Properties/Settings.Designer.cs
new file mode 100755
index 00000000000..f3bff7a3a95
--- /dev/null
+++ b/cs/demo/Ice/wpf/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.1433
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Ice.wpf.client.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.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;
+ }
+ }
+ }
+}
diff --git a/cs/demo/Ice/wpf/Properties/Settings.settings b/cs/demo/Ice/wpf/Properties/Settings.settings
new file mode 100755
index 00000000000..8f2fd95d626
--- /dev/null
+++ b/cs/demo/Ice/wpf/Properties/Settings.settings
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+ <Profiles>
+ <Profile Name="(Default)" />
+ </Profiles>
+ <Settings />
+</SettingsFile> \ No newline at end of file
diff --git a/cs/demo/Ice/wpf/config.client b/cs/demo/Ice/wpf/config.client
new file mode 100644
index 00000000000..35fc5c8b060
--- /dev/null
+++ b/cs/demo/Ice/wpf/config.client
@@ -0,0 +1,45 @@
+#
+# The client reads this property to create the reference to the
+# "hello" object in the server.
+#
+Hello.Proxy=hello:tcp -p 10000:udp -p 10000:ssl -p 10001
+
+#
+# Warn about connection exceptions.
+#
+Ice.Warn.Connections=1
+
+#
+# Network Tracing
+#
+# 0 = no network tracing
+# 1 = trace connection establishment and closure
+# 2 = like 1, but more detailed
+# 3 = like 2, but also trace data transfer
+#
+#Ice.Trace.Network=1
+
+#
+# Protocol Tracing
+#
+# 0 = no protocol tracing
+# 1 = trace protocol messages
+#
+#Ice.Trace.Protocol=1
+
+#
+# Security Tracing
+#
+# 0 = no security tracing
+# 1 = trace messages
+#
+#IceSSL.Trace.Security=1
+
+#
+# SSL Configuration
+#
+Ice.Plugin.IceSSL=IceSSL:IceSSL.PluginFactory
+IceSSL.DefaultDir=../../../../certs
+IceSSL.ImportCert.CurrentUser.Root=cacert.pem
+IceSSL.CertFile=c_rsa1024.pfx
+IceSSL.Password=password