public JcwChartFrm(ChartMetadata metadata, DisplayOptions displayOptions, IJcwCustomizeChart customizer) : base() { // set the default skin to use DevExpress.LookAndFeel.UserLookAndFeel.Default.Style = LookAndFeelStyle.Skin; DevExpress.LookAndFeel.UserLookAndFeel.Default.UseWindowsXPTheme = false; DevExpress.LookAndFeel.UserLookAndFeel.Default.UseDefaultLookAndFeel = true; // enabled form skinning SkinManager.EnableFormSkins(); m_displayOptions = displayOptions; m_originalChartMetadata = metadata; m_chartMetadata = metadata.Clone() as ChartMetadata; ChartStatistics = new Dictionary <StatisticTypes, Dictionary <string, double> > (); InitializeComponent(); m_jcwChartCtl = new JcwChartCtl(m_chartMetadata, this, customizer); m_jcwChartMetadataCtl = new JcwChartMetadataCtl(); m_jcwChartStatisticsCtl = new JcwChartStatisticsCtl(); m_jcwChartCtl.SuspendLayout(); m_jcwChartMetadataCtl.SuspendLayout(); m_jcwChartStatisticsCtl.SuspendLayout(); jcwDockManager.SuspendLayout(); SuspendLayout(); // // jcwChartCtl // m_jcwChartCtl.Dock = DockStyle.Fill; // // jcwChartMetadataCtl // m_jcwChartMetadataCtl.AutoHide = true; m_jcwChartMetadataCtl.ChartControl = m_jcwChartCtl; m_jcwChartMetadataCtl.ChartForm = this; m_jcwChartMetadataCtl.Metadata = m_chartMetadata; m_jcwChartMetadataCtl.PanelCaption = JcwResources.GetString("MetadataBarText"); // // jcwChartStatisticsCtl // m_jcwChartStatisticsCtl.AutoHide = true; m_jcwChartStatisticsCtl.ChartControl = m_jcwChartCtl; m_jcwChartStatisticsCtl.Metadata = m_chartMetadata; m_jcwChartStatisticsCtl.PanelCaption = JcwResources.GetString("StatisticsBarText"); Controls.Add(m_jcwChartCtl); ProcessDisplayOptions(); m_jcwChartCtl.ResumeLayout(false); m_jcwChartMetadataCtl.ResumeLayout(false); m_jcwChartStatisticsCtl.ResumeLayout(false); jcwDockManager.ResumeLayout(false); ResumeLayout(false); }
public void RevertChartMetadataSaveRequired() { if (m_chartMetadataSaveRequired) { m_chartMetadataSaveRequired = false; m_chartMetadata = m_originalChartMetadata.Clone() as ChartMetadata; m_jcwChartCtl.SaveRequired(m_chartMetadataSaveRequired, m_chartMetadata); m_jcwChartMetadataCtl.SaveRequired(m_chartMetadataSaveRequired, m_chartMetadata); } }