diff --git a/stormchat-client-csharp/StormChatWPF/LogWindow.xaml.cs b/stormchat-client-csharp/StormChatWPF/LogWindow.xaml.cs
index 5b4b9d6..63c1f06 100644
--- a/stormchat-client-csharp/StormChatWPF/LogWindow.xaml.cs
+++ b/stormchat-client-csharp/StormChatWPF/LogWindow.xaml.cs
@@ -25,7 +25,7 @@ namespace StormChatWPF
public LogWindow()
{
InitializeComponent();
- Instence = this;
+ Instence = this;
}
private void Login_button_Click(object sender, RoutedEventArgs e)
{
diff --git a/stormchat-client-csharp/StormChatWPF/MainWindow.xaml b/stormchat-client-csharp/StormChatWPF/MainWindow.xaml
index b0f60d8..dffa90a 100644
--- a/stormchat-client-csharp/StormChatWPF/MainWindow.xaml
+++ b/stormchat-client-csharp/StormChatWPF/MainWindow.xaml
@@ -26,6 +26,7 @@
-
+
+
diff --git a/stormchat-client-csharp/StormChatWPF/MainWindow.xaml.cs b/stormchat-client-csharp/StormChatWPF/MainWindow.xaml.cs
index 6c3ea7c..ecca4cf 100644
--- a/stormchat-client-csharp/StormChatWPF/MainWindow.xaml.cs
+++ b/stormchat-client-csharp/StormChatWPF/MainWindow.xaml.cs
@@ -1,17 +1,8 @@
using Interact;
-using System;
-using System.Collections.Generic;
+using System;
using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
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 StormChatWPF
{
@@ -65,7 +56,7 @@ namespace StormChatWPF
if (message.To == User.Me)
{
App.Current.Dispatcher.Invoke(
- delegate ()
+ (Action)delegate()
{
OutBox.Children.Add(new ChatBubble(message,HorizontalAlignment.Left));
});
@@ -73,11 +64,20 @@ namespace StormChatWPF
else
{
App.Current.Dispatcher.Invoke(
- delegate ()
+ (Action)delegate()
{
- OutBox.Children.Add(new ChatBubble(message,HorizontalAlignment.Right));
+ OutBox.Children.Add(new ChatBubble(message, HorizontalAlignment.Right));
});
}//发送的的消息
- }//将消息展现于UI界面
+ }//将消息展现于UI界面
+
+ private void button_Click_1(object sender, RoutedEventArgs e)
+ {
+ App.Current.Dispatcher.Invoke(
+ (Action)delegate ()
+ {
+ OutBox.Children.Add(new HeadPicture());
+ });
+ }
}
}
diff --git a/stormchat-client-csharp/StormChatWPF/StormChatWPF.csproj b/stormchat-client-csharp/StormChatWPF/StormChatWPF.csproj
index c09f777..34ad918 100644
--- a/stormchat-client-csharp/StormChatWPF/StormChatWPF.csproj
+++ b/stormchat-client-csharp/StormChatWPF/StormChatWPF.csproj
@@ -1,124 +1,133 @@
-
-
-
-
- Debug
- AnyCPU
- {CF4D6BE0-A862-401F-A3A6-4FDAC32F5B70}
- WinExe
- StormChatWPF
- StormChatWPF
- v4.0
- 512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
- true
- true
-
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
- StormChatWPF.App
-
-
-
-
-
-
-
-
-
-
-
-
- 4.0
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
-
- MainWindow.xaml
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- App.xaml
- Code
-
-
- LogWindow.xaml
- Code
-
-
- Designer
- MSBuild:Compile
-
-
-
-
- Code
-
-
- True
- Settings.settings
- True
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
-
-
-
-
- {cef054af-95b7-4b88-934e-02705feea554}
- Interact
-
-
-
-
-
-
-
-
-
-
-
-
-
- Designer
-
-
-
+
+
+
+
+ Debug
+ AnyCPU
+ {CF4D6BE0-A862-401F-A3A6-4FDAC32F5B70}
+ WinExe
+ StormChatWPF
+ StormChatWPF
+ v4.0
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+ true
+ true
+
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+ StormChatWPF.App
+
+
+
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+
+ MainWindow.xaml
+
+
+
+
+
+
+ Window1.xaml
+
+
+ MSBuild:Compile
+ Designer
+
+
+ App.xaml
+ Code
+
+
+ LogWindow.xaml
+ Code
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+
+
+ Code
+
+
+ True
+ Settings.settings
+ True
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
+
+
+ {cef054af-95b7-4b88-934e-02705feea554}
+ Interact
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Designer
+
+
+
\ No newline at end of file
diff --git a/stormchat-client-csharp/StormChatWPF/UI/HeadPicture.cs b/stormchat-client-csharp/StormChatWPF/UI/HeadPicture.cs
new file mode 100644
index 0000000..9108459
--- /dev/null
+++ b/stormchat-client-csharp/StormChatWPF/UI/HeadPicture.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows.Controls;
+using System.Windows;
+using System.Media;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.IO;
+
+namespace StormChatWPF
+{
+ class HeadPicture : Image
+ {
+ public HeadPicture(/*Stream imgstream*/)
+ {
+
+ FileStream fileStream = new FileStream(@"C:\Users\Administrator\Desktop\闪电.png", FileMode.Open);
+
+ Source = new BitmapImage()
+ {
+ StreamSource = fileStream
+ };
+ //border.Content = this;
+ }
+ private Label border = new Label()
+ {
+
+ };
+ }
+}
diff --git a/stormchat-client-csharp/StormChatWPF/UI/UserInfo.cs b/stormchat-client-csharp/StormChatWPF/UI/UserInfo.cs
new file mode 100644
index 0000000..e9b8cd0
--- /dev/null
+++ b/stormchat-client-csharp/StormChatWPF/UI/UserInfo.cs
@@ -0,0 +1,30 @@
+using Interact;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows.Controls;
+using System.Windows.Media;
+using System.Windows;
+
+namespace StormChatWPF
+{
+ class UserInfo:Label
+ {
+ public UserInfo(User user)
+ {
+
+
+ }
+ private Image headpicture = new Image
+ {
+ HorizontalAlignment = HorizontalAlignment.Left
+ };
+ private TextBlock UserNmae=new TextBlock
+ {
+ FontFamily = new FontFamily("Comic Sans MS"),
+ HorizontalAlignment = HorizontalAlignment.Right,
+ VerticalAlignment=VerticalAlignment.Top
+ };
+ }
+}
diff --git a/stormchat-client-csharp/StormChatWPF/Window1.xaml b/stormchat-client-csharp/StormChatWPF/Window1.xaml
new file mode 100644
index 0000000..8d96747
--- /dev/null
+++ b/stormchat-client-csharp/StormChatWPF/Window1.xaml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
diff --git a/stormchat-client-csharp/StormChatWPF/Window1.xaml.cs b/stormchat-client-csharp/StormChatWPF/Window1.xaml.cs
new file mode 100644
index 0000000..6451bfd
--- /dev/null
+++ b/stormchat-client-csharp/StormChatWPF/Window1.xaml.cs
@@ -0,0 +1,26 @@
+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 StormChatWPF
+{
+ ///
+ /// Window1.xaml 的交互逻辑
+ ///
+ public partial class Window1 : Window
+ {
+ public Window1()
+ {
+ InitializeComponent();
+ }
+ }
+}