|
@@ -21,6 +21,7 @@ using System.Windows.Shapes;
|
|
using Window = System.Windows.Window;
|
|
using Window = System.Windows.Window;
|
|
using MessageBox = System.Windows.MessageBox;
|
|
using MessageBox = System.Windows.MessageBox;
|
|
using static System.Net.Mime.MediaTypeNames;
|
|
using static System.Net.Mime.MediaTypeNames;
|
|
|
|
+using CollaborativePlatformMain.Form.MessageSubPage;
|
|
|
|
|
|
namespace CollaborativePlatformMain.Form
|
|
namespace CollaborativePlatformMain.Form
|
|
{
|
|
{
|
|
@@ -43,7 +44,10 @@ namespace CollaborativePlatformMain.Form
|
|
/// <param name="e"></param>
|
|
/// <param name="e"></param>
|
|
private void message_Click(object sender, MouseButtonEventArgs e)
|
|
private void message_Click(object sender, MouseButtonEventArgs e)
|
|
{
|
|
{
|
|
- SwitchMethod(sender as MenuItem, true);
|
|
|
|
|
|
+ dp_message.Visibility = Visibility.Visible;
|
|
|
|
+ seconMessagePage.Navigate(new SeconMessagePage(this));
|
|
|
|
+
|
|
|
|
+ //SwitchMethod(sender as MenuItem, true);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -169,57 +173,57 @@ namespace CollaborativePlatformMain.Form
|
|
/// <param name="isHoShow"></param>
|
|
/// <param name="isHoShow"></param>
|
|
public void SwitchMethod(MenuItem menuItem, bool isHoShow)
|
|
public void SwitchMethod(MenuItem menuItem, bool isHoShow)
|
|
{
|
|
{
|
|
- if (isHoShow)
|
|
|
|
- {
|
|
|
|
- sp_hzNavigation.Visibility = Visibility.Visible;
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- sp_hzNavigation.Visibility = Visibility.Collapsed;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- List<MenuItem> mis = CollaborationUtil.GetChildObjects<System.Windows.Controls.MenuItem>(mu_leftMenu);
|
|
|
|
-
|
|
|
|
- foreach (MenuItem mi in mis)
|
|
|
|
- {
|
|
|
|
- mi.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#1E9FFF"));
|
|
|
|
- if (mi.Header.ToString().Replace(" ", "").Equals("消息"))
|
|
|
|
- {
|
|
|
|
- dp_message.Visibility = Visibility.Collapsed;
|
|
|
|
- }
|
|
|
|
- else if (mi.Header.ToString().Replace(" ", "").Equals("项目"))
|
|
|
|
- {
|
|
|
|
- dp_project.Visibility = Visibility.Collapsed;
|
|
|
|
- }
|
|
|
|
- else if (mi.Header.ToString().Replace(" ", "").Equals("工具库"))
|
|
|
|
- {
|
|
|
|
- dp_tools.Visibility = Visibility.Collapsed;
|
|
|
|
- }
|
|
|
|
- else if (mi.Header.ToString().Replace(" ", "").Equals("联系人"))
|
|
|
|
- {
|
|
|
|
- dp_contacts.Visibility = Visibility.Collapsed;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (menuItem.Header.ToString().Replace(" ", "").Equals("消息"))
|
|
|
|
- {
|
|
|
|
- dp_message.Visibility = Visibility.Visible;
|
|
|
|
- }
|
|
|
|
- else if (menuItem.Header.ToString().Replace(" ", "").Equals("项目"))
|
|
|
|
- {
|
|
|
|
- dp_project.Visibility = Visibility.Visible;
|
|
|
|
- }
|
|
|
|
- else if (menuItem.Header.ToString().Replace(" ", "").Equals("工具库"))
|
|
|
|
- {
|
|
|
|
- dp_tools.Visibility = Visibility.Visible;
|
|
|
|
- }
|
|
|
|
- else if (menuItem.Header.ToString().Replace(" ", "").Equals("联系人"))
|
|
|
|
- {
|
|
|
|
- dp_contacts.Visibility = Visibility.Visible;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- menuItem.Background = new SolidColorBrush(Colors.Beige);
|
|
|
|
- me_message.Children.Clear();
|
|
|
|
|
|
+ //if (isHoShow)
|
|
|
|
+ //{
|
|
|
|
+ // sp_hzNavigation.Visibility = Visibility.Visible;
|
|
|
|
+ //}
|
|
|
|
+ //else
|
|
|
|
+ //{
|
|
|
|
+ // sp_hzNavigation.Visibility = Visibility.Collapsed;
|
|
|
|
+ //}
|
|
|
|
+
|
|
|
|
+ //List<MenuItem> mis = CollaborationUtil.GetChildObjects<System.Windows.Controls.MenuItem>(mu_leftMenu);
|
|
|
|
+
|
|
|
|
+ //foreach (MenuItem mi in mis)
|
|
|
|
+ //{
|
|
|
|
+ // mi.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#1E9FFF"));
|
|
|
|
+ // if (mi.Header.ToString().Replace(" ", "").Equals("消息"))
|
|
|
|
+ // {
|
|
|
|
+ // dp_message.Visibility = Visibility.Collapsed;
|
|
|
|
+ // }
|
|
|
|
+ // else if (mi.Header.ToString().Replace(" ", "").Equals("项目"))
|
|
|
|
+ // {
|
|
|
|
+ // dp_project.Visibility = Visibility.Collapsed;
|
|
|
|
+ // }
|
|
|
|
+ // else if (mi.Header.ToString().Replace(" ", "").Equals("工具库"))
|
|
|
|
+ // {
|
|
|
|
+ // dp_tools.Visibility = Visibility.Collapsed;
|
|
|
|
+ // }
|
|
|
|
+ // else if (mi.Header.ToString().Replace(" ", "").Equals("联系人"))
|
|
|
|
+ // {
|
|
|
|
+ // dp_contacts.Visibility = Visibility.Collapsed;
|
|
|
|
+ // }
|
|
|
|
+ //}
|
|
|
|
+
|
|
|
|
+ //if (menuItem.Header.ToString().Replace(" ", "").Equals("消息"))
|
|
|
|
+ //{
|
|
|
|
+ // dp_message.Visibility = Visibility.Visible;
|
|
|
|
+ //}
|
|
|
|
+ //else if (menuItem.Header.ToString().Replace(" ", "").Equals("项目"))
|
|
|
|
+ //{
|
|
|
|
+ // dp_project.Visibility = Visibility.Visible;
|
|
|
|
+ //}
|
|
|
|
+ //else if (menuItem.Header.ToString().Replace(" ", "").Equals("工具库"))
|
|
|
|
+ //{
|
|
|
|
+ // dp_tools.Visibility = Visibility.Visible;
|
|
|
|
+ //}
|
|
|
|
+ //else if (menuItem.Header.ToString().Replace(" ", "").Equals("联系人"))
|
|
|
|
+ //{
|
|
|
|
+ // dp_contacts.Visibility = Visibility.Visible;
|
|
|
|
+ //}
|
|
|
|
+
|
|
|
|
+ //menuItem.Background = new SolidColorBrush(Colors.Beige);
|
|
|
|
+ //me_message.Children.Clear();
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
@@ -383,45 +387,45 @@ namespace CollaborativePlatformMain.Form
|
|
/// <param name="e"></param>
|
|
/// <param name="e"></param>
|
|
private void me_announcementClick(object sender, RoutedEventArgs e)
|
|
private void me_announcementClick(object sender, RoutedEventArgs e)
|
|
{
|
|
{
|
|
- notificationDatas = new List<NotificationAnnouncement>();
|
|
|
|
-
|
|
|
|
- for (int i = 0; i < new List<string>() { "国博城项目建筑图纸更新", "北京大兴项目结构图纸更新", "绿地项目人防图纸更新" }.Count; i++)
|
|
|
|
- {
|
|
|
|
- NotificationAnnouncement notificationAnnouncement = new NotificationAnnouncement();
|
|
|
|
- notificationAnnouncement.MessageCategory = "通知公告";
|
|
|
|
-
|
|
|
|
- if (i == 0)
|
|
|
|
- {
|
|
|
|
- notificationAnnouncement.Content = "国博城项目总消息";
|
|
|
|
- notificationAnnouncement.SpecificContent = "按甲方要求,国博城项目务必在4月15号之前完成报审版。";
|
|
|
|
- }
|
|
|
|
- else if (i == 1)
|
|
|
|
- {
|
|
|
|
- notificationAnnouncement.Content = "北京大兴项目总消息";
|
|
|
|
- notificationAnnouncement.SpecificContent = "按甲方要求,北京大兴项目务必在4月22号之前完成报审版。";
|
|
|
|
- }
|
|
|
|
- else if (i == 2)
|
|
|
|
- {
|
|
|
|
- notificationAnnouncement.Content = "绿地项目总消息";
|
|
|
|
- notificationAnnouncement.SpecificContent = "按甲方要求,绿地项目务必在4月30号之前完成报审版。";
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- notificationDatas.Add(notificationAnnouncement);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- me_message.Children.Clear();
|
|
|
|
- foreach (var notificationData in notificationDatas)
|
|
|
|
- {
|
|
|
|
- Button button = new Button();
|
|
|
|
- button.Content = notificationData.Content;
|
|
|
|
- button.BorderThickness = new Thickness(0);
|
|
|
|
- button.Width = 180;
|
|
|
|
- button.Height = 30;
|
|
|
|
- button.Click += new RoutedEventHandler(messageBtnClick);
|
|
|
|
- button.Tag = notificationData;
|
|
|
|
- button.HorizontalContentAlignment = HorizontalAlignment.Left;
|
|
|
|
- me_message.Children.Add(button);
|
|
|
|
- }
|
|
|
|
|
|
+ //notificationDatas = new List<NotificationAnnouncement>();
|
|
|
|
+
|
|
|
|
+ //for (int i = 0; i < new List<string>() { "国博城项目建筑图纸更新", "北京大兴项目结构图纸更新", "绿地项目人防图纸更新" }.Count; i++)
|
|
|
|
+ //{
|
|
|
|
+ // NotificationAnnouncement notificationAnnouncement = new NotificationAnnouncement();
|
|
|
|
+ // notificationAnnouncement.MessageCategory = "通知公告";
|
|
|
|
+
|
|
|
|
+ // if (i == 0)
|
|
|
|
+ // {
|
|
|
|
+ // notificationAnnouncement.Content = "国博城项目总消息";
|
|
|
|
+ // notificationAnnouncement.SpecificContent = "按甲方要求,国博城项目务必在4月15号之前完成报审版。";
|
|
|
|
+ // }
|
|
|
|
+ // else if (i == 1)
|
|
|
|
+ // {
|
|
|
|
+ // notificationAnnouncement.Content = "北京大兴项目总消息";
|
|
|
|
+ // notificationAnnouncement.SpecificContent = "按甲方要求,北京大兴项目务必在4月22号之前完成报审版。";
|
|
|
|
+ // }
|
|
|
|
+ // else if (i == 2)
|
|
|
|
+ // {
|
|
|
|
+ // notificationAnnouncement.Content = "绿地项目总消息";
|
|
|
|
+ // notificationAnnouncement.SpecificContent = "按甲方要求,绿地项目务必在4月30号之前完成报审版。";
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+ // notificationDatas.Add(notificationAnnouncement);
|
|
|
|
+ //}
|
|
|
|
+
|
|
|
|
+ //me_message.Children.Clear();
|
|
|
|
+ //foreach (var notificationData in notificationDatas)
|
|
|
|
+ //{
|
|
|
|
+ // Button button = new Button();
|
|
|
|
+ // button.Content = notificationData.Content;
|
|
|
|
+ // button.BorderThickness = new Thickness(0);
|
|
|
|
+ // button.Width = 180;
|
|
|
|
+ // button.Height = 30;
|
|
|
|
+ // button.Click += new RoutedEventHandler(messageBtnClick);
|
|
|
|
+ // button.Tag = notificationData;
|
|
|
|
+ // button.HorizontalContentAlignment = HorizontalAlignment.Left;
|
|
|
|
+ // me_message.Children.Add(button);
|
|
|
|
+ //}
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -431,42 +435,42 @@ namespace CollaborativePlatformMain.Form
|
|
/// <param name="e"></param>
|
|
/// <param name="e"></param>
|
|
private void me_projectClick(object sender, RoutedEventArgs e)
|
|
private void me_projectClick(object sender, RoutedEventArgs e)
|
|
{
|
|
{
|
|
- notificationDatas = new List<NotificationAnnouncement>();
|
|
|
|
- foreach (var xiangmu in new List<string>() { "国博城项目建筑图纸更新", "北京大兴项目结构图纸更新", "绿地项目人防图纸更新" })
|
|
|
|
- {
|
|
|
|
- NotificationAnnouncement notificationAnnouncement = new NotificationAnnouncement();
|
|
|
|
- notificationAnnouncement.Content = xiangmu;
|
|
|
|
- notificationAnnouncement.MessageCategory = "项目消息";
|
|
|
|
-
|
|
|
|
- if (xiangmu.Equals("国博城项目建筑图纸更新"))
|
|
|
|
- {
|
|
|
|
- notificationAnnouncement.SpecificContent = "国博城项目建筑1#楼3层更新。";
|
|
|
|
- }
|
|
|
|
- else if (xiangmu.Equals("北京大兴项目结构图纸更新"))
|
|
|
|
- {
|
|
|
|
- notificationAnnouncement.SpecificContent = "北京大兴项目结构2#楼1层墙柱平法图更新。";
|
|
|
|
- }
|
|
|
|
- else if (xiangmu.Equals("绿地项目人防图纸更新"))
|
|
|
|
- {
|
|
|
|
- notificationAnnouncement.SpecificContent = "绿地项目地下人防图更新。";
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- notificationDatas.Add(notificationAnnouncement);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- me_message.Children.Clear();
|
|
|
|
- foreach (var notificationData in notificationDatas)
|
|
|
|
- {
|
|
|
|
- Button button = new Button();
|
|
|
|
- button.Content = notificationData.Content;
|
|
|
|
- button.BorderThickness = new Thickness(0);
|
|
|
|
- button.Width = 180;
|
|
|
|
- button.Height = 30;
|
|
|
|
- button.Click += new RoutedEventHandler(messageBtnClick);
|
|
|
|
- button.Tag = notificationData;
|
|
|
|
- button.HorizontalContentAlignment = HorizontalAlignment.Left;
|
|
|
|
- me_message.Children.Add(button);
|
|
|
|
- }
|
|
|
|
|
|
+ //notificationDatas = new List<NotificationAnnouncement>();
|
|
|
|
+ //foreach (var xiangmu in new List<string>() { "国博城项目建筑图纸更新", "北京大兴项目结构图纸更新", "绿地项目人防图纸更新" })
|
|
|
|
+ //{
|
|
|
|
+ // NotificationAnnouncement notificationAnnouncement = new NotificationAnnouncement();
|
|
|
|
+ // notificationAnnouncement.Content = xiangmu;
|
|
|
|
+ // notificationAnnouncement.MessageCategory = "项目消息";
|
|
|
|
+
|
|
|
|
+ // if (xiangmu.Equals("国博城项目建筑图纸更新"))
|
|
|
|
+ // {
|
|
|
|
+ // notificationAnnouncement.SpecificContent = "国博城项目建筑1#楼3层更新。";
|
|
|
|
+ // }
|
|
|
|
+ // else if (xiangmu.Equals("北京大兴项目结构图纸更新"))
|
|
|
|
+ // {
|
|
|
|
+ // notificationAnnouncement.SpecificContent = "北京大兴项目结构2#楼1层墙柱平法图更新。";
|
|
|
|
+ // }
|
|
|
|
+ // else if (xiangmu.Equals("绿地项目人防图纸更新"))
|
|
|
|
+ // {
|
|
|
|
+ // notificationAnnouncement.SpecificContent = "绿地项目地下人防图更新。";
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+ // notificationDatas.Add(notificationAnnouncement);
|
|
|
|
+ //}
|
|
|
|
+
|
|
|
|
+ //me_message.Children.Clear();
|
|
|
|
+ //foreach (var notificationData in notificationDatas)
|
|
|
|
+ //{
|
|
|
|
+ // Button button = new Button();
|
|
|
|
+ // button.Content = notificationData.Content;
|
|
|
|
+ // button.BorderThickness = new Thickness(0);
|
|
|
|
+ // button.Width = 180;
|
|
|
|
+ // button.Height = 30;
|
|
|
|
+ // button.Click += new RoutedEventHandler(messageBtnClick);
|
|
|
|
+ // button.Tag = notificationData;
|
|
|
|
+ // button.HorizontalContentAlignment = HorizontalAlignment.Left;
|
|
|
|
+ // me_message.Children.Add(button);
|
|
|
|
+ //}
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -476,33 +480,33 @@ namespace CollaborativePlatformMain.Form
|
|
/// <param name="e"></param>
|
|
/// <param name="e"></param>
|
|
private void me_systemClick(object sender, RoutedEventArgs e)
|
|
private void me_systemClick(object sender, RoutedEventArgs e)
|
|
{
|
|
{
|
|
- NotificationAnnouncement notificationAnnouncement = new NotificationAnnouncement();
|
|
|
|
- notificationAnnouncement.Content = "系统更新";
|
|
|
|
- notificationAnnouncement.SpecificContent = "交互平台版本更新至2.0版本· 本次更新了:· 1.主界面消息分组。· 2.修改了登陆界面。· 请及时更新!!";
|
|
|
|
- notificationAnnouncement.MessageCategory = "系统消息";
|
|
|
|
- NotificationAnnouncement notificationAnnouncement2 = new NotificationAnnouncement();
|
|
|
|
- notificationAnnouncement2.Content = "停服升级";
|
|
|
|
- notificationAnnouncement2.SpecificContent = "交互平台版本将在4月13日8点20分至4月13日8点50分进行停服更新·本次停服更新不会导致您的数据丢失。";
|
|
|
|
- notificationAnnouncement2.MessageCategory = "系统消息";
|
|
|
|
- notificationDatas = new List<NotificationAnnouncement>()
|
|
|
|
- {
|
|
|
|
- notificationAnnouncement,
|
|
|
|
- notificationAnnouncement2
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
- me_message.Children.Clear();
|
|
|
|
- foreach (var notificationData in notificationDatas)
|
|
|
|
- {
|
|
|
|
- Button button = new Button();
|
|
|
|
- button.Content = notificationData.Content;
|
|
|
|
- button.BorderThickness = new Thickness(0);
|
|
|
|
- button.Width = 180;
|
|
|
|
- button.Height = 30;
|
|
|
|
- button.Click += new RoutedEventHandler(messageBtnClick);
|
|
|
|
- button.Tag = notificationData;
|
|
|
|
- button.HorizontalContentAlignment = HorizontalAlignment.Left;
|
|
|
|
- me_message.Children.Add(button);
|
|
|
|
- }
|
|
|
|
|
|
+ // NotificationAnnouncement notificationAnnouncement = new NotificationAnnouncement();
|
|
|
|
+ // notificationAnnouncement.Content = "系统更新";
|
|
|
|
+ // notificationAnnouncement.SpecificContent = "交互平台版本更新至2.0版本· 本次更新了:· 1.主界面消息分组。· 2.修改了登陆界面。· 请及时更新!!";
|
|
|
|
+ // notificationAnnouncement.MessageCategory = "系统消息";
|
|
|
|
+ // NotificationAnnouncement notificationAnnouncement2 = new NotificationAnnouncement();
|
|
|
|
+ // notificationAnnouncement2.Content = "停服升级";
|
|
|
|
+ // notificationAnnouncement2.SpecificContent = "交互平台版本将在4月13日8点20分至4月13日8点50分进行停服更新·本次停服更新不会导致您的数据丢失。";
|
|
|
|
+ // notificationAnnouncement2.MessageCategory = "系统消息";
|
|
|
|
+ // notificationDatas = new List<NotificationAnnouncement>()
|
|
|
|
+ // {
|
|
|
|
+ // notificationAnnouncement,
|
|
|
|
+ // notificationAnnouncement2
|
|
|
|
+ //};
|
|
|
|
+
|
|
|
|
+ // me_message.Children.Clear();
|
|
|
|
+ // foreach (var notificationData in notificationDatas)
|
|
|
|
+ // {
|
|
|
|
+ // Button button = new Button();
|
|
|
|
+ // button.Content = notificationData.Content;
|
|
|
|
+ // button.BorderThickness = new Thickness(0);
|
|
|
|
+ // button.Width = 180;
|
|
|
|
+ // button.Height = 30;
|
|
|
|
+ // button.Click += new RoutedEventHandler(messageBtnClick);
|
|
|
|
+ // button.Tag = notificationData;
|
|
|
|
+ // button.HorizontalContentAlignment = HorizontalAlignment.Left;
|
|
|
|
+ // me_message.Children.Add(button);
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -512,48 +516,70 @@ namespace CollaborativePlatformMain.Form
|
|
/// <param name="e"></param>
|
|
/// <param name="e"></param>
|
|
private void messageBtnClick(object sender, RoutedEventArgs e)
|
|
private void messageBtnClick(object sender, RoutedEventArgs e)
|
|
{
|
|
{
|
|
- me_right.Children.Clear();
|
|
|
|
- Button button = sender as Button;
|
|
|
|
|
|
+ //me_right.Children.Clear();
|
|
|
|
+ //Button button = sender as Button;
|
|
|
|
|
|
- NotificationAnnouncement announcement = button.Tag as NotificationAnnouncement;
|
|
|
|
|
|
+ //NotificationAnnouncement announcement = button.Tag as NotificationAnnouncement;
|
|
|
|
|
|
- List<string> specificContent = announcement.SpecificContent.Split('·').ToList();
|
|
|
|
|
|
+ //List<string> specificContent = announcement.SpecificContent.Split('·').ToList();
|
|
|
|
|
|
- foreach (var specificConten in specificContent)
|
|
|
|
- {
|
|
|
|
- TextBlock textBlock = new TextBlock();
|
|
|
|
- textBlock.Text = specificConten;
|
|
|
|
- textBlock.FontSize = 15;
|
|
|
|
- textBlock.FontFamily = new FontFamily("黑体");
|
|
|
|
- me_right.Children.Add(textBlock);
|
|
|
|
- }
|
|
|
|
|
|
+ //foreach (var specificConten in specificContent)
|
|
|
|
+ //{
|
|
|
|
+ // TextBlock textBlock = new TextBlock();
|
|
|
|
+ // textBlock.Text = specificConten;
|
|
|
|
+ // textBlock.FontSize = 15;
|
|
|
|
+ // textBlock.FontFamily = new FontFamily("黑体");
|
|
|
|
+ // me_right.Children.Add(textBlock);
|
|
|
|
+ //}
|
|
|
|
|
|
- if (announcement.MessageCategory.Equals("项目消息"))
|
|
|
|
- {
|
|
|
|
- DockPanel dockPanel = new DockPanel();
|
|
|
|
- dockPanel.Margin = new Thickness(0, 10, 30, 0);
|
|
|
|
- dockPanel.HorizontalAlignment = HorizontalAlignment.Right;
|
|
|
|
-
|
|
|
|
- TextBlock textBlock = new TextBlock();
|
|
|
|
- textBlock.Text = "查看";
|
|
|
|
- textBlock.FontSize = 13;
|
|
|
|
- textBlock.Foreground = new SolidColorBrush(Colors.Green);
|
|
|
|
- textBlock.TextDecorations = TextDecorations.Underline;
|
|
|
|
- textBlock.Margin = new Thickness(0, 0, 10, 0);
|
|
|
|
- textBlock.FontFamily = new FontFamily("黑体");
|
|
|
|
-
|
|
|
|
- dockPanel.Children.Add(textBlock);
|
|
|
|
-
|
|
|
|
- TextBlock textBlock2 = new TextBlock();
|
|
|
|
- textBlock2.Text = "忽略";
|
|
|
|
- textBlock2.FontSize = 13;
|
|
|
|
- textBlock2.FontFamily = new FontFamily("黑体");
|
|
|
|
-
|
|
|
|
- textBlock2.Foreground = new SolidColorBrush(Colors.Green);
|
|
|
|
- textBlock2.TextDecorations = TextDecorations.Underline;
|
|
|
|
- dockPanel.Children.Add(textBlock2);
|
|
|
|
- me_right.Children.Add(dockPanel);
|
|
|
|
- }
|
|
|
|
|
|
+ //if (announcement.MessageCategory.Equals("项目消息"))
|
|
|
|
+ //{
|
|
|
|
+ // DockPanel dockPanel = new DockPanel();
|
|
|
|
+ // dockPanel.Margin = new Thickness(0, 10, 30, 0);
|
|
|
|
+ // dockPanel.HorizontalAlignment = HorizontalAlignment.Right;
|
|
|
|
+
|
|
|
|
+ // TextBlock textBlock = new TextBlock();
|
|
|
|
+ // textBlock.Text = "查看";
|
|
|
|
+ // textBlock.FontSize = 13;
|
|
|
|
+ // textBlock.Foreground = new SolidColorBrush(Colors.Green);
|
|
|
|
+ // textBlock.TextDecorations = TextDecorations.Underline;
|
|
|
|
+ // textBlock.Margin = new Thickness(0, 0, 10, 0);
|
|
|
|
+ // textBlock.FontFamily = new FontFamily("黑体");
|
|
|
|
+ // textBlock.PreviewMouseLeftButtonDown += new MouseButtonEventHandler(Message_Look);
|
|
|
|
+
|
|
|
|
+ // dockPanel.Children.Add(textBlock);
|
|
|
|
+
|
|
|
|
+ // TextBlock textBlock2 = new TextBlock();
|
|
|
|
+ // textBlock2.Text = "忽略";
|
|
|
|
+ // textBlock2.FontSize = 13;
|
|
|
|
+ // textBlock2.FontFamily = new FontFamily("黑体");
|
|
|
|
+ // textBlock2.Foreground = new SolidColorBrush(Colors.Green);
|
|
|
|
+ // textBlock2.TextDecorations = TextDecorations.Underline;
|
|
|
|
+ // textBlock2.PreviewMouseLeftButtonDown += new MouseButtonEventHandler(Message_Ignore);
|
|
|
|
+
|
|
|
|
+ // dockPanel.Children.Add(textBlock2);
|
|
|
|
+ // me_right.Children.Add(dockPanel);
|
|
|
|
+ //}
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 查看消息
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="sender"></param>
|
|
|
|
+ /// <param name="e"></param>
|
|
|
|
+ public void Message_Look(object sender, RoutedEventArgs e)
|
|
|
|
+ {
|
|
|
|
+ MessageBox.Show("查看消息");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 忽略消息
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="sender"></param>
|
|
|
|
+ /// <param name="e"></param>
|
|
|
|
+ public void Message_Ignore(object sender, RoutedEventArgs e)
|
|
|
|
+ {
|
|
|
|
+ MessageBox.Show("忽略消息");
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
#endregion
|