public void AddBoundVariable(string name, BindingGetDlg getDelegate, BindingSetDlg setDelegate) { BoundVariable variable; if (_vars.ContainsKey(name)) { variable = _vars[name]; } else { variable = new BoundVariable(); variable.Name = name; variable.cpu = _shared.Cpu; _vars.Add(name, variable); _shared.Cpu.AddVariable(variable, name); } if (getDelegate != null) { variable.Get = getDelegate; } if (setDelegate != null) { variable.Set = setDelegate; } }
public void AddGetter(IEnumerable <string> names, BindingGetDlg dlg) { foreach (var name in names) { AddBoundVariable(name, dlg, null); } }
public void AddBoundVariable(string name, BindingGetDlg getDelegate, BindingSetDlg setDelegate) { BoundVariable variable; if (variables.ContainsKey(name)) { variable = variables[name]; } else { variable = new BoundVariable { Name = name, }; variables.Add(name, variable); shared.Cpu.AddVariable(variable, name, false); } if (getDelegate != null) { variable.Get = getDelegate; } if (setDelegate != null) { variable.Set = setDelegate; } }
public void AddGetter(IEnumerable<string> names, BindingGetDlg dlg) { foreach (var name in names) { AddBoundVariable(name, dlg, null); } }
public void AddGetter(string name, BindingGetDlg dlg) { var v = Cpu.FindVariable(name) ?? Cpu.FindVariable(name.Split(":".ToCharArray())[0]); if (v != null) { var variable = v as BoundVariable; if (variable != null) { variable.Get = dlg; } } else { var bv = Cpu.CreateBoundVariable(name); bv.Get = dlg; bv.Cpu = Cpu; } }
public void AddGetter(String name, BindingGetDlg dlg) { Variable v = cpu.FindVariable(name); if (v == null) v = cpu.FindVariable(name.Split(":".ToCharArray())[0]); if (v != null) { if (v is BoundVariable) { ((BoundVariable)v).Get = dlg; } } else { var bv = cpu.CreateBoundVariable(name); bv.Get = dlg; bv.cpu = cpu; } }
public void AddGetter(string name, BindingGetDlg dlg) { var v = Cpu.FindVariable(name) ?? Cpu.FindVariable(name.Split(":".ToCharArray())[0]); if (v != null) { var variable = v as BoundVariable; if (variable != null) { variable.Get = dlg; } } else { var bv = Cpu.CreateBoundVariable(name); bv.Get = dlg; bv.Cpu = Cpu; } }
public void AddBoundVariable(string name, BindingGetDlg getDelegate, BindingSetDlg setDelegate) { BoundVariable variable; if (_vars.ContainsKey(name)) { variable = _vars[name]; } else { variable = new BoundVariable(); variable.Name = name; variable.cpu = _shared.Cpu; _vars.Add(name, variable); _shared.Cpu.AddVariable(variable, name); } if (getDelegate != null) variable.Get = getDelegate; if (setDelegate != null) variable.Set = setDelegate; }
public void AddGetter(String name, BindingGetDlg dlg) { Variable v = cpu.FindVariable(name); if (v == null) { v = cpu.FindVariable(name.Split(":".ToCharArray())[0]); } if (v != null) { if (v is BoundVariable) { ((BoundVariable)v).Get = dlg; } } else { var bv = cpu.CreateBoundVariable(name); bv.Get = dlg; bv.cpu = cpu; } }
public void AddBoundVariable(string name, BindingGetDlg getDelegate, BindingSetDlg setDelegate) { BoundVariable variable; if (variables.ContainsKey(name)) { variable = variables[name]; } else { variable = new BoundVariable { Name = name, }; variables.Add(name, variable); shared.Cpu.AddVariable(variable, name, false); } if (getDelegate != null) variable.Get = getDelegate; if (setDelegate != null) variable.Set = setDelegate; }
public void AddGetter(string name, BindingGetDlg dlg) { AddBoundVariable(name, dlg, null); }
public void AddGetter(string name, BindingGetDlg dlg) { AddBoundVariable(name, dlg, null); }