public MainForm() { InitializeComponent(); theModel = new DESmodel(); propertyGrid.SelectedObject = theModel; Client.SetClientChartAndArea(chartClient, chartClient.ChartAreas[0]); // static function 不需要 new CLient 就可以呼叫 Server.SetServerChartAndPieChart(chartServerAndQueue, chartServerAndQueue.ChartAreas[0], chartPie); TimedQueue.SetQueueChartAndArea(chartServerAndQueue, chartServerAndQueue.ChartAreas[1]); chartServerAndQueue.ChartAreas[1].AxisX.MajorGrid.LineColor = Color.Silver; chartServerAndQueue.ChartAreas[1].AxisY.MajorGrid.LineColor = Color.Silver; chartServerAndQueue.ChartAreas[1].AxisY.Minimum = 0; chartServerAndQueue.ChartAreas[1].AxisX.Minimum = 0; chartClient.ChartAreas[0].CursorX.IsUserEnabled = true; chartClient.ChartAreas[0].CursorX.Interval = 0; chartClient.ChartAreas[0].CursorX.IsUserSelectionEnabled = true; chartClient.ChartAreas[0].AxisX.ScaleView.Zoomable = true; chartClient.ChartAreas[0].AxisX.ScrollBar.IsPositionedInside = true; chartClient.ChartAreas[0].AxisX.ScrollBar.ButtonStyle = ScrollBarButtonStyles.ResetZoom; chartClient.ChartAreas[0].AxisX.ScaleView.SmallScrollMinSize = 0; chartClient.ChartAreas[0].CursorY.IsUserEnabled = true; chartClient.ChartAreas[0].CursorY.Interval = 0; chartClient.ChartAreas[0].CursorY.IsUserSelectionEnabled = true; chartClient.ChartAreas[0].AxisY.ScaleView.Zoomable = true; chartClient.ChartAreas[0].AxisY.ScrollBar.IsPositionedInside = true; chartClient.ChartAreas[0].AxisY.ScrollBar.ButtonStyle = ScrollBarButtonStyles.ResetZoom; chartClient.ChartAreas[0].AxisY.ScaleView.SmallScrollMinSize = 0; }
private void tsp_factory_Click(object sender, EventArgs e) { theModel = DESmodel.CreateFactoryModel(); propertyGrid.SelectedObject = theModel; }
private void tsp_computer_Click(object sender, EventArgs e) { theModel = DESmodel.CreateComputerModel(); propertyGrid.SelectedObject = theModel; }
private void tsp_bankAndMcDonald_Click(object sender, EventArgs e) { theModel = DESmodel.CreateBandAndMcDonaldModel(); propertyGrid.SelectedObject = theModel; }