// // Copyright (c) PlaceholderCompany. All rights reserved. // using DevExpress.XtraBars; using DevExpress.XtraBars.Ribbon; using GeoSigma.SigmaDrawerStyle; 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 PcgDrawR { /// /// The frm main test. /// public partial class FrmMainTest : DevExpress.XtraBars.Ribbon.RibbonForm { /// /// Initializes a new instance of the class. /// public FrmMainTest() { InitializeComponent(); this.tabbedView1.Ribbon = this.ribbonControl1; } /// /// bars the button item1_ item click. /// /// The sender. /// The e. private async void barButtonItem1_ItemClick(object sender, ItemClickEventArgs e) { UCDrawEdit drawerChild = new UCDrawEdit(); string strFile = "c:\\temp\\统计出的数据.kev"; bool bOpend = drawerChild.OpenFile(strFile); if (bOpend == false) { // frmChild.Close(); MessageBox.Show($"打开文件{strFile}失败", "打开"); return; // Task.FromResult(false); } var doc = this.tabbedView1.AddDocument(drawerChild); this.ribbonControl1.MergeRibbon(drawerChild.ribbonMain); doc.Caption = drawerChild.Text; } /// /// bars the button item2_ item click. /// /// The sender. /// The e. private void barButtonItem2_ItemClick(object sender, ItemClickEventArgs e) { FrmDoc pad = new FrmDoc(); pad.MdiParent = this; pad.Show(); } /// /// ribbons the control1_ merge. /// /// The sender. /// The e. private void ribbonControl1_Merge(object sender, DevExpress.XtraBars.Ribbon.RibbonMergeEventArgs e) { RibbonControl childRibbon = e.MergedChild; UCDrawEdit child = childRibbon.Parent as UCDrawEdit; child.MergePanels(); } private void FrmMainTest_Load(object sender, EventArgs e) { DrawerStyle drawerStyle = new DrawerStyle(); string strData = @" "; drawerStyle.DeserializePoint(strData); var pointStyle = drawerStyle.PontStyle; MessageBox.Show(pointStyle.GetType().ToString()); } } }