|
|
|
|
|
// <copyright file="FrmMainTest.cs" company="PlaceholderCompany">
|
|
|
|
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
|
|
|
|
// </copyright>
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The frm main test.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public partial class FrmMainTest : DevExpress.XtraBars.Ribbon.RibbonForm
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Initializes a new instance of the <see cref="FrmMainTest"/> class.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public FrmMainTest()
|
|
|
|
|
|
{
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
this.tabbedView1.Ribbon = this.ribbonControl1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// bars the button item1_ item click.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender">The sender.</param>
|
|
|
|
|
|
/// <param name="e">The e.</param>
|
|
|
|
|
|
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;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// bars the button item2_ item click.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender">The sender.</param>
|
|
|
|
|
|
/// <param name="e">The e.</param>
|
|
|
|
|
|
private void barButtonItem2_ItemClick(object sender, ItemClickEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
FrmDoc pad = new FrmDoc();
|
|
|
|
|
|
pad.MdiParent = this;
|
|
|
|
|
|
pad.Show();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// ribbons the control1_ merge.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender">The sender.</param>
|
|
|
|
|
|
/// <param name="e">The e.</param>
|
|
|
|
|
|
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 = @" <HowToViewPoint Name="""">
|
|
|
|
|
|
<Font W=""0"" H=""0"" O=""0"" B=""0"" I=""0"" U=""0"" S=""0"" CS=""1"" OP=""0"" CP=""0"" Q=""0"" PF=""0"" FN=""Times New Roman""/>
|
|
|
|
|
|
<Symbol Name="""" Height=""3.0000"" Width=""3.0000"" Angle=""0.0000"" FrColor=""0"" BkColor=""0"" EnableFrColor=""0"" EnableBkColor=""0""/>
|
|
|
|
|
|
<Text Height=""15.0000"" Width=""6.0000"" Angle=""0.0000"" DeltX=""0.0000"" DeltY=""0.0000"" Style=""76"" FrColor=""0"" BkColor=""0""/>
|
|
|
|
|
|
</HowToViewPoint>";
|
|
|
|
|
|
|
|
|
|
|
|
drawerStyle.DeserializePoint(strData);
|
|
|
|
|
|
var pointStyle = drawerStyle.PontStyle;
|
|
|
|
|
|
MessageBox.Show(pointStyle.GetType().ToString());
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|