public FATabStrip() { BeginInit(); SetStyle(ControlStyles.ContainerControl, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.ResizeRedraw, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.OptimizedDoubleBuffer, true); SetStyle(ControlStyles.Selectable, true); items = new FATabStripItemCollection(); items.CollectionChanged += new CollectionChangeEventHandler(OnCollectionChanged); base.Size = new Size(350, 200); menu = new ContextMenuStrip(); menu.Renderer = ToolStripRenderer; menu.ItemClicked += new ToolStripItemClickedEventHandler(OnMenuItemClicked); menu.VisibleChanged += new EventHandler(OnMenuVisibleChanged); menuGlyph = new FATabStripMenuGlyph(ToolStripRenderer); closeButton = new FATabStripCloseButton(ToolStripRenderer); Font = defaultFont; sf = new StringFormat(); EndInit(); UpdateLayout(); }
public FATabStrip() { BeginInit(); SetStyle(ControlStyles.ContainerControl, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.ResizeRedraw, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.OptimizedDoubleBuffer, true); SetStyle(ControlStyles.Selectable, true); items = new FATabStripItemCollection(); items.CollectionChanged += new CollectionChangeEventHandler(OnCollectionChanged); base.Size = new Size(350, 200); menu = new ContextMenuStrip(); menu.RenderMode = ToolStripRenderMode.ManagerRenderMode; menu.ItemClicked += new ToolStripItemClickedEventHandler(OnMenuItemClicked); menu.VisibleChanged += new EventHandler(OnMenuVisibleChanged); menuGlyph = new FATabStripMenuGlyph(ToolStripRenderer); closeButton = new FATabStripCloseButton(ToolStripRenderer); Font = defaultFont; sf = new StringFormat(); EndInit(); UpdateLayout(); }
public virtual void Assign(FATabStripItemCollection collection) { this.BeginUpdate(); try { this.Clear(); for (int index = 0; index < collection.Count; ++index) { FATabStripItem faTabStripItem1 = collection[index]; FATabStripItem faTabStripItem2 = new FATabStripItem(); faTabStripItem2.Assign(faTabStripItem1); this.Add(faTabStripItem2); } } finally { this.EndUpdate(); } }
public virtual void Assign(FATabStripItemCollection collection) { this.BeginUpdate(); try { base.Clear(); for (int i = 0; i < collection.Count; i++) { FATabStripItem item = collection[i]; FATabStripItem fatabStripItem = new FATabStripItem(); fatabStripItem.Assign(item); this.Add(fatabStripItem); } } finally { this.EndUpdate(); } }
public virtual void Assign(FATabStripItemCollection collection) { BeginUpdate(); try { Clear(); for (int n = 0; n < collection.Count; n++) { FATabStripItem item = collection[n]; FATabStripItem newItem = new FATabStripItem(); newItem.Assign(item); Add(newItem); } } finally { EndUpdate(); } }
public FATabStrip() { BeginInit(); double dpiscale = 1.0; using (Graphics g = this.CreateGraphics()) { dpiscale = g.DpiX / 96.0; } DEF_HEADER_HEIGHT = (int)(19 * dpiscale); SetStyle(ControlStyles.ContainerControl, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.ResizeRedraw, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.OptimizedDoubleBuffer, true); SetStyle(ControlStyles.Selectable, true); items = new FATabStripItemCollection(); items.CollectionChanged += new CollectionChangeEventHandler(OnCollectionChanged); base.Size = new Size(350, 200); menu = new ContextMenuStrip(); menu.RenderMode = ToolStripRenderMode.ManagerRenderMode; menu.ItemClicked += new ToolStripItemClickedEventHandler(OnMenuItemClicked); menu.VisibleChanged += new EventHandler(OnMenuVisibleChanged); menuGlyph = new FATabStripMenuGlyph(ToolStripRenderer); closeButton = new FATabStripCloseButton(ToolStripRenderer); Font = defaultFont; sf = new StringFormat(); EndInit(); UpdateLayout(); }
/// <summary> /// Menulis Result View /// </summary> /// <param name="tabPages">tab page pada result view</param> public void WriteResultPane(FATabStripItemCollection tabPages) { seriesXmlWriter.WriteStartElement("ResultPane"); foreach (FATabStripItem tp in tabPages) { seriesXmlWriter.WriteStartElement("TabPage"); if (tp is ANNResultTabPage) { ANNResultTabPage annTp = (ANNResultTabPage)tp; seriesXmlWriter.WriteElementString("Type", "Neural Network"); seriesXmlWriter.WriteElementString("Title", annTp.Title); seriesXmlWriter.WriteElementString("SeriesVariable", annTp.Variable.VariableName); seriesXmlWriter.WriteStartElement("NetworkSpecification"); seriesXmlWriter.WriteElementString("InputLayerNeurons", annTp.NetworkProperties.InputLayerNeurons.ToString()); seriesXmlWriter.WriteElementString("HiddenLayerNeurons", annTp.NetworkProperties.HiddenLayerNeurons.ToString()); seriesXmlWriter.WriteElementString("OutputLayerNeurons", annTp.NetworkProperties.OutputLayerNeurons.ToString()); seriesXmlWriter.WriteElementString("ActivationFunction", ((int)(annTp.NetworkProperties.ActivationFunction)).ToString()); seriesXmlWriter.WriteElementString("LearningRate", annTp.NetworkProperties.LearningRate.ToString()); seriesXmlWriter.WriteElementString("Momentum", annTp.NetworkProperties.Momentum.ToString()); seriesXmlWriter.WriteElementString("IncludedObservations", annTp.NetworkProperties.IncludedObservations.ToString()); seriesXmlWriter.WriteElementString("Error", annTp.NetworkProperties.Error.ToString()); seriesXmlWriter.WriteElementString("MSE", annTp.NetworkProperties.MSE.ToString()); seriesXmlWriter.WriteElementString("MAE", annTp.NetworkProperties.MAE.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Predicted"); foreach (double value in annTp.Predicted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); if (annTp.Forecasted != null) { seriesXmlWriter.WriteStartElement("Forecasted"); foreach (double value in annTp.Forecasted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteStartElement("VisibleView"); if (annTp.IsAnnModelSummaryVisible) seriesXmlWriter.WriteElementString("View", "AnnModelSummary"); if (annTp.IsActualPredictedResidualDataGridVisible) seriesXmlWriter.WriteElementString("View", "ActualPredictedResidualDataGrid"); if (annTp.IsForecastedDataGridVisible) seriesXmlWriter.WriteElementString("View", "ForecastedDataGrid"); if (annTp.IsActualAndPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndPredictedGraph"); if (annTp.IsActualAndForecastedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndForecastedGraph"); if (annTp.IsActualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualVsPredictedGraph"); if (annTp.IsResidualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualGraph"); if (annTp.IsResidualVsActualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsActualGraph"); if (annTp.IsResidualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsPredictedGraph"); seriesXmlWriter.WriteFullEndElement(); } else if (tp is MAResultTabPage) { MAResultTabPage maTp = (MAResultTabPage)tp; seriesXmlWriter.WriteElementString("Type", "Moving Average"); seriesXmlWriter.WriteElementString("Title", maTp.Title); seriesXmlWriter.WriteElementString("SeriesVariable", maTp.Variable.VariableName); seriesXmlWriter.WriteStartElement("MASpecification"); seriesXmlWriter.WriteElementString("includedObservations", maTp.MaProperties.includedObservations.ToString()); seriesXmlWriter.WriteElementString("isSingleMA", maTp.MaProperties.isSingleMA.ToString().ToLower()); seriesXmlWriter.WriteElementString("orde", maTp.MaProperties.orde.ToString()); seriesXmlWriter.WriteElementString("sseMA", maTp.MaProperties.sseMA.ToString()); seriesXmlWriter.WriteElementString("mseMA", maTp.MaProperties.mseMA.ToString()); seriesXmlWriter.WriteElementString("maeMA", maTp.MaProperties.maeMA.ToString()); seriesXmlWriter.WriteElementString("mpeMA", maTp.MaProperties.mpeMA.ToString()); seriesXmlWriter.WriteElementString("mapeMA", maTp.MaProperties.mapeMA.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("SingleMA"); foreach (double value in maTp.MaTable.singleSmoothed) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); if (maTp.MaProperties.isSingleMA == false) { seriesXmlWriter.WriteStartElement("DoubleMA"); foreach (double value in maTp.MaTable.doubleSmoothed) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteStartElement("Predicted"); foreach (double value in maTp.MaTable.predicted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Residual"); foreach (double value in maTp.MaTable.residual) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); if (maTp.Forecasted != null) { seriesXmlWriter.WriteStartElement("Forecasted"); foreach (double value in maTp.Forecasted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteStartElement("VisibleView"); if (maTp.IsMaModelSummaryVisible) seriesXmlWriter.WriteElementString("View", "MAModelSummary"); if (maTp.IsMovingAverageDataGridVisible) seriesXmlWriter.WriteElementString("View", "MovingAverageDataGrid"); if (maTp.IsSmoothingVisible) seriesXmlWriter.WriteElementString("View", "Smoothing"); //if (maTp.IsActualPredictedResidualDataGridVisible) seriesXmlWriter.WriteElementString("View", "ActualPredictedResidualDataGrid"); if (maTp.IsForecastedDataGridVisible) seriesXmlWriter.WriteElementString("View", "ForecastedDataGrid"); if (maTp.IsActualAndPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndPredictedGraph"); if (maTp.IsActualAndSmoothedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndSmoothedGraph"); if (maTp.IsActualAndForecastedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndForecastedGraph"); if (maTp.IsActualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualVsPredictedGraph"); if (maTp.IsResidualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualGraph"); if (maTp.IsResidualVsActualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsActualGraph"); if (maTp.IsResidualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsPredictedGraph"); seriesXmlWriter.WriteFullEndElement(); } else if (tp is ESResultTabPage) { ESResultTabPage esTp = (ESResultTabPage)tp; seriesXmlWriter.WriteElementString("Type", "Exponential Smoothing"); seriesXmlWriter.WriteElementString("Title", esTp.Title); seriesXmlWriter.WriteElementString("SeriesVariable", esTp.Variable.VariableName); seriesXmlWriter.WriteStartElement("ESSpecification"); seriesXmlWriter.WriteElementString("includedObservations", esTp.EsProperties.includedObservations.ToString()); seriesXmlWriter.WriteElementString("alpha", esTp.EsProperties.alpha.ToString()); seriesXmlWriter.WriteElementString("gamma", esTp.EsProperties.gamma.ToString()); seriesXmlWriter.WriteElementString("beta", esTp.EsProperties.beta.ToString()); seriesXmlWriter.WriteElementString("seasonalLength", esTp.EsProperties.seasonalLength.ToString()); seriesXmlWriter.WriteElementString("sseES", esTp.EsProperties.sseES.ToString()); seriesXmlWriter.WriteElementString("mseES", esTp.EsProperties.mseES.ToString()); seriesXmlWriter.WriteElementString("maeES", esTp.EsProperties.maeES.ToString()); seriesXmlWriter.WriteElementString("mpeES", esTp.EsProperties.mpeES.ToString()); seriesXmlWriter.WriteElementString("mapeES", esTp.EsProperties.mapeES.ToString()); seriesXmlWriter.WriteElementString("initialModel", esTp.EsProperties.initialModel.ToString()); seriesXmlWriter.WriteElementString("isMultiplicative", esTp.EsProperties.isMultiplicative.ToString().ToLower()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Smoothed"); foreach (double value in esTp.EsTable.smoothed) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); if (esTp.EsProperties.initialModel != 1 && esTp.EsProperties.initialModel != 2) { seriesXmlWriter.WriteStartElement("Trend"); foreach (double value in esTp.EsTable.trend) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); } if (esTp.EsProperties.initialModel == 4) { seriesXmlWriter.WriteStartElement("Seasonal"); foreach (double value in esTp.EsTable.seasonal) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteStartElement("Predicted"); foreach (double value in esTp.EsTable.predicted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Residual"); foreach (double value in esTp.EsTable.residual) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); if (esTp.Forecasted != null) { seriesXmlWriter.WriteStartElement("Forecasted"); foreach (double value in esTp.Forecasted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteStartElement("VisibleView"); if (esTp.IsEsModelSummaryVisible) seriesXmlWriter.WriteElementString("View", "ESModelSummary"); if (esTp.IsExponentialSmoothingDataGridVisible) seriesXmlWriter.WriteElementString("View", "ExponentialSmoothingDataGrid"); if (esTp.IsSmoothingVisible) seriesXmlWriter.WriteElementString("View", "Smoothing"); if (esTp.IsTrendVisible) seriesXmlWriter.WriteElementString("View", "Trend"); if (esTp.IsSeasonalVisible) seriesXmlWriter.WriteElementString("View", "Seasonal"); //if (maTp.IsActualPredictedResidualDataGridVisible) seriesXmlWriter.WriteElementString("View", "ActualPredictedResidualDataGrid"); if (esTp.IsForecastedDataGridVisible) seriesXmlWriter.WriteElementString("View", "ForecastedDataGrid"); if (esTp.IsActualAndPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndPredictedGraph"); if (esTp.IsActualAndSmoothedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndSmoothedGraph"); if (esTp.IsActualAndForecastedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndForecastedGraph"); if (esTp.IsActualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualVsPredictedGraph"); if (esTp.IsResidualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualGraph"); if (esTp.IsResidualVsActualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsActualGraph"); if (esTp.IsResidualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsPredictedGraph"); seriesXmlWriter.WriteFullEndElement(); } else if (tp is DECResultTabPage) { DECResultTabPage decTp = (DECResultTabPage)tp; seriesXmlWriter.WriteElementString("Type", "Decomposition"); seriesXmlWriter.WriteElementString("Title", decTp.Title); seriesXmlWriter.WriteElementString("SeriesVariable", decTp.Variable.VariableName); seriesXmlWriter.WriteStartElement("DECSpecification"); seriesXmlWriter.WriteElementString("includedObservations", decTp.DecProperties.includedObservations.ToString()); seriesXmlWriter.WriteElementString("seasonalLength", decTp.DecProperties.seasonalLength.ToString()); seriesXmlWriter.WriteElementString("sseDEC", decTp.DecProperties.sseDEC.ToString()); seriesXmlWriter.WriteElementString("mseDEC", decTp.DecProperties.mseDEC.ToString()); seriesXmlWriter.WriteElementString("maeDEC", decTp.DecProperties.maeDEC.ToString()); seriesXmlWriter.WriteElementString("mpeDEC", decTp.DecProperties.mpeDEC.ToString()); seriesXmlWriter.WriteElementString("mapeDEC", decTp.DecProperties.mapeDEC.ToString()); seriesXmlWriter.WriteElementString("isMultiplicative", decTp.DecProperties.isMultiplikatif.ToString().ToLower()); seriesXmlWriter.WriteElementString("initialTrend", decTp.DecProperties.initialTrend.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Parameters"); foreach (double value in decTp.DecProperties.parameters) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("SeasonalIndex"); foreach (double value in decTp.DecProperties.seasonalIdx) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Trend"); foreach (double value in decTp.DecTable.trend) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Detrend"); foreach (double value in decTp.DecTable.detrend) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Seasonal"); foreach (double value in decTp.DecTable.seasonal) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Deseasonal"); foreach (double value in decTp.DecTable.deseasonal) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Predicted"); foreach (double value in decTp.DecTable.predicted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Residual"); foreach (double value in decTp.DecTable.residual) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); if (decTp.Forecasted != null) { seriesXmlWriter.WriteStartElement("Forecasted"); foreach (double value in decTp.Forecasted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteStartElement("VisibleView"); if (decTp.IsDecModelSummaryVisible) seriesXmlWriter.WriteElementString("View", "DECModelSummary"); if (decTp.IsDecompositionDataGridVisible) seriesXmlWriter.WriteElementString("View", "DecompositionDataGrid"); if (decTp.IsTrendVisible) seriesXmlWriter.WriteElementString("View", "Trend"); //if (maTp.IsActualPredictedResidualDataGridVisible) seriesXmlWriter.WriteElementString("View", "ActualPredictedResidualDataGrid"); if (decTp.IsDetrendVisible) seriesXmlWriter.WriteElementString("View", "Detrend"); if (decTp.IsSeasonalVisible) seriesXmlWriter.WriteElementString("View", "Seasonal"); if (decTp.IsDeseasonalVisible) seriesXmlWriter.WriteElementString("View", "Deseasonal"); if (decTp.IsForecastedDataGridVisible) seriesXmlWriter.WriteElementString("View", "ForecastedDataGrid"); if (decTp.IsActualPredictedAndTrendGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualPredictedAndTrendGraph"); if (decTp.IsActualAndForecastedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndForecastedGraph"); if (decTp.IsActualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualVsPredictedGraph"); if (decTp.IsResidualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualGraph"); if (decTp.IsResidualVsActualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsActualGraph"); if (decTp.IsResidualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsPredictedGraph"); if (decTp.IsDetrendGraphVisible) seriesXmlWriter.WriteElementString("View", "DetrendGraph"); if (decTp.IsDeseasonalVisible) seriesXmlWriter.WriteElementString("View", "DeseasonalGraph"); seriesXmlWriter.WriteFullEndElement(); } else if (tp is TrendAnalysisResultTabPage) { TrendAnalysisResultTabPage trendTp = (TrendAnalysisResultTabPage)tp; seriesXmlWriter.WriteElementString("Type", "Trend Analysis"); seriesXmlWriter.WriteElementString("Title", trendTp.Title); seriesXmlWriter.WriteElementString("SeriesVariable", trendTp.Variable.VariableName); seriesXmlWriter.WriteStartElement("TrendAnalysisSpecification"); seriesXmlWriter.WriteElementString("includedObservations", trendTp.TrendProperties.includedObservations.ToString()); seriesXmlWriter.WriteElementString("R", trendTp.TrendProperties.r.ToString()); seriesXmlWriter.WriteElementString("RSquare", trendTp.TrendProperties.rSquare.ToString()); seriesXmlWriter.WriteElementString("RSquareAdjusted", trendTp.TrendProperties.rSquareAdjusted.ToString()); seriesXmlWriter.WriteElementString("sse", trendTp.TrendProperties.sse.ToString()); seriesXmlWriter.WriteElementString("mse", trendTp.TrendProperties.mse.ToString()); seriesXmlWriter.WriteElementString("initialModel", trendTp.TrendProperties.initialModel.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Parameters"); foreach (double value in trendTp.TrendProperties.parameters) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Predicted"); foreach (double value in trendTp.Predicted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Residual"); foreach (double value in trendTp.Residual) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); if (trendTp.Forecasted != null) { seriesXmlWriter.WriteStartElement("Forecasted"); foreach (double value in trendTp.Forecasted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteStartElement("VisibleView"); if (trendTp.IsTrendAnalysisModelSummaryVisible) seriesXmlWriter.WriteElementString("View", "TrendAnalysisModelSummary"); if (trendTp.IsActualPredictedResidualDataGridVisible) seriesXmlWriter.WriteElementString("View", "ActualPredictedResidualDataGrid"); if (trendTp.IsForecastedDataGridVisible) seriesXmlWriter.WriteElementString("View", "ForecastedDataGrid"); if (trendTp.IsActualAndPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndPredictedGraph"); if (trendTp.IsActualAndForecastedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndForecastedGraph"); if (trendTp.IsActualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualVsPredictedGraph"); if (trendTp.IsResidualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualGraph"); if (trendTp.IsResidualVsActualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsActualGraph"); if (trendTp.IsResidualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsPredictedGraph"); seriesXmlWriter.WriteFullEndElement(); } else if (tp is CorrelogramResult) { CorrelogramResult cTp = (CorrelogramResult)tp; seriesXmlWriter.WriteElementString("Type", "Correlogram"); seriesXmlWriter.WriteElementString("Title", cTp.Title); seriesXmlWriter.WriteElementString("Lag", cTp.Lag.ToString()); seriesXmlWriter.WriteElementString("WhiteNoise", cTp.WhiteNoiseAcf.ToString().ToLower()); seriesXmlWriter.WriteStartElement("Data"); foreach (double value in cTp.Data) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); } else if (tp is LRResultTabPage) { LRResultTabPage lrTp = (LRResultTabPage)tp; seriesXmlWriter.WriteElementString("Type", "Linear Regression"); seriesXmlWriter.WriteElementString("Title", lrTp.Title); seriesXmlWriter.WriteElementString("DependentVariable", lrTp.DependentVariable.VariableName); seriesXmlWriter.WriteStartElement("IndependentVariables"); foreach (SeriesVariable var in lrTp.IndependentVariables) seriesXmlWriter.WriteElementString("Variable", var.VariableName); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteElementString("IsDurbinWatsonVisible", lrTp.IsDurbinWatsonVisible.ToString().ToLower()); seriesXmlWriter.WriteElementString("IsPartialCorrelationVisible", lrTp.IsPartialCorrelationVisible.ToString().ToLower()); seriesXmlWriter.WriteElementString("IsVIFForPredictorsVisible", lrTp.IsVIFForPredictorsVisible.ToString().ToLower()); seriesXmlWriter.WriteElementString("IsConfidenceIntervalForParametersVisible", lrTp.IsConfidenceIntervalForParametersVisible.ToString().ToLower()); seriesXmlWriter.WriteStartElement("LRSpecification"); seriesXmlWriter.WriteElementString("IncludedObservations", lrTp.LRProperties.IncludedObservations.ToString()); seriesXmlWriter.WriteElementString("IsMultiple", lrTp.LRProperties.IsMultiple.ToString().ToLower()); seriesXmlWriter.WriteElementString("R", lrTp.LRProperties.R.ToString()); seriesXmlWriter.WriteElementString("RSquare", lrTp.LRProperties.RSquare.ToString()); seriesXmlWriter.WriteElementString("AdjRSquare", lrTp.LRProperties.AdjRSquare.ToString()); seriesXmlWriter.WriteElementString("StandardError", lrTp.LRProperties.StandardError.ToString()); seriesXmlWriter.WriteElementString("DurbinWatson", lrTp.LRProperties.DurbinWatson.ToString()); seriesXmlWriter.WriteElementString("F", lrTp.LRProperties.F.ToString()); seriesXmlWriter.WriteElementString("SigOfF", lrTp.LRProperties.SigOfF.ToString()); seriesXmlWriter.WriteElementString("SSE", lrTp.LRProperties.SSE.ToString()); seriesXmlWriter.WriteElementString("SSR", lrTp.LRProperties.SSR.ToString()); seriesXmlWriter.WriteElementString("SST", lrTp.LRProperties.SST.ToString()); seriesXmlWriter.WriteElementString("MSE", lrTp.LRProperties.MSE.ToString()); seriesXmlWriter.WriteElementString("MSR", lrTp.LRProperties.MSR.ToString()); seriesXmlWriter.WriteStartElement("Parameters"); foreach (double val in lrTp.LRProperties.Parameters) seriesXmlWriter.WriteElementString("Value", val.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("StandardErrorOfParameters"); foreach (double val in lrTp.LRProperties.StandardErrorOfParameters) seriesXmlWriter.WriteElementString("Value", val.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("t"); foreach (double val in lrTp.LRProperties.t) seriesXmlWriter.WriteElementString("Value", val.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("SigOfT"); foreach (double val in lrTp.LRProperties.SigOfT) seriesXmlWriter.WriteElementString("Value", val.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("LowerBoundForParameters"); foreach (double val in lrTp.LRProperties.LowerBoundForParameters) seriesXmlWriter.WriteElementString("Value", val.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("UpperBoundForParameters"); foreach (double val in lrTp.LRProperties.UpperBoundForParameters) seriesXmlWriter.WriteElementString("Value", val.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("VIFForpredictors"); foreach (double val in lrTp.LRProperties.VIFForpredictors) seriesXmlWriter.WriteElementString("Value", val.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Correlations"); foreach (double val in lrTp.LRProperties.Correlations) seriesXmlWriter.WriteElementString("Value", val.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("PartialCorrelations"); foreach (double val in lrTp.LRProperties.PartialCorrelations) seriesXmlWriter.WriteElementString("Value", val.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("LRComponent"); seriesXmlWriter.WriteStartElement("Actual"); foreach (double val in lrTp.LRTable.Actual) seriesXmlWriter.WriteElementString("Value", val.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Predicted"); foreach (double val in lrTp.LRTable.Predicted) seriesXmlWriter.WriteElementString("Value", val.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Residual"); foreach (double val in lrTp.LRTable.Residual) seriesXmlWriter.WriteElementString("Value", val.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("ExpectedResidual"); foreach (double val in lrTp.LRTable.ExpectedResidual) seriesXmlWriter.WriteElementString("Value", val.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteFullEndElement(); if (lrTp.IsForcastedTableVisible) { seriesXmlWriter.WriteStartElement("LRForcasting"); seriesXmlWriter.WriteElementString("ForcastingStep", lrTp.ForcastedTime.Length.ToString()); seriesXmlWriter.WriteStartElement("TestValues"); int i = 0; foreach (SeriesVariable var in lrTp.IndependentVariables) { seriesXmlWriter.WriteStartElement(var.VariableName); for (int j = 0; j < lrTp.ForcastedData.Length; j++) { seriesXmlWriter.WriteElementString("Value", lrTp.TestValues[i, j].ToString()); } i++; seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("ForcastedValues"); seriesXmlWriter.WriteStartElement(lrTp.DependentVariable.VariableName); foreach (double val in lrTp.ForcastedData) seriesXmlWriter.WriteElementString("Value", val.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("ForcastedTime"); foreach (string val in lrTp.ForcastedTime) seriesXmlWriter.WriteElementString("Value", val); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteStartElement("VisibleView"); seriesXmlWriter.WriteElementString("View", "LRModelSummary"); if (lrTp.IsAnovaTableVisible) seriesXmlWriter.WriteElementString("View", "LRAnova"); if (lrTp.IsCoefficientTableVisible) seriesXmlWriter.WriteElementString("View", "LRCoefficients"); if (lrTp.IsDataTableVisible) seriesXmlWriter.WriteElementString("View", "LRActualPredictedResidual"); if (lrTp.IsForcastedTableVisible) seriesXmlWriter.WriteElementString("View", "Forcasted"); if (lrTp.IsResidualGraphVisible) seriesXmlWriter.WriteElementString("View", "LRResidualGraph"); if (lrTp.IsResidualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "LRResidualVsPredictedGraph"); if (lrTp.IsNormalProbabilityPlotVisible) seriesXmlWriter.WriteElementString("View", "LRNormalProbabilityPlot"); seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteEndElement(); seriesXmlWriter.WriteEndDocument(); seriesXmlWriter.Flush(); }
/// <summary> /// Menulis Result View /// </summary> /// <param name="tabPages">tab page pada result view</param> public void WriteResultPane(FATabStripItemCollection tabPages) { seriesXmlWriter.WriteStartElement("ResultPane"); foreach (FATabStripItem tp in tabPages) { seriesXmlWriter.WriteStartElement("TabPage"); if (tp is ANNResultTabPage) { ANNResultTabPage annTp = (ANNResultTabPage)tp; seriesXmlWriter.WriteElementString("Type", "Neural Network"); seriesXmlWriter.WriteElementString("Title", annTp.Title); seriesXmlWriter.WriteElementString("SeriesVariable", annTp.Variable.VariableName); seriesXmlWriter.WriteStartElement("NetworkSpecification"); seriesXmlWriter.WriteElementString("InputLayerNeurons", annTp.NetworkProperties.InputLayerNeurons.ToString()); seriesXmlWriter.WriteElementString("HiddenLayerNeurons", annTp.NetworkProperties.HiddenLayerNeurons.ToString()); seriesXmlWriter.WriteElementString("OutputLayerNeurons", annTp.NetworkProperties.OutputLayerNeurons.ToString()); seriesXmlWriter.WriteElementString("ActivationFunction", ((int)(annTp.NetworkProperties.ActivationFunction)).ToString()); seriesXmlWriter.WriteElementString("LearningRate", annTp.NetworkProperties.LearningRate.ToString()); seriesXmlWriter.WriteElementString("Momentum", annTp.NetworkProperties.Momentum.ToString()); seriesXmlWriter.WriteElementString("IncludedObservations", annTp.NetworkProperties.IncludedObservations.ToString()); seriesXmlWriter.WriteElementString("Error", annTp.NetworkProperties.Error.ToString()); seriesXmlWriter.WriteElementString("MSE", annTp.NetworkProperties.MSE.ToString()); seriesXmlWriter.WriteElementString("MAE", annTp.NetworkProperties.MAE.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Predicted"); foreach (double value in annTp.Predicted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); if (annTp.Forecasted != null) { seriesXmlWriter.WriteStartElement("Forecasted"); foreach (double value in annTp.Forecasted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteStartElement("VisibleView"); if (annTp.IsAnnModelSummaryVisible) seriesXmlWriter.WriteElementString("View", "AnnModelSummary"); if (annTp.IsActualPredictedResidualDataGridVisible) seriesXmlWriter.WriteElementString("View", "ActualPredictedResidualDataGrid"); if (annTp.IsForecastedDataGridVisible) seriesXmlWriter.WriteElementString("View", "ForecastedDataGrid"); if (annTp.IsActualAndPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndPredictedGraph"); if (annTp.IsActualAndForecastedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndForecastedGraph"); if (annTp.IsActualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualVsPredictedGraph"); if (annTp.IsResidualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualGraph"); if (annTp.IsResidualVsActualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsActualGraph"); if (annTp.IsResidualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsPredictedGraph"); seriesXmlWriter.WriteFullEndElement(); } else if (tp is MAResultTabPage) { MAResultTabPage maTp = (MAResultTabPage)tp; seriesXmlWriter.WriteElementString("Type", "Moving Average"); seriesXmlWriter.WriteElementString("Title", maTp.Title); seriesXmlWriter.WriteElementString("SeriesVariable", maTp.Variable.VariableName); seriesXmlWriter.WriteStartElement("MASpecification"); seriesXmlWriter.WriteElementString("includedObservations", maTp.MaProperties.includedObservations.ToString()); seriesXmlWriter.WriteElementString("isSingleMA", maTp.MaProperties.isSingleMA.ToString().ToLower()); seriesXmlWriter.WriteElementString("orde", maTp.MaProperties.orde.ToString()); seriesXmlWriter.WriteElementString("sseMA", maTp.MaProperties.sseMA.ToString()); seriesXmlWriter.WriteElementString("mseMA", maTp.MaProperties.mseMA.ToString()); seriesXmlWriter.WriteElementString("maeMA", maTp.MaProperties.maeMA.ToString()); seriesXmlWriter.WriteElementString("mpeMA", maTp.MaProperties.mpeMA.ToString()); seriesXmlWriter.WriteElementString("mapeMA", maTp.MaProperties.mapeMA.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("SingleMA"); foreach (double value in maTp.MaTable.singleSmoothed) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); if (maTp.MaProperties.isSingleMA == false) { seriesXmlWriter.WriteStartElement("DoubleMA"); foreach (double value in maTp.MaTable.doubleSmoothed) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteStartElement("Predicted"); foreach (double value in maTp.MaTable.predicted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Residual"); foreach (double value in maTp.MaTable.residual) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); if (maTp.Forecasted != null) { seriesXmlWriter.WriteStartElement("Forecasted"); foreach (double value in maTp.Forecasted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteStartElement("VisibleView"); if (maTp.IsMaModelSummaryVisible) seriesXmlWriter.WriteElementString("View", "MAModelSummary"); if (maTp.IsMovingAverageDataGridVisible) seriesXmlWriter.WriteElementString("View", "MovingAverageDataGrid"); if (maTp.IsSmoothingVisible) seriesXmlWriter.WriteElementString("View", "Smoothing"); //if (maTp.IsActualPredictedResidualDataGridVisible) seriesXmlWriter.WriteElementString("View", "ActualPredictedResidualDataGrid"); if (maTp.IsForecastedDataGridVisible) seriesXmlWriter.WriteElementString("View", "ForecastedDataGrid"); if (maTp.IsActualAndPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndPredictedGraph"); if (maTp.IsActualAndSmoothedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndSmoothedGraph"); if (maTp.IsActualAndForecastedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndForecastedGraph"); if (maTp.IsActualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualVsPredictedGraph"); if (maTp.IsResidualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualGraph"); if (maTp.IsResidualVsActualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsActualGraph"); if (maTp.IsResidualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsPredictedGraph"); seriesXmlWriter.WriteFullEndElement(); } else if (tp is ESResultTabPage) { ESResultTabPage esTp = (ESResultTabPage)tp; seriesXmlWriter.WriteElementString("Type", "Exponential Smoothing"); seriesXmlWriter.WriteElementString("Title", esTp.Title); seriesXmlWriter.WriteElementString("SeriesVariable", esTp.Variable.VariableName); seriesXmlWriter.WriteStartElement("ESSpecification"); seriesXmlWriter.WriteElementString("includedObservations", esTp.EsProperties.includedObservations.ToString()); seriesXmlWriter.WriteElementString("alpha", esTp.EsProperties.alpha.ToString()); seriesXmlWriter.WriteElementString("gamma", esTp.EsProperties.gamma.ToString()); seriesXmlWriter.WriteElementString("beta", esTp.EsProperties.beta.ToString()); seriesXmlWriter.WriteElementString("seasonalLength", esTp.EsProperties.seasonalLength.ToString()); seriesXmlWriter.WriteElementString("sseES", esTp.EsProperties.sseES.ToString()); seriesXmlWriter.WriteElementString("mseES", esTp.EsProperties.mseES.ToString()); seriesXmlWriter.WriteElementString("maeES", esTp.EsProperties.maeES.ToString()); seriesXmlWriter.WriteElementString("mpeES", esTp.EsProperties.mpeES.ToString()); seriesXmlWriter.WriteElementString("mapeES", esTp.EsProperties.mapeES.ToString()); seriesXmlWriter.WriteElementString("initialModel", esTp.EsProperties.initialModel.ToString()); seriesXmlWriter.WriteElementString("isMultiplicative", esTp.EsProperties.isMultiplicative.ToString().ToLower()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Smoothed"); foreach (double value in esTp.EsTable.smoothed) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); if (esTp.EsProperties.initialModel != 1 && esTp.EsProperties.initialModel != 2) { seriesXmlWriter.WriteStartElement("Trend"); foreach (double value in esTp.EsTable.trend) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); } if (esTp.EsProperties.initialModel == 4) { seriesXmlWriter.WriteStartElement("Seasonal"); foreach (double value in esTp.EsTable.seasonal) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteStartElement("Predicted"); foreach (double value in esTp.EsTable.predicted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Residual"); foreach (double value in esTp.EsTable.residual) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); if (esTp.Forecasted != null) { seriesXmlWriter.WriteStartElement("Forecasted"); foreach (double value in esTp.Forecasted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteStartElement("VisibleView"); if (esTp.IsEsModelSummaryVisible) seriesXmlWriter.WriteElementString("View", "ESModelSummary"); if (esTp.IsExponentialSmoothingDataGridVisible) seriesXmlWriter.WriteElementString("View", "ExponentialSmoothingDataGrid"); if (esTp.IsSmoothingVisible) seriesXmlWriter.WriteElementString("View", "Smoothing"); if (esTp.IsTrendVisible) seriesXmlWriter.WriteElementString("View", "Trend"); if (esTp.IsSeasonalVisible) seriesXmlWriter.WriteElementString("View", "Seasonal"); //if (maTp.IsActualPredictedResidualDataGridVisible) seriesXmlWriter.WriteElementString("View", "ActualPredictedResidualDataGrid"); if (esTp.IsForecastedDataGridVisible) seriesXmlWriter.WriteElementString("View", "ForecastedDataGrid"); if (esTp.IsActualAndPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndPredictedGraph"); if (esTp.IsActualAndSmoothedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndSmoothedGraph"); if (esTp.IsActualAndForecastedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndForecastedGraph"); if (esTp.IsActualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualVsPredictedGraph"); if (esTp.IsResidualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualGraph"); if (esTp.IsResidualVsActualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsActualGraph"); if (esTp.IsResidualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsPredictedGraph"); seriesXmlWriter.WriteFullEndElement(); } else if (tp is DECResultTabPage) { DECResultTabPage decTp = (DECResultTabPage)tp; seriesXmlWriter.WriteElementString("Type", "Decomposition"); seriesXmlWriter.WriteElementString("Title", decTp.Title); seriesXmlWriter.WriteElementString("SeriesVariable", decTp.Variable.VariableName); seriesXmlWriter.WriteStartElement("DECSpecification"); seriesXmlWriter.WriteElementString("includedObservations", decTp.DecProperties.includedObservations.ToString()); seriesXmlWriter.WriteElementString("seasonalLength", decTp.DecProperties.seasonalLength.ToString()); seriesXmlWriter.WriteElementString("sseDEC", decTp.DecProperties.sseDEC.ToString()); seriesXmlWriter.WriteElementString("mseDEC", decTp.DecProperties.mseDEC.ToString()); seriesXmlWriter.WriteElementString("maeDEC", decTp.DecProperties.maeDEC.ToString()); seriesXmlWriter.WriteElementString("mpeDEC", decTp.DecProperties.mpeDEC.ToString()); seriesXmlWriter.WriteElementString("mapeDEC", decTp.DecProperties.mapeDEC.ToString()); seriesXmlWriter.WriteElementString("isMultiplicative", decTp.DecProperties.isMultiplikatif.ToString().ToLower()); seriesXmlWriter.WriteElementString("initialTrend", decTp.DecProperties.initialTrend.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Parameters"); foreach (double value in decTp.DecProperties.parameters) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("SeasonalIndex"); foreach (double value in decTp.DecProperties.seasonalIdx) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Trend"); foreach (double value in decTp.DecTable.trend) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Detrend"); foreach (double value in decTp.DecTable.detrend) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Seasonal"); foreach (double value in decTp.DecTable.seasonal) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Deseasonal"); foreach (double value in decTp.DecTable.deseasonal) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Predicted"); foreach (double value in decTp.DecTable.predicted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Residual"); foreach (double value in decTp.DecTable.residual) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); if (decTp.Forecasted != null) { seriesXmlWriter.WriteStartElement("Forecasted"); foreach (double value in decTp.Forecasted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteStartElement("VisibleView"); if (decTp.IsDecModelSummaryVisible) seriesXmlWriter.WriteElementString("View", "DECModelSummary"); if (decTp.IsDecompositionDataGridVisible) seriesXmlWriter.WriteElementString("View", "DecompositionDataGrid"); if (decTp.IsTrendVisible) seriesXmlWriter.WriteElementString("View", "Trend"); //if (maTp.IsActualPredictedResidualDataGridVisible) seriesXmlWriter.WriteElementString("View", "ActualPredictedResidualDataGrid"); if (decTp.IsDetrendVisible) seriesXmlWriter.WriteElementString("View", "Detrend"); if (decTp.IsSeasonalVisible) seriesXmlWriter.WriteElementString("View", "Seasonal"); if (decTp.IsDeseasonalVisible) seriesXmlWriter.WriteElementString("View", "Deseasonal"); if (decTp.IsForecastedDataGridVisible) seriesXmlWriter.WriteElementString("View", "ForecastedDataGrid"); if (decTp.IsActualPredictedAndTrendGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualPredictedAndTrendGraph"); if (decTp.IsActualAndForecastedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndForecastedGraph"); if (decTp.IsActualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualVsPredictedGraph"); if (decTp.IsResidualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualGraph"); if (decTp.IsResidualVsActualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsActualGraph"); if (decTp.IsResidualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsPredictedGraph"); if (decTp.IsDetrendGraphVisible) seriesXmlWriter.WriteElementString("View", "DetrendGraph"); if (decTp.IsDeseasonalVisible) seriesXmlWriter.WriteElementString("View", "DeseasonalGraph"); seriesXmlWriter.WriteFullEndElement(); } else if (tp is TrendAnalysisResultTabPage) { TrendAnalysisResultTabPage trendTp = (TrendAnalysisResultTabPage)tp; seriesXmlWriter.WriteElementString("Type", "Trend Analysis"); seriesXmlWriter.WriteElementString("Title", trendTp.Title); seriesXmlWriter.WriteElementString("SeriesVariable", trendTp.Variable.VariableName); seriesXmlWriter.WriteStartElement("TrendAnalysisSpecification"); seriesXmlWriter.WriteElementString("includedObservations", trendTp.TrendProperties.includedObservations.ToString()); seriesXmlWriter.WriteElementString("R", trendTp.TrendProperties.r.ToString()); seriesXmlWriter.WriteElementString("RSquare", trendTp.TrendProperties.rSquare.ToString()); seriesXmlWriter.WriteElementString("RSquareAdjusted", trendTp.TrendProperties.rSquareAdjusted.ToString()); seriesXmlWriter.WriteElementString("sse", trendTp.TrendProperties.sse.ToString()); seriesXmlWriter.WriteElementString("mse", trendTp.TrendProperties.mse.ToString()); seriesXmlWriter.WriteElementString("initialModel", trendTp.TrendProperties.initialModel.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Parameters"); foreach (double value in trendTp.TrendProperties.parameters) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Predicted"); foreach (double value in trendTp.Predicted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteStartElement("Residual"); foreach (double value in trendTp.Residual) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); if (trendTp.Forecasted != null) { seriesXmlWriter.WriteStartElement("Forecasted"); foreach (double value in trendTp.Forecasted) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteStartElement("VisibleView"); if (trendTp.IsTrendAnalysisModelSummaryVisible) seriesXmlWriter.WriteElementString("View", "TrendAnalysisModelSummary"); if (trendTp.IsActualPredictedResidualDataGridVisible) seriesXmlWriter.WriteElementString("View", "ActualPredictedResidualDataGrid"); if (trendTp.IsForecastedDataGridVisible) seriesXmlWriter.WriteElementString("View", "ForecastedDataGrid"); if (trendTp.IsActualAndPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndPredictedGraph"); if (trendTp.IsActualAndForecastedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualAndForecastedGraph"); if (trendTp.IsActualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ActualVsPredictedGraph"); if (trendTp.IsResidualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualGraph"); if (trendTp.IsResidualVsActualGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsActualGraph"); if (trendTp.IsResidualVsPredictedGraphVisible) seriesXmlWriter.WriteElementString("View", "ResidualVsPredictedGraph"); seriesXmlWriter.WriteFullEndElement(); } else if (tp is CorrelogramResult) { CorrelogramResult cTp = (CorrelogramResult)tp; seriesXmlWriter.WriteElementString("Type", "Correlogram"); seriesXmlWriter.WriteElementString("Title", cTp.Title); seriesXmlWriter.WriteElementString("Lag", cTp.Lag.ToString()); seriesXmlWriter.WriteElementString("WhiteNoise", cTp.WhiteNoiseAcf.ToString().ToLower()); seriesXmlWriter.WriteStartElement("Data"); foreach (double value in cTp.Data) seriesXmlWriter.WriteElementString("Value", value.ToString()); seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteFullEndElement(); } seriesXmlWriter.WriteFullEndElement(); seriesXmlWriter.WriteEndElement(); seriesXmlWriter.WriteEndDocument(); seriesXmlWriter.Flush(); }
private List<FATabStripItem> copyTabCollectionAsList(FATabStripItemCollection tabs) { List<FATabStripItem> list = new List<FATabStripItem>(); foreach(FATabStripItem tab in tabs) { list.Add(tab); } return list; }