If $X$ is a simple random variable, then $E(X)$ can be written in terms of the distribution function $F$ of $X$ $E(X) = \sum_{x\in\mathbb{R}}x[F(x)-F(x^-)]$;

I was thinking, as $X$ is a simple random variable, so it is defined as $X=\sum_{x=1}^{m}xI_{C_x}$. Then, the expected value is $\mathbb{E}(X)=\sum_{x=1}^{m}x\mathbb{P}({X=x})$. As a result from distribution function it has $\mathbb{P}(X=x)=F(x)-F(x^-)$. So I was wondering if as I just can use this result, and write $\mathbb{E}(X)=\sum_{x}x [F(x)-F(x^-)]$.
It seems right in the case of a discrete random variable.
For a continuous one, you would rather write $\int_{-\infty}^\infty x dF(x)$
This is terrible notation.  Why are you starting your sum from $i=1$?  What is $F(x^-)$? Do you mean the limit of $F(x)$ from the left?  If so, then $F(x)=F(x^-)$ so their difference is precisely $0$.  What are you even summing over? You are summing over values of $i$ apparently, but nowhere does $i$ appear in the summed expression.  Maybe you want to sum over a list of values of $x$, each of which differ by some small amount, and it seems like you want to let $x^-$ be that small amount less than $x$, then take the limit as that small amount goes to 0 after the sum is computed.  Still you run into trouble because as the difference $x-x^-$ gets smaller, the sum blows up, so you need to divide the entire sum by $(x-x^-)$ to get something that converges.  In that case, you've simply found the integral.

$$E(x)=\int_{-\infty}^{\infty}xF(x)dx$$

which is definition of expected value for continuous random variables.