void flp_MouseUp(object sender, EventArgs e) { SessionVariable v = ((Control)sender).Tag as SessionVariable; if (v != null) { bool newVar = false; GraphVariable graphVariable = this.DisplayOptions.GraphVariables.FirstOrDefault(gv => gv.Variable == v.Name); if (graphVariable == null) { newVar = true; graphVariable = new GraphVariable() { Variable = v.Name, Name = v.Alias }; } GraphVariableForm gvf = new GraphVariableForm(graphVariable); if (DialogResult.OK == gvf.ShowDialog()) { Control panel = (Control)sender; if (sender is Label) { panel = ((Control)sender).Parent; } this.AddGraphVariable(graphVariable, panel, newVar); } } }
void flp_MouseUp(object sender, EventArgs e) { SessionVariable v = ((Control)sender).Tag as SessionVariable; if (v != null) { bool newVar = false; GraphVariable graphVariable = this.DisplayOptions.GraphVariables.FirstOrDefault(gv => gv.Variable == v.Name); if (graphVariable == null) { newVar = true; graphVariable = new GraphVariable() { Variable = v.Name, Name = v.Alias }; } GraphVariableForm gvf = new GraphVariableForm(graphVariable); if (DialogResult.OK == gvf.ShowDialog()) { Control panel = (Control)sender; if (sender is Label) { panel = ((Control)sender).Parent; } this.AddGraphVariable(graphVariable, panel, newVar); } /* * GaugeWindow gw = new GaugeWindow(session, v); * session.LogLineRead += new ME7LoggerSession.LogLineReadDel(gw.Refresh); * gw.Show(this); */ } }