diff options
author | Jose <jose@zeroc.com> | 2010-02-11 05:10:43 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2010-02-11 05:10:43 +0100 |
commit | d3e520a951ced49d836e94936451a529d301e562 (patch) | |
tree | 366f383dbc98a8fb3c2e2744c6581736aa4cd034 /cs | |
parent | bug 4380: stringToProxy docu (diff) | |
download | ice-d3e520a951ced49d836e94936451a529d301e562.tar.bz2 ice-d3e520a951ced49d836e94936451a529d301e562.tar.xz ice-d3e520a951ced49d836e94936451a529d301e562.zip |
4651 - Inconsistent line endings
Diffstat (limited to 'cs')
35 files changed, 1424 insertions, 1424 deletions
diff --git a/cs/demo/Glacier2/chat/App.xaml b/cs/demo/Glacier2/chat/App.xaml index 33fffe497ee..e93d138ce72 100755 --- a/cs/demo/Glacier2/chat/App.xaml +++ b/cs/demo/Glacier2/chat/App.xaml @@ -1,21 +1,21 @@ -<!--
-// **********************************************************************
-//
-// Copyright (c) 2003-2010 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="Glacier2.chat.client.App"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- Startup="start" ShutdownMode="OnLastWindowClose">
- <Application.Resources>
- <Style x:Key="Menu">
- <Setter Property="MenuItem.FontFamily" Value="Times New Romans"/>
- <Setter Property="MenuItem.FontSize" Value="12"/>
- </Style>
- </Application.Resources>
-</Application>
+<!-- +// ********************************************************************** +// +// Copyright (c) 2003-2010 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="Glacier2.chat.client.App" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + Startup="start" ShutdownMode="OnLastWindowClose"> + <Application.Resources> + <Style x:Key="Menu"> + <Setter Property="MenuItem.FontFamily" Value="Times New Romans"/> + <Setter Property="MenuItem.FontSize" Value="12"/> + </Style> + </Application.Resources> +</Application> diff --git a/cs/demo/Glacier2/chat/App.xaml.cs b/cs/demo/Glacier2/chat/App.xaml.cs index b8b8cfef5a8..c344795a1ac 100755 --- a/cs/demo/Glacier2/chat/App.xaml.cs +++ b/cs/demo/Glacier2/chat/App.xaml.cs @@ -1,32 +1,32 @@ -// **********************************************************************
-//
-// Copyright (c) 2003-2010 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 Glacier2.chat.client
-{
- /// <summary>
- /// Interaction logic for App.xaml
- /// </summary>
- public partial class App : System.Windows.Application
- {
-
- public void start(object sender, StartupEventArgs e)
- {
- ChatWindow window = new ChatWindow();
- window.Show();
- window.doLogin();
- }
- }
-}
+// ********************************************************************** +// +// Copyright (c) 2003-2010 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 Glacier2.chat.client +{ + /// <summary> + /// Interaction logic for App.xaml + /// </summary> + public partial class App : System.Windows.Application + { + + public void start(object sender, StartupEventArgs e) + { + ChatWindow window = new ChatWindow(); + window.Show(); + window.doLogin(); + } + } +} diff --git a/cs/demo/Glacier2/chat/CancelDialog.xaml b/cs/demo/Glacier2/chat/CancelDialog.xaml index e7e6416ed93..ac7eeab5c8d 100755 --- a/cs/demo/Glacier2/chat/CancelDialog.xaml +++ b/cs/demo/Glacier2/chat/CancelDialog.xaml @@ -1,27 +1,27 @@ -<!--
-// **********************************************************************
-//
-// Copyright (c) 2003-2010 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="Glacier2.chat.client.CancelDialog"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- Title="Connecting" Height="80" Width="200" ResizeMode="NoResize">
- <Grid>
- <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Vertical">
-
- <StackPanel Orientation="Vertical">
- <TextBlock Margin="2" Name="txtInfo" Width="180" TextWrapping="Wrap">Please wait while connecting...</TextBlock>
- </StackPanel>
-
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
- <Button Margin="2" MaxWidth="80" Click="cancel" IsDefault="True">Cancel</Button>
- </StackPanel>
- </StackPanel>
- </Grid>
-</Window>
+<!-- +// ********************************************************************** +// +// Copyright (c) 2003-2010 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="Glacier2.chat.client.CancelDialog" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + Title="Connecting" Height="80" Width="200" ResizeMode="NoResize"> + <Grid> + <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Vertical"> + + <StackPanel Orientation="Vertical"> + <TextBlock Margin="2" Name="txtInfo" Width="180" TextWrapping="Wrap">Please wait while connecting...</TextBlock> + </StackPanel> + + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> + <Button Margin="2" MaxWidth="80" Click="cancel" IsDefault="True">Cancel</Button> + </StackPanel> + </StackPanel> + </Grid> +</Window> diff --git a/cs/demo/Glacier2/chat/CancelDialog.xaml.cs b/cs/demo/Glacier2/chat/CancelDialog.xaml.cs index e3eb9dccd5a..366335811a4 100755 --- a/cs/demo/Glacier2/chat/CancelDialog.xaml.cs +++ b/cs/demo/Glacier2/chat/CancelDialog.xaml.cs @@ -1,49 +1,49 @@ -// **********************************************************************
-//
-// Copyright (c) 2003-2010 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.Shapes;
-
-namespace Glacier2.chat.client
-{
- /// <summary>
- /// Interaction logic for CancelDialog.xaml
- /// </summary>
- public partial class CancelDialog : Window
- {
- public CancelDialog()
- {
- InitializeComponent();
- }
-
- public void cancel(object sender, RoutedEventArgs args)
- {
- _cancel = true;
- Close();
- }
-
- public bool ShowModal()
- {
- ShowDialog();
- return _cancel;
- }
-
- private bool _cancel = false;
- }
-}
+// ********************************************************************** +// +// Copyright (c) 2003-2010 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.Shapes; + +namespace Glacier2.chat.client +{ + /// <summary> + /// Interaction logic for CancelDialog.xaml + /// </summary> + public partial class CancelDialog : Window + { + public CancelDialog() + { + InitializeComponent(); + } + + public void cancel(object sender, RoutedEventArgs args) + { + _cancel = true; + Close(); + } + + public bool ShowModal() + { + ShowDialog(); + return _cancel; + } + + private bool _cancel = false; + } +} diff --git a/cs/demo/Glacier2/chat/ChatCommands.cs b/cs/demo/Glacier2/chat/ChatCommands.cs index 871f6f9f5f8..1530adbfb27 100755 --- a/cs/demo/Glacier2/chat/ChatCommands.cs +++ b/cs/demo/Glacier2/chat/ChatCommands.cs @@ -1,58 +1,58 @@ -// **********************************************************************
-//
-// Copyright (c) 2003-2010 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.Input;
-
-namespace Glacier2.chat.client
-{
- public class ChatCommands
- {
- static ChatCommands()
- {
- // Initialize logout command
- _loginCommand = new RoutedUICommand("Login", "Login", typeof(ChatCommands), null);
- // Initialize logout command
- _logoutCommand = new RoutedUICommand("Logout", "Logout", typeof(ChatCommands), null);
- // Initialize exit commnad
- _exitCommand = new RoutedUICommand("Exit", "&Exit", typeof(ChatCommands), null);
- }
-
- public static RoutedUICommand Login
- {
- get
- {
- return _loginCommand;
- }
- }
-
- public static RoutedUICommand Logout
- {
- get
- {
- return _logoutCommand;
- }
- }
-
- public static RoutedUICommand Exit
- {
- get
- {
- return _exitCommand;
- }
- }
-
- private static RoutedUICommand _loginCommand;
- private static RoutedUICommand _logoutCommand;
- private static RoutedUICommand _exitCommand;
- }
-}
+// ********************************************************************** +// +// Copyright (c) 2003-2010 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.Input; + +namespace Glacier2.chat.client +{ + public class ChatCommands + { + static ChatCommands() + { + // Initialize logout command + _loginCommand = new RoutedUICommand("Login", "Login", typeof(ChatCommands), null); + // Initialize logout command + _logoutCommand = new RoutedUICommand("Logout", "Logout", typeof(ChatCommands), null); + // Initialize exit commnad + _exitCommand = new RoutedUICommand("Exit", "&Exit", typeof(ChatCommands), null); + } + + public static RoutedUICommand Login + { + get + { + return _loginCommand; + } + } + + public static RoutedUICommand Logout + { + get + { + return _logoutCommand; + } + } + + public static RoutedUICommand Exit + { + get + { + return _exitCommand; + } + } + + private static RoutedUICommand _loginCommand; + private static RoutedUICommand _logoutCommand; + private static RoutedUICommand _exitCommand; + } +} diff --git a/cs/demo/Glacier2/chat/ChatWindow.xaml b/cs/demo/Glacier2/chat/ChatWindow.xaml index f12fc665e36..e786db40417 100755 --- a/cs/demo/Glacier2/chat/ChatWindow.xaml +++ b/cs/demo/Glacier2/chat/ChatWindow.xaml @@ -1,69 +1,69 @@ -<!--
-// **********************************************************************
-//
-// Copyright (c) 2003-2010 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="Glacier2.chat.client.ChatWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="clr-namespace:Glacier2.chat.client"
- Title="Chat Window" Height="300" Width="300" Closed="windowClosed">
- <Window.CommandBindings>
- <CommandBinding Command="local:ChatCommands.Login" Executed="login" CanExecute="isLoginEnabled"/>
- <CommandBinding Command="local:ChatCommands.Logout" Executed="logout" CanExecute="isLogoutEnabled"/>
- <CommandBinding Command="local:ChatCommands.Exit" Executed="exit"/>
- </Window.CommandBindings>
- <DockPanel>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" DockPanel.Dock="Top">
- <Menu Style="{StaticResource Menu}" Background="White">
- <MenuItem Header="Session">
- <MenuItem Header="_Login" Command="local:ChatCommands.Login" Background="White"/>
- <MenuItem Header="_Logout" Command="local:ChatCommands.Logout" Background="White"/>
- <MenuItem Header="E_xit" Command="local:ChatCommands.Exit" Background="White"/>
- </MenuItem>
- </Menu>
- </StackPanel>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="5*"></RowDefinition>
- <RowDefinition Height="AUTO"></RowDefinition>
- <RowDefinition Height="AUTO"></RowDefinition>
- <RowDefinition Height="AUTO"></RowDefinition>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
-
- <!-- Define a text box to show chat messages. -->
- <TextBox Grid.Column="0" Grid.Row="0" x:Name="txtMessages"
- FontSize="12" Text="" TextWrapping="Wrap" IsEnabled="True"
- ScrollViewer.CanContentScroll="True" ScrollViewer.HorizontalScrollBarVisibility="Auto"
- ScrollViewer.VerticalScrollBarVisibility="Auto" IsReadOnly="True"
- MinLines="4" SizeChanged="scrollDown"/>
-
- <!-- Define another splitter to separate the upper view and the text box used
- for input messages. -->
- <GridSplitter Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" Height="2"
- ResizeDirection="Rows" HorizontalAlignment="Stretch"/>
-
- <!--- Define an editable text box for the user to write messages. -->
- <TextBox Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3"
- Name="input"
- IsEnabled="False"
- TextWrapping="Wrap"
- ScrollViewer.CanContentScroll="True"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Auto"
- Background="WhiteSmoke" KeyDown="sendMessage" TabIndex="1"></TextBox>
-
- <!-- TextBlock with the status message -->
- <Label Grid.Row="3" Name="status" Grid.Column="0" VerticalAlignment="Bottom" Content="Not connected"/>
-
- </Grid>
- </DockPanel>
-</Window>
+<!-- +// ********************************************************************** +// +// Copyright (c) 2003-2010 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="Glacier2.chat.client.ChatWindow" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Glacier2.chat.client" + Title="Chat Window" Height="300" Width="300" Closed="windowClosed"> + <Window.CommandBindings> + <CommandBinding Command="local:ChatCommands.Login" Executed="login" CanExecute="isLoginEnabled"/> + <CommandBinding Command="local:ChatCommands.Logout" Executed="logout" CanExecute="isLogoutEnabled"/> + <CommandBinding Command="local:ChatCommands.Exit" Executed="exit"/> + </Window.CommandBindings> + <DockPanel> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" DockPanel.Dock="Top"> + <Menu Style="{StaticResource Menu}" Background="White"> + <MenuItem Header="Session"> + <MenuItem Header="_Login" Command="local:ChatCommands.Login" Background="White"/> + <MenuItem Header="_Logout" Command="local:ChatCommands.Logout" Background="White"/> + <MenuItem Header="E_xit" Command="local:ChatCommands.Exit" Background="White"/> + </MenuItem> + </Menu> + </StackPanel> + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="5*"></RowDefinition> + <RowDefinition Height="AUTO"></RowDefinition> + <RowDefinition Height="AUTO"></RowDefinition> + <RowDefinition Height="AUTO"></RowDefinition> + </Grid.RowDefinitions> + <Grid.ColumnDefinitions> + <ColumnDefinition></ColumnDefinition> + </Grid.ColumnDefinitions> + + <!-- Define a text box to show chat messages. --> + <TextBox Grid.Column="0" Grid.Row="0" x:Name="txtMessages" + FontSize="12" Text="" TextWrapping="Wrap" IsEnabled="True" + ScrollViewer.CanContentScroll="True" ScrollViewer.HorizontalScrollBarVisibility="Auto" + ScrollViewer.VerticalScrollBarVisibility="Auto" IsReadOnly="True" + MinLines="4" SizeChanged="scrollDown"/> + + <!-- Define another splitter to separate the upper view and the text box used + for input messages. --> + <GridSplitter Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" Height="2" + ResizeDirection="Rows" HorizontalAlignment="Stretch"/> + + <!--- Define an editable text box for the user to write messages. --> + <TextBox Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3" + Name="input" + IsEnabled="False" + TextWrapping="Wrap" + ScrollViewer.CanContentScroll="True" + HorizontalScrollBarVisibility="Hidden" + VerticalScrollBarVisibility="Auto" + Background="WhiteSmoke" KeyDown="sendMessage" TabIndex="1"></TextBox> + + <!-- TextBlock with the status message --> + <Label Grid.Row="3" Name="status" Grid.Column="0" VerticalAlignment="Bottom" Content="Not connected"/> + + </Grid> + </DockPanel> +</Window> diff --git a/cs/demo/Glacier2/chat/ChatWindow.xaml.cs b/cs/demo/Glacier2/chat/ChatWindow.xaml.cs index 2c8485343f3..569b79c06f8 100755 --- a/cs/demo/Glacier2/chat/ChatWindow.xaml.cs +++ b/cs/demo/Glacier2/chat/ChatWindow.xaml.cs @@ -1,287 +1,287 @@ -// **********************************************************************
-//
-// Copyright(c) 2003-2010 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 Demo;
-
-namespace Glacier2.chat.client
-{
- public class LoginData
- {
- public LoginData()
- {
- routerHost = "127.0.0.1";
- userName = "test";
- password = "";
- }
-
- public String routerHost;
- public String userName;
- public String password;
- }
-
- class Util
- {
- static public void
- locateOnScreen(System.Windows.Window window)
- {
- window.Left = (System.Windows.SystemParameters.PrimaryScreenWidth - window.Width) / 2;
- window.Top = (System.Windows.SystemParameters.PrimaryScreenHeight - window.Height) / 2;
- }
-
- static public void
- centerWindow(System.Windows.Window w1, System.Windows.Window w)
- {
- w1.Top = w.Top + ((w.Height - w1.Height) / 2);
- w1.Left = w.Left + ((w.Width - w1.Width) / 2);
- }
- }
-
- /// <summary>
- /// Interaction logic for ChatWindow.xaml
- /// </summary>
- public partial class ChatWindow : Window, Glacier2.SessionCallback
- {
- private class ChatCallbackI : Demo.ChatCallbackDisp_
- {
- public ChatCallbackI(ChatWindow window)
- {
- _window = window;
- }
-
- public override void
- message(string data, Ice.Current current)
- {
- _window.appendMessage(data + Environment.NewLine);
- }
-
- private ChatWindow _window;
- }
-
- public ChatWindow()
- {
- Ice.InitializationData initData = new Ice.InitializationData();
-
- initData.properties = Ice.Util.createProperties();
- initData.properties.load("config.client");
-
- // Dispatch servant calls and AMI callbacks with this windows Dispatcher.
- initData.dispatcher = delegate(System.Action action, Ice.Connection connection)
- {
- Dispatcher.BeginInvoke(DispatcherPriority.Normal, action);
- };
-
- _factory = new SessionFactoryHelper(initData, this);
- InitializeComponent();
- Util.locateOnScreen(this);
- }
-
- private void
- login(object sender, ExecutedRoutedEventArgs args)
- {
- doLogin();
- }
-
- public void doLogin()
- {
- LoginDialog loginDialog = new LoginDialog(_loginData);
- Util.centerWindow(loginDialog, this);
- if(loginDialog.ShowModal())
- {
- status.Content = "Connecting";
- _factory.setRouterHost(_loginData.routerHost);
- _factory.setRouterIdentity(new Ice.Identity("router", "DemoGlacier2"));
- _session = _factory.connect(_loginData.userName, _loginData.password);
-
- _cancelDialog = new CancelDialog();
- Util.centerWindow(_cancelDialog, this);
- if(_cancelDialog.ShowModal())
- {
- destroySession();
- }
- }
- }
-
- private void
- logout(object sender, ExecutedRoutedEventArgs args)
- {
- txtMessages.Text = "";
- status.Content = "Logging out";
- destroySession();
- }
-
- private void
- exit(object sender, ExecutedRoutedEventArgs args)
- {
- Close();
- }
-
- private void
- windowClosed(object sender, EventArgs e)
- {
- lock(this)
- {
- destroySession();
- }
- App.Current.Shutdown(0);
- }
-
- private void
- isLogoutEnabled(object sender, CanExecuteRoutedEventArgs args)
- {
- args.CanExecute = _session != null && _session.isConnected();
- }
-
- private void
- isLoginEnabled(object sender,CanExecuteRoutedEventArgs args)
- {
- args.CanExecute = _session == null || !_session.isConnected();
- }
-
- //
- // Event handler attached to txtChatImputLine onKeyDown.
- // If the key is the Enter key, it sends the message asynchronously
- // and cleans the input line; otherwise, it does nothing.
- //
- private void
- sendMessage(object sender, KeyEventArgs e)
- {
- if(e.Key == Key.Enter)
- {
- string message = input.Text.Trim();
- if(message.Length > 0)
- {
- _chat.begin_say(message).whenCompleted(delegate(Ice.Exception ex)
- {
- appendMessage("<system-message> - " + ex.ToString() +
- Environment.NewLine);
- });
- }
- input.Text = "";
- }
- }
-
- private void
- scrollDown(object sender, SizeChangedEventArgs e)
- {
- txtMessages.ScrollToEnd();
- }
-
- private void
- closeCancelDialog()
- {
- if(_cancelDialog != null)
- {
- _cancelDialog.Close();
- _cancelDialog = null;
- }
- }
-
- public void
- appendMessage(string message)
- {
- txtMessages.AppendText(message);
- txtMessages.ScrollToEnd();
- }
-
- private void
- destroySession()
- {
- if(_session != null)
- {
- _session.destroy();
- _session = null;
- }
- }
-
- private LoginData _loginData = new LoginData();
- private CancelDialog _cancelDialog = new CancelDialog();
- private Glacier2.SessionFactoryHelper _factory;
- private Glacier2.SessionHelper _session;
- private Demo.ChatSessionPrx _chat;
-
- #region Callback Members
-
- public void connectFailed(SessionHelper session, Exception ex)
- {
- // If the session has been reassigned avoid the
- // spurious callback.
- if(session != _session)
- {
- return;
- }
-
- closeCancelDialog();
- status.Content = ex.GetType();
- }
-
- public void connected(SessionHelper session)
- {
- // If the session has been reassigned avoid the
- // spurious callback.
- if(session != _session)
- {
- return;
- }
-
- Ice.Object servant = new ChatCallbackI(this);
-
- Demo.ChatCallbackPrx callback = Demo.ChatCallbackPrxHelper.uncheckedCast(_session.addWithUUID(servant));
- _chat = Demo.ChatSessionPrxHelper.uncheckedCast(_session.session());
- _chat.begin_setCallback(callback).whenCompleted(delegate()
- {
- closeCancelDialog();
- input.IsEnabled = true;
- status.Content = "Connected with " + _loginData.routerHost;
- },
- delegate(Ice.Exception ex)
- {
- if(_session != null)
- {
- _session.destroy();
- }
- });
- }
-
- public void createdCommunicator(SessionHelper session)
- {
- }
-
- public void disconnected(SessionHelper session)
- {
- // If the session has been reassigned avoid the
- // spurious callback.
- if(session != _session)
- {
- return;
- }
- closeCancelDialog();
- _session = null;
- _chat = null;
- input.IsEnabled = false;
- status.Content = "Not connected";
- }
-
- #endregion
- }
-}
+// ********************************************************************** +// +// Copyright(c) 2003-2010 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 Demo; + +namespace Glacier2.chat.client +{ + public class LoginData + { + public LoginData() + { + routerHost = "127.0.0.1"; + userName = "test"; + password = ""; + } + + public String routerHost; + public String userName; + public String password; + } + + class Util + { + static public void + locateOnScreen(System.Windows.Window window) + { + window.Left = (System.Windows.SystemParameters.PrimaryScreenWidth - window.Width) / 2; + window.Top = (System.Windows.SystemParameters.PrimaryScreenHeight - window.Height) / 2; + } + + static public void + centerWindow(System.Windows.Window w1, System.Windows.Window w) + { + w1.Top = w.Top + ((w.Height - w1.Height) / 2); + w1.Left = w.Left + ((w.Width - w1.Width) / 2); + } + } + + /// <summary> + /// Interaction logic for ChatWindow.xaml + /// </summary> + public partial class ChatWindow : Window, Glacier2.SessionCallback + { + private class ChatCallbackI : Demo.ChatCallbackDisp_ + { + public ChatCallbackI(ChatWindow window) + { + _window = window; + } + + public override void + message(string data, Ice.Current current) + { + _window.appendMessage(data + Environment.NewLine); + } + + private ChatWindow _window; + } + + public ChatWindow() + { + Ice.InitializationData initData = new Ice.InitializationData(); + + initData.properties = Ice.Util.createProperties(); + initData.properties.load("config.client"); + + // Dispatch servant calls and AMI callbacks with this windows Dispatcher. + initData.dispatcher = delegate(System.Action action, Ice.Connection connection) + { + Dispatcher.BeginInvoke(DispatcherPriority.Normal, action); + }; + + _factory = new SessionFactoryHelper(initData, this); + InitializeComponent(); + Util.locateOnScreen(this); + } + + private void + login(object sender, ExecutedRoutedEventArgs args) + { + doLogin(); + } + + public void doLogin() + { + LoginDialog loginDialog = new LoginDialog(_loginData); + Util.centerWindow(loginDialog, this); + if(loginDialog.ShowModal()) + { + status.Content = "Connecting"; + _factory.setRouterHost(_loginData.routerHost); + _factory.setRouterIdentity(new Ice.Identity("router", "DemoGlacier2")); + _session = _factory.connect(_loginData.userName, _loginData.password); + + _cancelDialog = new CancelDialog(); + Util.centerWindow(_cancelDialog, this); + if(_cancelDialog.ShowModal()) + { + destroySession(); + } + } + } + + private void + logout(object sender, ExecutedRoutedEventArgs args) + { + txtMessages.Text = ""; + status.Content = "Logging out"; + destroySession(); + } + + private void + exit(object sender, ExecutedRoutedEventArgs args) + { + Close(); + } + + private void + windowClosed(object sender, EventArgs e) + { + lock(this) + { + destroySession(); + } + App.Current.Shutdown(0); + } + + private void + isLogoutEnabled(object sender, CanExecuteRoutedEventArgs args) + { + args.CanExecute = _session != null && _session.isConnected(); + } + + private void + isLoginEnabled(object sender,CanExecuteRoutedEventArgs args) + { + args.CanExecute = _session == null || !_session.isConnected(); + } + + // + // Event handler attached to txtChatImputLine onKeyDown. + // If the key is the Enter key, it sends the message asynchronously + // and cleans the input line; otherwise, it does nothing. + // + private void + sendMessage(object sender, KeyEventArgs e) + { + if(e.Key == Key.Enter) + { + string message = input.Text.Trim(); + if(message.Length > 0) + { + _chat.begin_say(message).whenCompleted(delegate(Ice.Exception ex) + { + appendMessage("<system-message> - " + ex.ToString() + + Environment.NewLine); + }); + } + input.Text = ""; + } + } + + private void + scrollDown(object sender, SizeChangedEventArgs e) + { + txtMessages.ScrollToEnd(); + } + + private void + closeCancelDialog() + { + if(_cancelDialog != null) + { + _cancelDialog.Close(); + _cancelDialog = null; + } + } + + public void + appendMessage(string message) + { + txtMessages.AppendText(message); + txtMessages.ScrollToEnd(); + } + + private void + destroySession() + { + if(_session != null) + { + _session.destroy(); + _session = null; + } + } + + private LoginData _loginData = new LoginData(); + private CancelDialog _cancelDialog = new CancelDialog(); + private Glacier2.SessionFactoryHelper _factory; + private Glacier2.SessionHelper _session; + private Demo.ChatSessionPrx _chat; + + #region Callback Members + + public void connectFailed(SessionHelper session, Exception ex) + { + // If the session has been reassigned avoid the + // spurious callback. + if(session != _session) + { + return; + } + + closeCancelDialog(); + status.Content = ex.GetType(); + } + + public void connected(SessionHelper session) + { + // If the session has been reassigned avoid the + // spurious callback. + if(session != _session) + { + return; + } + + Ice.Object servant = new ChatCallbackI(this); + + Demo.ChatCallbackPrx callback = Demo.ChatCallbackPrxHelper.uncheckedCast(_session.addWithUUID(servant)); + _chat = Demo.ChatSessionPrxHelper.uncheckedCast(_session.session()); + _chat.begin_setCallback(callback).whenCompleted(delegate() + { + closeCancelDialog(); + input.IsEnabled = true; + status.Content = "Connected with " + _loginData.routerHost; + }, + delegate(Ice.Exception ex) + { + if(_session != null) + { + _session.destroy(); + } + }); + } + + public void createdCommunicator(SessionHelper session) + { + } + + public void disconnected(SessionHelper session) + { + // If the session has been reassigned avoid the + // spurious callback. + if(session != _session) + { + return; + } + closeCancelDialog(); + _session = null; + _chat = null; + input.IsEnabled = false; + status.Content = "Not connected"; + } + + #endregion + } +} diff --git a/cs/demo/Glacier2/chat/LoginDialog.xaml b/cs/demo/Glacier2/chat/LoginDialog.xaml index df3feea57a3..e8908afd35b 100755 --- a/cs/demo/Glacier2/chat/LoginDialog.xaml +++ b/cs/demo/Glacier2/chat/LoginDialog.xaml @@ -1,41 +1,41 @@ -<!--
-// **********************************************************************
-//
-// Copyright (c) 2003-2010 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="Glacier2.chat.client.LoginDialog"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- Title="LoginDialog" Height="160" Width="240" ResizeMode="NoResize">
- <Grid>
- <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Vertical"
- MaxWidth="240">
- <!-- Connection data -->
- <StackPanel Orientation="Vertical">
- <StackPanel Orientation="Horizontal">
- <TextBlock Margin="2" Name="lblHost" Width="60">Host:</TextBlock>
- <TextBox Margin="2" Name="txtHost" Width="120"></TextBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Margin="2" Name="lblUsername" Width="60">Username:</TextBlock>
- <TextBox Margin="2" Name="txtUsername" Width="120"></TextBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Margin="2" TextWrapping="NoWrap" Width="60">Password:</TextBlock>
- <PasswordBox Margin="2" Name="txtPassword" Width="120"></PasswordBox>
- </StackPanel>
- </StackPanel>
-
- <!-- Login / Cancel buttons -->
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
- <Button Margin="2" MaxWidth="80" Click="login" IsDefault="True">Login</Button>
- <Button Margin="2" MaxWidth="80" Click="cancel" IsDefault="True">Cancel</Button>
- </StackPanel>
- </StackPanel>
- </Grid>
-</Window>
+<!-- +// ********************************************************************** +// +// Copyright (c) 2003-2010 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="Glacier2.chat.client.LoginDialog" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + Title="LoginDialog" Height="160" Width="240" ResizeMode="NoResize"> + <Grid> + <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Vertical" + MaxWidth="240"> + <!-- Connection data --> + <StackPanel Orientation="Vertical"> + <StackPanel Orientation="Horizontal"> + <TextBlock Margin="2" Name="lblHost" Width="60">Host:</TextBlock> + <TextBox Margin="2" Name="txtHost" Width="120"></TextBox> + </StackPanel> + <StackPanel Orientation="Horizontal"> + <TextBlock Margin="2" Name="lblUsername" Width="60">Username:</TextBlock> + <TextBox Margin="2" Name="txtUsername" Width="120"></TextBox> + </StackPanel> + <StackPanel Orientation="Horizontal"> + <TextBlock Margin="2" TextWrapping="NoWrap" Width="60">Password:</TextBlock> + <PasswordBox Margin="2" Name="txtPassword" Width="120"></PasswordBox> + </StackPanel> + </StackPanel> + + <!-- Login / Cancel buttons --> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> + <Button Margin="2" MaxWidth="80" Click="login" IsDefault="True">Login</Button> + <Button Margin="2" MaxWidth="80" Click="cancel" IsDefault="True">Cancel</Button> + </StackPanel> + </StackPanel> + </Grid> +</Window> diff --git a/cs/demo/Glacier2/chat/LoginDialog.xaml.cs b/cs/demo/Glacier2/chat/LoginDialog.xaml.cs index 670aa6ac803..2d4b96e8745 100755 --- a/cs/demo/Glacier2/chat/LoginDialog.xaml.cs +++ b/cs/demo/Glacier2/chat/LoginDialog.xaml.cs @@ -1,63 +1,63 @@ -// **********************************************************************
-//
-// Copyright (c) 2003-2010 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.Shapes;
-
-namespace Glacier2.chat.client
-{
- /// <summary>
- /// Interaction logic for LoginDialog.xaml
- /// </summary>
- public partial class LoginDialog : Window
- {
- public LoginDialog(LoginData loginData)
- {
- InitializeComponent();
- _loginData = loginData;
- txtHost.Text = _loginData.routerHost;
- txtUsername.Text = _loginData.userName;
- txtPassword.Password = _loginData.password;
- }
-
- public void login(object sender, RoutedEventArgs e)
- {
- _loginData.routerHost = txtHost.Text;
- _loginData.userName = txtUsername.Text;
- _loginData.password = txtPassword.Password;
- _cancel = false;
- Close();
- }
-
- public void cancel(object sender, RoutedEventArgs args)
- {
- _cancel = true;
- Close();
- }
-
- public bool ShowModal()
- {
- ShowDialog();
- return !_cancel;
- }
-
- private bool _cancel = true;
- private LoginData _loginData;
- }
-}
+// ********************************************************************** +// +// Copyright (c) 2003-2010 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.Shapes; + +namespace Glacier2.chat.client +{ + /// <summary> + /// Interaction logic for LoginDialog.xaml + /// </summary> + public partial class LoginDialog : Window + { + public LoginDialog(LoginData loginData) + { + InitializeComponent(); + _loginData = loginData; + txtHost.Text = _loginData.routerHost; + txtUsername.Text = _loginData.userName; + txtPassword.Password = _loginData.password; + } + + public void login(object sender, RoutedEventArgs e) + { + _loginData.routerHost = txtHost.Text; + _loginData.userName = txtUsername.Text; + _loginData.password = txtPassword.Password; + _cancel = false; + Close(); + } + + public void cancel(object sender, RoutedEventArgs args) + { + _cancel = true; + Close(); + } + + public bool ShowModal() + { + ShowDialog(); + return !_cancel; + } + + private bool _cancel = true; + private LoginData _loginData; + } +} diff --git a/cs/demo/Glacier2/chat/Properties/AssemblyInfo.cs b/cs/demo/Glacier2/chat/Properties/AssemblyInfo.cs index bcf9f65b7e8..031ce1e01a4 100755 --- a/cs/demo/Glacier2/chat/Properties/AssemblyInfo.cs +++ b/cs/demo/Glacier2/chat/Properties/AssemblyInfo.cs @@ -1,55 +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("Glacier2.chat.client")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Glacier2.chat.client")]
-[assembly: AssemblyCopyright("Copyright © 2010")]
-[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")]
+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("Glacier2.chat.client")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Glacier2.chat.client")] +[assembly: AssemblyCopyright("Copyright © 2010")] +[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/Glacier2/chat/Properties/Resources.Designer.cs b/cs/demo/Glacier2/chat/Properties/Resources.Designer.cs index a96435df6e7..33bbc28e6a8 100755 --- a/cs/demo/Glacier2/chat/Properties/Resources.Designer.cs +++ b/cs/demo/Glacier2/chat/Properties/Resources.Designer.cs @@ -1,71 +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 Glacier2.chat.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("Glacier2.chat.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;
- }
- }
- }
-}
+//------------------------------------------------------------------------------ +// <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 Glacier2.chat.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("Glacier2.chat.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/Glacier2/chat/Properties/Resources.resx b/cs/demo/Glacier2/chat/Properties/Resources.resx index ffecec851ab..2b64efaf5df 100755 --- a/cs/demo/Glacier2/chat/Properties/Resources.resx +++ b/cs/demo/Glacier2/chat/Properties/Resources.resx @@ -114,4 +114,4 @@ <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 +</root>
diff --git a/cs/demo/Glacier2/chat/Properties/Settings.Designer.cs b/cs/demo/Glacier2/chat/Properties/Settings.Designer.cs index 6b363ea5353..472165a6cde 100755 --- a/cs/demo/Glacier2/chat/Properties/Settings.Designer.cs +++ b/cs/demo/Glacier2/chat/Properties/Settings.Designer.cs @@ -1,30 +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 Glacier2.chat.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;
- }
- }
- }
-}
+//------------------------------------------------------------------------------ +// <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 Glacier2.chat.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/Glacier2/chat/Properties/Settings.settings b/cs/demo/Glacier2/chat/Properties/Settings.settings index 8f2fd95d626..1dc1197a474 100755 --- a/cs/demo/Glacier2/chat/Properties/Settings.settings +++ b/cs/demo/Glacier2/chat/Properties/Settings.settings @@ -4,4 +4,4 @@ <Profile Name="(Default)" />
</Profiles>
<Settings />
-</SettingsFile>
\ No newline at end of file +</SettingsFile>
diff --git a/cs/demo/Ice/wpf/App.xaml b/cs/demo/Ice/wpf/App.xaml index a72bc4d3452..be5bee38505 100644 --- a/cs/demo/Ice/wpf/App.xaml +++ b/cs/demo/Ice/wpf/App.xaml @@ -1,18 +1,18 @@ -<!--
-// **********************************************************************
-//
-// Copyright (c) 2003-2010 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>
+<!-- +// ********************************************************************** +// +// Copyright (c) 2003-2010 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 index 67609070928..e1067676eeb 100644 --- a/cs/demo/Ice/wpf/App.xaml.cs +++ b/cs/demo/Ice/wpf/App.xaml.cs @@ -1,25 +1,25 @@ -// **********************************************************************
-//
-// Copyright (c) 2003-2010 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
- {
- }
-}
+// ********************************************************************** +// +// Copyright (c) 2003-2010 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/HelloWindow.xaml b/cs/demo/Ice/wpf/HelloWindow.xaml index 1285e27485d..eca181199d1 100644 --- a/cs/demo/Ice/wpf/HelloWindow.xaml +++ b/cs/demo/Ice/wpf/HelloWindow.xaml @@ -1,91 +1,91 @@ -<!--
-// **********************************************************************
-//
-// Copyright (c) 2003-2010 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>
+<!-- +// ********************************************************************** +// +// Copyright (c) 2003-2010 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 index 88c42f6bd67..542e873b4c2 100644 --- a/cs/demo/Ice/wpf/HelloWindow.xaml.cs +++ b/cs/demo/Ice/wpf/HelloWindow.xaml.cs @@ -1,294 +1,294 @@ -// **********************************************************************
-//
-// Copyright(c) 2003-2010 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");
- initData.dispatcher = delegate(System.Action action, Ice.Connection connection)
- {
- Dispatcher.BeginInvoke(DispatcherPriority.Normal, action);
- };
- _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 SayHelloCB
- {
- public SayHelloCB(HelloWindow window)
- {
- _window = window;
- }
-
- public void response()
- {
- lock(this)
- {
- Debug.Assert(!_response);
- _response = true;
- _window.status.Content = "Ready";
- }
- }
-
- public void exception(Exception ex)
- {
- lock(this)
- {
- Debug.Assert(!_response);
- _response = true;
- _window.handleException(ex);
- }
- }
-
- public void sent(bool sentSynchronously)
- {
- lock(this)
- {
- if(_response)
- {
- return;
- }
- if(_window.deliveryMode.Text.Equals(TWOWAY) || _window.deliveryMode.Text.Equals(TWOWAY_SECURE))
- {
- _window.status.Content = "Waiting for response";
- }
- else
- {
- _window.status.Content = "Ready";
- }
- }
- }
-
- 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())
- {
- status.Content = "Sending request";
- SayHelloCB cb = new SayHelloCB(this);
- hello.begin_sayHello(delay).whenCompleted(cb.response, cb.exception).whenSent(cb.sent);
- }
- else
- {
- flush.IsEnabled = true;
- hello.sayHello(delay);
- status.Content = "Queued sayHello request";
- }
- }
- catch(Ice.LocalException ex)
- {
- handleException(ex);
- }
- }
-
- private void handleException(Exception ex)
- {
- status.Content = ex.GetType();
- }
-
- private void shutdown_Click(object sender, RoutedEventArgs e)
- {
- Demo.HelloPrx hello = createProxy();
- if(hello == null)
- {
- return;
- }
-
- int delay =(int)delaySlider.Value;
-
- try
- {
- if(!deliveryModeIsBatch())
- {
- AsyncResult<Demo.Callback_Hello_shutdown> result = hello.begin_shutdown();
- status.Content = "Sending request";
- result.whenCompleted(delegate()
- {
- status.Content = "Ready";
- },
- delegate(Exception ex)
- {
- handleException(ex);
- });
- }
- 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)
- {
- Ice.AsyncResult r = _communicator.begin_flushBatchRequests();
- r.whenCompleted(handleException);
-
- 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;
- }
-}
+// ********************************************************************** +// +// Copyright(c) 2003-2010 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"); + initData.dispatcher = delegate(System.Action action, Ice.Connection connection) + { + Dispatcher.BeginInvoke(DispatcherPriority.Normal, action); + }; + _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 SayHelloCB + { + public SayHelloCB(HelloWindow window) + { + _window = window; + } + + public void response() + { + lock(this) + { + Debug.Assert(!_response); + _response = true; + _window.status.Content = "Ready"; + } + } + + public void exception(Exception ex) + { + lock(this) + { + Debug.Assert(!_response); + _response = true; + _window.handleException(ex); + } + } + + public void sent(bool sentSynchronously) + { + lock(this) + { + if(_response) + { + return; + } + if(_window.deliveryMode.Text.Equals(TWOWAY) || _window.deliveryMode.Text.Equals(TWOWAY_SECURE)) + { + _window.status.Content = "Waiting for response"; + } + else + { + _window.status.Content = "Ready"; + } + } + } + + 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()) + { + status.Content = "Sending request"; + SayHelloCB cb = new SayHelloCB(this); + hello.begin_sayHello(delay).whenCompleted(cb.response, cb.exception).whenSent(cb.sent); + } + else + { + flush.IsEnabled = true; + hello.sayHello(delay); + status.Content = "Queued sayHello request"; + } + } + catch(Ice.LocalException ex) + { + handleException(ex); + } + } + + private void handleException(Exception ex) + { + status.Content = ex.GetType(); + } + + private void shutdown_Click(object sender, RoutedEventArgs e) + { + Demo.HelloPrx hello = createProxy(); + if(hello == null) + { + return; + } + + int delay =(int)delaySlider.Value; + + try + { + if(!deliveryModeIsBatch()) + { + AsyncResult<Demo.Callback_Hello_shutdown> result = hello.begin_shutdown(); + status.Content = "Sending request"; + result.whenCompleted(delegate() + { + status.Content = "Ready"; + }, + delegate(Exception ex) + { + handleException(ex); + }); + } + 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) + { + Ice.AsyncResult r = _communicator.begin_flushBatchRequests(); + r.whenCompleted(handleException); + + 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/Properties/AssemblyInfo.cs b/cs/demo/Ice/wpf/Properties/AssemblyInfo.cs index 477b3052629..a4393ba1e71 100755 --- a/cs/demo/Ice/wpf/Properties/AssemblyInfo.cs +++ b/cs/demo/Ice/wpf/Properties/AssemblyInfo.cs @@ -1,55 +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 © 2010")]
-[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")]
+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 © 2010")] +[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 index f40e7d965b2..4ffd3bcc16d 100755 --- a/cs/demo/Ice/wpf/Properties/Resources.Designer.cs +++ b/cs/demo/Ice/wpf/Properties/Resources.Designer.cs @@ -1,71 +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;
- }
- }
- }
-}
+//------------------------------------------------------------------------------ +// <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 index ffecec851ab..2b64efaf5df 100755 --- a/cs/demo/Ice/wpf/Properties/Resources.resx +++ b/cs/demo/Ice/wpf/Properties/Resources.resx @@ -114,4 +114,4 @@ <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 +</root>
diff --git a/cs/demo/Ice/wpf/Properties/Settings.Designer.cs b/cs/demo/Ice/wpf/Properties/Settings.Designer.cs index f3bff7a3a95..93df3f41bc1 100755 --- a/cs/demo/Ice/wpf/Properties/Settings.Designer.cs +++ b/cs/demo/Ice/wpf/Properties/Settings.Designer.cs @@ -1,30 +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;
- }
- }
- }
-}
+//------------------------------------------------------------------------------ +// <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 index 8f2fd95d626..1dc1197a474 100755 --- a/cs/demo/Ice/wpf/Properties/Settings.settings +++ b/cs/demo/Ice/wpf/Properties/Settings.settings @@ -4,4 +4,4 @@ <Profile Name="(Default)" />
</Profiles>
<Settings />
-</SettingsFile>
\ No newline at end of file +</SettingsFile>
diff --git a/cs/demo/IceBox/hello/config.admin b/cs/demo/IceBox/hello/config.admin index a5c17db1204..242636ca9ef 100644 --- a/cs/demo/IceBox/hello/config.admin +++ b/cs/demo/IceBox/hello/config.admin @@ -1,13 +1,13 @@ -#
-# Proxy to the IceBox ServiceManager:
-#
-
-#
-# When the IceBox.ServiceManager object adapter is configured:
-#
-#IceBoxAdmin.ServiceManager.Proxy=DemoIceBox/ServiceManager:tcp -p 9998 -h 127.0.0.1
-
-#
-# When Ice.Admin is configured:
-#
-IceBoxAdmin.ServiceManager.Proxy=DemoIceBox/admin -f IceBox.ServiceManager:tcp -p 9996 -h 127.0.0.1
+# +# Proxy to the IceBox ServiceManager: +# + +# +# When the IceBox.ServiceManager object adapter is configured: +# +#IceBoxAdmin.ServiceManager.Proxy=DemoIceBox/ServiceManager:tcp -p 9998 -h 127.0.0.1 + +# +# When Ice.Admin is configured: +# +IceBoxAdmin.ServiceManager.Proxy=DemoIceBox/admin -f IceBox.ServiceManager:tcp -p 9996 -h 127.0.0.1 diff --git a/cs/src/Ice/AMDCallback.cs b/cs/src/Ice/AMDCallback.cs index 98bb55c7e86..1ab0581cca7 100644 --- a/cs/src/Ice/AMDCallback.cs +++ b/cs/src/Ice/AMDCallback.cs @@ -20,4 +20,4 @@ namespace Ice /// Use ice_response to raise user exceptions.</param> void ice_exception(System.Exception ex); } -}
\ No newline at end of file +} diff --git a/cs/src/Ice/ConnectionReaper.cs b/cs/src/Ice/ConnectionReaper.cs index 42ffb318172..759dd1cadc3 100644 --- a/cs/src/Ice/ConnectionReaper.cs +++ b/cs/src/Ice/ConnectionReaper.cs @@ -41,4 +41,4 @@ namespace IceInternal private ICollection<Ice.ConnectionI> _connections = new List<Ice.ConnectionI>(); } -}
\ No newline at end of file +} diff --git a/cs/src/Ice/SocketOperation.cs b/cs/src/Ice/SocketOperation.cs index c1a8281bef9..d7d7e89f282 100644 --- a/cs/src/Ice/SocketOperation.cs +++ b/cs/src/Ice/SocketOperation.cs @@ -16,4 +16,4 @@ namespace IceInternal public const int Write = 2; public const int Connect = 2; } -}
\ No newline at end of file +} diff --git a/cs/test/Ice/dispatcher/TestI.cs b/cs/test/Ice/dispatcher/TestI.cs index 4c0dcd50ba0..c114f70271c 100644 --- a/cs/test/Ice/dispatcher/TestI.cs +++ b/cs/test/Ice/dispatcher/TestI.cs @@ -74,4 +74,4 @@ public class TestControllerI : TestIntfControllerDisp_ } private Ice.ObjectAdapter _adapter; -};
\ No newline at end of file +}; diff --git a/cs/test/Ice/location/ServerManagerI.cs b/cs/test/Ice/location/ServerManagerI.cs index 11ceecdc300..b0dea9217e1 100644 --- a/cs/test/Ice/location/ServerManagerI.cs +++ b/cs/test/Ice/location/ServerManagerI.cs @@ -16,11 +16,11 @@ public class ServerManagerI : ServerManagerDisp_ Ice.InitializationData initData) { _registry = registry; - _communicators = new ArrayList();
- _initData = initData;
- _initData.properties.setProperty("TestAdapter.AdapterId", "TestAdapter");
- _initData.properties.setProperty("TestAdapter.ReplicaGroupId", "ReplicatedAdapter");
- _initData.properties.setProperty("TestAdapter2.AdapterId", "TestAdapter2");
+ _communicators = new ArrayList(); + _initData = initData; + _initData.properties.setProperty("TestAdapter.AdapterId", "TestAdapter"); + _initData.properties.setProperty("TestAdapter.ReplicaGroupId", "ReplicatedAdapter"); + _initData.properties.setProperty("TestAdapter2.AdapterId", "TestAdapter2"); } public override void startServer(Ice.Current current) diff --git a/cs/test/Ice/seqMapping/Makefile.mak b/cs/test/Ice/seqMapping/Makefile.mak index a3172a561fb..40cf64841c4 100644 --- a/cs/test/Ice/seqMapping/Makefile.mak +++ b/cs/test/Ice/seqMapping/Makefile.mak @@ -27,7 +27,7 @@ GDIR = generated MCSFLAGS = $(MCSFLAGS) -target:exe
- +
client.exe: $(C_SRCS) $(GEN_SRCS) Serializable.dll
$(MCS) $(MCSFLAGS) -out:$@ -r:"$(refdir)\Ice.dll" -r:Serializable.dll $(C_SRCS) $(GEN_SRCS)
@@ -40,7 +40,7 @@ collocated.exe: $(COL_SRCS) $(GEN_SRCS) Serializable.dll serveramd.exe: $(SAMD_SRCS) $(GEN_AMD_SRCS) Serializable.dll
$(MCS) $(MCSFLAGS) -out:$@ -r:"$(refdir)\Ice.dll" -r:Serializable.dll $(SAMD_SRCS) $(GEN_AMD_SRCS)
-Serializable.dll: Serializable.cs - $(MCS) $(MCSFLAGS) -target:library -out:Serializable.dll /keyfile:$(KEYFILE) Serializable.cs - +Serializable.dll: Serializable.cs
+ $(MCS) $(MCSFLAGS) -target:library -out:Serializable.dll /keyfile:$(KEYFILE) Serializable.cs
+
!include .depend.mak
diff --git a/cs/test/Ice/stream/Makefile.mak b/cs/test/Ice/stream/Makefile.mak index a71450450a7..d2c9ef5a4a1 100644 --- a/cs/test/Ice/stream/Makefile.mak +++ b/cs/test/Ice/stream/Makefile.mak @@ -28,7 +28,7 @@ SLICE2CSFLAGS = $(SLICE2CSFLAGS) --stream -I. client.exe: $(C_SRCS) $(GEN_SRCS) Serializable.dll
$(MCS) $(MCSFLAGS) -out:$@ -r:"$(refdir)\Ice.dll" -r:Serializable.dll $(C_SRCS) $(GEN_SRCS)
-Serializable.dll: Serializable.cs - $(MCS) $(MCSFLAGS) -target:library -out:Serializable.dll /keyfile:$(KEYFILE) Serializable.cs - +Serializable.dll: Serializable.cs
+ $(MCS) $(MCSFLAGS) -target:library -out:Serializable.dll /keyfile:$(KEYFILE) Serializable.cs
+
!include .depend.mak
diff --git a/cs/test/Ice/threadPoolPriority/PriorityI.cs b/cs/test/Ice/threadPoolPriority/PriorityI.cs index ab44d10042a..f5f1747a2f5 100644 --- a/cs/test/Ice/threadPoolPriority/PriorityI.cs +++ b/cs/test/Ice/threadPoolPriority/PriorityI.cs @@ -14,4 +14,4 @@ public class PriorityI : Test.PriorityDisp_ { return Thread.CurrentThread.Priority.ToString(); } -}
\ No newline at end of file +} diff --git a/cs/test/IceBox/configuration/config.icebox2 b/cs/test/IceBox/configuration/config.icebox2 index 6b921b75231..2e86b5c7113 100644 --- a/cs/test/IceBox/configuration/config.icebox2 +++ b/cs/test/IceBox/configuration/config.icebox2 @@ -13,4 +13,4 @@ IceBox.Service.Service1=testservice.dll:TestServiceI --Ice.Config=config.service IceBox.UseSharedCommunicator.Service2=1 IceBox.Service.Service2=testservice.dll:TestServiceI --Ice.Config=config.service2-2 -IceBox.LoadOrder=Service1 Service2
\ No newline at end of file +IceBox.LoadOrder=Service1 Service2 diff --git a/cs/test/IceBox/configuration/config.service1-2 b/cs/test/IceBox/configuration/config.service1-2 index 76064138212..c173914db2a 100644 --- a/cs/test/IceBox/configuration/config.service1-2 +++ b/cs/test/IceBox/configuration/config.service1-2 @@ -8,4 +8,4 @@ OverrideMe=2 UnsetMe= -Ice.PrintAdapterReady=0
\ No newline at end of file +Ice.PrintAdapterReady=0 diff --git a/cs/test/IceBox/configuration/config.service2-2 b/cs/test/IceBox/configuration/config.service2-2 index c1a99d112c1..36c8d0812cb 100644 --- a/cs/test/IceBox/configuration/config.service2-2 +++ b/cs/test/IceBox/configuration/config.service2-2 @@ -6,4 +6,4 @@ Service2.Prop=1 OverrideMe=3 UnsetMe= -Ice.PrintAdapterReady=0
\ No newline at end of file +Ice.PrintAdapterReady=0 |