示例#1
0
 public void Remove(BondStructureComponent component_)
 {
   m_listOfComponents.Remove(component_);
   subscribe(component_, false);
   component_.Dispose();
   recalculateLive(true);
 }
 private void add()
 {
   var item = new BondStructureComponent();
   InternalStructure.Add(item);
   addControlFor(item);
   m_loadedName = null;
   m_loadedPath = null;
 }
    private void addControlFor(BondStructureComponent item)
    {
      var cntrol = new BondStructureComponentEditor();
      flowLayoutPanel1.Controls.Add(cntrol);
      subscribe(cntrol);
      cntrol.Bind(item);

      sortOutPositioning();
      cntrol.Create();
    }
    private void subscribe(BondStructureComponent component_, bool do_ = true)
    {
      if (component_ == null)
        return;

      component_.PropertyChanged -= handleComponentChanged;

      if (!do_)
        return;

      component_.PropertyChanged += handleComponentChanged;
    }
    internal void Bind(BondStructureComponent bindToThis_)
    {
      subscribe(InnerObject, false);

      InnerObject = bindToThis_;

      subscribe(InnerObject);

      tbMult.Bind(bindToThis_, "Multiplier", new Validators.DoubleValidator("##0.0##"));

      tbInputString.Bind(m_inputStringARgs, "InputString", null, DataSourceUpdateMode.OnValidation);
    }
示例#6
0
    public BondStructure(BondStructureDefinition def_)
      : base(def_.Name)
    {
      foreach (var comp in def_.Items)
      {
        var item = new BondStructureComponent()
        {
          Bond = BondAnalysisLineHelper.FindBondFromDefinition(comp),
          Multiplier = comp.Multiplier
        };

        Add(item);
      }

      setPriorValue();
      SetNameSortingDate();
      recalculateLive(true);
    }
示例#7
0
 public void Add(BondStructureComponent component_)
 {
   m_listOfComponents.Add(component_);
   subscribe(component_);
   recalculateLive(true);
 }