private void cu_Resized(object sender, MouseEventArgs e)
        {
            CadreUC uc = sender as CadreUC;

            uc.Width  = e.X;
            uc.Height = e.Y;
        }
Exemple #2
0
 public void Remove(CadreUC uc)
 {
     if (this.IsBelowToThisGroup(uc))
     {
         this.Controls.Remove(uc);
         this.parent.Controls.Add(uc);
         this.inner.Remove(uc);
     }
 }
        private void CurrentCadreModel_NewObject(object sender, EventArgs e)
        {
            CadreUC cu = new CadreUC(this.sPanel);

            cu.Moved                      += cu_Moved;
            cu.Resized                    += cu_Resized;
            cu.Selected                   += cu_Selected;
            cu.CrossRectanglePaint        += cu_CrossRectanglePaint;
            cu.Properties.PropertyChanged += Properties_PropertyChanged;
            this.SculptureObject.AddNewCadreModel(cu.Properties);
            this.sPanel.Controls.Add(cu);
            this.CurrentCadreModel.CurrentObject = cu.Properties;
            this.btnValidate1.SetDirty();
        }
 private void SculptureView_Load(object sender, EventArgs e)
 {
     this.SculptureObject.Reinit();
     foreach (Library.CadreModel cm in this.SculptureObject.Cadres)
     {
         CadreUC cu = new CadreUC(this.sPanel, cm);
         cu.Moved                      += cu_Moved;
         cu.Resized                    += cu_Resized;
         cu.Selected                   += cu_Selected;
         cu.CrossRectanglePaint        += cu_CrossRectanglePaint;
         cu.Properties.PropertyChanged += Properties_PropertyChanged;
         this.sPanel.Controls.Add(cu);
     }
     Library.CadreModel.ReinitCounter(this.SculptureObject.Cadres.Count);
 }
Exemple #5
0
 public bool IsBelowToThisGroup(CadreUC uc)
 {
     return(this.inner.Exists(a => { return a.TabIndex == uc.TabIndex; }));
 }
        private void cu_Moved(object sender, MouseEventArgs e)
        {
            CadreUC uc = sender as CadreUC;

            uc.Position = new Point(uc.Position.X + e.X, uc.Position.Y + e.Y);
        }