public GeometryCreator() { InitializeComponent(); radioButton3.CheckedChanged += radioButtongroup2_CheckedChanged; radioButton4.CheckedChanged += radioButtongroup2_CheckedChanged; radioButton5.CheckedChanged += radioButtongroup2_CheckedChanged; radioButton6.CheckedChanged += radioButtongroup2_CheckedChanged; radioButton7.CheckedChanged += radioButtongroup2_CheckedChanged; radioButton8.CheckedChanged += radioButtongroup2_CheckedChanged; radioButton9.CheckedChanged += radioButtongroup2_CheckedChanged; radioButton10.CheckedChanged += radioButtongroup2_CheckedChanged; this.toolStripTextBox1.TextChanged += toolStripTextBox1_TextChanged; this.toolStripTextBox2.TextChanged += toolStripTextBox1_TextChanged; this.toolStripTextBox3.TextChanged += toolStripTextBox1_TextChanged; this.toolStripTextBox4.TextChanged += toolStripTextBox1_TextChanged; this.toolStripTextBox5.TextChanged += toolStripTextBox1_TextChanged; hinttimergc = new Timer { Interval = 2000 }; hinttimergc.Tick += hinttimergc_Tick; SquareGrid = new SquareGrid { GridColor = System.Drawing.Color.Green, Height = 25, Width = 25, OffsetX = 0, OffsetY = 0 }; }
private void button4_Click(object sender, EventArgs e) { var gsf = new GridSettingForm(); gsf.SetLang(); gsf.Grid = new PPDEditor.SquareGrid { Width = SquareGrid.Width * 2, Height = SquareGrid.Height * 2, GridColor = SquareGrid.GridColor, OffsetX = SquareGrid.OffsetX * 2, OffsetY = SquareGrid.OffsetY * 2 }; if (gsf.ShowDialog() == DialogResult.OK) { SquareGrid = new SquareGrid { Width = gsf.Grid.Width / 2, Height = gsf.Grid.Height / 2, GridColor = gsf.Grid.GridColor, OffsetX = gsf.Grid.OffsetX / 2, OffsetY = gsf.Grid.OffsetY / 2 }; bezierControl1.DrawAndRefresh(); } }
public void CopyFrom(SquareGrid grid) { Width = grid.Width; Height = grid.Height; OffsetX = grid.OffsetX; OffsetY = grid.OffsetY; GridColor = grid.GridColor; }
public GridComponent(PPDDevice device, PPDFramework.Resource.ResourceManager resourceManager, SquareGrid grid) : base(device) { this.grid = grid; this.resourceManager = resourceManager; savedGrid = new SquareGrid(); savedGrid.CopyFrom(grid); UpdateResource(); }
public MainGame(PPDDevice device, MyGame mygame, PPDFramework.Resource.ResourceManager resourceManager, SquareGrid squareGrid) : base(device) { this.resourceManager = resourceManager; AddChild(mpd = new MarkPointDrawer(device, resourceManager)); AddChild(kasi = new TextureString(device, "", 20, true, PPDColors.White) { Position = new Vector2(400, 415) }); AddChild(mgt = new MainGameTop(device, resourceManager)); AddChild(mgb = new MainGameBottom(device, resourceManager)); AddChild(up = new PictureObject(device, resourceManager, Utility.Path.Combine("assist", "up.png"))); AddChild(upSelect = new PictureObject(device, resourceManager, Utility.Path.Combine("assist", "upselect.png"))); AddChild(right = new PictureObject(device, resourceManager, Utility.Path.Combine("assist", "right.png"))); AddChild(rightSelect = new PictureObject(device, resourceManager, Utility.Path.Combine("assist", "rightselect.png"))); AddChild(area = new PictureObject(device, resourceManager, Utility.Path.Combine("assist", "area.png"))); AddChild(angleLine = new LineComponent(device, resourceManager, PPDColors.Blue) { LineWidth = 3 }); AddChild(dummy = new DummyDrawComponent(device)); AddChild(grid = new GridComponent(device, resourceManager, squareGrid)); }