Step 1: Split the integral.
\[ I = \int_{-\pi}^{\pi} \frac{2x(1+\sin x)}{1+\cos^2 x}\,dx = \int_{-\pi}^{\pi} \frac{2x}{1+\cos^2 x}\,dx + \int_{-\pi}^{\pi} \frac{2x\sin x}{1+\cos^2 x}\,dx = I_1 + I_2. \]
Step 2: Show $I_1 = 0$ using the odd function property.
Let $g(x) = \dfrac{2x}{1+\cos^2 x}$. Then $g(-x) = \dfrac{-2x}{1+\cos^2(-x)} = -g(x)$. So $g$ is odd and $I_1 = 0$.
Step 3: Show $I_2$ has an even integrand.
Let $h(x) = \dfrac{2x\sin x}{1+\cos^2 x}$. Then $h(-x) = \dfrac{2(-x)\sin(-x)}{1+\cos^2(-x)} = \dfrac{2x\sin x}{1+\cos^2 x} = h(x)$. So $h$ is even.
Step 4: Use even function property.
\[ I_2 = 2\int_0^{\pi} \frac{2x\sin x}{1+\cos^2 x}\,dx = 4\int_0^{\pi} \frac{x\sin x}{1+\cos^2 x}\,dx. \]
Step 5: Apply King's property $\int_0^{\pi} f(x)\,dx = \int_0^{\pi} f(\pi-x)\,dx$.
Let $J = \int_0^{\pi} \dfrac{x\sin x}{1+\cos^2 x}\,dx$. Replacing $x$ with $\pi-x$: $J = \int_0^{\pi} \dfrac{(\pi-x)\sin x}{1+\cos^2 x}\,dx$. Adding: $2J = \pi\int_0^{\pi} \dfrac{\sin x}{1+\cos^2 x}\,dx$. Let $u = \cos x$, $du = -\sin x\,dx$: $\pi\int_{-1}^{1} \dfrac{du}{1+u^2} = \pi[\tan^{-1}u]_{-1}^{1} = \pi\left(\dfrac{\pi}{4}+\dfrac{\pi}{4}\right) = \dfrac{\pi^2}{2}$. So $J = \dfrac{\pi^2}{4}$.
Step 6: Compute the final answer.
$I = 0 + 4J = 4 \cdot \dfrac{\pi^2}{4} = \pi^2$.
\[ \boxed{\pi^2} \]