using CollaborativePlatformMain.DFEntity;
using CollaborativePlatformMain.Form.UserControlForm;
using CollaborativePlatformMain.Util;
using HandyControl.Controls;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics.Eventing.Reader;
using System.Drawing.Printing;
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;
using Window = System.Windows.Window;
using MessageBox = System.Windows.MessageBox;
using static System.Net.Mime.MediaTypeNames;
using CollaborativePlatformMain.Form.MessageSubPage;
using CollaborativePlatformMain.Form.MessageSubPage.CreatLevel;
using CollaborativePlatformMain.Form.MessageSubPage.Project;
using CollaborativePlatformMain.DFEntity.MessageSubUtil;
namespace CollaborativePlatformMain.Form
{
///
/// HomepageForm.xaml 的交互逻辑
///
public partial class HomepageForm : Window
{
public HomepageForm()
{
InitializeComponent();
}
#region 最左边消息
///
/// 消息是否为初始化
///
public bool IsSeconMessagePage = false;
///
/// 消息窗体
///
public SeconMessagePage SeconMessagePage = null;
///
/// 消息
///
///
///
private void message_Click(object sender, MouseButtonEventArgs e)
{
MenuItem menuItem = sender as MenuItem;
ModifyBackground(menuItem);
dp_message.Visibility = Visibility.Visible;
dp_project.Visibility = Visibility.Collapsed;
dp_contacts.Visibility = Visibility.Collapsed;
dp_gallery.Visibility = Visibility.Collapsed;
dp_tools.Visibility = Visibility.Collapsed;
dp_threetools.Visibility = Visibility.Collapsed;
dp_ArticleReview.Visibility = Visibility.Collapsed;
SeconMessagePage = new SeconMessagePage(this);
seconMessagePage.Navigate(SeconMessagePage);
IsSeconMessagePage = true;
//SwitchMethod(sender as MenuItem, true);
}
///
/// 项目是否初始化
///
public bool IsSeconProjectPageShow = false;
///
/// 项目
///
///
///
private void project_Click(object sender, MouseButtonEventArgs e)
{
MenuItem menuItem = sender as MenuItem;
ModifyBackground(menuItem);
dp_message.Visibility = Visibility.Collapsed;
dp_project.Visibility = Visibility.Visible;
dp_contacts.Visibility = Visibility.Collapsed;
dp_gallery.Visibility = Visibility.Collapsed;
dp_tools.Visibility = Visibility.Collapsed;
dp_threetools.Visibility = Visibility.Collapsed;
dp_ArticleReview.Visibility = Visibility.Collapsed;
if (!IsSeconProjectPageShow)
{
seconProjectPage.Navigate(new SeconProjectPage(this));
IsSeconProjectPageShow = true;
}
}
///
/// 联系人是否初始化
///
public bool IsSeconContactsPage = false;
///
/// 联系人
///
///
///
private void contacts_Click(object sender, MouseButtonEventArgs e)
{
MenuItem menuItem = sender as MenuItem;
ModifyBackground(menuItem);
dp_message.Visibility = Visibility.Collapsed;
dp_project.Visibility = Visibility.Collapsed;
dp_contacts.Visibility = Visibility.Visible;
dp_gallery.Visibility = Visibility.Visible;
dp_tools.Visibility = Visibility.Collapsed;
dp_threetools.Visibility = Visibility.Collapsed;
dp_ArticleReview.Visibility = Visibility.Collapsed;
if (!IsSeconContactsPage)
{
seconContactsPage.Navigate(new SeconContactsPage(this));
IsSeconContactsPage = true;
}
}
///
/// 图库大样图是否初始化
///
public bool IsSeconLegendPage = false;
///
/// 图库大样图
///
///
///
private void gallery_Click(object sender, MouseButtonEventArgs e)
{
MenuItem menuItem = sender as MenuItem;
ModifyBackground(menuItem);
dp_message.Visibility = Visibility.Collapsed;
dp_project.Visibility = Visibility.Collapsed;
dp_contacts.Visibility = Visibility.Collapsed;
dp_gallery.Visibility = Visibility.Visible;
dp_tools.Visibility = Visibility.Collapsed;
dp_threetools.Visibility = Visibility.Collapsed;
dp_ArticleReview.Visibility = Visibility.Collapsed;
if (!IsSeconLegendPage)
{
seconLegendPage.Navigate(new SeconLegendPage(this));
IsSeconLegendPage = true;
}
}
///
/// 工具库是否初始化
///
public bool IsSeconToolLibraryPage = false;
///
/// 工具库
///
///
///
private void tool_Click(object sender, MouseButtonEventArgs e)
{
MenuItem menuItem = sender as MenuItem;
ModifyBackground(menuItem);
dp_message.Visibility = Visibility.Collapsed;
dp_project.Visibility = Visibility.Collapsed;
dp_contacts.Visibility = Visibility.Collapsed;
dp_gallery.Visibility = Visibility.Collapsed;
dp_tools.Visibility = Visibility.Visible;
dp_threetools.Visibility = Visibility.Collapsed;
dp_ArticleReview.Visibility = Visibility.Collapsed;
if (!IsSeconToolLibraryPage)
{
seconToolsPage.Navigate(new SeconToolLibraryPage());
IsSeconToolLibraryPage = true;
}
}
///
/// 三维是否初始化
///
public bool IsSeconThreeDimensionalPage = false;
///
/// 三维
///
///
///
private void three_Click(object sender, MouseButtonEventArgs e)
{
MenuItem menuItem = sender as MenuItem;
ModifyBackground(menuItem);
dp_message.Visibility = Visibility.Collapsed;
dp_project.Visibility = Visibility.Collapsed;
dp_contacts.Visibility = Visibility.Collapsed;
dp_gallery.Visibility = Visibility.Collapsed;
dp_tools.Visibility = Visibility.Collapsed;
dp_threetools.Visibility = Visibility.Visible;
dp_ArticleReview.Visibility = Visibility.Collapsed;
if (!IsSeconThreeDimensionalPage)
{
seconThreeTools.Navigate(new SeconThreeDimensionalPage(this));
IsSeconThreeDimensionalPage = true;
}
}
///
/// 条文审查是否初始化
///
public bool IsSeconArticleReviewPage = false;
///
/// 条文审查
///
///
///
private void MenuItem_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
MenuItem menuItem = sender as MenuItem;
ModifyBackground(menuItem);
dp_message.Visibility = Visibility.Collapsed;
dp_project.Visibility = Visibility.Collapsed;
dp_contacts.Visibility = Visibility.Collapsed;
dp_gallery.Visibility = Visibility.Collapsed;
dp_tools.Visibility = Visibility.Collapsed;
dp_threetools.Visibility = Visibility.Collapsed;
dp_ArticleReview.Visibility = Visibility.Visible;
if (!IsSeconArticleReviewPage)
{
seconArticleReview.Navigate(new SeconArticleReviewPage());
IsSeconArticleReviewPage = true;
}
}
///
/// 设置最左测导航的颜色
///
///
///
public void ModifyBackground(MenuItem menuItem)
{
List