private void PcArchor_ValueChanged(WPFClientControlLib.PointControl obj) { PcAbsolute.X = _building.InitBound.MinX + _floor.InitBound.MinX + obj.X; PcAbsolute.Y = _building.InitBound.MinY + _floor.InitBound.MinY + obj.Y; PcRelative.ValueChanged -= PcRelative_ValueChanged; PcRelative.X = obj.X - PcZero.X; PcRelative.Y = obj.Y - PcZero.Y; PcRelative.ValueChanged += PcRelative_ValueChanged; }
private void PcZero_ValueChanged(WPFClientControlLib.PointControl obj) { PcRelative.ValueChanged -= PcRelative_ValueChanged; ArchorSettingContext.ZeroX = obj.X; ArchorSettingContext.ZeroY = obj.Y; PcRelative.X = _dev.PosX - obj.X; PcRelative.Y = _dev.PosZ - obj.Y; PcRelative.ValueChanged += PcRelative_ValueChanged; }
private void PcRelative_ValueChanged(WPFClientControlLib.PointControl obj) { PcArchor.ValueChanged -= PcArchor_ValueChanged; PcZero.ValueChanged -= PcZero_ValueChanged; GetDevRoom(); //if (_room != null) { PcAbsolute.X = _building.InitBound.MinX + _floor.InitBound.MinX + PcZero.X + obj.X; PcAbsolute.Y = _building.InitBound.MinY + _floor.InitBound.MinY + PcZero.Y + obj.Y; PcArchor.X = PcZero.X + obj.X; PcArchor.Y = PcZero.Y + obj.Y; } //else //{ // PcAbsolute.X = _building.InitBound.MinX + _floor.InitBound.MinX + obj.X; // PcAbsolute.Y = _building.InitBound.MinY + _floor.InitBound.MinY + obj.Y; // PcArchor.X = PcZero.X + obj.X; // PcArchor.Y = PcZero.Y + obj.Y; //} PcZero.ValueChanged += PcZero_ValueChanged; PcArchor.ValueChanged += PcArchor_ValueChanged; }