public void BindDataToControl(Library.CadreModel cm)
 {
     this.modelTypes = new List <Library.CadreModelType>();
     this.modelTypes.AddRange(from Library.CadreModelType m in cm.ModelTypes select(m.Clone() as Library.CadreModelType));
     this.cmbType.DataSource    = this.modelTypes;
     this.cmbType.DisplayMember = "Type";
     this.cmbType.DataBindings.Add("SelectedIndex", cm, "SelectedModelTypeIndex");
     for (int index = 0; index < this.modelTypes.Count; ++index)
     {
         IBindingUC t = this.ucRefs[index] as IBindingUC;
         t.BindDataToControl(this.modelTypes[index]);
     }
     this.txtName.DataBindings.Add("Text", cm, "Name");
 }
Example #2
0
 public GroupCadreUC(SculpturePanel panel, Library.GroupCadreModel group, Library.CadreModel cm) : base(panel, cm)
 {
     InitializeComponent();
     this.group = new Library.GroupCadreModel();
     foreach (CadreUC cadre in panel.Controls)
     {
         if (this.group.Exists(cadre.TabIndex))
         {
             this.inner.Add(cadre);
             this.parent.Controls.Remove(cadre);
             this.Controls.Add(cadre);
         }
     }
 }
Example #3
0
 public CadreUC(SculpturePanel panel)
 {
     InitializeComponent();
     this.buttonDown           = false;
     this.cm                   = new Library.CadreModel();
     this.BackColor            = this.cm.Background;
     this.ForeColor            = this.cm.Foreground;
     this.BorderColor          = this.cm.Border;
     base.Left                 = this.cm.Height;
     base.Top                  = this.cm.HeightPosition;
     this.Width                = this.cm.Width;
     this.Height               = this.cm.Height;
     this.cm.PropertyChanged  += cm_PropertyChanged;
     this.parent               = panel;
     this.parent.RatioChanged += parent_RatioChanged;
     this.Size                 = new Size(this.cm.Width, this.cm.Height);
 }
 private void BindDataToControl(Library.CadreModel cm)
 {
     this.cadreModelBindingSource.DataSource = cm;
 }