public My_VariableBindingData(My_Variable variable, WaveformCore core, ScaleManager scaleManager, CursorViewer cursorViewer) { this.variable = variable; this.cursorViewer = cursorViewer; this.core = core; this.scaleManager = scaleManager; //Реакция на изменение переменной variable.PropertyChanged += new PropertyChangedEventHandler(variable_PropertyChanged); }
private void MenuItemProperties_Click(object sender, RoutedEventArgs e) { if (ListViewMain.SelectedItem != null) { My_Variable mv = ((ListViewMain.SelectedItem as TreeViewItem).Header as My_VariableBindingData).Variable; SignalProperties prop = new SignalProperties(mv); if (prop.ShowDialog() == true) { UpdateSignalView(); } } }
private void MenuItemSignalProperties_Click(object sender, RoutedEventArgs e) { object item = ListViewCurrentSelectedSignals.SelectedItem; if (item != null) { My_Variable var = (My_Variable)item; SignalProperties prop = new SignalProperties(var); prop.ShowDialog(); pageIterator.UpdateIterators(); UpdateListViewData(); } }
private void MenuItemDeleteSignal_Click(object sender, RoutedEventArgs e) { object item = ListViewCurrentSelectedSignals.SelectedItem; if (item != null) { My_Variable var = (My_Variable)item; CurrentDump.Remove(var); pageIterator.PrepareIterators(); MapPages(); UpdateListViewCurrentSignals(); UpdateListViewData(); TextBlockPageCount.Text = TotalPageCountStr; NumericUpDownPage.Value = 1; } }
private void LoadConfiguration(string confPath) { currentDump.Clear(); WaveformConfiguration conf = WaveformConfiguration.LoadConfiguration(confPath); if (conf != null) { foreach (My_VariableConfiguration varc in conf.VariablesConfiguration) { foreach (IValueProvider var in dump.GetVariablesEnumerator()) { if (var is Signal) { if ((var as Signal).Idx.Equals(varc.Idx)) { My_Variable variable = new My_Variable(var as Signal); variable.DataRepresentation = varc.DataRepresentation; currentDump.Add(variable); break; } } } } ScaleManager.StartTime = StartTime; ScaleManager.EndTime = EndTime; ScaleManager.VisibleStartTime = conf.VisibleStartTime; ScaleManager.VisibleTimeDiapasone = conf.VisibleTimeDiapasone; entity = conf.Entity; architectureName = conf.ArchitectureName; entityName = conf.EntityName; fileName = conf.FileName; bookMarks = conf.BookMarks; } else { foreach (IValueProvider var in dump.Variables) { if (var is Signal) { currentDump.Add(new My_Variable(var.Name, var.Name, var as Signal)); } } entity = new Entity(); } }
public double?GetYPos(My_Variable var) { foreach (object o in ListViewMain.Items) { TreeViewItem tlw = o as TreeViewItem; My_VariableBindingData bd = tlw.Header as My_VariableBindingData; if (bd.Variable == var) { try { Point pt = tlw.PointToScreen(new Point(0, 0)); return(pt.Y); } catch { return(null); } } } return(null); }
public Selection() { x1 = 0; x2 = 0; variable = null; }
public Selection(UInt64 start, UInt64 end, My_Variable variable) { this.x1 = start; this.x2 = end; this.variable = variable; }
public GeneratorDialog(My_Variable variable) { InitializeComponent(); this.GenSettings = ModellingType.GetGeneratorSettings(variable.Signal.Type); }
public My_VariableConfiguration(My_Variable variable) { idx = variable.Signal.Idx; dataRepresentation = variable.DataRepresentation; }
public SignalProperties(My_Variable variable) { this.variable = variable; InitializeComponent(); }