| | |
| | | this.Model = rhs; |
| | | } |
| | | |
| | | /* public AssetsPumpMainViewModel(Vmo.AssetsPumpMainVmo rhs) : base() |
| | | { |
| | | this.SeriesID = rhs.SeriesID; |
| | | this.RatedPower = rhs.RatedPower; |
| | | this.RatedEfficiency = rhs.RatedEfficiency; |
| | | this.Erosion = rhs.Erosion; |
| | | this.D2 = rhs.D2; |
| | | this.Name = rhs.Name; |
| | | this.TagName = rhs.TagName; |
| | | this.SortCode = rhs.SortCode; |
| | | this.RatedSpeed = rhs.RatedSpeed; |
| | | this.RatedHead = rhs.RatedHead; |
| | | this.RatedFlow = rhs.RatedFlow; |
| | | this.Description = rhs.Description; |
| | | }*/ |
| | | |
| | | public void Reset(Vmo.AssetsPumpMainVmo rhs) |
| | | { |
| | | this.ID = rhs.ID; |
| | |
| | | this.RatedHead = rhs.RatedHead; |
| | | this.RatedFlow = rhs.RatedFlow; |
| | | this.Description = rhs.Description; |
| | | this.Model = rhs; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | //ç¼è¾åå§çæ§è½æ²çº¿ |
| | | using Yw.Vmo; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | { |
| | | public partial class ImportPumpPerform2dByExcelCtrl : DevExpress.XtraEditors.XtraUserControl |
| | |
| | | /// è·åæ°æ® |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public HStation.Vmo.PhartDiagramRelationExtensionsVmo Get() |
| | | public PhartDiagramExGraphListVmo Get() |
| | | { |
| | | return this.pumpChartExcelImportCtrl1.Get(); |
| | | } |
| | |
| | | layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); |
| | | layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem(); |
| | | emptySpaceItem3 = new DevExpress.XtraLayout.EmptySpaceItem(); |
| | | layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | textEdit2 = new DevExpress.XtraEditors.TextEdit(); |
| | | layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | ((ISupportInitialize)bindingSource1).BeginInit(); |
| | | ((ISupportInitialize)layoutControl2).BeginInit(); |
| | | layoutControl2.SuspendLayout(); |
| | |
| | | ((ISupportInitialize)layoutControlGroup1).BeginInit(); |
| | | ((ISupportInitialize)layoutControlItem1).BeginInit(); |
| | | ((ISupportInitialize)layoutControlItem2).BeginInit(); |
| | | ((ISupportInitialize)emptySpaceItem2).BeginInit(); |
| | | ((ISupportInitialize)emptySpaceItem3).BeginInit(); |
| | | ((ISupportInitialize)layoutControlItem3).BeginInit(); |
| | | ((ISupportInitialize)textEdit2.Properties).BeginInit(); |
| | | ((ISupportInitialize)layoutControlItem4).BeginInit(); |
| | | SuspendLayout(); |
| | | // |
| | | // layoutControl2 |
| | |
| | | layoutControl2.Controls.Add(pumpChartExcelImportCtrl1); |
| | | layoutControl2.Controls.Add(btnExcelFilePath); |
| | | layoutControl2.Controls.Add(textEdit1); |
| | | layoutControl2.Controls.Add(textEdit2); |
| | | layoutControl2.Dock = DockStyle.Fill; |
| | | layoutControl2.Location = new Point(0, 0); |
| | | layoutControl2.Name = "layoutControl2"; |
| | |
| | | // |
| | | // pumpChartExcelImportCtrl1 |
| | | // |
| | | pumpChartExcelImportCtrl1.Location = new Point(2, 52); |
| | | pumpChartExcelImportCtrl1.Location = new Point(2, 28); |
| | | pumpChartExcelImportCtrl1.Margin = new Padding(2, 2, 2, 2); |
| | | pumpChartExcelImportCtrl1.Name = "pumpChartExcelImportCtrl1"; |
| | | pumpChartExcelImportCtrl1.Size = new Size(996, 606); |
| | | pumpChartExcelImportCtrl1.TabIndex = 3; |
| | | pumpChartExcelImportCtrl1.Size = new Size(996, 630); |
| | | pumpChartExcelImportCtrl1.TabIndex = 4; |
| | | // |
| | | // btnExcelFilePath |
| | | // |
| | |
| | | editorButtonImageOptions2.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions2.SvgImage"); |
| | | editorButtonImageOptions2.SvgImageSize = new Size(14, 14); |
| | | btnExcelFilePath.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "导å
¥æä»¶", "Import", superToolTip1, DevExpress.Utils.ToolTipAnchor.Default), new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "模æ¿ä¸è½½", "Download", superToolTip2, DevExpress.Utils.ToolTipAnchor.Default) }); |
| | | btnExcelFilePath.Size = new Size(323, 22); |
| | | btnExcelFilePath.Size = new Size(277, 22); |
| | | btnExcelFilePath.StyleController = layoutControl2; |
| | | btnExcelFilePath.TabIndex = 0; |
| | | btnExcelFilePath.ButtonClick += btnExcelFilePath_ButtonClick; |
| | | // |
| | | // textEdit1 |
| | | // |
| | | textEdit1.Location = new Point(66, 28); |
| | | textEdit1.Location = new Point(411, 2); |
| | | textEdit1.Name = "textEdit1"; |
| | | textEdit1.Size = new Size(323, 20); |
| | | textEdit1.Size = new Size(112, 20); |
| | | textEdit1.StyleController = layoutControl2; |
| | | textEdit1.TabIndex = 2; |
| | | // |
| | |
| | | // |
| | | layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; |
| | | layoutControlGroup1.GroupBordersVisible = false; |
| | | layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, emptySpaceItem2, emptySpaceItem3, layoutControlItem3 }); |
| | | layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem3, layoutControlItem2, layoutControlItem4, emptySpaceItem3 }); |
| | | layoutControlGroup1.Name = "Root"; |
| | | layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); |
| | | layoutControlGroup1.Size = new Size(1000, 660); |
| | |
| | | layoutControlItem1.Control = btnExcelFilePath; |
| | | layoutControlItem1.Location = new Point(0, 0); |
| | | layoutControlItem1.Name = "layoutControlItem1"; |
| | | layoutControlItem1.Size = new Size(391, 26); |
| | | layoutControlItem1.Size = new Size(345, 26); |
| | | layoutControlItem1.Text = "æä»¶è·¯å¾:"; |
| | | layoutControlItem1.TextSize = new Size(52, 14); |
| | | // |
| | | // layoutControlItem2 |
| | | // |
| | | layoutControlItem2.Control = textEdit1; |
| | | layoutControlItem2.Location = new Point(0, 26); |
| | | layoutControlItem2.Location = new Point(345, 0); |
| | | layoutControlItem2.Name = "layoutControlItem2"; |
| | | layoutControlItem2.Size = new Size(391, 24); |
| | | layoutControlItem2.Size = new Size(180, 26); |
| | | layoutControlItem2.Text = "åç§°:"; |
| | | layoutControlItem2.TextSize = new Size(52, 14); |
| | | // |
| | | // emptySpaceItem2 |
| | | // |
| | | emptySpaceItem2.AllowHotTrack = false; |
| | | emptySpaceItem2.Location = new Point(391, 0); |
| | | emptySpaceItem2.Name = "emptySpaceItem2"; |
| | | emptySpaceItem2.Size = new Size(609, 26); |
| | | emptySpaceItem2.TextSize = new Size(0, 0); |
| | | // |
| | | // emptySpaceItem3 |
| | | // |
| | | emptySpaceItem3.AllowHotTrack = false; |
| | | emptySpaceItem3.Location = new Point(391, 26); |
| | | emptySpaceItem3.Location = new Point(706, 0); |
| | | emptySpaceItem3.Name = "emptySpaceItem3"; |
| | | emptySpaceItem3.Size = new Size(609, 24); |
| | | emptySpaceItem3.Size = new Size(294, 26); |
| | | emptySpaceItem3.TextSize = new Size(0, 0); |
| | | // |
| | | // layoutControlItem3 |
| | | // |
| | | layoutControlItem3.Control = pumpChartExcelImportCtrl1; |
| | | layoutControlItem3.Location = new Point(0, 50); |
| | | layoutControlItem3.Location = new Point(0, 26); |
| | | layoutControlItem3.Name = "layoutControlItem3"; |
| | | layoutControlItem3.Size = new Size(1000, 610); |
| | | layoutControlItem3.Size = new Size(1000, 634); |
| | | layoutControlItem3.TextSize = new Size(0, 0); |
| | | layoutControlItem3.TextVisible = false; |
| | | // |
| | | // textEdit2 |
| | | // |
| | | textEdit2.Location = new Point(591, 2); |
| | | textEdit2.Name = "textEdit2"; |
| | | textEdit2.Size = new Size(113, 20); |
| | | textEdit2.StyleController = layoutControl2; |
| | | textEdit2.TabIndex = 3; |
| | | // |
| | | // layoutControlItem4 |
| | | // |
| | | layoutControlItem4.Control = textEdit2; |
| | | layoutControlItem4.Location = new Point(525, 0); |
| | | layoutControlItem4.Name = "layoutControlItem4"; |
| | | layoutControlItem4.Size = new Size(181, 26); |
| | | layoutControlItem4.Text = "éè¦åº¦:"; |
| | | layoutControlItem4.TextSize = new Size(52, 14); |
| | | // |
| | | // ImportPumpPerform2dByExcelCtrl |
| | | // |
| | |
| | | ((ISupportInitialize)layoutControlGroup1).EndInit(); |
| | | ((ISupportInitialize)layoutControlItem1).EndInit(); |
| | | ((ISupportInitialize)layoutControlItem2).EndInit(); |
| | | ((ISupportInitialize)emptySpaceItem2).EndInit(); |
| | | ((ISupportInitialize)emptySpaceItem3).EndInit(); |
| | | ((ISupportInitialize)layoutControlItem3).EndInit(); |
| | | ((ISupportInitialize)textEdit2.Properties).EndInit(); |
| | | ((ISupportInitialize)layoutControlItem4).EndInit(); |
| | | ResumeLayout(false); |
| | | } |
| | | |
| | |
| | | private DevExpress.XtraEditors.TextEdit textEdit1; |
| | | private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; |
| | | private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; |
| | | private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem3; |
| | | private PumpChartExcelImportCtrl pumpChartExcelImportCtrl1; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; |
| | | private DevExpress.XtraEditors.TextEdit textEdit2; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; |
| | | } |
| | | } |
| | |
| | | public ImportPumpPerform2dByExcelDlg() |
| | | { |
| | | InitializeComponent(); |
| | | this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åè°äºä»¶ |
| | | /// </summary> |
| | | public event Func<PhartDiagramRelationExtensionsVmo, Task<bool>> ReloadDataEvent; |
| | | |
| | | public void SetBindingData() |
| | | { |
| | | } |
| | | public event Func<Vmo.PhartDiagramRelationExtensionsVmo, Task<bool>> ReloadDataEvent; |
| | | |
| | | //ç¡®å® |
| | | private async void btnOk_Click(object sender, EventArgs e) |
| | | { |
| | | var vmo = this.importCurveByExcelCtrl1.Get(); |
| | | var result = await this.ReloadDataEvent.Invoke(vmo); |
| | | var ExtensionsVmo = new PhartDiagramRelationExtensionsVmo(); |
| | | ExtensionsVmo.Diagram = vmo; |
| | | var result = await this.ReloadDataEvent.Invoke(ExtensionsVmo); |
| | | if (!result) |
| | | { |
| | | XtraMessageBox.Show("导å
¥å¤±è´¥ï¼"); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace HStation.WinFrmUI |
| | | { |
| | | partial class ImportPumpPerform2dByImageDlg |
| | | { |
| | | /// <summary> |
| | | /// Required designer variable. |
| | | /// </summary> |
| | | private System.ComponentModel.IContainer components = null; |
| | | |
| | | /// <summary> |
| | | /// Clean up any resources being used. |
| | | /// </summary> |
| | | /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> |
| | | protected override void Dispose(bool disposing) |
| | | { |
| | | if (disposing && (components != null)) |
| | | { |
| | | components.Dispose(); |
| | | } |
| | | base.Dispose(disposing); |
| | | } |
| | | |
| | | #region Windows Form Designer generated code |
| | | |
| | | /// <summary> |
| | | /// Required method for Designer support - do not modify |
| | | /// the contents of this method with the code editor. |
| | | /// </summary> |
| | | private void InitializeComponent() |
| | | { |
| | | DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); |
| | | ComponentResourceManager resources = new ComponentResourceManager(typeof(ImportPumpPerform2dByImageDlg)); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SuperToolTip superToolTip1 = new DevExpress.Utils.SuperToolTip(); |
| | | DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SuperToolTip superToolTip2 = new DevExpress.Utils.SuperToolTip(); |
| | | layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); |
| | | btnEditPicture = new DevExpress.XtraEditors.ButtonEdit(); |
| | | textEdit2 = new DevExpress.XtraEditors.TextEdit(); |
| | | generalOkAndCancelCtrl1 = new GeneralOkAndCancelCtrl(); |
| | | panelControl1 = new DevExpress.XtraEditors.PanelControl(); |
| | | textEditName = new DevExpress.XtraEditors.TextEdit(); |
| | | Root = new DevExpress.XtraLayout.LayoutControlGroup(); |
| | | layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); |
| | | layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | pumpChartImageImportCtrl1 = new PumpChartImageImportCtrl(); |
| | | ((ISupportInitialize)layoutControl1).BeginInit(); |
| | | layoutControl1.SuspendLayout(); |
| | | ((ISupportInitialize)btnEditPicture.Properties).BeginInit(); |
| | | ((ISupportInitialize)textEdit2.Properties).BeginInit(); |
| | | ((ISupportInitialize)panelControl1).BeginInit(); |
| | | panelControl1.SuspendLayout(); |
| | | ((ISupportInitialize)textEditName.Properties).BeginInit(); |
| | | ((ISupportInitialize)Root).BeginInit(); |
| | | ((ISupportInitialize)layoutControlItem1).BeginInit(); |
| | | ((ISupportInitialize)layoutControlItem2).BeginInit(); |
| | | ((ISupportInitialize)layoutControlItem5).BeginInit(); |
| | | ((ISupportInitialize)emptySpaceItem1).BeginInit(); |
| | | ((ISupportInitialize)layoutControlItem3).BeginInit(); |
| | | ((ISupportInitialize)layoutControlItem4).BeginInit(); |
| | | SuspendLayout(); |
| | | // |
| | | // layoutControl1 |
| | | // |
| | | layoutControl1.Controls.Add(btnEditPicture); |
| | | layoutControl1.Controls.Add(textEdit2); |
| | | layoutControl1.Controls.Add(generalOkAndCancelCtrl1); |
| | | layoutControl1.Controls.Add(panelControl1); |
| | | layoutControl1.Controls.Add(textEditName); |
| | | layoutControl1.Dock = DockStyle.Fill; |
| | | layoutControl1.Location = new Point(0, 0); |
| | | layoutControl1.Name = "layoutControl1"; |
| | | layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(1228, 230, 650, 400); |
| | | layoutControl1.Root = Root; |
| | | layoutControl1.Size = new Size(1062, 545); |
| | | layoutControl1.TabIndex = 0; |
| | | layoutControl1.Text = "layoutControl1"; |
| | | // |
| | | // btnEditPicture |
| | | // |
| | | btnEditPicture.Location = new Point(76, 12); |
| | | btnEditPicture.Name = "btnEditPicture"; |
| | | editorButtonImageOptions1.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions1.SvgImage"); |
| | | editorButtonImageOptions1.SvgImageSize = new Size(14, 14); |
| | | editorButtonImageOptions2.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions2.SvgImage"); |
| | | editorButtonImageOptions2.SvgImageSize = new Size(14, 14); |
| | | btnEditPicture.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "导å
¥æä»¶", "Import", superToolTip1, DevExpress.Utils.ToolTipAnchor.Default), new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "模æ¿ä¸è½½", "Download", superToolTip2, DevExpress.Utils.ToolTipAnchor.Default) }); |
| | | btnEditPicture.Size = new Size(315, 22); |
| | | btnEditPicture.StyleController = layoutControl1; |
| | | btnEditPicture.TabIndex = 0; |
| | | // |
| | | // textEdit2 |
| | | // |
| | | textEdit2.Location = new Point(630, 13); |
| | | textEdit2.Name = "textEdit2"; |
| | | textEdit2.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False; |
| | | textEdit2.Properties.EditFormat.FormatString = "N0"; |
| | | textEdit2.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Numeric; |
| | | textEdit2.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); |
| | | textEdit2.Size = new Size(82, 20); |
| | | textEdit2.StyleController = layoutControl1; |
| | | textEdit2.TabIndex = 3; |
| | | // |
| | | // generalOkAndCancelCtrl1 |
| | | // |
| | | generalOkAndCancelCtrl1.ButtonCancelMaxSize = new Size(100, 26); |
| | | generalOkAndCancelCtrl1.ButtonCancelMinSize = new Size(100, 26); |
| | | generalOkAndCancelCtrl1.ButtonOkMaxSize = new Size(100, 26); |
| | | generalOkAndCancelCtrl1.ButtonOkMinSize = new Size(100, 26); |
| | | generalOkAndCancelCtrl1.Location = new Point(12, 507); |
| | | generalOkAndCancelCtrl1.Name = "generalOkAndCancelCtrl1"; |
| | | generalOkAndCancelCtrl1.Size = new Size(1038, 26); |
| | | generalOkAndCancelCtrl1.TabIndex = 4; |
| | | // |
| | | // panelControl1 |
| | | // |
| | | panelControl1.Controls.Add(pumpChartImageImportCtrl1); |
| | | panelControl1.Location = new Point(12, 38); |
| | | panelControl1.Name = "panelControl1"; |
| | | panelControl1.Size = new Size(1038, 465); |
| | | panelControl1.TabIndex = 1; |
| | | // |
| | | // textEditName |
| | | // |
| | | textEditName.Location = new Point(459, 12); |
| | | textEditName.Name = "textEditName"; |
| | | textEditName.Size = new Size(103, 20); |
| | | textEditName.StyleController = layoutControl1; |
| | | textEditName.TabIndex = 2; |
| | | // |
| | | // Root |
| | | // |
| | | Root.AppearanceItemCaption.Options.UseTextOptions = true; |
| | | Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; |
| | | Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; |
| | | Root.GroupBordersVisible = false; |
| | | Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem5, emptySpaceItem1, layoutControlItem3, layoutControlItem4 }); |
| | | Root.Name = "Root"; |
| | | Root.Size = new Size(1062, 545); |
| | | Root.TextVisible = false; |
| | | // |
| | | // layoutControlItem1 |
| | | // |
| | | layoutControlItem1.Control = panelControl1; |
| | | layoutControlItem1.Location = new Point(0, 26); |
| | | layoutControlItem1.Name = "layoutControlItem1"; |
| | | layoutControlItem1.Size = new Size(1042, 469); |
| | | layoutControlItem1.TextSize = new Size(0, 0); |
| | | layoutControlItem1.TextVisible = false; |
| | | // |
| | | // layoutControlItem2 |
| | | // |
| | | layoutControlItem2.Control = generalOkAndCancelCtrl1; |
| | | layoutControlItem2.Location = new Point(0, 495); |
| | | layoutControlItem2.Name = "layoutControlItem2"; |
| | | layoutControlItem2.Size = new Size(1042, 30); |
| | | layoutControlItem2.TextSize = new Size(0, 0); |
| | | layoutControlItem2.TextVisible = false; |
| | | // |
| | | // layoutControlItem5 |
| | | // |
| | | layoutControlItem5.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center; |
| | | layoutControlItem5.Control = textEdit2; |
| | | layoutControlItem5.Location = new Point(554, 0); |
| | | layoutControlItem5.MaxSize = new Size(150, 24); |
| | | layoutControlItem5.MinSize = new Size(150, 24); |
| | | layoutControlItem5.Name = "layoutControlItem5"; |
| | | layoutControlItem5.Size = new Size(150, 26); |
| | | layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; |
| | | layoutControlItem5.Text = "éè¦åº¦:"; |
| | | layoutControlItem5.TextSize = new Size(52, 14); |
| | | // |
| | | // emptySpaceItem1 |
| | | // |
| | | emptySpaceItem1.AllowHotTrack = false; |
| | | emptySpaceItem1.Location = new Point(704, 0); |
| | | emptySpaceItem1.Name = "emptySpaceItem1"; |
| | | emptySpaceItem1.Size = new Size(338, 26); |
| | | emptySpaceItem1.TextSize = new Size(0, 0); |
| | | // |
| | | // layoutControlItem3 |
| | | // |
| | | layoutControlItem3.Control = btnEditPicture; |
| | | layoutControlItem3.Location = new Point(0, 0); |
| | | layoutControlItem3.Name = "layoutControlItem3"; |
| | | layoutControlItem3.Size = new Size(383, 26); |
| | | layoutControlItem3.Text = "å¾çè·¯å¾:"; |
| | | layoutControlItem3.TextSize = new Size(52, 14); |
| | | // |
| | | // layoutControlItem4 |
| | | // |
| | | layoutControlItem4.Control = textEditName; |
| | | layoutControlItem4.Location = new Point(383, 0); |
| | | layoutControlItem4.Name = "layoutControlItem4"; |
| | | layoutControlItem4.Size = new Size(171, 26); |
| | | layoutControlItem4.Text = "åç§°:"; |
| | | layoutControlItem4.TextSize = new Size(52, 14); |
| | | // |
| | | // pumpChartImageImportCtrl1 |
| | | // |
| | | pumpChartImageImportCtrl1.Dock = DockStyle.Fill; |
| | | pumpChartImageImportCtrl1.Location = new Point(2, 2); |
| | | pumpChartImageImportCtrl1.Margin = new Padding(2, 2, 2, 2); |
| | | pumpChartImageImportCtrl1.Name = "pumpChartImageImportCtrl1"; |
| | | pumpChartImageImportCtrl1.Size = new Size(1034, 461); |
| | | pumpChartImageImportCtrl1.TabIndex = 0; |
| | | // |
| | | // ImportPumpPerform2dByImageDlg |
| | | // |
| | | AutoScaleDimensions = new SizeF(7F, 14F); |
| | | AutoScaleMode = AutoScaleMode.Font; |
| | | ClientSize = new Size(1062, 545); |
| | | Controls.Add(layoutControl1); |
| | | Name = "ImportPumpPerform2dByImageDlg"; |
| | | StartPosition = FormStartPosition.CenterParent; |
| | | Text = "éè¿å¾ç导å
¥"; |
| | | ((ISupportInitialize)layoutControl1).EndInit(); |
| | | layoutControl1.ResumeLayout(false); |
| | | ((ISupportInitialize)btnEditPicture.Properties).EndInit(); |
| | | ((ISupportInitialize)textEdit2.Properties).EndInit(); |
| | | ((ISupportInitialize)panelControl1).EndInit(); |
| | | panelControl1.ResumeLayout(false); |
| | | ((ISupportInitialize)textEditName.Properties).EndInit(); |
| | | ((ISupportInitialize)Root).EndInit(); |
| | | ((ISupportInitialize)layoutControlItem1).EndInit(); |
| | | ((ISupportInitialize)layoutControlItem2).EndInit(); |
| | | ((ISupportInitialize)layoutControlItem5).EndInit(); |
| | | ((ISupportInitialize)emptySpaceItem1).EndInit(); |
| | | ((ISupportInitialize)layoutControlItem3).EndInit(); |
| | | ((ISupportInitialize)layoutControlItem4).EndInit(); |
| | | ResumeLayout(false); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | private DevExpress.XtraLayout.LayoutControl layoutControl1; |
| | | private DevExpress.XtraLayout.LayoutControlGroup Root; |
| | | private GeneralOkAndCancelCtrl generalOkAndCancelCtrl1; |
| | | private DevExpress.XtraEditors.PanelControl panelControl1; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; |
| | | private DevExpress.XtraEditors.TextEdit textEdit2; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; |
| | | private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; |
| | | private DevExpress.XtraEditors.ButtonEdit btnEditPicture; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; |
| | | private DevExpress.XtraEditors.TextEdit textEditName; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; |
| | | private PumpChartImageImportCtrl pumpChartImageImportCtrl1; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using DevExpress.Mvvm.Native; |
| | | using DevExpress.XtraEditors; |
| | | using HStation.Vmo; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | { |
| | | public partial class ImportPumpPerform2dByImageDlg : DevExpress.XtraEditors.XtraForm |
| | | { |
| | | public ImportPumpPerform2dByImageDlg() |
| | | { |
| | | InitializeComponent(); |
| | | this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; |
| | | this.layoutControl1.SetupLayoutControl(); |
| | | this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public event Func<PhartDiagramRelationExtensionsVmo, Task<bool>> ReloadDataEvent; |
| | | |
| | | //è¿:FilePath, PhartRelation.eGraphType, |
| | | // åº:PhartDiagramExGraphListVmo |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public void SetBindingData() |
| | | { |
| | | } |
| | | |
| | | //ç¡®å® |
| | | private async void GeneralOkAndCancelCtrl1_OkEvent() |
| | | { |
| | | var diagram = this.pumpChartImageImportCtrl1.Get(); |
| | | var vmo = new PhartDiagramRelationExtensionsVmo(); |
| | | vmo.Diagram = diagram; |
| | | var result = await this.ReloadDataEvent?.Invoke(vmo); |
| | | if (!result) |
| | | { |
| | | XtraMessageBox.Show("导å
¥å¤±è´¥ï¼"); |
| | | return; |
| | | } |
| | | XtraMessageBox.Show("导å
¥æåï¼"); |
| | | this.DialogResult = DialogResult.OK; |
| | | this.Close(); |
| | | } |
| | | |
| | | //导å
¥å¾ç |
| | | private void btnEditPicture_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | { |
| | | var dlg = new OpenFileDialog(); |
| | | dlg.Title = "éæ©å¾çæä»¶"; |
| | | dlg.Filter = "å¾ç|*.png;*.jpg"; |
| | | if (dlg.ShowDialog() == DialogResult.OK) |
| | | { |
| | | var fileName = dlg.FileName; |
| | | this.btnEditPicture.EditValue = fileName; |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <root> |
| | | <!-- |
| | | Microsoft ResX Schema |
| | | |
| | | Version 2.0 |
| | | |
| | | The primary goals of this format is to allow a simple XML format |
| | | that is mostly human readable. The generation and parsing of the |
| | | various data types are done through the TypeConverter classes |
| | | associated with the data types. |
| | | |
| | | Example: |
| | | |
| | | ... ado.net/XML headers & schema ... |
| | | <resheader name="resmimetype">text/microsoft-resx</resheader> |
| | | <resheader name="version">2.0</resheader> |
| | | <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
| | | <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
| | | <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
| | | <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
| | | <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
| | | <value>[base64 mime encoded serialized .NET Framework object]</value> |
| | | </data> |
| | | <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
| | | <comment>This is a comment</comment> |
| | | </data> |
| | | |
| | | There are any number of "resheader" rows that contain simple |
| | | name/value pairs. |
| | | |
| | | Each data row contains a name, and value. The row also contains a |
| | | type or mimetype. Type corresponds to a .NET class that support |
| | | text/value conversion through the TypeConverter architecture. |
| | | Classes that don't support this are serialized and stored with the |
| | | mimetype set. |
| | | |
| | | The mimetype is used for serialized objects, and tells the |
| | | ResXResourceReader how to depersist the object. This is currently not |
| | | extensible. For a given mimetype the value must be set accordingly: |
| | | |
| | | Note - application/x-microsoft.net.object.binary.base64 is the format |
| | | that the ResXResourceWriter will generate, however the reader can |
| | | read any of the formats listed below. |
| | | |
| | | mimetype: application/x-microsoft.net.object.binary.base64 |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | mimetype: application/x-microsoft.net.object.soap.base64 |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | mimetype: application/x-microsoft.net.object.bytearray.base64 |
| | | value : The object must be serialized into a byte array |
| | | : using a System.ComponentModel.TypeConverter |
| | | : and then encoded with base64 encoding. |
| | | --> |
| | | <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
| | | <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
| | | <xsd:element name="root" msdata:IsDataSet="true"> |
| | | <xsd:complexType> |
| | | <xsd:choice maxOccurs="unbounded"> |
| | | <xsd:element name="metadata"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" use="required" type="xsd:string" /> |
| | | <xsd:attribute name="type" type="xsd:string" /> |
| | | <xsd:attribute name="mimetype" type="xsd:string" /> |
| | | <xsd:attribute ref="xml:space" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="assembly"> |
| | | <xsd:complexType> |
| | | <xsd:attribute name="alias" type="xsd:string" /> |
| | | <xsd:attribute name="name" type="xsd:string" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="data"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
| | | <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
| | | <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
| | | <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
| | | <xsd:attribute ref="xml:space" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="resheader"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" use="required" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | </xsd:choice> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | </xsd:schema> |
| | | <resheader name="resmimetype"> |
| | | <value>text/microsoft-resx</value> |
| | | </resheader> |
| | | <resheader name="version"> |
| | | <value>2.0</value> |
| | | </resheader> |
| | | <resheader name="reader"> |
| | | <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | <resheader name="writer"> |
| | | <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> |
| | | <data name="editorButtonImageOptions1.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 |
| | | LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl |
| | | dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAAMDAAAC77u/ |
| | | PD94bWwgdmVyc2lvbj0nMS4wJyBlb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
| | | </value> |
| | | </data> |
| | | <data name="editorButtonImageOptions2.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 |
| | | LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl |
| | | dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAHYNAAAC77u/ |
| | | PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi |
| | | IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv |
| | | MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh |
| | | Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg |
| | | MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5H |
| | | cmVlbntmaWxsOiMwMzlDMjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9Cgkuc3Qwe29wYWNpdHk6MC4z |
| | | O30KPC9zdHlsZT4NCiAgPHBhdGggZD0iTTgsNGgxOHY2aDJWM2MwLTAuNS0wLjUtMS0xLTFIN0M2LjUs |
| | | Miw2LDIuNSw2LDN2N2gyVjR6IiBjbGFzcz0iQmxhY2siIC8+DQogIDxwYXRoIGQ9Ik0yNiwyNkg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> |
| | | </data> |
| | | </root> |
| | |
| | | using DevExpress.XtraEditors; |
| | | using HStation.Vmo; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | |
| | | |
| | | public void SetBindingData(Vmo.AssetsPumpMainVmo vmo) |
| | | { |
| | | this.pumpChartPointImportCtrl1.SetBindingData(vmo.RatedFlow, vmo.RatedHead, vmo.RatedSpeed, vmo.RatedEfficiency); |
| | | this.pumpChartPointImportCtrl1.SetBindingData(vmo.RatedFlow, vmo.RatedHead, vmo.RatedSpeed, vmo.RatedEfficiency.Value); |
| | | } |
| | | |
| | | private void btnOk_Click(object sender, EventArgs e) |
| | | /// <summary> |
| | | /// åè°äºä»¶ |
| | | /// </summary> |
| | | public event Func<Vmo.PhartDiagramRelationExtensionsVmo, Task<bool>> ReloadDataEvent; |
| | | |
| | | //ç¡®å® |
| | | private async void btnOk_Click(object sender, EventArgs e) |
| | | { |
| | | var vmo = this.pumpChartPointImportCtrl1.Get(); |
| | | var ExtensionsVmo = new PhartDiagramRelationExtensionsVmo(); |
| | | ExtensionsVmo.Diagram = vmo; |
| | | var result = await this.ReloadDataEvent.Invoke(ExtensionsVmo); |
| | | if (!result) |
| | | { |
| | | XtraMessageBox.Show("导å
¥å¤±è´¥ï¼"); |
| | | return; |
| | | } |
| | | XtraMessageBox.Show("导å
¥æåï¼"); |
| | | this.DialogResult = DialogResult.OK; |
| | | this.Close(); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace HStation.WinFrmUI |
| | | { |
| | | partial class EditAssetsPumpPerform2dDlg |
| | | { |
| | | /// <summary> |
| | | /// Required designer variable. |
| | | /// </summary> |
| | | private System.ComponentModel.IContainer components = null; |
| | | |
| | | /// <summary> |
| | | /// Clean up any resources being used. |
| | | /// </summary> |
| | | /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> |
| | | protected override void Dispose(bool disposing) |
| | | { |
| | | if (disposing && (components != null)) |
| | | { |
| | | components.Dispose(); |
| | | } |
| | | base.Dispose(disposing); |
| | | } |
| | | |
| | | #region Windows Form Designer generated code |
| | | |
| | | /// <summary> |
| | | /// Required method for Designer support - do not modify |
| | | /// the contents of this method with the code editor. |
| | | /// </summary> |
| | | private void InitializeComponent() |
| | | { |
| | | layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); |
| | | generalOkAndCancelCtrl1 = new GeneralOkAndCancelCtrl(); |
| | | Root = new DevExpress.XtraLayout.LayoutControlGroup(); |
| | | layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | panelControl1 = new DevExpress.XtraEditors.PanelControl(); |
| | | pumpChartEditCtrl1 = new PumpChartEditCtrl(); |
| | | ((ISupportInitialize)layoutControl1).BeginInit(); |
| | | layoutControl1.SuspendLayout(); |
| | | ((ISupportInitialize)Root).BeginInit(); |
| | | ((ISupportInitialize)layoutControlItem2).BeginInit(); |
| | | ((ISupportInitialize)layoutControlItem1).BeginInit(); |
| | | ((ISupportInitialize)panelControl1).BeginInit(); |
| | | panelControl1.SuspendLayout(); |
| | | SuspendLayout(); |
| | | // |
| | | // layoutControl1 |
| | | // |
| | | layoutControl1.Controls.Add(generalOkAndCancelCtrl1); |
| | | layoutControl1.Controls.Add(panelControl1); |
| | | layoutControl1.Dock = DockStyle.Fill; |
| | | layoutControl1.Location = new Point(0, 0); |
| | | layoutControl1.Name = "layoutControl1"; |
| | | layoutControl1.Root = Root; |
| | | layoutControl1.Size = new Size(898, 552); |
| | | layoutControl1.TabIndex = 0; |
| | | layoutControl1.Text = "layoutControl1"; |
| | | // |
| | | // generalOkAndCancelCtrl1 |
| | | // |
| | | generalOkAndCancelCtrl1.ButtonCancelMaxSize = new Size(100, 26); |
| | | generalOkAndCancelCtrl1.ButtonCancelMinSize = new Size(100, 26); |
| | | generalOkAndCancelCtrl1.ButtonOkMaxSize = new Size(100, 26); |
| | | generalOkAndCancelCtrl1.ButtonOkMinSize = new Size(100, 26); |
| | | generalOkAndCancelCtrl1.Location = new Point(12, 514); |
| | | generalOkAndCancelCtrl1.Name = "generalOkAndCancelCtrl1"; |
| | | generalOkAndCancelCtrl1.Size = new Size(874, 26); |
| | | generalOkAndCancelCtrl1.TabIndex = 5; |
| | | // |
| | | // Root |
| | | // |
| | | Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; |
| | | Root.GroupBordersVisible = false; |
| | | Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2 }); |
| | | Root.Name = "Root"; |
| | | Root.Size = new Size(898, 552); |
| | | Root.TextVisible = false; |
| | | // |
| | | // layoutControlItem2 |
| | | // |
| | | layoutControlItem2.Control = generalOkAndCancelCtrl1; |
| | | layoutControlItem2.Location = new Point(0, 502); |
| | | layoutControlItem2.Name = "layoutControlItem2"; |
| | | layoutControlItem2.Size = new Size(878, 30); |
| | | layoutControlItem2.TextSize = new Size(0, 0); |
| | | layoutControlItem2.TextVisible = false; |
| | | // |
| | | // layoutControlItem1 |
| | | // |
| | | layoutControlItem1.Control = panelControl1; |
| | | layoutControlItem1.Location = new Point(0, 0); |
| | | layoutControlItem1.Name = "layoutControlItem1"; |
| | | layoutControlItem1.Size = new Size(878, 502); |
| | | layoutControlItem1.TextSize = new Size(0, 0); |
| | | layoutControlItem1.TextVisible = false; |
| | | // |
| | | // panelControl1 |
| | | // |
| | | panelControl1.Controls.Add(pumpChartEditCtrl1); |
| | | panelControl1.Location = new Point(12, 12); |
| | | panelControl1.Name = "panelControl1"; |
| | | panelControl1.Size = new Size(874, 498); |
| | | panelControl1.TabIndex = 4; |
| | | // |
| | | // pumpChartEditCtrl1 |
| | | // |
| | | pumpChartEditCtrl1.Dock = DockStyle.Fill; |
| | | pumpChartEditCtrl1.Location = new Point(2, 2); |
| | | pumpChartEditCtrl1.Margin = new Padding(2, 2, 2, 2); |
| | | pumpChartEditCtrl1.Name = "pumpChartEditCtrl1"; |
| | | pumpChartEditCtrl1.Size = new Size(870, 494); |
| | | pumpChartEditCtrl1.TabIndex = 0; |
| | | // |
| | | // EditAssetsPumpPerform2dDlg |
| | | // |
| | | AutoScaleDimensions = new SizeF(7F, 14F); |
| | | AutoScaleMode = AutoScaleMode.Font; |
| | | ClientSize = new Size(898, 552); |
| | | Controls.Add(layoutControl1); |
| | | Name = "EditAssetsPumpPerform2dDlg"; |
| | | StartPosition = FormStartPosition.CenterParent; |
| | | Text = "ç¼è¾æ²çº¿"; |
| | | ((ISupportInitialize)layoutControl1).EndInit(); |
| | | layoutControl1.ResumeLayout(false); |
| | | ((ISupportInitialize)Root).EndInit(); |
| | | ((ISupportInitialize)layoutControlItem2).EndInit(); |
| | | ((ISupportInitialize)layoutControlItem1).EndInit(); |
| | | ((ISupportInitialize)panelControl1).EndInit(); |
| | | panelControl1.ResumeLayout(false); |
| | | ResumeLayout(false); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | private DevExpress.XtraLayout.LayoutControl layoutControl1; |
| | | private GeneralOkAndCancelCtrl generalOkAndCancelCtrl1; |
| | | private DevExpress.XtraLayout.LayoutControlGroup Root; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; |
| | | private DevExpress.XtraEditors.PanelControl panelControl1; |
| | | private PumpChartEditCtrl pumpChartEditCtrl1; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using DevExpress.XtraEditors; |
| | | using HStation.Vmo; |
| | | using Yw.Vmo; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | { |
| | | public partial class EditAssetsPumpPerform2dDlg : DevExpress.XtraEditors.XtraForm |
| | | { |
| | | public EditAssetsPumpPerform2dDlg() |
| | | { |
| | | InitializeComponent(); |
| | | this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; |
| | | this.layoutControl1.SetupLayoutControl(); |
| | | this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public event Func<PhartDiagramRelationExtensionsVmo, Task<bool>> ReloadDataEvent; |
| | | |
| | | private PhartDiagramRelationExtensionsVmo _vmo = null; |
| | | |
| | | /// <summary> |
| | | /// ç»å®æ°æ® |
| | | /// </summary> |
| | | public void SetBindingData(PhartDiagramRelationExtensionsVmo vmo) |
| | | { |
| | | if (vmo == null) |
| | | { |
| | | return; |
| | | } |
| | | _vmo = vmo; |
| | | this.pumpChartEditCtrl1.SetBindingData(vmo.Diagram, 0); |
| | | } |
| | | |
| | | //ç¡®å® |
| | | private async void GeneralOkAndCancelCtrl1_OkEvent() |
| | | { |
| | | if (_vmo == null) |
| | | { |
| | | return; |
| | | } |
| | | var diagram = this.pumpChartEditCtrl1.Get(); |
| | | _vmo.Diagram = diagram; |
| | | var result = await this.ReloadDataEvent?.Invoke(_vmo); |
| | | if (!result) |
| | | { |
| | | XtraMessageBox.Show("导å
¥å¤±è´¥ï¼"); |
| | | return; |
| | | } |
| | | XtraMessageBox.Show("导å
¥æåï¼"); |
| | | this.DialogResult = DialogResult.OK; |
| | | this.Close(); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <root> |
| | | <!-- |
| | | Microsoft ResX Schema |
| | | |
| | | Version 2.0 |
| | | |
| | | The primary goals of this format is to allow a simple XML format |
| | | that is mostly human readable. The generation and parsing of the |
| | | various data types are done through the TypeConverter classes |
| | | associated with the data types. |
| | | |
| | | Example: |
| | | |
| | | ... ado.net/XML headers & schema ... |
| | | <resheader name="resmimetype">text/microsoft-resx</resheader> |
| | | <resheader name="version">2.0</resheader> |
| | | <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
| | | <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
| | | <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
| | | <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
| | | <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
| | | <value>[base64 mime encoded serialized .NET Framework object]</value> |
| | | </data> |
| | | <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
| | | <comment>This is a comment</comment> |
| | | </data> |
| | | |
| | | There are any number of "resheader" rows that contain simple |
| | | name/value pairs. |
| | | |
| | | Each data row contains a name, and value. The row also contains a |
| | | type or mimetype. Type corresponds to a .NET class that support |
| | | text/value conversion through the TypeConverter architecture. |
| | | Classes that don't support this are serialized and stored with the |
| | | mimetype set. |
| | | |
| | | The mimetype is used for serialized objects, and tells the |
| | | ResXResourceReader how to depersist the object. This is currently not |
| | | extensible. For a given mimetype the value must be set accordingly: |
| | | |
| | | Note - application/x-microsoft.net.object.binary.base64 is the format |
| | | that the ResXResourceWriter will generate, however the reader can |
| | | read any of the formats listed below. |
| | | |
| | | mimetype: application/x-microsoft.net.object.binary.base64 |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | mimetype: application/x-microsoft.net.object.soap.base64 |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | mimetype: application/x-microsoft.net.object.bytearray.base64 |
| | | value : The object must be serialized into a byte array |
| | | : using a System.ComponentModel.TypeConverter |
| | | : and then encoded with base64 encoding. |
| | | --> |
| | | <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
| | | <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
| | | <xsd:element name="root" msdata:IsDataSet="true"> |
| | | <xsd:complexType> |
| | | <xsd:choice maxOccurs="unbounded"> |
| | | <xsd:element name="metadata"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" use="required" type="xsd:string" /> |
| | | <xsd:attribute name="type" type="xsd:string" /> |
| | | <xsd:attribute name="mimetype" type="xsd:string" /> |
| | | <xsd:attribute ref="xml:space" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="assembly"> |
| | | <xsd:complexType> |
| | | <xsd:attribute name="alias" type="xsd:string" /> |
| | | <xsd:attribute name="name" type="xsd:string" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="data"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
| | | <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
| | | <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
| | | <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
| | | <xsd:attribute ref="xml:space" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="resheader"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" use="required" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | </xsd:choice> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | </xsd:schema> |
| | | <resheader name="resmimetype"> |
| | | <value>text/microsoft-resx</value> |
| | | </resheader> |
| | | <resheader name="version"> |
| | | <value>2.0</value> |
| | | </resheader> |
| | | <resheader name="reader"> |
| | | <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | <resheader name="writer"> |
| | | <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | </root> |
| | |
| | | /// </summary> |
| | | private void InitializeComponent() |
| | | { |
| | | components = new Container(); |
| | | ComponentResourceManager resources = new ComponentResourceManager(typeof(PumpChartMainPage)); |
| | | ribbonControl1 = new DevExpress.XtraBars.Ribbon.RibbonControl(); |
| | | BtnAdd = new DevExpress.XtraBars.BarButtonItem(); |
| | |
| | | barBtnUpdateimportance = new DevExpress.XtraBars.BarButtonItem(); |
| | | barBtnOtherName = new DevExpress.XtraBars.BarButtonItem(); |
| | | barBtnEditChart = new DevExpress.XtraBars.BarButtonItem(); |
| | | barBtnImportByPicture = new DevExpress.XtraBars.BarButtonItem(); |
| | | ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage(); |
| | | ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); |
| | | ribbonPageGroup2 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); |
| | | dockManager1 = new DevExpress.XtraBars.Docking.DockManager(components); |
| | | dockPanel1 = new DevExpress.XtraBars.Docking.DockPanel(); |
| | | dockPanel1_Container = new DevExpress.XtraBars.Docking.ControlContainer(); |
| | | phartDiagramRelationListCtrl1 = new PhartDiagramRelationListCtrl(); |
| | | pumpChartViewCtrl1 = new PumpChartViewCtrl(); |
| | | ((ISupportInitialize)ribbonControl1).BeginInit(); |
| | | ((ISupportInitialize)dockManager1).BeginInit(); |
| | | dockPanel1.SuspendLayout(); |
| | | dockPanel1_Container.SuspendLayout(); |
| | | SuspendLayout(); |
| | | // |
| | | // ribbonControl1 |
| | | // |
| | | ribbonControl1.ExpandCollapseItem.Id = 0; |
| | | ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic; |
| | | ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, BtnAdd, barBtnImportByExcel, barBtnDelete, barBtnUpdateimportance, barBtnOtherName, barBtnEditChart }); |
| | | ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, BtnAdd, barBtnImportByExcel, barBtnDelete, barBtnUpdateimportance, barBtnOtherName, barBtnEditChart, barBtnImportByPicture }); |
| | | ribbonControl1.Location = new Point(0, 0); |
| | | ribbonControl1.MaxItemId = 33; |
| | | ribbonControl1.MaxItemId = 34; |
| | | ribbonControl1.Name = "ribbonControl1"; |
| | | ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 }); |
| | | ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; |
| | |
| | | barBtnEditChart.Name = "barBtnEditChart"; |
| | | barBtnEditChart.ItemClick += barBtnEditChart_ItemClick; |
| | | // |
| | | // barBtnImportByPicture |
| | | // |
| | | barBtnImportByPicture.Caption = "å¾ç"; |
| | | barBtnImportByPicture.Id = 33; |
| | | barBtnImportByPicture.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnImportByPicture.ImageOptions.SvgImage"); |
| | | barBtnImportByPicture.Name = "barBtnImportByPicture"; |
| | | barBtnImportByPicture.ItemClick += barBtnImportByPicture_ItemClick; |
| | | // |
| | | // ribbonPage1 |
| | | // |
| | | ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { ribbonPageGroup1, ribbonPageGroup2 }); |
| | |
| | | // ribbonPageGroup1 |
| | | // |
| | | ribbonPageGroup1.ItemLinks.Add(barBtnImportByExcel, true); |
| | | ribbonPageGroup1.ItemLinks.Add(barBtnImportByPicture); |
| | | ribbonPageGroup1.Name = "ribbonPageGroup1"; |
| | | ribbonPageGroup1.Text = "导å
¥"; |
| | | // |
| | |
| | | ribbonPageGroup2.Name = "ribbonPageGroup2"; |
| | | ribbonPageGroup2.Text = "æä½"; |
| | | // |
| | | // dockManager1 |
| | | // |
| | | dockManager1.Form = this; |
| | | dockManager1.RootPanels.AddRange(new DevExpress.XtraBars.Docking.DockPanel[] { dockPanel1 }); |
| | | dockManager1.TopZIndexControls.AddRange(new string[] { "DevExpress.XtraBars.BarDockControl", "DevExpress.XtraBars.StandaloneBarDockControl", "System.Windows.Forms.MenuStrip", "System.Windows.Forms.StatusStrip", "System.Windows.Forms.StatusBar", "DevExpress.XtraBars.Ribbon.RibbonStatusBar", "DevExpress.XtraBars.Ribbon.RibbonControl", "DevExpress.XtraBars.Navigation.OfficeNavigationBar", "DevExpress.XtraBars.Navigation.TileNavPane", "DevExpress.XtraBars.TabFormControl", "DevExpress.XtraBars.FluentDesignSystem.FluentDesignFormControl", "DevExpress.XtraBars.ToolbarForm.ToolbarFormControl" }); |
| | | // |
| | | // dockPanel1 |
| | | // |
| | | dockPanel1.Controls.Add(dockPanel1_Container); |
| | | dockPanel1.Dock = DevExpress.XtraBars.Docking.DockingStyle.Left; |
| | | dockPanel1.ID = new Guid("7665f850-caee-40d7-a6f4-2718b4e99f9d"); |
| | | dockPanel1.Location = new Point(0, 101); |
| | | dockPanel1.Name = "dockPanel1"; |
| | | dockPanel1.OriginalSize = new Size(200, 200); |
| | | dockPanel1.Size = new Size(200, 462); |
| | | dockPanel1.Text = "æ²çº¿å表"; |
| | | // |
| | | // dockPanel1_Container |
| | | // |
| | | dockPanel1_Container.Controls.Add(phartDiagramRelationListCtrl1); |
| | | dockPanel1_Container.Location = new Point(3, 26); |
| | | dockPanel1_Container.Name = "dockPanel1_Container"; |
| | | dockPanel1_Container.Size = new Size(193, 433); |
| | | dockPanel1_Container.TabIndex = 0; |
| | | // |
| | | // phartDiagramRelationListCtrl1 |
| | | // |
| | | phartDiagramRelationListCtrl1.BorderVisible = true; |
| | | phartDiagramRelationListCtrl1.Dock = DockStyle.Fill; |
| | | phartDiagramRelationListCtrl1.Location = new Point(0, 0); |
| | | phartDiagramRelationListCtrl1.Name = "phartDiagramRelationListCtrl1"; |
| | | phartDiagramRelationListCtrl1.Size = new Size(193, 433); |
| | | phartDiagramRelationListCtrl1.TabIndex = 0; |
| | | // |
| | | // pumpChartViewCtrl1 |
| | | // |
| | | pumpChartViewCtrl1.Dock = DockStyle.Fill; |
| | | pumpChartViewCtrl1.Location = new Point(200, 101); |
| | | pumpChartViewCtrl1.Margin = new Padding(2, 2, 2, 2); |
| | | pumpChartViewCtrl1.Name = "pumpChartViewCtrl1"; |
| | | pumpChartViewCtrl1.Size = new Size(678, 462); |
| | | pumpChartViewCtrl1.TabIndex = 2; |
| | | // |
| | | // PumpChartMainPage |
| | | // |
| | | Appearance.BackColor = SystemColors.Control; |
| | | Appearance.Options.UseBackColor = true; |
| | | AutoScaleDimensions = new SizeF(7F, 14F); |
| | | AutoScaleMode = AutoScaleMode.Font; |
| | | Controls.Add(pumpChartViewCtrl1); |
| | | Controls.Add(dockPanel1); |
| | | Controls.Add(ribbonControl1); |
| | | Name = "PumpChartMainPage"; |
| | | Size = new Size(878, 563); |
| | | ((ISupportInitialize)ribbonControl1).EndInit(); |
| | | ((ISupportInitialize)dockManager1).EndInit(); |
| | | dockPanel1.ResumeLayout(false); |
| | | dockPanel1_Container.ResumeLayout(false); |
| | | ResumeLayout(false); |
| | | PerformLayout(); |
| | | } |
| | |
| | | private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage1; |
| | | private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1; |
| | | private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup2; |
| | | private DevExpress.XtraBars.BarButtonItem barBtnImportByPicture; |
| | | private DevExpress.XtraBars.Docking.DockManager dockManager1; |
| | | private PumpChartViewCtrl pumpChartViewCtrl1; |
| | | private DevExpress.XtraBars.Docking.DockPanel dockPanel1; |
| | | private DevExpress.XtraBars.Docking.ControlContainer dockPanel1_Container; |
| | | private PhartDiagramRelationListCtrl phartDiagramRelationListCtrl1; |
| | | } |
| | | } |
| | |
| | | namespace HStation.WinFrmUI |
| | | using DevExpress.XtraEditors; |
| | | using HStation.Vmo; |
| | | using Yw; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | { |
| | | public partial class PumpChartMainPage : DocumentPage |
| | | { |
| | | public PumpChartMainPage() |
| | | { |
| | | InitializeComponent(); |
| | | this.phartDiagramRelationListCtrl1.SelectedChangedEvent += PhartDiagramRelationListCtrl1_SelectedChangedEvent; |
| | | } |
| | | |
| | | private AssetsPumpMainVmo _vmo; |
| | | |
| | | private List<PhartDiagramRelationVmo> _allBindingList; |
| | | private PhartDiagramRelationVmo _relation = null; |
| | | |
| | | public async void SetBindingData(AssetsPumpMainVmo vmo) |
| | | { |
| | | if (vmo == null) |
| | | { |
| | | return; |
| | | } |
| | | _vmo = vmo; |
| | | this.PageTitle.Caption = $"{vmo.Name}\r\næå¤±æ²çº¿"; |
| | | _allBindingList = new List<PhartDiagramRelationVmo>(); |
| | | var allList = await BLLFactory<HStation.BLL.PhartDiagramRelation>.Instance |
| | | .GetByObjectTypeAndObjectID(HStation.Assets.DataType.PumpMain, vmo.ID); |
| | | allList?.ForEach(x => _allBindingList.Add(x)); |
| | | this.phartDiagramRelationListCtrl1.SetBindingData(_allBindingList); |
| | | } |
| | | |
| | | //éæ©æ¹å |
| | | private void PhartDiagramRelationListCtrl1_SelectedChangedEvent(PhartDiagramRelationVmo obj) |
| | | { |
| | | _relation = obj; |
| | | LoadPhart(_relation); |
| | | } |
| | | |
| | | //å è½½å¾è¡¨ |
| | | private async void LoadPhart(PhartDiagramRelationVmo relation) |
| | | { |
| | | if (relation == null) |
| | | { |
| | | this.pumpChartViewCtrl1.SetBindingData(null, default); |
| | | return; |
| | | } |
| | | var vmo = await BLLFactory<Yw.BLL.PhartDiagramExtensions>.Instance.GetByID(relation.DiagramID); |
| | | this.pumpChartViewCtrl1.SetBindingData(vmo, _vmo.RatedSpeed); |
| | | } |
| | | |
| | | //è¡¨æ ¼ |
| | | private void barBtnImportByExcel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | var dlg = new ImportPumpPerform2dByExcelDlg(); |
| | | dlg.SetBindingData(); |
| | | dlg.ReloadDataEvent += async (rhs) => |
| | | { |
| | | var bll = new BLL.PhartDiagramRelation(); |
| | | var id = await bll.InsertEx(rhs); |
| | | if (id > 0) |
| | | { |
| | | return true; |
| | | } |
| | | return true; |
| | | }; |
| | | { |
| | | var bll = new BLL.PhartDiagramRelation(); |
| | | var id = await bll.InsertEx(rhs); |
| | | if (id > 0) |
| | | { |
| | | var vmo = new PhartDiagramRelationVmo(rhs); |
| | | var relationId = await BLLFactory<HStation.BLL.PhartDiagramRelation>.Instance.Insert(vmo); |
| | | if (relationId > 0) |
| | | { |
| | | _allBindingList.Add(rhs); |
| | | this.phartDiagramRelationListCtrl1.SetBindingData(_allBindingList); |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | return false; |
| | | }; |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | //å¾ç |
| | | private void barBtnImportByPicture_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | var dlg = new ImportPumpPerform2dByExcelDlg(); |
| | | dlg.ReloadDataEvent += async (rhs) => |
| | | { |
| | | var bll = new BLL.PhartDiagramRelation(); |
| | | var id = await bll.InsertEx(rhs); |
| | | if (id > 0) |
| | | { |
| | | var vmo = new PhartDiagramRelationVmo(rhs); |
| | | var relationId = await BLLFactory<HStation.BLL.PhartDiagramRelation>.Instance.Insert(vmo); |
| | | if (relationId > 0) |
| | | { |
| | | _allBindingList.Add(rhs); |
| | | this.phartDiagramRelationListCtrl1.SetBindingData(_allBindingList); |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | return false; |
| | | }; |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | //ç¼è¾ |
| | | private void barBtnEditChart_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | private async void barBtnEditChart_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | var vm = GetCurrentViewModel(); |
| | | if (vm == null) |
| | | { |
| | | return; |
| | | } |
| | | var dlg = new EditAssetsPumpPerform2dDlg(); |
| | | var vmo = await BLLFactory<HStation.BLL.PhartDiagramRelation>.Instance.GetExByID(vm.DiagramID); |
| | | dlg.SetBindingData(vmo); |
| | | dlg.ReloadDataEvent += async (rhs) => |
| | | { |
| | | var bll = new BLL.PhartDiagramRelation(); |
| | | var bol = await bll.Update(rhs); |
| | | if (bol) |
| | | { |
| | | vm.Reset(rhs); |
| | | return true; |
| | | } |
| | | return true; |
| | | }; |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | //å«å |
| | |
| | | } |
| | | |
| | | //å é¤ |
| | | private void barBtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | private async void barBtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | var vm = GetCurrentViewModel(); |
| | | if (vm == null) |
| | | { |
| | | return; |
| | | } |
| | | var result = XtraMessageBox.Show("请é®ç¡®è®¤å é¤å½åæ°æ®åï¼", "询é®", MessageBoxButtons.YesNo) == DialogResult.Yes; |
| | | if (!result) |
| | | { |
| | | return; |
| | | } |
| | | var bol = await BLLFactory<HStation.BLL.PhartDiagramRelation>.Instance.DeleteByID(vm.ID); |
| | | if (!bol) |
| | | { |
| | | TipFormHelper.ShowError("å é¤å¤±è´¥ï¼"); |
| | | return; |
| | | } |
| | | _allBindingList.Remove(vm); |
| | | this.phartDiagramRelationListCtrl1.SetBindingData(_allBindingList); |
| | | TipFormHelper.ShowSucceed("å 餿åï¼"); |
| | | } |
| | | |
| | | //è·åå½å |
| | | private PhartDiagramRelationVmo GetCurrentViewModel() |
| | | { |
| | | if (_allBindingList == null) |
| | | { |
| | | TipFormHelper.ShowError("æ°æ®åå§åé误ï¼"); |
| | | return null; |
| | | } |
| | | if (_allBindingList.Count < 1) |
| | | { |
| | | TipFormHelper.ShowInfo("æ æ°æ®ï¼"); |
| | | return null; |
| | | } |
| | | if (_relation == null) |
| | | { |
| | | TipFormHelper.ShowWarn("è¯·éæ©æ°æ®è¡ï¼"); |
| | | return null; |
| | | } |
| | | return _relation; |
| | | } |
| | | } |
| | | } |
| | |
| | | LDE2eiAgIE0xNiwyMnY0aDRMMTYsMjJ6IiBjbGFzcz0iQmx1ZSIgLz4NCjwvc3ZnPgs= |
| | | </value> |
| | | </data> |
| | | <data name="barBtnImportByPicture.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 |
| | | LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl |
| | | dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAACwFAAAC77u/ |
| | | PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi |
| | | IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv |
| | | MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh |
| | | Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg |
| | | MzIgMzI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ogTTI3LjQsMTEuN2gtMy4yVjEzaDEuNnYxLjQgIGMtMC40LDAu |
| | | Mi0xLDAuMy0xLjUsMC4zYy0wLjMsMC0wLjYtMC4xLTAuOC0wLjFjLTAuOC0wLjItMC45LTEuMS0wLjkt |
| | | MS42VjExYzAtMS43LDEuMi0xLjcsMi4yLTEuN2MwLjEsMCwwLjMsMCwwLjYsMHYwLjloMS41VjguMSAg |
| | | Yy0wLjgtMC4yLTEuNi0wLjItMi40LTAuMmMtMC41LDAtMC45LDAtMS40LDAuMWMtMi4yLDAuNS0yLjIs |
| | | Mi4xLTIuMiwzdjEuOWMwLDAuOSwwLjEsMi41LDIuMiwzYzAuNCwwLjEsMC44LDAuMSwxLjIsMC4yICBj |
| | | MS4yLDAsMi4yLTAuNCwyLjktMC44bDAuMi0wLjFWMTEuN3oiIGNsYXNzPSJHcmVlbiIgLz4NCjwvc3Zn |
| | | Pgs= |
| | | </value> |
| | | </data> |
| | | <metadata name="dockManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>17, 17</value> |
| | | </metadata> |
| | | </root> |
| | |
| | | return; |
| | | } |
| | | var page = new PumpChartMainPage(); |
| | | // page.InitialDataSource(currentVm.ID); |
| | | page.SetBindingData(currentVm.Model); |
| | | page.PageTitle.Caption = guid.Function; |
| | | page.PageGuid = guid; |
| | | CreatePage(page, guid); |
| | |
| | | <Compile Update="01-pump\07-PumpChart\01-import\01-excel\ImportPumpPerform2dByExcelDlg.cs"> |
| | | <SubType>Form</SubType> |
| | | </Compile> |
| | | <Compile Update="01-pump\07-PumpChart\01-import\02-image\ImportAssetsExchangerCurveQLByPictureDlg.cs"> |
| | | <SubType>Form</SubType> |
| | | </Compile> |
| | | <Compile Update="01-pump\07-PumpChart\02-Eidt\EditAssetsExchangerCurveQLDlg.cs"> |
| | | <SubType>Form</SubType> |
| | | </Compile> |
| | | <Compile Update="02-adapting\EditAdaptingMainDlg.cs" /> |
| | | <Compile Update="02-adapting\AddAdaptingMainDlg.cs" /> |
| | | <Compile Update="01-pump\03-AssetsPumpType\EditAssetsPumpTypeDlg.cs"> |
| | |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Folder Include="01-pump\07-PumpChart\01-import\02-image\" /> |
| | | <Folder Include="12-package\02-main\01-EditPumpPartProp\" /> |
| | | </ItemGroup> |
| | | |
| | |
| | | private XYDiagram _diagram; |
| | | private XYDiagramDefaultPane _default_pane; |
| | | private AxisX _axis_x; |
| | | private AxisY _axis_y; |
| | | private AxisY _axis_y; |
| | | |
| | | private List<Yw.Geometry.Point2d> _point_pt_list; |
| | | private List<Yw.Geometry.Point2d> _point_pt_list; |
| | | private List<Yw.Geometry.Point2d> _line_pt_list; |
| | | |
| | | private UniversalCoordinate _coordinate; |
| | | private bool _initial_data = false; |
| | | private bool _initial_data = false; |
| | | private bool _mouse_mode = false;//é¼ æ æ¨¡å¼ |
| | | |
| | | #endregion |
| | | #endregion Private Variable |
| | | |
| | | #region Public Variable |
| | | #region Public Variable |
| | | |
| | | /// <summary> |
| | | /// Xè½´æ é¢ |
| | |
| | | _axis_y.Title.Text = value; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// é¼ æ æ¨¡å¼ |
| | | /// </summary> |
| | |
| | | } |
| | | set |
| | | { |
| | | _mouse_mode = value; |
| | | _mouse_mode = value; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | #endregion Public Variable |
| | | |
| | | #region Public Evnet |
| | | |
| | |
| | | /// </summary> |
| | | public event Action<List<Yw.Geometry.Point2d>> DefinePointChangedEvent; |
| | | |
| | | #endregion |
| | | #endregion Public Evnet |
| | | |
| | | |
| | | |
| | | #region Initial |
| | | |
| | |
| | | this.chartControl1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.chartControl1_MouseDown); |
| | | this.chartControl1.KeyUp += new System.Windows.Forms.KeyEventHandler(this.chartControl1_KeyUp); |
| | | |
| | | |
| | | _diagram = (XYDiagram)chartControl1.Diagram; |
| | | _default_pane=_diagram.DefaultPane; |
| | | _default_pane = _diagram.DefaultPane; |
| | | _axis_x = _diagram.AxisX; |
| | | //_axis_x.SetAxisXQDisplay(); |
| | | _axis_y = _diagram.AxisY; |
| | | //_axis_y.SetAxisYQLDisplay(); |
| | | |
| | | |
| | | |
| | | _axis_x.Visibility = DefaultBoolean.False; |
| | | _axis_x.GridLines.Visible = false; |
| | | _axis_y.Visibility = DefaultBoolean.False; |
| | | _axis_y.GridLines.Visible = false; |
| | | |
| | | |
| | | this.chartControl1.SetChartMonoColorDisplay(); |
| | | } |
| | |
| | | |
| | | /// <summary> |
| | | /// ç»å®æ°æ® |
| | | /// </summary> |
| | | /// </summary> |
| | | public void SetBindingData(List<Yw.Geometry.Point2d> point_pt_list, List<Yw.Geometry.Point2d> line_pt_list, string coordinate = null, Color? color = null) |
| | | { |
| | | _initial_data = false; |
| | |
| | | this.chartControl1.EndInit(); |
| | | return; |
| | | } |
| | | |
| | | |
| | | AddPointSeries(color.Value, _axis_x, _axis_y, _default_pane, _point_pt_list); |
| | | AddLineSeries(color.Value, _axis_x, _axis_y, _default_pane, _line_pt_list); |
| | | AddLineSeries(color.Value, _axis_x, _axis_y, _default_pane, _line_pt_list); |
| | | if (_coordinate == null) |
| | | SetCoordinate(); |
| | | |
| | | SetChartAxis(); |
| | | this.chartControl1.EndInit(); |
| | | _initial_data = true; |
| | | |
| | | } |
| | | |
| | | //æ¯å¦æ¯æ ææ°æ® |
| | |
| | | return false; |
| | | } |
| | | |
| | | #region Add Chart Data |
| | | #region Add Chart Data |
| | | |
| | | private void AddPointSeries(Color color, AxisXBase axis_x, AxisYBase axis_y, XYDiagramPaneBase pane, List<Yw.Geometry.Point2d> pt_list) |
| | | { |
| | |
| | | var series_pt = new DevExpress.XtraCharts.SeriesPoint(pt.X, new double[] { pt.Y }); |
| | | series_pt_list.Add(series_pt); |
| | | } |
| | | |
| | | |
| | | var series = new DevExpress.XtraCharts.Series(); |
| | | series.ShowInLegend = false; |
| | | series.ArgumentScaleType = DevExpress.XtraCharts.ScaleType.Numerical; |
| | |
| | | this.chartControl1.Series.Add(series); |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | #endregion Add Chart Data |
| | | |
| | | #endregion |
| | | |
| | | #endregion SetBindingData |
| | | |
| | | #region Set Axis |
| | | |
| | |
| | | _minY = Math.Min(_line_pt_list.Min(x => x.Y), _minY); |
| | | _maxY = Math.Min(_line_pt_list.Max(x => x.Y), _maxY); |
| | | |
| | | |
| | | _coordinate = UniversalCoordinate.CalcCoordinate(_minX, _maxX, _minY, _maxY); |
| | | if (_coordinate == null) |
| | | return; |
| | |
| | | { |
| | | _coordinate.GridNumberX++; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设置å¾è¡¨è½´ |
| | |
| | | _axis_y.Visibility = DefaultBoolean.False; |
| | | _axis_y.GridLines.Visible = false; |
| | | return; |
| | | } |
| | | } |
| | | |
| | | //计ç®å»åº¦ X |
| | | var axis_x_labels = new List<CustomAxisLabel>(); |
| | |
| | | _axis_x.CustomLabels.AddRange(axis_x_labels.ToArray()); |
| | | _axis_x.Visibility = DefaultBoolean.True; |
| | | _axis_x.GridLines.Visible = true; |
| | | |
| | | |
| | | //计ç®å»åº¦ Y |
| | | var axis_y_labels = new List<CustomAxisLabel>(); |
| | |
| | | _axis_y.SetAxisRange(_coordinate.DispMinY(), _coordinate.DispMaxY()); |
| | | } |
| | | |
| | | |
| | | |
| | | #endregion Calc |
| | | #endregion Set Axis |
| | | |
| | | #region ChartEvent |
| | | |
| | | private SeriesPoint _pick_point = null;// éä¸ç¹ |
| | | private SeriesPoint _pick_point = null;// éä¸ç¹ |
| | | |
| | | private void chartControl1_MouseDown(object sender, MouseEventArgs e) |
| | | { |
| | | if (!_initial_data) |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | private void chartControl1_MouseMove(object sender, MouseEventArgs e) |
| | | { |
| | |
| | | _pick_point.NumericalArgument = diagram_coordinates.NumericalArgument; |
| | | } |
| | | |
| | | |
| | | private void chartControl1_MouseUp(object sender, MouseEventArgs e) |
| | | { |
| | | if (!_mouse_mode) |
| | |
| | | |
| | | _pick_point = null; |
| | | } |
| | | |
| | | |
| | | private void chartControl1_KeyUp(object sender, KeyEventArgs e) |
| | | { |
| | |
| | | } |
| | | _pick_point.Values[0] = y; |
| | | _pick_point.NumericalArgument = x; |
| | | var index = _pick_point.Tag.is |
| | | SetPointPtValue(); |
| | | /* var index = _pick_point.Tag.is |
| | | SetPointPtValue();*/ |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ´æ°æ°æ® |
| | |
| | | this.DefinePointChangedEvent?.Invoke(_point_pt_list); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #endregion ChartEvent |
| | | } |
| | | } |
| | |
| | | using DevExpress.XtraEditors; |
| | | using System.Data; |
| | | |
| | | |
| | | namespace Yw.WinFrmUI.Phart |
| | | { |
| | | public partial class UniversalEditCtrl : DevExpress.XtraEditors.XtraUserControl |
| | |
| | | InitializeComponent(); |
| | | |
| | | this.gridView1.SetNormalEditView(); |
| | | this.gridView1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; |
| | | this.gridView1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; |
| | | this.curveExpressEditChart.DefinePointChangedEvent += FeatCurvesDispCtrl1_OnDefinePointChanged; |
| | | } |
| | | |
| | | |
| | | private List<Yw.Geometry.Point2d> _pt_ql_list = null; |
| | | private List<Yw.Geometry.Point2d> _fitCurvePoints = null; |
| | | |
| | | |
| | | /// <summary> |
| | | /// åå§åæ°æ® |
| | | /// </summary> |
| | |
| | | this.bindingSource1.DataSource = _fitCurvePoints; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// åå§åæ°æ®(ç®å没æå®ä¹ç¹) |
| | | /// </summary> |
| | | /// </summary> |
| | | public void SetBindingData(Yw.Geometry.CubicSpline2d cubic_spline_ql) |
| | | { |
| | | if (cubic_spline_ql == null) |
| | |
| | | SetBindingData(pt_ql_list, pt_ql_list); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// åå§åæ°æ® |
| | | /// </summary> |
| | | /// </summary> |
| | | public void SetBindingData(List<Yw.Geometry.Point2d> pt_ql_list, |
| | | List<Yw.Geometry.Point2d> def_pt_ql_list) |
| | | { |
| | | |
| | | _fitCurvePoints = new List<Yw.Geometry.Point2d>(); |
| | | this.bindingSource1.DataSource = _fitCurvePoints; |
| | | |
| | |
| | | |
| | | if (pt_ql_list == null || pt_ql_list.Count < 4) |
| | | { |
| | | |
| | | return; |
| | | } |
| | | |
| | | _pt_ql_list = pt_ql_list; |
| | | |
| | | |
| | | this.cmbCurveType.Properties.Items.Clear(); |
| | | this.cmbCurveType.Properties.Items.Add("æµéæ°´ææ²çº¿"); |
| | |
| | | this.bindingSource1.ResetBindings(false); |
| | | } |
| | | |
| | | |
| | | |
| | | //åå
æ ¼ä¿®æ¹å触å |
| | | private void gridView1_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// å·æ°æ°æ® |
| | | /// </summary> |
| | |
| | | _fitCurvePoints.Add(new Yw.Geometry.Point2d(pt.X, pt.Y)); |
| | | |
| | | var list = _fitCurvePoints?.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList(); |
| | | this.curveExpressEditChart.UpdateCurve(list); |
| | | //this.curveExpressEditChart.UpdateCurve(list); |
| | | this.bindingSource1.ResetBindings(false); |
| | | } |
| | | |
| | |
| | | points.Add(new Yw.Geometry.Point2d(x, y)); |
| | | } |
| | | _pt_ql_list = points; |
| | | this.curveExpressEditChart.UpdateCurve(points); |
| | | // this.curveExpressEditChart.UpdateCurve(points); |
| | | } |
| | | |
| | | |
| | | //æå
¥ç¹ |
| | | private void InsertPoint() |
| | |
| | | ReloadCurvePoints(); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 设置æ²çº¿åæ |
| | | /// </summary> |
| | |
| | | { |
| | | this.curveExpressEditChart.SetChartAxis(); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åç¹ä¿¡æ¯ |
| | |
| | | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | } |