Add Json.Net and separate out Statistics Configuration file
Import Json.Net since it's difficult for SimpleJson to deal with nested type.
This commit is contained in:
@@ -29,14 +29,13 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
||||
System.Windows.Forms.DataVisualization.Charting.Legend legend2 = new System.Windows.Forms.DataVisualization.Charting.Legend();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series4 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series5 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series6 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
||||
System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
this.StatisticsChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
||||
this.byISPCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.bindingConfiguration = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
@@ -56,10 +55,10 @@
|
||||
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.calculationContainer = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.OKButton = new System.Windows.Forms.Button();
|
||||
this.CancelButton = new System.Windows.Forms.Button();
|
||||
this.OKButton = new System.Windows.Forms.Button();
|
||||
this.bindingConfiguration = new System.Windows.Forms.BindingSource(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.StatisticsChart)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingConfiguration)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
@@ -76,46 +75,47 @@
|
||||
this.splitContainer3.Panel1.SuspendLayout();
|
||||
this.splitContainer3.Panel2.SuspendLayout();
|
||||
this.splitContainer3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingConfiguration)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// StatisticsChart
|
||||
//
|
||||
this.StatisticsChart.BackColor = System.Drawing.Color.Transparent;
|
||||
chartArea2.AxisX.MajorGrid.Enabled = false;
|
||||
chartArea2.AxisY.MajorGrid.Enabled = false;
|
||||
chartArea2.AxisY2.MajorGrid.Enabled = false;
|
||||
chartArea2.BackColor = System.Drawing.Color.Transparent;
|
||||
chartArea2.Name = "ChartArea";
|
||||
this.StatisticsChart.ChartAreas.Add(chartArea2);
|
||||
chartArea1.AxisX.MajorGrid.Enabled = false;
|
||||
chartArea1.AxisY.MajorGrid.Enabled = false;
|
||||
chartArea1.AxisY2.MajorGrid.Enabled = false;
|
||||
chartArea1.BackColor = System.Drawing.Color.Transparent;
|
||||
chartArea1.Name = "ChartArea";
|
||||
this.StatisticsChart.ChartAreas.Add(chartArea1);
|
||||
this.StatisticsChart.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
legend2.BackColor = System.Drawing.Color.Transparent;
|
||||
legend2.Name = "ChartLegend";
|
||||
this.StatisticsChart.Legends.Add(legend2);
|
||||
legend1.BackColor = System.Drawing.Color.Transparent;
|
||||
legend1.Name = "ChartLegend";
|
||||
this.StatisticsChart.Legends.Add(legend1);
|
||||
this.StatisticsChart.Location = new System.Drawing.Point(0, 0);
|
||||
this.StatisticsChart.Margin = new System.Windows.Forms.Padding(5, 10, 5, 10);
|
||||
this.StatisticsChart.Name = "StatisticsChart";
|
||||
this.StatisticsChart.Palette = System.Windows.Forms.DataVisualization.Charting.ChartColorPalette.Pastel;
|
||||
series4.ChartArea = "ChartArea";
|
||||
series4.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Area;
|
||||
series4.Color = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));
|
||||
series4.Legend = "ChartLegend";
|
||||
series4.Name = "Data Transferred";
|
||||
series5.ChartArea = "ChartArea";
|
||||
series5.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Bubble;
|
||||
series5.Color = System.Drawing.Color.FromArgb(((int)(((byte)(221)))), ((int)(((byte)(88)))), ((int)(((byte)(0)))));
|
||||
series5.Legend = "ChartLegend";
|
||||
series5.Name = "Package Loss";
|
||||
series5.YValuesPerPoint = 4;
|
||||
series6.BorderWidth = 4;
|
||||
series6.ChartArea = "ChartArea";
|
||||
series6.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
|
||||
series6.Color = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(77)))), ((int)(((byte)(150)))));
|
||||
series6.Legend = "ChartLegend";
|
||||
series6.Name = "Ping";
|
||||
this.StatisticsChart.Series.Add(series4);
|
||||
this.StatisticsChart.Series.Add(series5);
|
||||
this.StatisticsChart.Series.Add(series6);
|
||||
this.StatisticsChart.Size = new System.Drawing.Size(951, 221);
|
||||
series1.ChartArea = "ChartArea";
|
||||
series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Area;
|
||||
series1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));
|
||||
series1.Legend = "ChartLegend";
|
||||
series1.Name = "Data Transferred";
|
||||
series2.ChartArea = "ChartArea";
|
||||
series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Bubble;
|
||||
series2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(221)))), ((int)(((byte)(88)))), ((int)(((byte)(0)))));
|
||||
series2.Legend = "ChartLegend";
|
||||
series2.Name = "Package Loss";
|
||||
series2.YValuesPerPoint = 4;
|
||||
series3.BorderWidth = 4;
|
||||
series3.ChartArea = "ChartArea";
|
||||
series3.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
|
||||
series3.Color = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(77)))), ((int)(((byte)(150)))));
|
||||
series3.Legend = "ChartLegend";
|
||||
series3.Name = "Ping";
|
||||
this.StatisticsChart.Series.Add(series1);
|
||||
this.StatisticsChart.Series.Add(series2);
|
||||
this.StatisticsChart.Series.Add(series3);
|
||||
this.StatisticsChart.Size = new System.Drawing.Size(951, 222);
|
||||
this.StatisticsChart.TabIndex = 2;
|
||||
//
|
||||
// byISPCheckBox
|
||||
@@ -130,10 +130,6 @@
|
||||
this.byISPCheckBox.Text = "By ISP/geolocation";
|
||||
this.byISPCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// bindingConfiguration
|
||||
//
|
||||
this.bindingConfiguration.DataSource = typeof(Shadowsocks.Model.StatisticsStrategyConfiguration);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
@@ -169,7 +165,7 @@
|
||||
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox1.Controls.Add(this.radioButton2);
|
||||
this.groupBox1.Controls.Add(this.radioButton1);
|
||||
this.groupBox1.Location = new System.Drawing.Point(698, 12);
|
||||
this.groupBox1.Location = new System.Drawing.Point(698, 7);
|
||||
this.groupBox1.Margin = new System.Windows.Forms.Padding(5, 10, 5, 10);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10);
|
||||
@@ -205,6 +201,7 @@
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.IsSplitterFixed = true;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Margin = new System.Windows.Forms.Padding(5, 10, 5, 10);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
@@ -221,7 +218,7 @@
|
||||
this.splitContainer1.Panel2.Controls.Add(this.groupBox1);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.StatisticsChart);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(951, 458);
|
||||
this.splitContainer1.SplitterDistance = 227;
|
||||
this.splitContainer1.SplitterDistance = 226;
|
||||
this.splitContainer1.SplitterWidth = 10;
|
||||
this.splitContainer1.TabIndex = 12;
|
||||
//
|
||||
@@ -252,7 +249,7 @@
|
||||
// splitContainer2.Panel2
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.splitContainer3);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(951, 227);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(951, 226);
|
||||
this.splitContainer2.SplitterDistance = 365;
|
||||
this.splitContainer2.SplitterWidth = 5;
|
||||
this.splitContainer2.TabIndex = 7;
|
||||
@@ -404,7 +401,7 @@
|
||||
// splitContainer3.Panel2
|
||||
//
|
||||
this.splitContainer3.Panel2.Controls.Add(this.calculationContainer);
|
||||
this.splitContainer3.Size = new System.Drawing.Size(581, 227);
|
||||
this.splitContainer3.Size = new System.Drawing.Size(581, 226);
|
||||
this.splitContainer3.SplitterDistance = 46;
|
||||
this.splitContainer3.SplitterWidth = 10;
|
||||
this.splitContainer3.TabIndex = 6;
|
||||
@@ -426,11 +423,23 @@
|
||||
this.calculationContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.calculationContainer.Margin = new System.Windows.Forms.Padding(5, 10, 5, 10);
|
||||
this.calculationContainer.Name = "calculationContainer";
|
||||
this.calculationContainer.Size = new System.Drawing.Size(581, 171);
|
||||
this.calculationContainer.Size = new System.Drawing.Size(581, 170);
|
||||
this.calculationContainer.TabIndex = 1;
|
||||
//
|
||||
// CancelButton
|
||||
//
|
||||
this.CancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CancelButton.Location = new System.Drawing.Point(844, 166);
|
||||
this.CancelButton.Name = "CancelButton";
|
||||
this.CancelButton.Size = new System.Drawing.Size(93, 43);
|
||||
this.CancelButton.TabIndex = 5;
|
||||
this.CancelButton.Text = "Cancel";
|
||||
this.CancelButton.UseVisualStyleBackColor = true;
|
||||
this.CancelButton.Click += new System.EventHandler(this.CancelButton_Click);
|
||||
//
|
||||
// OKButton
|
||||
//
|
||||
this.OKButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.OKButton.Location = new System.Drawing.Point(745, 166);
|
||||
this.OKButton.Name = "OKButton";
|
||||
this.OKButton.Size = new System.Drawing.Size(93, 43);
|
||||
@@ -439,15 +448,9 @@
|
||||
this.OKButton.UseVisualStyleBackColor = true;
|
||||
this.OKButton.Click += new System.EventHandler(this.OKButton_Click);
|
||||
//
|
||||
// CancelButton
|
||||
// bindingConfiguration
|
||||
//
|
||||
this.CancelButton.Location = new System.Drawing.Point(844, 166);
|
||||
this.CancelButton.Name = "CancelButton";
|
||||
this.CancelButton.Size = new System.Drawing.Size(93, 43);
|
||||
this.CancelButton.TabIndex = 5;
|
||||
this.CancelButton.Text = "Cancel";
|
||||
this.CancelButton.UseVisualStyleBackColor = true;
|
||||
this.CancelButton.Click += new System.EventHandler(this.CancelButton_Click);
|
||||
this.bindingConfiguration.DataSource = typeof(Shadowsocks.Model.StatisticsStrategyConfiguration);
|
||||
//
|
||||
// StatisticsStrategyConfigurationForm
|
||||
//
|
||||
@@ -462,7 +465,6 @@
|
||||
this.Name = "StatisticsStrategyConfigurationForm";
|
||||
this.Text = "StatisticsStrategyConfigurationForm";
|
||||
((System.ComponentModel.ISupportInitialize)(this.StatisticsChart)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingConfiguration)).EndInit();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
@@ -482,6 +484,7 @@
|
||||
this.splitContainer3.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit();
|
||||
this.splitContainer3.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingConfiguration)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -509,7 +512,7 @@
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.NumericUpDown dataCollectionMinutesNum;
|
||||
private System.Windows.Forms.BindingSource bindingConfiguration;
|
||||
private System.Windows.Forms.Button CancelButton;
|
||||
private new System.Windows.Forms.Button CancelButton;
|
||||
private System.Windows.Forms.Button OKButton;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user