using DevExpress.CodeParser.VB.Preprocessor;
|
using DevExpress.Utils.Svg;
|
using DevExpress.XtraBars.Docking;
|
using DevExpress.XtraBars.Docking2010.Views;
|
using DevExpress.XtraBars.Docking2010.Views.Tabbed;
|
using DevExpress.XtraBars.Navigation;
|
using DevExpress.XtraBars.Ribbon;
|
using DevExpress.XtraEditors;
|
using DevExpress.XtraSpreadsheet.Model;
|
using DevExpress.XtraTab;
|
using HStation.WinFrmUI;
|
using HStation.WinFrmUI.Assets;
|
using HStation.WinFrmUI.Basic;
|
using HStation.WinFrmUI.Dict;
|
using IBox.WinFrmUI;
|
using NPOI.SS.Formula.Functions;
|
using PBS.WinFrmUI;
|
using PBS.WinFrmUI.DataAnalysis;
|
using PBS.WinFrmUI.Hydro;
|
using PBS.WinFrmUI.WE;
|
using System.IO;
|
using Yw.WinFrmUI;
|
using Yw.WinFrmUI.Page;
|
using PBS.Vmo;
|
|
namespace PBS.Desktop
|
{
|
public partial class MainForm : RibbonForm
|
{
|
public MainForm()
|
{
|
InitializeComponent();
|
|
this.accordionControlFunction.GroupHeight = 50;
|
this.accordionControlFunction.ItemHeight = 35;
|
this.accordionControlFunction.Appearance.Group.Default.Font = new Font("΢ÈíÑźÚ", 10.5f);
|
this.accordionControlFunction.Appearance.Item.Default.Font = new Font("΢ÈíÑźÚ", 9.5f);
|
this.accordionControlFunction.AllowItemSelection = true;
|
|
this.accordionControlFunction.Appearance.AccordionControl.BackColor = Color.White;
|
this.accordionControlFunction.Appearance.AccordionControl.BorderColor = Color.White;
|
//this.accordionControlFunction.ResizeMode = AccordionControlResizeMode.None;
|
this.accordionControlFunction.AllowHtmlText = true;
|
this.accordionControlFunction.HtmlTemplates.HamburgerHeaderPanel.Template = @"<div class='hamburger-header-background'></div>";
|
this.accordionControlFunction.HtmlTemplates.HamburgerHeaderPanel.Styles = @".hamburger-header-background {background-color: #ffffff; height: 100%;width: 100%;}";
|
|
this.tabbedView1.Style = DockingViewStyle.Classic;
|
this.tabbedView1.Appearance.BackColor = Color.White;
|
//this.tabbedView1.AppearancePage.Header.BackColor = Color.White;
|
this.tabbedView1.AppearancePage.HeaderSelected.Font = new Font("΢ÈíÑźÚ", 10f, FontStyle.Bold);
|
|
// this.tabbedView1.CustomDrawTabHeader += OnCustomDrawTabHeader;
|
}
|
|
private void OnCustomDrawTabHeader(object sender, TabHeaderCustomDrawEventArgs e)
|
{
|
// »ñÈ¡ TabbedView ʵÀý
|
var tabbedView = sender as TabbedView;
|
|
bool isSelected = false;
|
|
// ÉèÖÿ¹¾â³ÝģʽÒÔÈ·±£»æÖÆÖÊÁ¿
|
e.Cache.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
|
|
// ¼ÆËãÔ²µÄλÖúʹóС£¬ÕâÀïÎÒÃǼòµ¥µØÓø߶È×÷Ϊֱ¾¶
|
int diameter = Math.Min(e.Bounds.Width, e.Bounds.Height);
|
Rectangle circleRect = new Rectangle(e.Bounds.X + (e.Bounds.Width - diameter) / 2, e.Bounds.Y, diameter, diameter);
|
|
// ÉèÖûˢÑÕÉ«£¬¿ÉÒÔ¸ù¾ÝÑ¡ÖÐ״̬¸Ä±äÑÕÉ«
|
Brush brush = isSelected ? Brushes.LightSkyBlue : Brushes.Gray; // ʾÀýÑÕÉ«
|
|
// »æÖÆÔ²Ðα³¾°
|
e.Cache.Graphics.FillEllipse(brush, circleRect); // ×¢ÒâÕâÀïʹÓõÄÊÇ e.Cache.Graphics ¶ø²»ÊÇ e.Cache.Paint
|
|
// Èç¹ûÐèÒª£¬¿ÉÒÔÔÚÕâÀï»æÖÆÎı¾»òÆäËûͼÐÎ
|
StringFormat stringFormat = new StringFormat
|
{
|
Alignment = StringAlignment.Center,
|
LineAlignment = StringAlignment.Center
|
};
|
e.Cache.Graphics.DrawString(e.TabHeaderInfo.ViewInfo.GetSelectablePage().Text, this.Font, Brushes.Black, e.Bounds, stringFormat);
|
|
// ±íʾÒÑ×ÔÐд¦Àí»æÖÆ
|
e.Handled = true;
|
}
|
|
//HatchBrush myHatchBrush1 = new HatchBrush(HatchStyle.BackwardDiagonal, Color.LightGray, Color.AliceBlue);
|
//private void TabbedView1_CustomDrawTabHeader(object sender, DevExpress.XtraTab.TabHeaderCustomDrawEventArgs e)
|
//{
|
// e.Cache.FillRectangle(myHatchBrush1, e.Bounds);
|
// e.DefaultDrawText();
|
// e.DefaultDrawImage();
|
// e.DefaultDrawButtons();
|
// e.Handled = true;
|
//}
|
|
#region TileNavPane Ïà¹Ø´¦Àí
|
|
//ÒÆ¶¯´°Ìå
|
private void tileNavPane_MouseDown(object sender, MouseEventArgs e)
|
{
|
if (e.Clicks >= 2)
|
{
|
if (this.WindowState == FormWindowState.Maximized)
|
{
|
this.WindowState = FormWindowState.Normal;
|
}
|
else
|
{
|
this.WindowState = FormWindowState.Maximized;
|
}
|
}
|
else
|
{
|
var hit_info = this.tileNavPane.CalcHitInfo(e.Location);
|
if (hit_info.InButton)
|
{
|
return;
|
}
|
this.DragMove();
|
}
|
}
|
|
//±êÌâµã»÷
|
private void nbTitle_ElementClick(object sender, NavElementEventArgs e)
|
{
|
}
|
|
//×î´ó»¯×îС»¯´°Ìå
|
private void nbNormal_ElementClick(object sender, NavElementEventArgs e)
|
{
|
if (this.WindowState == FormWindowState.Maximized)
|
{
|
this.WindowState = FormWindowState.Normal;
|
}
|
else
|
{
|
this.WindowState = FormWindowState.Maximized;
|
}
|
}
|
|
//×îС»¯´°Ìå
|
private void nbMin_ElementClick(object sender, NavElementEventArgs e)
|
{
|
this.WindowState = FormWindowState.Minimized;
|
}
|
|
//¹Ø±Õ´°Ìå
|
private void nabClose_ElementClick(object sender, NavElementEventArgs e)
|
{
|
this.Close();
|
}
|
|
//¹¦Äܵã»÷ʼþ
|
private void tileNavPane_ElementClick(object sender, NavElementEventArgs e)
|
{
|
if (e.Element is not NavButton btn)
|
return;
|
if (!btn.Enabled)
|
return;
|
if (btn.Tag is not string tag)
|
return;
|
PageGuid pguid = null;
|
if (this.tabbedView1.ActiveDocument != null)
|
{
|
pguid = this.tabbedView1.ActiveDocument.Tag as PageGuid;
|
}
|
SelectModular(tag, pguid);
|
}
|
|
#endregion TileNavPane Ïà¹Ø´¦Àí
|
|
#region ´°Ìåʼþ
|
|
//½çÃæ¼ÇÔØÊ¼þ
|
private void MainForm_Load(object sender, EventArgs e)
|
{
|
}
|
|
//½çÃæÏÔʾʼþ
|
private void MainForm_Shown(object sender, EventArgs e)
|
{
|
//var guid = new PageGuid()
|
//{
|
// Modular = "PBS",
|
// MoudingType = eMoudingType.Tab,
|
// Function = "Home"
|
//};
|
//if (!IsExistPage(guid, true))
|
//{
|
//}
|
|
SelectModular("BasicData");
|
}
|
|
//½çÃæÕýÔÚÍ˳öʱȷÈÏ
|
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
|
{
|
if (e.CloseReason == CloseReason.UserClosing)
|
{
|
if (XtraMessageBox.Show("ÊÇ·ñ¹Ø±Õ³ÌÐò£¿", "Ìáʾ", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) != DialogResult.Yes)
|
{
|
e.Cancel = true;
|
return;
|
}
|
}
|
}
|
|
//½çÃæÍ˳ö
|
private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
|
{
|
}
|
|
//´°Ìå³ß´ç¸Ä±ä
|
private void MainForm_Resize(object sender, EventArgs e)
|
{
|
if (this.WindowState == FormWindowState.Maximized)
|
{
|
}
|
else
|
{
|
}
|
}
|
|
#endregion ´°Ìåʼþ
|
|
#region TabbedView Ïà¹ØÊ¼þ´¦Àí³ÌÐò
|
|
//Ñ¡ÖÐ
|
private void tabbedView1_DocumentSelected(object sender, DocumentEventArgs e)
|
{
|
if (e.Document == null)
|
return;
|
var pguid = e.Document.Tag as PageGuid;
|
if (pguid == null)
|
return;
|
SelectModular(pguid.Modular, pguid);
|
}
|
|
//Ìí¼Ó
|
private void tabbedView1_DocumentAdded(object sender, DocumentEventArgs e)
|
{
|
if (this.tabbedView1.Documents.Count > 1)
|
{
|
if (!this.tabbedView1.DocumentGroupProperties.ShowTabHeader)
|
{
|
}
|
}
|
}
|
|
//¼¤»î
|
private void tabbedView1_DocumentActivated(object sender, DocumentEventArgs e)
|
{
|
var page = e.Document.Control as DocumentPage;
|
if (page == null)
|
{
|
return;
|
}
|
}
|
|
//¹Ø±Õ ´Ëʱ¿Ø¼þÒѾΪ¿Õ
|
private void tabbedView1_DocumentClosed(object sender, DocumentEventArgs e)
|
{
|
}
|
|
#endregion TabbedView Ïà¹ØÊ¼þ´¦Àí³ÌÐò
|
|
#region Page
|
|
//ÊÇ·ñ´æÔÚPage
|
private bool IsExistPage(PageGuid pguid, bool isActivePage)
|
{
|
if (pguid == null)
|
{
|
return false;
|
}
|
if (this.dockManager1.Panels != null && this.dockManager1.Panels.Count > 0)
|
{
|
foreach (DockPanel panel in this.dockManager1.Panels)
|
{
|
if (panel.Tag != null)
|
{
|
if (panel.Tag is PageGuid)
|
{
|
if ((panel.Tag as PageGuid).ToString() == pguid.ToString())
|
{
|
if (isActivePage)
|
{
|
panel.Show();
|
}
|
return true;
|
}
|
}
|
}
|
}
|
}
|
|
if (this.tabbedView1.Documents != null && this.tabbedView1.Documents.Count > 0)
|
{
|
foreach (BaseDocument doc in this.tabbedView1.Documents)
|
{
|
if (doc.Tag != null)
|
{
|
if (doc.Tag is PageGuid)
|
{
|
if ((doc.Tag as PageGuid).ToString() == pguid.ToString())
|
{
|
if (isActivePage)
|
{
|
this.tabbedView1.Controller.Activate(doc);
|
}
|
return true;
|
}
|
}
|
}
|
}
|
}
|
|
return false;
|
}
|
|
//¸üÐÂÊý¾Ý
|
private void RefreshPageData(PageGuid pguid)
|
{
|
if (pguid == null)
|
{
|
return;
|
}
|
if (this.dockManager1.Panels != null && this.dockManager1.Panels.Count > 0)
|
{
|
var panel = this.dockManager1.Panels.ToList().Find(x => x.Tag != null && x.Tag is PageGuid && (x.Tag as PageGuid).ToString() == pguid.ToString());
|
if (panel != null)
|
{
|
if (panel.ControlContainer.Controls.Count > 0)
|
{
|
var page = panel.ControlContainer.Controls[0] as DocumentPage;
|
if (page != null)
|
{
|
page.RefreshData();
|
}
|
}
|
return;
|
}
|
}
|
|
if (this.tabbedView1.Documents != null && this.tabbedView1.Documents.Count > 0)
|
{
|
var doc = this.tabbedView1.Documents.ToList().Find(x => x.Tag != null && x.Tag is PageGuid && (x.Tag as PageGuid).ToString() == pguid.ToString());
|
if (doc != null)
|
{
|
var page = doc.Control as DocumentPage;
|
if (page != null)
|
{
|
page.RefreshData();
|
}
|
return;
|
}
|
}
|
}
|
|
//¸üÐÂPageTitle
|
private void UpdatePageTitle(PageGuid pguid, PageTitle title)
|
{
|
if (pguid == null || title == null)
|
return;
|
|
if (this.dockManager1.Panels != null && this.dockManager1.Panels.Count > 0)
|
{
|
var panel = this.dockManager1.Panels.ToList().Find(x => x.Tag != null && x.Tag is PageGuid && (x.Tag as PageGuid).ToString() == pguid.ToString());
|
if (panel != null)
|
{
|
panel.Text = title.Caption;
|
panel.ImageOptions.Image = title.HeaderImage;
|
panel.ImageOptions.SvgImage = title.HeaderSvgImage;
|
panel.ImageOptions.SvgImageSize = title.SvgImageSize;
|
if (panel.ControlContainer.Controls.Count > 0)
|
{
|
var page = panel.ControlContainer.Controls[0] as DocumentPage;
|
if (page != null)
|
{
|
page.PageTitle = title;
|
}
|
}
|
return;
|
}
|
}
|
|
if (this.tabbedView1.Documents != null && this.tabbedView1.Documents.Count > 0)
|
{
|
var doc = this.tabbedView1.Documents.ToList().Find(x => x.Tag != null && x.Tag is PageGuid && (x.Tag as PageGuid).ToString() == pguid.ToString());
|
if (doc != null)
|
{
|
doc.Caption = title.Caption;
|
doc.ImageOptions.Image = title.HeaderImage;
|
doc.ImageOptions.SvgImage = title.HeaderSvgImage;
|
doc.ImageOptions.SvgImageSize = title.SvgImageSize;
|
var page = doc.Control as DocumentPage;
|
if (page != null)
|
{
|
page.PageTitle = title;
|
}
|
return;
|
}
|
}
|
}
|
|
//´´½¨Page
|
private bool CreatePage(DocumentPage page, PageGuid pguid)
|
{
|
if (page == null || pguid == null)
|
{
|
return false;
|
}
|
page.PageGuid = pguid;
|
page.Dock = DockStyle.Fill;
|
page.IsExistPageEvent += IsExistPage;
|
page.CreatePageEvent += CreatePage;
|
page.RefreshPageDataEvent += RefreshPageData;
|
page.UpdatePageTitleEvent += UpdatePageTitle;
|
page.ClosePageEvent += ClosePage;
|
page.RegistEvents();
|
switch (pguid.MoudingType)
|
{
|
case eMoudingType.Dock:
|
{
|
this.dockManager1.BeginUpdate();
|
DockPanel docPnl = null;
|
if (pguid.DockType == eDockType.Left)
|
{
|
docPnl = this.dockManager1.AddPanel(DockingStyle.Left);
|
}
|
else if (pguid.DockType == eDockType.Right)
|
{
|
docPnl = this.dockManager1.AddPanel(DockingStyle.Right);
|
}
|
|
docPnl.Footer = Directory.GetCurrentDirectory();
|
if (page.PageTitle != null)
|
{
|
docPnl.Text = page.PageTitle.Caption;
|
docPnl.ImageOptions.Image = page.PageTitle.HeaderImage;
|
docPnl.ImageOptions.SvgImage = page.PageTitle.HeaderSvgImage;
|
docPnl.ImageOptions.SvgImageSize = page.PageTitle.SvgImageSize;
|
docPnl.Options.ShowCloseButton = page.PageTitle.AllowClose;
|
}
|
docPnl.ControlContainer.Controls.Add(page);
|
docPnl.Tag = pguid;
|
this.dockManager1.EndUpdate();
|
docPnl.Show();
|
}
|
break;
|
|
case eMoudingType.Tab:
|
{
|
this.tabbedView1.BeginUpdate();
|
var doc = this.tabbedView1.AddDocument(page);
|
doc.Footer = Directory.GetCurrentDirectory();
|
if (page.PageTitle != null)
|
{
|
doc.Caption = page.PageTitle.Caption;
|
doc.ImageOptions.Image = page.PageTitle.HeaderImage;
|
doc.ImageOptions.SvgImage = page.PageTitle.HeaderSvgImage;
|
doc.ImageOptions.SvgImageSize = page.PageTitle.SvgImageSize;
|
doc.Properties.AllowClose = page.PageTitle.AllowClose ? DevExpress.Utils.DefaultBoolean.True : DevExpress.Utils.DefaultBoolean.False;
|
}
|
doc.Tag = pguid;
|
this.tabbedView1.EndUpdate();
|
this.tabbedView1.Controller.Activate(doc);
|
}
|
break;
|
|
default: break;
|
}
|
page.InitialDataSource();
|
return true;
|
}
|
|
//¹Ø±ÕPage
|
private void ClosePage(PageGuid pguid)
|
{
|
switch (pguid.MoudingType)
|
{
|
case eMoudingType.Dock:
|
{
|
if (this.dockManager1.Panels != null && this.dockManager1.Panels.Count > 0)
|
{
|
var panel = this.dockManager1.Panels.ToList().Find(x => x.Tag != null && x.Tag is PageGuid && (x.Tag as PageGuid).ToString() == pguid.ToString());
|
if (panel != null)
|
{
|
if (panel.Visibility != DockVisibility.Hidden)
|
panel.Close();//»á´¥·¢ÕýÔڹرպ͹رÕʼþ
|
//this.dockManager1.RemovePanel(panel);//²»»á´¥·¢ÕýÔڹرպ͹رÕʼþ
|
}
|
}
|
}
|
break;
|
|
case eMoudingType.Tab:
|
{
|
if (this.tabbedView1.Documents != null && this.tabbedView1.Documents.Count > 0)
|
{
|
var doc = this.tabbedView1.Documents.ToList().Find(x => x.Tag != null && x.Tag is PageGuid && (x.Tag as PageGuid).ToString() == pguid.ToString());
|
if (doc != null)
|
{
|
this.tabbedView1.Controller.Close(doc);//»á´¥·¢ÕýÔڹرպ͹رÕʼþ
|
}
|
}
|
}
|
break;
|
|
default: break;
|
}
|
}
|
|
#endregion Page
|
|
#region Modular
|
|
private string _sel_modular = string.Empty;
|
|
//Ñ¡ÔñÄ£¿é
|
private void SelectModular(string modular, PageGuid pguid = null)
|
{
|
if (_sel_modular != modular)
|
{
|
foreach (NavButton btn in this.tileNavPane.Buttons)
|
{
|
if (btn.Tag == null)
|
continue;
|
if (btn.Tag is string tag)
|
{
|
if (tag == modular)
|
{
|
btn.Appearance.BackColor = Color.FromArgb(50, 121, 197);
|
btn.Appearance.ForeColor = Color.White;
|
}
|
else
|
{
|
btn.Appearance.BackColor = Color.White;
|
btn.Appearance.ForeColor = Color.Black;
|
}
|
}
|
}
|
|
//ÖÇÄÜÓ²¼þ
|
if (modular == "SmartHardware")
|
{
|
var guid = new PageGuid()
|
{
|
Modular = "SmartHardware",
|
MoudingType = eMoudingType.Tab,
|
Function = "IBox",
|
};
|
if (!IsExistPage(guid, true))
|
{
|
var ibox = IBoxDataHelper.GetData();
|
var page = new IBoxForm(ibox);
|
page.PageGuid = guid;
|
page.PageTitle.Caption = "ÖÇÄÜÓ²¼þ";
|
page.PageTitle.HeaderSvgImage = svgImgItem32[4];
|
page.PageTitle.SvgImageSize = new Size(18, 18);
|
CreatePage(page, guid);
|
}
|
}
|
|
//³õʼ¹¦ÄÜÁбí
|
this.accordionControlFunction.Elements.Clear();
|
var list = GetAccordionElementList(modular);
|
if (list != null && list.Count > 0)
|
{
|
foreach (var element in list)
|
{
|
var accEle = GetAccordionControlElement(element);
|
this.accordionControlFunction.Elements.Add(accEle);
|
}
|
}
|
_sel_modular = modular;
|
}
|
|
//Ñ¡Ôñ¹¦ÄÜ
|
if (pguid != null)
|
{
|
foreach (var item in this.accordionControlFunction.Elements)
|
{
|
if (SelectAccordionControlElement(item, pguid))
|
break;
|
}
|
}
|
}
|
|
//»ñȡģ¿éÔªËØ
|
private DevExpress.XtraBars.Navigation.AccordionControlElement GetAccordionControlElement(AccordionElement ele)
|
{
|
var dev_ele = new DevExpress.XtraBars.Navigation.AccordionControlElement();
|
dev_ele.Name = ele.Id;
|
dev_ele.Text = ele.Caption;
|
dev_ele.Image = ele.Image;
|
dev_ele.ImageOptions.SvgImage = ele.SvgImage;
|
dev_ele.ImageOptions.SvgImageSize = ele.SvgImageSize;
|
dev_ele.AllowGlyphSkinning = ele.AllowGlyphSkinning ? DevExpress.Utils.DefaultBoolean.True : DevExpress.Utils.DefaultBoolean.False;
|
dev_ele.Tag = ele;
|
dev_ele.Style = DevExpress.XtraBars.Navigation.ElementStyle.Item;
|
dev_ele.Click += delegate { ele.Click?.Invoke(); };
|
if (ele.Elements != null && ele.Elements.Count > 0)
|
{
|
dev_ele.Style = DevExpress.XtraBars.Navigation.ElementStyle.Group;
|
foreach (var item in ele.Elements)
|
{
|
dev_ele.Elements.Add(GetAccordionControlElement(item));
|
}
|
}
|
return dev_ele;
|
}
|
|
//Ñ¡Ôñ¹¦ÄÜÔªËØ
|
private bool SelectAccordionControlElement(DevExpress.XtraBars.Navigation.AccordionControlElement ctrl_ele, PageGuid pguid)
|
{
|
if (ctrl_ele == null)
|
return false;
|
if (pguid == null)
|
return false;
|
if (ctrl_ele.Tag is AccordionElement ele)
|
{
|
if (ele.PageGuid != null && ele.PageGuid.ToString() == pguid.ToString())
|
{
|
this.accordionControlFunction.SelectedElement = ctrl_ele;
|
if (ctrl_ele.OwnerElement != null)
|
{
|
ctrl_ele.OwnerElement.Expanded = true;
|
this.accordionControlFunction.Refresh();
|
}
|
return true;
|
}
|
else
|
{
|
if (ctrl_ele.Elements != null && ctrl_ele.Elements.Count > 0)
|
{
|
foreach (var item in ctrl_ele.Elements)
|
{
|
SelectAccordionControlElement(item, pguid);
|
}
|
}
|
}
|
}
|
|
return false;
|
}
|
|
//»ñÈ¡
|
private List<AccordionElement> GetAccordionElementList(string modular)
|
{
|
var list = new List<AccordionElement>();
|
switch (modular)
|
{
|
case "BasicData":
|
{
|
var place_mgr_ele = new AccordionElement()
|
{
|
Id = "place",
|
Caption = "³¡Ëù¹ÜÀí",
|
SvgImage = svgImgGroup32[0],
|
SvgImageSize = new Size(24, 24),
|
AllowGlyphSkinning = true,
|
Elements = new List<AccordionElement>()
|
{
|
Get("ÐÐÕþÇøÓò",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "DistrictMgr",
|
}, svgImgItem32[0], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page = new DivisionMainPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page, guid);
|
}
|
}),
|
Get("³¡Ëù",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "PlaceMgr",
|
}, svgImgItem32[1], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page = new PlaceMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page, guid);
|
}
|
}),
|
Get("¹©Ë®ÉèÊ©", new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "FacilityMgr",
|
}, svgImgItem32[2], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page = new FacilityMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page, guid);
|
}
|
})
|
}
|
};
|
|
var we_mgr_ele = new AccordionElement()
|
{
|
Id = "we",
|
Caption = "µ±Á¿¹ÜÀí",
|
SvgImage = svgImgGroup32[1],
|
SvgImageSize = new Size(24, 24),
|
AllowGlyphSkinning = true,
|
Elements = new List<AccordionElement>() {
|
Get("ÓÃË®Æ÷¾ß",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "WaterUtensilMgr",
|
}, svgImgItem32[4], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page = new PBS.WinFrmUI.WE.WaterUtensilMainPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page, guid);
|
}
|
}),
|
Get("ÓÃË®µ±Á¿",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "WaterWEMgr",
|
}, svgImgItem32[5], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page = new PBS.WinFrmUI.WE.WaterWEMgr();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page, guid);
|
}
|
})
|
}
|
};
|
|
var coupling = Get("Á¬½Ó¼þ", new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsCouplingMgr",
|
}, svgImgItem32[7], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
});
|
coupling.Elements = new List<AccordionElement>()
|
{
|
Get("ÃÆÍ·",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsBluntheadMgr",
|
}, svgImgItem32[8], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new AssetsBluntheadMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
Get("ÍäÍ·",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsElbowMgr",
|
}, svgImgItem32[32], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new AssetsElbowMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
Get("Èýͨ",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsThreelinkMgr",
|
}, svgImgItem32[31], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new AssetsThreelinkMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
Get("ËÄͨ",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsFourlinkMgr",
|
}, svgImgItem32[26], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new AssetsFourlinkMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
};
|
|
var emitter = Get("À©É¢Æ÷", new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsEmitterMgr",
|
}, svgImgItem32[7], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
});
|
emitter.Elements = new List<AccordionElement>()
|
{
|
Get("ÅçÍ·",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsSprinklerMgr",
|
}, svgImgItem32[25], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new AssetsSprinklerMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
Get("Ïû»ð˨",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsHydrantMgr",
|
}, svgImgItem32[30], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new AssetsHydrantMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
Get("ÀäÈ´Ëþ",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsCoolingMgr",
|
}, svgImgItem32[24], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new AssetsCoolingMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
};
|
|
var Instrument = Get("ÉèÊ©ÒDZí", new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsInstrumentMgr",
|
}, svgImgItem32[22], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
});
|
Instrument.Elements = new List<AccordionElement>()
|
{
|
Get("Ë®±í",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsMeterMgr",
|
}, svgImgItem32[6], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page = new AssetsMeterMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page, guid);
|
}
|
}),
|
Get("ѹÁ¦±í",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsPressmeterMgr",
|
}, svgImgItem32[20], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new AssetsPressmeterMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
Get("Á÷Á¿¼Æ",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsFlowmeterMgr",
|
}, svgImgItem32[21], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new AssetsFlowmeterMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
};
|
|
var Resistance = Get("×è¼þ", new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsResistanceMgr",
|
}, svgImgItem32[7], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
});
|
Resistance.Elements = new List<AccordionElement>()
|
{
|
Get("»»ÈÈÆ÷",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsExchangerMgr",
|
}, svgImgItem32[29], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new AssetsExchangerMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
Get("ѹËõ»ú",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsCompressorMgr",
|
}, svgImgItem32[28], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new AssetsCompressorMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
};
|
|
#region ¹©Ë®Ë®Ô´
|
|
var waterSupplySource = Get("¹©Ë®Ë®Ô´", new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "waterSupplySource",
|
}, svgImgItem32[7], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
});
|
waterSupplySource.Elements = new List<AccordionElement>()
|
{
|
Get("Ë®³Ø", new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsTankMgr",
|
}, svgImgItem32[7], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page = new AssetsTankMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page, guid);
|
}
|
}),
|
};
|
|
#endregion ¹©Ë®Ë®Ô´
|
|
#region ¹©Ë®×°ÖÃ
|
|
var waterSupply = Get("¹©Ë®×°ÖÃ", new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "waterSupply",
|
}, svgImgItem32[7], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
});
|
waterSupply.Elements = new List<AccordionElement>()
|
{
|
Get("Ë®±Ã¹ÜÀí", new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsPumpMgr",
|
}, svgImgItem32[7], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page = new PumpProductMainPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page, guid);
|
}
|
}),
|
Get("³ÉÌ×É豸", new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsPackageMgr",
|
}, svgImgItem32[8], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page = new PackageManageMainPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page, guid);
|
}
|
})
|
};
|
|
#endregion ¹©Ë®×°ÖÃ
|
|
var FacilityNetwork = Get("ÉèÊ©¹ÜÍø", new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "FacilityNetwork",
|
}, svgImgItem32[7], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
});
|
FacilityNetwork.Elements = new List<AccordionElement>()
|
{
|
Get("¹ÜµÀ",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsPipeMgr",
|
}, svgImgItem32[6], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page = new AssetsPipeMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page, guid);
|
}
|
}),
|
Get("·§ÃÅ",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsValveMgr",
|
}, svgImgItem32[7], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new AssetsValveMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
Get("¹ý¶É¼þ",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsTranslationMgr",
|
}, svgImgItem32[6], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page = new AssetsTranslationMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page, guid);
|
}
|
}),
|
coupling,
|
emitter,
|
};
|
|
var asset_mgr_ele = new AccordionElement()
|
{
|
Id = "asset",
|
Caption = "²úÆ·¹ÜÀí",
|
SvgImage = svgImgGroup32[2],
|
SvgImageSize = new Size(24, 24),
|
AllowGlyphSkinning = true,
|
Elements = new List<AccordionElement>() {
|
Get("³§É̹ÜÀí",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "AssetsManufacturerMgr",
|
}, svgImgItem32[6], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
/* var page = new DocumentPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page, guid);*/
|
}
|
}),
|
waterSupplySource,
|
waterSupply,
|
FacilityNetwork,
|
Instrument,
|
}
|
};
|
|
var system_config_ele = new AccordionElement()
|
{
|
Id = "asset",
|
Caption = "ϵͳÅäÖÃ",
|
SvgImage = svgImgGroup32[3],
|
SvgImageSize = new Size(24, 24),
|
AllowGlyphSkinning = true,
|
Elements = new List<AccordionElement>() {
|
Get("ÀàÐ͹ÜÀí",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "SystemTypeMgr",
|
}, svgImgItem32[9], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new SysTypeManageMainPanel();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
Get("·ÖÀà¹ÜÀí",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "SystemCatalogMgr",
|
}, svgImgItem32[10], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new SysCatalogManageMainPanel();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
Get("ÊôÐÔ¹ÜÀí",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "SystemPropMgr",
|
}, svgImgItem32[11], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new SysPropManageMainPanel();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
Get("±êÇ©¹ÜÀí",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "SystemFlagMgr",
|
}, svgImgItem32[16], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new SysFlagManageMainPanel();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
Get("×ÖµäÀàÐÍ",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "SystemDictMgr",
|
}, svgImgItem32[12], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new DictManageMainPanel();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
}
|
};
|
|
var auth_config_ele = new AccordionElement()
|
{
|
Id = "asset",
|
Caption = "ȨÏÞÅäÖÃ",
|
SvgImage = svgImgGroup32[4],
|
SvgImageSize = new Size(24, 24),
|
AllowGlyphSkinning = true,
|
Elements = new List<AccordionElement>() {
|
Get("Óû§¹ÜÀí",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "UserMgr",
|
}, svgImgItem32[14], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new UserMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
Get("½ÇÉ«¹ÜÀí",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "RoleMgr",
|
}, svgImgItem32[34], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new RoleMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
Get("²Ëµ¥¹ÜÀí",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "MenuMgr",
|
}, svgImgItem32[15], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new MenuMgrPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
Get("½ÇÉ«²Ëµ¥",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "ProjectMenuMgr",
|
}, svgImgItem32[17], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new RoleProjectMenuPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
Get("Óû§ÈÕÖ¾",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "UserLogMgr",
|
}, svgImgItem32[18], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page=new UserLoginLogPage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page,guid);
|
}
|
}),
|
Get("¸öÈËÖÐÐÄ",new PageGuid()
|
{
|
Modular = "BasicData",
|
MoudingType = eMoudingType.Tab,
|
Function = "PersonalCenter",
|
}, svgImgItem32[33], new Size(18, 18), (caption,guid,svg,size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var dlg=new PersonalCenterDlg();
|
dlg.ShowDialog();
|
}
|
}),
|
}
|
};
|
|
list.Add(place_mgr_ele);
|
list.Add(we_mgr_ele);
|
list.Add(asset_mgr_ele);
|
list.Add(system_config_ele);
|
list.Add(auth_config_ele);
|
}
|
break;
|
|
case "ModelManage":
|
{
|
var hydraulicScenario = Get("Ë®Á¦³¡¾°", new PageGuid()
|
{
|
Modular = "ModelManage",
|
MoudingType = eMoudingType.Tab,
|
Function = " ",
|
}, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
//var page = new HydroSceneMgrPage();
|
//page.PageGuid = guid;
|
//page.PageTitle.Caption = caption;
|
//page.PageTitle.HeaderSvgImage = svg;
|
//page.PageTitle.SvgImageSize = size;
|
//CreatePage(page, guid);
|
}
|
});
|
var modelTemplate = Get("Ä£ÐÍÄ£°æ", new PageGuid()
|
{
|
Modular = "ModelManage",
|
MoudingType = eMoudingType.Tab,
|
Function = " ",
|
}, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
}
|
});
|
var rapidModeling = Get("¿ìËÙ½¨Ä£", new PageGuid()
|
{
|
Modular = "ModelManage",
|
MoudingType = eMoudingType.Tab,
|
Function = " ",
|
}, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
}
|
});
|
var modelEdit = Get("Ä£Ðͱà¼", new PageGuid()
|
{
|
Modular = "ModelManage",
|
MoudingType = eMoudingType.Tab,
|
Function = " ",
|
}, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
}
|
});
|
list.Add(hydraulicScenario);
|
list.Add(modelTemplate);
|
list.Add(rapidModeling);
|
list.Add(modelEdit);
|
}
|
break;
|
|
case "WaterSupplyAnalysis":
|
{
|
var systemCurve = Get("ϵͳÇúÏß", new PageGuid()
|
{
|
Modular = "WaterSupplyAnalysis",
|
MoudingType = eMoudingType.Tab,
|
Function = " ",
|
}, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page = new SystemCurvePage();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page, guid);
|
}
|
});
|
var forecastWater = Get("Ë®Á¿Ô¤²â", new PageGuid()
|
{
|
Modular = "WaterSupplyAnalysis",
|
MoudingType = eMoudingType.Tab,
|
Function = " ",
|
}, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
}
|
});
|
var operationalEvaluation = Get("ÔËÐÐÆÀ¹À", new PageGuid()
|
{
|
Modular = "WaterSupplyAnalysis",
|
MoudingType = eMoudingType.Tab,
|
Function = " ",
|
}, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
}
|
});
|
list.Add(systemCurve);
|
list.Add(forecastWater);
|
list.Add(operationalEvaluation);
|
}
|
break;
|
|
case "DataAnalysis":
|
{
|
var analysis1 = Get("Á÷Á¿Ñ¹Á¦±È¶Ô·ÖÎö", new PageGuid()
|
{
|
Modular = "DataAnalysis",
|
MoudingType = eMoudingType.Tab,
|
Function = "FlowPressAnalysis",
|
}, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page = new FlowPressAnalysis();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page, guid);
|
}
|
});
|
|
var analysis2 = Get("Ä©¶ËѹÁ¦·ÖÎö", new PageGuid()
|
{
|
Modular = "DataAnalysis",
|
MoudingType = eMoudingType.Tab,
|
Function = "EndPressAnalysis",
|
}, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) =>
|
{
|
if (!IsExistPage(guid, true))
|
{
|
var page = new EndPressAnalysis();
|
page.PageGuid = guid;
|
page.PageTitle.Caption = caption;
|
page.PageTitle.HeaderSvgImage = svg;
|
page.PageTitle.SvgImageSize = size;
|
CreatePage(page, guid);
|
}
|
});
|
|
list.Add(analysis1);
|
list.Add(analysis2);
|
}
|
break;
|
|
default:
|
break;
|
}
|
|
return list;
|
}
|
|
private AccordionElement Get(string caption, PageGuid guid, SvgImage svg_img, Size size, Action<string, PageGuid, SvgImage, Size> action, bool glyph_skinning = true)
|
{
|
var ele = new AccordionElement();
|
if (guid == null)
|
{
|
ele.Id = Guid.NewGuid().ToString();
|
}
|
else
|
{
|
ele.Id = guid.ToString();
|
ele.Click = delegate { action(caption, guid, svg_img, size); };
|
}
|
ele.PageGuid = guid;
|
ele.Caption = caption;
|
ele.SvgImage = svg_img;
|
ele.SvgImageSize = size;
|
ele.AllowGlyphSkinning = glyph_skinning;
|
return ele;
|
}
|
|
#endregion Modular
|
}
|
}
|