using using using using using using using using using using using

System; System.Collections; System.ComponentModel; System.Data; System.Drawing; System.Web; System.Web.SessionState; System.Web.UI; System.Web.UI.WebControls; System.Web.UI.HtmlControls; ChartDirector;

namespace CRA.clima.webapplications.gsrad { /// <summary> /// Descrizione di riepilogo per WebForm1. /// </summary> public class WebForm1 : System.Web.UI.Page { protected System.Web.UI.WebControls.TextBox TextBox1; protected System.Web.UI.WebControls.TextBox TextBox2; protected System.Web.UI.WebControls.TextBox TextBox3; protected System.Web.UI.WebControls.TextBox TextBox4; protected System.Web.UI.WebControls.TextBox TextBox5; protected System.Web.UI.WebControls.TextBox TextBox6; protected System.Web.UI.WebControls.TextBox TextBox7; protected System.Web.UI.WebControls.TextBox TextBox8; protected System.Web.UI.WebControls.TextBox TextBox9; protected System.Web.UI.WebControls.Label Label2; protected System.Web.UI.WebControls.TextBox TextBox10; protected System.Web.UI.WebControls.Label Label3; protected System.Web.UI.WebControls.Button Button1; protected System.Web.UI.WebControls.Label Label4; protected System.Web.UI.WebControls.Label Label5; protected System.Web.UI.WebControls.Label lblSlope; protected System.Web.UI.WebControls.Label lblAspect; protected System.Web.UI.WebControls.HyperLink HyperLink1; protected System.Web.UI.WebControls.HyperLink HyperLink2; protected System.Web.UI.WebControls.HyperLink HyperLink3; protected System.Web.UI.WebControls.Image Image1; protected ChartDirector.WebChartViewer WebChartViewer1;

Web.WebControls.WebControls.UI.Label Label1.Label Label10.Label Label11.WebControls.UI.Button Button2. System. System.WebControls.Web.WebControls.UI. base.Web.UI.Web. Non modificare il contenuto del metodo con l'editor di codice. System.TextBox TextBox15.UI.WebControls.WebControls.TextBox TextBox12.WebControls.UI. System.Label Label12.Web.EventArgs e) { // Inserire qui il codice utente necessario per inizializzare la pagina.Web. } /// /// /// /// <summary> Metodo necessario per il supporto della finestra di progettazione. System. </summary> .UI.WebControls. System.Button Button3.TextBox TextBox16.OnInit(e). System.TextBox TextBox14. System.Web.WebControls.TextBox TextBox11. System.protected protected protected protected protected protected protected protected protected protected protected protected protected protected protected protected protected protected protected protected protected protected System. System.Web.Web. private void Page_Load(object sender.UI.WebChartViewer WebChartViewer2. System. System.UI. ChartDirector.UI.Web.UI.Label Label13.Web. System. System.UI.UI. System. System.Label Label14.Web.UI.Web. System.UI.Web.TextBox TextBox18. // InitializeComponent().TextBox TextBox17.WebControls.Label Label8. } #region Codice generato da Progettazione Web Form override protected void OnInit(EventArgs e) { // // CODEGEN: questa chiamata è richiesta da Progettazione Web Form ASP.Label Label6.UI. System.WebControls. System.WebControls.WebControls.WebControls.UI.WebControls.Web.WebControls.Web.Web. System.UI.UI.WebControls.Label Label9.Web.TextBox TextBox13. System.Label Label15.Web.Label Label7.NET.UI.UI.WebControls.WebControls.Web.WebControls.Web.

it. double cellSize = double. .Visible = false. elevation[4] = double.www. WebChartViewer2.sipeaa.Text). double[] elevation = new double[9]. elevation[2] = double.www.gsrad.Text). lblAspect.sipeaa. // data for the graph //the data for the line chart double[] dataY1 = new double[365].Text).Text).it.Click += new System. System.Parse(TextBox1.Parse(TextBox8.EventArgs e) { WebChartViewer1.Page_Load).Visible = false.SlopeAspect(cellSize. elevation[6] = double. elevation[8] = double.Button2_Click).Button1_Click).clima. this.Parse(TextBox4.clima. elevation[7] = double.Text).webapplications.sipeaa.gsrad.Parse(TextBox10.CRA_clima_GSRad g = new CRA. 1).ToString().CRA_clima_GSRad().Click += new System.Text).Round(g.it.EventHandler(this.webapplications.sipeaa.Round(g.Text = Math.ToString().SlopeAspect(cellSize.EventHandler(this.EventHandler(this. lblSlope.Text = Math.Parse(TextBox7. elevation)[1].Text). System.www.Button1.gsrad.it.Parse(TextBox5. //instance of the web service class CRA. } private void Button2_Click(object sender. this.Load += new System.CRA_clima_GSRad g = new CRA.Button3.Button3_Click).Text).webapplications. this.Parse(TextBox9.Text). } #endregion private void Button1_Click(object sender.Parse(TextBox6.Click += new System. elevation[5] = double. elevation)[0].gsrad.Parse(TextBox3.CRA_clima_GSRad().Parse(TextBox2.EventArgs e) { //instance of the web service class CRA.Text).Button2.private void InitializeComponent() { this. elevation[0] = double. 1).clima.www. elevation[3] = double.EventHandler(this.clima.webapplications. elevation[1] = double.

setLabelStyle("". dataY3[i] = g. //Set the plotarea and add grids c.addText(50. 0xffffff. "extraterrestrial solar radiation". c.Parse(TextBox13. //Add titles to the top and bottom of the chart using 7.setTitle("SRad (MJ m-2 d-1)".Text). "daily". "arial.5 pts Arial as the x axis label font c. i++) { // day of the year dataX[i] = i+1.ttf".Parse(TextBox12. 7. //Use 10 pts Arial as the y axis label font c. 10. double lat2 = double. 10). //The text is white 0xffffff on a deep blue 0x31319C background. // extraterrestrial rad dataY1[i] = g. "arial.setTitle("day of the year".ExtraterrestrialRadiationDaily(i+1.xAxis(). lat3).Text). -1. "arial. dataY2[i] = g. lat1).double[] dataY2 = new double[365].ExtraterrestrialRadiationDaily(i+1. lat2). //Use 7. int i = 0.5).yAxis(). -1. c. 25.TopLeft). -1).5pt Arial font.addTitle2(Chart.setLabelStyle("". 440. double[] dataX = new double[365].ttf". double lat3 = double.yAxis(). 180. 0x31319C). i<365. "arial. 10.Top. } //Create a XYChart object of size 500 x 256 pixels XYChart c = new XYChart(500. 0xc0c0c0.Parse(TextBox11. 0xc0c0c0.ExtraterrestrialRadiationDaily(i+1.Text).setAlignment(Chart.ttf". double lat1 = double. 256).5).ttf". . 7. //Add text in the plot area (top left corner of plotarea) c. c. 0x31319c). 10). double[] dataY3 = new double[365]. for (i=0. 26.setPlotArea(50.xAxis().

double rangeTD = double.sipeaa. double rangeTM = double.Text).addLineLayer(dataY3.Image = c.gsrad.EventArgs e) { WebChartViewer2.Text). TextBox13. //instance of the web service class CRA.it. lat = double.Text). double extraRad. int DOY.gsrad.www.CRA_clima_GSRad g = new CRA.ExtraterrestrialRadiationHourly(DOY.addLineLayer(dataY2.CRA_clima_GSRad().Parse(TextBox17.Parse(TextBox14.//set labels c.Visible = false. System. extraRadHourly = g. TextBox11. } private void Button3_Click(object sender. WebChartViewer1. //output the chart WebChartViewer1.Text).clima. lat).0x40cf40. double gsrad.Text). "". double BC_b = double.365.Parse(TextBox18.makeWebImage(1).Text). //GSRad .addLineLayer(dataY1.getHTMLImageMap("clickable".setLinearScale(1. //extraterresrialRadiation extraRad = g.Visible = true.ImageMap = c.Parse(TextBox16.www. c.ExtraterrestrialRadiationDaily(DOY.xAxis(). double lat. double[] extraRadHourly = new double[24].webapplications.webapplications. //include tool tip for the chart WebChartViewer1. "title='GSR hourly data'").0xc00000.Text).sipeaa.30). DOY = int.clima.it. c. TextBox12. //Add a red diamonds layer to the chart c.Parse(TextBox15.0x31319c.Text). lat). WebChartViewer1.Visible = false.

0x31319C). //Add titles to the top and bottom of the chart using 7. rangeTM.setPlotArea(50.5pt Arial font. c.setLabelStyle("". 0xffffff. 0xc0c0c0. //Add a red diamonds layer to the chart c. 25.setLinearScale(0. -1). //Add text in the plot area (top left corner of plotarea) c.xAxis().5 pts Arial as the x axis label font c. "hourly". //Use 10 pts Arial as the y axis label font c. 440. "arial. 0xc0c0c0. 0xc00000). } //Create a XYChart object of size 500 x 256 pixels XYChart c = new XYChart(500.xAxis(). Chart. 10.setAlignment(Chart.75. 0x31319c). extraRadHourly.yAxis()."hourlyGSRad". //Set the plotarea and add grids c.addText(50.HourlyGlobalSolarRadiationDaily(gsrad. . 10).23. c.setTitle("GSRad (MJ m-2 h-1)". dataY = g. "hourly values of global solar radiation".setTitle("hour". 26.6). double[] dataX = new double[24]. extraRad). 180. extraRad).ttf". //set labels c.addScatterLayer(dataX. i<23. 10). //The text is white 0xffffff on a deep blue 0x31319C background.GlobalSolarRadiationBristowCampbell(1. i++) { dataX[i] = i+1.yAxis().ttf".setLabelStyle("".5).TopLeft). -1.xAxis(). 256).DiamondSymbol.gsrad = g. //Use 7. c.Top. 7. BC_b. "arial.5). dataY. "arial. 8. 10. "arial. int i = 0. -1.ttf". // data for the graph //the data for the line chart double[] dataY = new double[24]. 7.ttf". 0.addTitle2(Chart. for (i=0.rangeTD.

getHTMLImageMap("clickable".makeWebImage(1).//output the chart WebChartViewer2.Visible = true. WebChartViewer2. } } } . "title='GSR hourly data'"). //include tool tip for the chart WebChartViewer2.Image = c. "".ImageMap = c.

Sign up to vote on this title
UsefulNot useful