首页 新闻 会员 周边

用Silverlight做的BA系统的楼层平面图怎么样能够做到BA点的无刷新

0
悬赏园豆:5 [已解决问题] 解决于 2013-05-14 14:22

只要能够无刷新,不管用定时刷新,还是别的, 只要能刷,就可以
<UserControl x:Class="MapLayer.Alarm.Alarm"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
   
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="30"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel x:Name="header" HorizontalAlignment="Center" Orientation="Horizontal">
            <TextBlock x:Name="ImageName" Style="{StaticResource MSYH-font}"></TextBlock>
        </StackPanel>
        <StackPanel x:Name="header2" HorizontalAlignment="Right">
            <ComboBox x:Name="cboSelect" Style="{StaticResource combo-style}" ItemsSource="{Binding Mode=OneWay}" SelectionChanged="cboSelect_SelectionChanged"></ComboBox>
        </StackPanel> 
  <Image x:Name="MyImage"  Grid.Row="1" Stretch="Fill" SizeChanged="MyImage_SizeChanged">
            <Image.RenderTransform>
                <TransformGroup>
                    <ScaleTransform x:Name="scaleing"></ScaleTransform>
                    <RotateTransform x:Name="rt_myimage" CenterX="450" CenterY="230" Angle="0"></RotateTransform>
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
        </Grid>   
</UserControl>

Soul 今天的主页 Soul 今天 | 菜鸟二级 | 园豆:206
提问于:2010-11-10 17:12
< >
分享
最佳答案
1

这种问题在Silverlight比较好解决的。

1、使用绑定数据,属性改变通知模式。

2、后台定义一个Timer,定时访问数据库进行数据处理,更新属性值,当有改变的时候属性自动通知,页面。

上面的方式不是很好,不过逻辑简单。

最好是使用SOCKET。Silverlight 和服务器程序使用SOCKET通信。当有人改变当前属性值是,通知所有客户端。

收获园豆:5
stillwater | 初学一级 |园豆:117 | 2012-03-30 14:07
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册