优化显示,一些异常的处理
This commit is contained in:
@@ -5,8 +5,9 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:StormChatWPF"
|
xmlns:local="clr-namespace:StormChatWPF"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="StormChat" Height="450" Width="800"
|
Title="WelCome" Height="450" Width="800"
|
||||||
Icon="UI/闪电.png">
|
Icon="UI/Resources/闪电.png"
|
||||||
|
WindowStartupLocation="CenterScreen">
|
||||||
<Grid Height="418" VerticalAlignment="Stretch" Margin="2,1,1,1">
|
<Grid Height="418" VerticalAlignment="Stretch" Margin="2,1,1,1">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="200*"/>
|
<ColumnDefinition Width="200*"/>
|
||||||
@@ -19,7 +20,7 @@
|
|||||||
<RowDefinition Height="150*"/>
|
<RowDefinition Height="150*"/>
|
||||||
<RowDefinition Height="150*"/>
|
<RowDefinition Height="150*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Image x:Name="LogBackground" Grid.ColumnSpan="4" Height="268" Margin="10,10,10,0" Grid.RowSpan="2" VerticalAlignment="Top" Source="UI/登录界面底.png"/>
|
<Image x:Name="LogBackground" Grid.ColumnSpan="4" Height="268" Margin="10,10,10,0" Grid.RowSpan="2" VerticalAlignment="Top" Source="pack://application:,,,/UI/Resources/登录界面底.png"/>
|
||||||
<Button x:Name="Login_button" Content="LogIn" Click="Login_button_Click" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="2" Margin="160.6,69.6,160.6,44.6" Width="70" Height="25" HorizontalAlignment="Center"/>
|
<Button x:Name="Login_button" Content="LogIn" Click="Login_button_Click" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="2" Margin="160.6,69.6,160.6,44.6" Width="70" Height="25" HorizontalAlignment="Center"/>
|
||||||
<TextBox x:Name="AccountBox" TextWrapping="Wrap" Text="201701110203" Grid.Row="2" TextAlignment="Left" Margin="137.6,4.6,137.6,112.6" Grid.Column="1" Grid.ColumnSpan="2" Height="22" Width="122" HorizontalAlignment="Center" BorderThickness="0,0,0,1" VerticalAlignment="Top" />
|
<TextBox x:Name="AccountBox" TextWrapping="Wrap" Text="201701110203" Grid.Row="2" TextAlignment="Left" Margin="137.6,4.6,137.6,112.6" Grid.Column="1" Grid.ColumnSpan="2" Height="22" Width="122" HorizontalAlignment="Center" BorderThickness="0,0,0,1" VerticalAlignment="Top" />
|
||||||
<PasswordBox x:Name="passwordBox" Password="1233211234567" Margin="135,35,135,0" Grid.Column="1" Grid.Row="2" VerticalAlignment="Top" Grid.ColumnSpan="2" Height="22" Width="122" HorizontalAlignment="Center" BorderThickness="0,0,0,1" HorizontalContentAlignment="Left"/>
|
<PasswordBox x:Name="passwordBox" Password="1233211234567" Margin="135,35,135,0" Grid.Column="1" Grid.Row="2" VerticalAlignment="Top" Grid.ColumnSpan="2" Height="22" Width="122" HorizontalAlignment="Center" BorderThickness="0,0,0,1" HorizontalContentAlignment="Left"/>
|
||||||
|
|||||||
@@ -5,9 +5,8 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:StormChatWPF"
|
xmlns:local="clr-namespace:StormChatWPF"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="UserWindow" Height="450" Width="800"
|
Title="StormChat" Height="450" Width="800"
|
||||||
|
WindowStartupLocation="CenterScreen">
|
||||||
>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="60*"/>
|
<RowDefinition Height="60*"/>
|
||||||
|
|||||||
@@ -47,10 +47,18 @@ namespace StormChatWPF
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void Button_Click(object sender, RoutedEventArgs e)
|
private void Button_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (Chat.CurrentContact == null)
|
||||||
|
{
|
||||||
|
MessageBox.Show("请选择联系人!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (InputBox.Text!="")
|
||||||
{
|
{
|
||||||
Chat.chat.SendMessage(InputBox.Text, Chat.CurrentContact);
|
Chat.chat.SendMessage(InputBox.Text, Chat.CurrentContact);
|
||||||
InputBox.Text = "";
|
InputBox.Text = "";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
internal void ShowMessage(Message message)
|
internal void ShowMessage(Message message)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -117,8 +117,4 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
|
||||||
<data name="LogFormBackground" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\LogFormBackground.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 71 KiB |
@@ -91,10 +91,6 @@
|
|||||||
<DependentUpon>Settings.settings</DependentUpon>
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
</Compile>
|
</Compile>
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<None Include="Properties\Settings.settings">
|
<None Include="Properties\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
@@ -118,5 +114,10 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="UI\Resources\聊天气泡.png" />
|
<Resource Include="UI\Resources\聊天气泡.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -31,7 +31,7 @@ namespace StormChatWPF
|
|||||||
{
|
{
|
||||||
Background = new ImageBrush()
|
Background = new ImageBrush()
|
||||||
{
|
{
|
||||||
ImageSource=new BitmapImage(new Uri("pack://application..../UI/Resource/聊天气泡.png"))
|
ImageSource=new BitmapImage(new Uri("pack://application:,,,/UI/Resources/聊天气泡.png"))
|
||||||
};
|
};
|
||||||
HorizontalAlignment = alignment;
|
HorizontalAlignment = alignment;
|
||||||
text.Text = msg.Text;
|
text.Text = msg.Text;
|
||||||
|
|||||||
Reference in New Issue
Block a user