예제 #1
0
        void UpdateInstance()
        {
            if (Initializing)
            {
                return;
            }

            if (TargetInstance == null)
            {
                return;
            }

            if (TargetInstance.SelectedInstance == null)
            {
                return;
            }

            TargetInstance.SelectedInstance.Center.X = (float)xbox.Value;
            TargetInstance.SelectedInstance.Center.Y = (float)ybox.Value;
            TargetInstance.SelectedInstance.Angle    = (float)rbox.Value;

            if (TargetInstance.SelectedInstance.GetType() == typeof(BreakTab))
            {
                BreakTab BT = TargetInstance.SelectedInstance as BreakTab;
                BT.Radius = (float)radiusbox.Value;
            }
            TargetInstance.Redraw(true);
        }
예제 #2
0
        private void GerberPanelizerParent_DragDrop(object sender, DragEventArgs e)
        {
            if (e.Data.GetDataPresent(DataFormats.FileDrop))
            {
                GerberPanelize childForm = new GerberPanelize(this, TV, ID);
                childForm.MdiParent = this;
                childForm.Show();
                childForm.ZoomToFit();
                childForm.glControl1_DragDrop(sender, e);
                ActivePanelizeInstance = childForm;
                childForm.ThePanel.MaxRectPack();
                childForm.ThePanel.BuildAutoTabs(new GerberLibrary.StandardConsoleLog());
                childForm.ZoomToFit();

                childForm.Redraw(true);
            }
        }
예제 #3
0
        void UpdateInstance()
        {
            if (Initializing)
            {
                return;
            }

            if (TargetInstance == null)
            {
                return;
            }

            if (TargetInstance.SelectedInstance == null)
            {
                return;
            }

            TargetInstance.SelectedInstance.Center.X = (float)xbox.Value;
            TargetInstance.SelectedInstance.Center.Y = (float)ybox.Value;
            TargetInstance.SelectedInstance.Angle    = (float)rbox.Value;

            if (TargetInstance.SelectedInstance.GetType() == typeof(BreakTab))
            {
                BreakTab BT = TargetInstance.SelectedInstance as BreakTab;
                BT.Radius = (float)radiusbox.Value;
            }
            else if (TargetInstance.SelectedInstance.GetType() == typeof(GerberInstance))

            {
                GerberInstance GI = TargetInstance.SelectedInstance as GerberInstance;
                GI.RebuildTransformed(TargetInstance.ThePanel.GerberOutlines[GI.GerberPath], TargetInstance.ThePanel.TheSet.ExtraTabDrillDistance);
            }

            TargetInstance.UpdateHoverControls();
            TargetInstance.Redraw(true);
        }