Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/17/08 15:19:02 (15 years ago)
Author:
whackl
Message:

Graph fixed (#397)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Client.Console/HiveClientConsole.cs

    r1002 r1010  
    134134        }
    135135
    136         UpdateGraph(zGJobs, sc.JobsDone, sc.JobsAborted);
     136        UpdateGraph(sc.JobsDone, sc.JobsAborted);
    137137
    138138        if (sc.Status == NetworkEnumWcfConnState.Connected) {
     
    194194    }
    195195
    196     private void UpdateGraph(ZedGraphControl zgc, int jobsDone, int jobsAborted) {
     196    private void UpdateGraph(int jobsDone, int jobsAborted) {
     197      ZedGraphControl zgc = new ZedGraphControl();
    197198      GraphPane myPane = zgc.GraphPane;
    198199      myPane.GraphObjList.Clear();
    199 
    200200
    201201      myPane.Title.IsVisible = false;  // no title
     
    205205      myPane.YAxis.IsVisible = false;  // no y-axis
    206206      myPane.Legend.IsVisible = false; // no legend
    207      
     207
     208      myPane.Fill.Color = Color.FromKnownColor(KnownColor.Control);
     209
    208210      myPane.Chart.Fill.Type = FillType.None;
    209       myPane.Fill.Type = FillType.None;
    210 
    211       //// Set the titles and axis labels
    212       //myPane.Legend.IsVisible = false;
    213       //myPane.Title.IsVisible = false;
    214       ////myPane.Fill.Type = FillType.None;
    215       ////myPane.Fill = new Fill();
    216       ////myPane.Fill.Color = Color.Transparent;
     211      myPane.Fill.Type = FillType.Solid;
    217212
    218213      double sum = (double)jobsDone + jobsAborted;
     
    220215      double perAborted = (double)jobsAborted / sum * 100;
    221216
    222       myPane.AddPieSlice(perDone, Color.Green, 0.1, "Jobs done");
    223       myPane.AddPieSlice(perAborted, Color.Red, 0.1, "Jobs aborted");
     217      myPane.AddPieSlice(perDone, Color.Green, 0.1, "");
     218      myPane.AddPieSlice(perAborted, Color.Red, 0.1, "");
    224219     
    225220      myPane.AxisChange();
     221
     222      pbGraph.Image = zgc.GetImage();
    226223    }
    227224
     
    246243        cc.IPAdress = tbIPAdress.Text;
    247244        cc.Port = port;
    248         cccc.SetConnection(cc);
     245        cccc.SetConnectionAsync(cc);
    249246      } else {
    250247        MessageBox.Show("IP Adress and/or Port Error", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    251248      }
    252      
    253249    }
    254250
    255251    private void btnDisconnect_Click(object sender, EventArgs e) {
    256       cccc.Disconnect();
     252      cccc.DisconnectAsync();
    257253    }
    258254
Note: See TracChangeset for help on using the changeset viewer.