- netpinger_app.zip
- LiveGraph.dll
- NetPinger.exe
- NetUtils.dll
- netpinger_src.zip
- NetPinger
- config
- graphic
- 0_very_poor.png
- 1_poor.png
- 2_fair.png
- 3_good.png
- 4_very good.png
- 5_excellent.png
- 6_perfect.png
- BeBounce.ico
- Font_Signs_Balls_icon_CRIMSON_3067.png
- mnu_clear.png
- mnu_clear_all.png
- mnu_data_series_options.png
- mnu_graphs.png
- mnu_help.png
- mnu_host_add.png
- mnu_host_remove.png
- mnu_options.png
- mnu_program_options.png
- mnu_save.png
- mnu_scan.png
- mnu_start.png
- mnu_start_all.png
- mnu_stop all.png
- mnu_stop.png
- mnu_traceroute.png
- LiveGraph
- NetPinger.csproj
- NetPinger.sln
- NetUtils
- Properties
- source
- netpinger_demo.zip
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using NetUtils;
namespace NetPinger
{
public partial class GraphForm : Form
{
private Dictionary<HostPinger, HostDataSeries>.ValueCollection _series = null;
public Dictionary<HostPinger, HostDataSeries>.ValueCollection Series
{
get { return _series; }
set { _series = value; }
}
private GraphManager _graphManager;
public GraphForm(GraphManager graphManager)
{
_graphManager = graphManager;
InitializeComponent();
if (_graphManager.IsError)
{
_cbGraph.Text = "An error occured while opening settings file!";
_btnLoad.Enabled = _btnSave.Enabled = _btnRemove.Enabled = _cbGraph.Enabled = false;
}
else
{
foreach (string g in _graphManager.Graphs)
_cbGraph.Items.Add(g);
_graphManager.OnGraphCollectionUpdate += new GraphManager.GraphCollectionUpdate(_graphManager_OnGraphCollectionUpdate);
}
}
void _graphManager_OnGraphCollectionUpdate()
{
_cbGraph.Items.Clear();
foreach (string g in _graphManager.Graphs)
_cbGraph.Items.Add(g);
}
private void _gcGraphs_OnAddView(LiveGraph.GraphControl control, LiveGraph.Graph graph)
{
AddDataSeriesForm dlg = new AddDataSeriesForm();
dlg.Series = _series;
if (dlg.ShowDialog(this) == DialogResult.OK)
graph.AddView(dlg.SelectedSeries, dlg.Color);
}
private void _btnLoad_Click(object sender, EventArgs e)
{
_graphManager.LoadGraphCollection(_cbGraph.Text, _gcGraphs);
}
private void _btnSave_Click(object sender, EventArgs e)
{
_graphManager.AddGraphCollection(_cbGraph.Text, _gcGraphs);
}
private void _btnRemove_Click(object sender, EventArgs e)
{
_graphManager.RemoveGraphCollection(_cbGraph.Text);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.