Ejemplo n.º 1
0
 private void updateEnabled()
 {
     if (listSTLObjects.SelectedItem == null)
     {
         textRotX.Enabled      = false;
         textRotY.Enabled      = false;
         textRotZ.Enabled      = false;
         textScaleX.Enabled    = false;
         textScaleY.Enabled    = false;
         textScaleZ.Enabled    = false;
         checkScaleAll.Enabled = false;
         textTransX.Enabled    = false;
         textTransY.Enabled    = false;
         textTransZ.Enabled    = false;
         buttonCenter.Enabled  = false;
         buttonLand.Enabled    = false;
         cont.SetObjectSelected(false);
     }
     else
     {
         textRotX.Enabled      = true;
         textRotY.Enabled      = true;
         textRotZ.Enabled      = true;
         textScaleX.Enabled    = true;
         textScaleY.Enabled    = !checkScaleAll.Checked;
         textScaleZ.Enabled    = !checkScaleAll.Checked;
         checkScaleAll.Enabled = true;
         textTransX.Enabled    = true;
         textTransY.Enabled    = true;
         textTransZ.Enabled    = true;
         buttonCenter.Enabled  = true;
         buttonLand.Enabled    = true;
         cont.SetObjectSelected(true);
     }
     if (listSTLObjects.Items.Count == 0)
     {
         buttonRemoveSTL.Enabled = false;
         buttonSave.Enabled      = false;
         buttonSlice.Enabled     = false;
     }
     else
     {
         buttonRemoveSTL.Enabled = listSTLObjects.SelectedIndex >= 0;
         buttonSave.Enabled      = true;
         buttonSlice.Enabled     = true;
     }
 }
Ejemplo n.º 2
0
 public STLComposer()
 {
     InitializeComponent();
     try
     {
         cont        = new ThreeDControl();
         cont.Dock   = DockStyle.None;
         cont.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom;
         cont.Width  = Width - panelControls.Width;
         cont.Height = Height;
         Controls.Add(cont);
         cont.SetEditor(true);
         cont.SetObjectSelected(false);
         cont.eventObjectMoved += objectMoved;
         updateEnabled();
     }
     catch { }
 }
Ejemplo n.º 3
0
 public STLComposer()
 {
     InitializeComponent();
     try
     {
         cont = new ThreeDControl();
         cont.Dock = DockStyle.None;
         cont.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom;
         cont.Width = Width - panelControls.Width;
         cont.Height = Height;
         Controls.Add(cont);
         cont.SetEditor(true);
         cont.SetObjectSelected(false);
         cont.eventObjectMoved += objectMoved;
         updateEnabled();
     }
     catch { }
 }