Przeglądaj źródła

补充消息窗体

ouruisong 1 rok temu
rodzic
commit
cbf2061b5f

+ 9 - 0
CollaborativePlatformMain/CollaborativePlatformMain.csproj

@@ -87,6 +87,10 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </ApplicationDefinition>
+    <Compile Include="DFEntity\MessageSubUtil\MessageData.cs" />
+    <Compile Include="Form\MessageSubPage\SeconMessagePage.xaml.cs">
+      <DependentUpon>SeconMessagePage.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Form\UserControlForm\CBButtonControls.xaml.cs">
       <DependentUpon>CBButtonControls.xaml</DependentUpon>
     </Compile>
@@ -95,6 +99,10 @@
     </Compile>
     <Compile Include="Util\CollaborationUtil.cs" />
     <Compile Include="Util\LoginUtil.cs" />
+    <Page Include="Form\MessageSubPage\SeconMessagePage.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Form\UserControlForm\CBButtonControls.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -176,5 +184,6 @@
   <ItemGroup>
     <None Include="App.config" />
   </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>

+ 42 - 0
CollaborativePlatformMain/DFEntity/MessageSubUtil/MessageData.cs

@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CollaborativePlatformMain.DFEntity.MessageSubUtil
+{
+    /// <summary>
+    /// 
+    /// <para>文件名(File Name):     MessageData.cs</para>
+    /// 
+    /// <para>描述(Description):     消息数据</para>
+    /// 
+    /// <para>数据表(Tables):        nothing</para>
+    /// 
+    /// <para>作者(Author):          Ou Rui Song</para>
+    /// 
+    /// <para>日期(Create Date):     2024年4月20日17:04:39</para>
+    /// 
+    /// 修改记录(Revision History):
+    ///     R1:
+    ///         修改作者:
+    ///         修改日期:
+    ///         修改理由:
+    /// 
+    /// </summary>
+    public class MessageData
+    {
+
+        /// <summary>
+        /// 二级菜单
+        /// </summary>
+        public string SeconNode { get; set; } = "";
+
+        /// <summary>
+        /// 三级菜单
+        /// </summary>
+        public List<string> ThreeNodes { get; set; } = new List<string>();
+
+    }
+}

+ 10 - 33
CollaborativePlatformMain/Form/HomepageForm.xaml

@@ -10,7 +10,7 @@
         Background=" Transparent"
         WindowStartupLocation="CenterScreen"
         WindowStyle="None"
-        Title="" Height="600" Width="800" ResizeMode="NoResize">
+        Title="" Height="557" Width="800" ResizeMode="NoResize">
     <LayUI:LayTitleBar Background="{DynamicResource Blue}"   CornerRadius="10"
                        WindowState="{Binding WindowState, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
         <LayUI:LayTitleBar.Header>
@@ -26,19 +26,10 @@
             <StackPanel>
                 <DockPanel Background="{DynamicResource Blue}">
 
-                    <DockPanel Margin="5 10 0 10" Width="64" Height="64" HorizontalAlignment="Left" Background="AntiqueWhite" />
-
-                    <!--<Border BorderBrush="Gray" Width="64" Height="64" 
-                    Background="AntiqueWhite"  BorderThickness="0.5,0.5,0.5,0.5">
-                    <StackPanel  Orientation="Horizontal" FlowDirection="LeftToRight">
-                        <Border BorderBrush="Red"  BorderThickness="0,0.5,0.5,0.5">
-                            -->
-                    <!-- <Image Source="Assets/Image/logo.jpg" />-->
-                    <!--
-                        </Border>
-                        <Button Visibility="Collapsed" Content="新增项目" Height="30" Width="70" Margin="100,15,0,0" x:Name="create_Pro" Click="create_Pro_Click" />
-                    </StackPanel>
-                </Border>-->
+                    <DockPanel Margin="5 5 0 5" Width="30" Height="30" HorizontalAlignment="Left" Background="AntiqueWhite" >
+
+                    </DockPanel>
+
                 </DockPanel>
 
                 <DockPanel Height="430">
@@ -68,26 +59,10 @@
                     <!--消息-->
                     <DockPanel Name="dp_message" Visibility="Collapsed">
                         <!--中间-->
-                        <StackPanel Width="180" HorizontalAlignment="Left" Background="WhiteSmoke">
-                            <StackPanel>
-
-                                <DockPanel   Margin="0 0 0 0" Name="sp_hzNavigation" Height="30" Visibility="Collapsed">
-
-                                    <Menu>
-                                        <MenuItem Header="通知公告" Click="me_announcementClick" />
-                                        <MenuItem Header="项目" Click="me_projectClick" />
-                                        <MenuItem Header="系统" Click="me_systemClick" />
-                                    </Menu>
-                                </DockPanel>
-
-                                <StackPanel Background="WhiteSmoke"  Name="me_message">
-                                </StackPanel>
-                            </StackPanel>
-                        </StackPanel>
-                        <!--最右边-->
-                        <StackPanel Name="me_right"  Height="400"  Width="483"
-                                Margin="0 10 0 0"  HorizontalAlignment="Left">
+                        <StackPanel Width="670" HorizontalAlignment="Left">
+                            <Frame Name="seconMessagePage" NavigationUIVisibility="Hidden"/>
                         </StackPanel>
+
                     </DockPanel>
 
                     <!--项目-->
@@ -346,7 +321,9 @@
                             </DockPanel>
                         </StackPanel>
                     </DockPanel>
+
                 </DockPanel>
+
                 <Border  CornerRadius="0 0 10 10" Background="{DynamicResource Blue}">
 
                     <DockPanel Height="37">

+ 218 - 192
CollaborativePlatformMain/Form/HomepageForm.xaml.cs

@@ -21,6 +21,7 @@ using System.Windows.Shapes;
 using Window = System.Windows.Window;
 using MessageBox = System.Windows.MessageBox;
 using static System.Net.Mime.MediaTypeNames;
+using CollaborativePlatformMain.Form.MessageSubPage;
 
 namespace CollaborativePlatformMain.Form
 {
@@ -43,7 +44,10 @@ namespace CollaborativePlatformMain.Form
         /// <param name="e"></param>
         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>
@@ -169,57 +173,57 @@ namespace CollaborativePlatformMain.Form
         /// <param name="isHoShow"></param>
         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
@@ -383,45 +387,45 @@ namespace CollaborativePlatformMain.Form
         /// <param name="e"></param>
         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>
@@ -431,42 +435,42 @@ namespace CollaborativePlatformMain.Form
         /// <param name="e"></param>
         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>
@@ -476,33 +480,33 @@ namespace CollaborativePlatformMain.Form
         /// <param name="e"></param>
         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>
@@ -512,48 +516,70 @@ namespace CollaborativePlatformMain.Form
         /// <param name="e"></param>
         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

+ 34 - 0
CollaborativePlatformMain/Form/MessageSubPage/SeconMessagePage.xaml

@@ -0,0 +1,34 @@
+<Page x:Class="CollaborativePlatformMain.Form.MessageSubPage.SeconMessagePage"
+        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"
+        xmlns:local="clr-namespace:CollaborativePlatformMain.Form.MessageSubPage"
+        mc:Ignorable="d"
+        Title="SeconMessagePage" Width="663" Height="430"
+        Loaded="Window_Loaded">
+    <DockPanel>
+
+        <!--中间-->
+        <StackPanel Height="430">
+
+            <DockPanel Margin="0 0 0 0" Name="sp_hzNavigation" Width="180" Height="30" 
+                       HorizontalAlignment="Left" >
+                <Menu>
+                    <MenuItem Header="通知公告" Click="me_announcementClick" />
+                    <MenuItem Header="项目" Click="me_projectClick" />
+                    <MenuItem Header="系统" Click="me_systemClick" />
+                </Menu>
+            </DockPanel>
+
+            <StackPanel Width="180" Height="400" Background="WhiteSmoke"  Name="me_message">
+
+            </StackPanel>
+        </StackPanel>
+
+        <StackPanel Margin="10,0,0,0" Name="me_right" HorizontalAlignment="Left"  Height="400"  Width="483">
+            
+        </StackPanel>
+
+    </DockPanel>
+</Page>

+ 318 - 0
CollaborativePlatformMain/Form/MessageSubPage/SeconMessagePage.xaml.cs

@@ -0,0 +1,318 @@
+using CollaborativePlatformMain.DFEntity.MessageSubUtil;
+using System;
+using System.Collections.Generic;
+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 CollaborativePlatformMain.Form.MessageSubPage
+{
+    /// <summary>
+    /// SeconMessagePage.xaml 的交互逻辑
+    /// </summary>
+    public partial class SeconMessagePage : Page
+    {
+        /// <summary>
+        /// 父级窗体
+        /// </summary>
+        public HomepageForm Homepage;
+
+        /// <summary>
+        ///  有参构造
+        /// </summary>
+        /// <param name="homepageForm">父级窗体</param>
+        public SeconMessagePage(HomepageForm homepageForm)
+        {
+            InitializeComponent();
+            Homepage = homepageForm;
+        }
+
+
+        public List<MessageData> tongzhis1 = new List<MessageData>();
+        public List<MessageData> tongzhis2 = new List<MessageData>();
+
+        public List<MessageData> xiangmu1 = new List<MessageData>();
+        public List<MessageData> xiangmu2 = new List<MessageData>();
+
+        public List<MessageData> xitong1 = new List<MessageData>();
+        public List<MessageData> xitong2 = new List<MessageData>();
+
+
+
+
+        /// <summary>
+        /// 窗体初始化
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void Window_Loaded(object sender, RoutedEventArgs e)
+        {
+            List<string> secondaryNodes = new List<string>() { "通知公告", "项目", "系统" };
+
+            for (int i = 0; i < secondaryNodes.Count; i++)
+            {
+
+
+                if (i == 0)
+                {
+                    List<string> projects = new List<string>() { "国博城项目总消息", "北京大兴项目总消息", "绿地项目总消息" };
+
+                    MessageData messageData = new MessageData();
+                    messageData.SeconNode = secondaryNodes[i];
+                    messageData.ThreeNodes = projects;
+                    tongzhis1.Add(messageData);
+
+                    for (int j = 0; j < projects.Count; j++)
+                    {
+                        MessageData threeData = new MessageData();
+                        threeData.SeconNode = projects[j];
+                        if (j == 0)
+                        {
+                            List<string> nodes = new List<string>() { "按甲方要求,国博城项目务必在4月15号之前完成报审版。" };
+                            threeData.ThreeNodes = nodes;
+                        }
+                        else if (j == 1)
+                        {
+                            List<string> nodes = new List<string>() { "按甲方要求,北京大兴项目务必在4月22号之前完成报审版。" };
+                            threeData.ThreeNodes = nodes;
+                        }
+                        else if (j == 2)
+                        {
+                            List<string> nodes = new List<string>() { "按甲方要求,绿地项目务必在4月30号之前完成报审版。" };
+                            threeData.ThreeNodes = nodes;
+                        }
+                        tongzhis2.Add(threeData);
+                    }
+                }
+                else if (i == 1)
+                {
+                    List<string> projects = new List<string>() { "国博城项目建筑图纸更新", "北京大兴项目结构图纸更新", "绿地项目人防图纸更新" };
+
+                    MessageData messageData = new MessageData();
+                    messageData.SeconNode = secondaryNodes[i];
+                    messageData.ThreeNodes = projects;
+                    xiangmu1.Add(messageData);
+
+                    for (int j = 0; j < projects.Count; j++)
+                    {
+                        MessageData threeData = new MessageData();
+                        threeData.SeconNode = projects[j];
+                        if (j == 0)
+                        {
+                            List<string> nodes = new List<string>() { "国博城项目建筑1#楼3层更新。" };
+                            threeData.ThreeNodes = nodes;
+                        }
+                        else if (j == 1)
+                        {
+                            List<string> nodes = new List<string>() { "北京大兴项目结构2#楼1层墙柱平法图更新。" };
+                            threeData.ThreeNodes = nodes;
+                        }
+                        else if (j == 2)
+                        {
+                            List<string> nodes = new List<string>() { "绿地项目地下人防图更新。" };
+                            threeData.ThreeNodes = nodes;
+                        }
+                        xiangmu2.Add(threeData);
+                    }
+                }
+                else if (i == 2)
+                {
+                    List<string> projects = new List<string>() { "系统更新", "停服升级" };
+
+                    MessageData messageData = new MessageData();
+                    messageData.SeconNode = secondaryNodes[i];
+                    messageData.ThreeNodes = projects;
+                    xitong1.Add(messageData);
+
+                    for (int j = 0; j < projects.Count; j++)
+                    {
+                        MessageData threeData = new MessageData();
+                        threeData.SeconNode = projects[j];
+                        if (j == 0)
+                        {
+                            List<string> nodes = new List<string>() { "交互平台版本更新至2.0版本",
+                                                                      "  本次更新了:",
+                                                                      "    1.主界面消息分组。",
+                                                                      "    2.修改了登陆界面。",
+                                                                      "   请及时更新!!",};
+                            threeData.ThreeNodes = nodes;
+                        }
+                        else if (j == 1)
+                        {
+                            List<string> nodes = new List<string>() { "交互平台版本将在4月13日8点20分至4月13日8点50分进行停服更新",
+                                                                       "本次停服更新不会导致您的数据丢失。"};
+                            threeData.ThreeNodes = nodes;
+                        }
+                        xitong2.Add(threeData);
+                    }
+                }
+            }
+
+            me_message.Children.Clear();
+            foreach (var item in tongzhis2)
+            {
+                Button button = new Button();
+                button.Content = item.SeconNode;
+                button.BorderThickness = new Thickness(0);
+                button.Width = 180;
+                button.Height = 30;
+                button.Tag = item;
+                button.Click += new RoutedEventHandler(messageBtnClick);
+                button.HorizontalContentAlignment = HorizontalAlignment.Left;
+                me_message.Children.Add(button);
+            }
+        }
+
+        /// <summary>
+        /// 二级菜单选中的元素
+        /// </summary>
+        public static string SelectNode = "";
+
+        /// <summary>
+        /// 通知公告
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void me_announcementClick(object sender, RoutedEventArgs e)
+        {
+            MenuItem menu = sender as MenuItem;
+            if (menu == null) return;
+
+            me_message.Children.Clear();
+            foreach (var item in tongzhis2)
+            {
+                Button button = new Button();
+                button.Content = item.SeconNode;
+                button.BorderThickness = new Thickness(0);
+                button.Width = 180;
+                button.Height = 30;
+                button.Background= Brushes.WhiteSmoke;
+                button.Visibility = Visibility.Visible;
+                button.Click += new RoutedEventHandler(messageBtnClick);
+                button.Tag = item;
+                button.HorizontalContentAlignment = HorizontalAlignment.Left;
+                me_message.Children.Add(button);
+            }
+
+            SelectNode = menu.Header.ToString();
+        }
+
+        /// <summary>
+        /// 项目
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void me_projectClick(object sender, RoutedEventArgs e)
+        {
+            MenuItem menu = sender as MenuItem;
+            if (menu == null) return;
+
+            me_message.Children.Clear();
+            foreach (var item in xiangmu2)
+            {
+                Button button = new Button();
+                button.Content = item.SeconNode;
+                button.BorderThickness = new Thickness(0);
+                button.Width = 180;
+                button.Height = 30;
+                button.Tag = item;
+                button.Click += new RoutedEventHandler(messageBtnClick);
+                button.HorizontalContentAlignment = HorizontalAlignment.Left;
+                me_message.Children.Add(button);
+            }
+
+            SelectNode = menu.Header.ToString();
+        }
+
+        /// <summary>
+        /// 系统
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void me_systemClick(object sender, RoutedEventArgs e)
+        {
+            MenuItem menu = sender as MenuItem;
+            if (menu == null) return;
+
+            me_message.Children.Clear();
+            foreach (var item in xitong2)
+            {
+                Button button = new Button();
+                button.Content = item.SeconNode;
+                button.BorderThickness = new Thickness(0);
+                button.Width = 180;
+                button.Height = 30;
+                button.Tag = item;
+                button.Click += new RoutedEventHandler(messageBtnClick);
+                button.HorizontalContentAlignment = HorizontalAlignment.Left;
+                me_message.Children.Add(button);
+            }
+
+            SelectNode = menu.Header.ToString();
+        }
+
+
+        /// <summary>
+        /// 具体消息按钮
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void messageBtnClick(object sender, RoutedEventArgs e)
+        {
+            Button button = sender as Button;
+
+            MessageData announcement = button.Tag as MessageData;
+            if (announcement == null) return;
+            List<string> specificContent = announcement.ThreeNodes;
+
+            me_right.Children.Clear();
+            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 (SelectNode.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);
+            }
+        }
+
+
+    }
+}

+ 2 - 2
CollaborativePlatformMain/MainWindow.xaml

@@ -9,7 +9,7 @@
         AllowsTransparency="True"
         Background=" Transparent"
         WindowStartupLocation="CenterScreen"
-        WindowStyle="None"
+        WindowStyle="None" 
         Title="" Height="500" Width="350" ResizeMode="NoResize">
 
     <LayUI:LayTitleBar Background="{DynamicResource Blue}"   CornerRadius="10"
@@ -72,7 +72,7 @@
                     </DockPanel>
 
                     <DockPanel Margin="0 20 0 0">
-                        <LayUI:LayButton HorizontalAlignment="Center" Height="30"  Content="注册" FontSize="15"></LayUI:LayButton>
+                        <LayUI:LayButton HorizontalAlignment="Center" Height="30"  Content="注册" FontSize="15" Click="LayButton_Click"></LayUI:LayButton>
                     </DockPanel>
                 </StackPanel>
 

+ 39 - 2
CollaborativePlatformMain/MainWindow.xaml.cs

@@ -28,6 +28,7 @@ namespace CollaborativePlatformMain
             this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
         }
 
+
         /// <summary>
         /// 登陆
         /// </summary>
@@ -60,7 +61,9 @@ namespace CollaborativePlatformMain
         /// <param name="e"></param>
         private void RegisterLayButton_Click(object sender, RoutedEventArgs e)
         {
-
+            sp_Login.Visibility = Visibility.Collapsed;
+            sp_Register.Visibility = Visibility.Visible;
+            sp_temporaryLogin.Visibility = Visibility.Collapsed;
         }
 
 
@@ -82,7 +85,7 @@ namespace CollaborativePlatformMain
         /// <param name="e"></param>
         private void TemporaryLogin2_Click(object sender, RoutedEventArgs e)
         {
-            List<string> temporaryLogins = new List<string>() { "550632" };
+            List<string> temporaryLogins = new List<string>() { "123456" };
 
             if (!string.IsNullOrEmpty(tb_InvitationCode.Text) && temporaryLogins.Contains(tb_InvitationCode.Text))
             {
@@ -96,5 +99,39 @@ namespace CollaborativePlatformMain
                 MessageBox.Show("邀请码错误!", "提示", MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.None);
             }
         }
+
+        /// <summary>
+        /// 注册事件
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void LayButton_Click(object sender, RoutedEventArgs e)
+        {
+            //账号
+            string name = tb_rguserName.Text.ToString();
+            //密码
+            string pwd1 = tb_rguserPwd.Text.ToString();
+            //确认密码
+            string pwd2 = tb_rgconuserPwd.Text.ToString();
+
+            if (name == string.Empty)
+            {
+                MessageBox.Show("账号不允许为空!", "提示", MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.None);
+            }
+            if (pwd1 == string.Empty || pwd2 == string.Empty)
+            {
+                MessageBox.Show("密码不允许为空!", "提示", MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.None);
+            }
+            if (pwd1 != pwd2)
+            {
+                MessageBox.Show("两次密码不一致,请检查!", "提示", MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.None);
+            }
+
+            HomepageForm homepageForm = new HomepageForm();
+            homepageForm.Show();
+            this.Close();
+        }
+
+        
     }
 }