Exemple #1
0
 public DrawTools(MainWin window, PictureBox pic)
 {
     this.mainWindow  = window;
     this.mainPicture = pic;
     this.pointerTool = new PointerTool(mainWindow, mainPicture);
     this.lineTool    = new LineTool(mainWindow, mainPicture);
     this.rectTool    = new RectTool(mainWindow, mainPicture);
     this.polyTool    = new PolyTool(mainWindow, mainPicture);
     this.circleTool  = new CircleTool(mainWindow, mainPicture);
     this.curveTool   = new CurveTool(mainWindow, mainPicture);
     this.fillTool    = new FillTool(mainWindow, mainPicture);
     this.resizeTool  = new ResizeTool(mainWindow, mainPicture);
     this.cutTool     = new CutTool(mainWindow, mainPicture);
 }
Exemple #2
0
        private void FrmVisualDebug_Load(object sender, EventArgs e)
        {
            comboBoxSimulateOutput.Items.Clear();
            comboBoxSimulateOutput.Items.Add("Disabled");
            foreach (OutAxis axe in (OutAxis[])Enum.GetValues(typeof(OutAxis)))
            {
                comboBoxSimulateOutput.Items.Add("Simulate axis " + axe.ToString());
            }
            comboBoxSimulateOutput.SelectedIndex = 0;


            for (int a = 0; a < SuperVJoy.maxOutputAxisCountIWantToUse; a++)
            {
                PictureBox p = new PictureBox
                {
                    Parent      = pictCurve,
                    Width       = 10,
                    Height      = 10,
                    BorderStyle = BorderStyle.Fixed3D,
                    BackColor   = Color.Red
                };
                PictsAxis[a] = p;
                Label l = new Label
                {
                    Parent    = pictCurve,
                    BackColor = Color.Transparent,
                    ForeColor = Color.Gray,
                    Font      = new Font(FontFamily.GenericMonospace, 15)
                };
                LabelValueAxis[a] = l;
            }

            SuperVJoy.plzOutputToDebugFrm = true;
            pictCurve.Image          = CurveTool.generateBitmapCurveAllAxis();
            TmrRefreshCurves.Enabled = true;
        }