I wish to customise my theorem style to something like the one shown, but I couldn,t figure a universal definition of parameters. Some suggestions?

The code:
\documentclass{article}
\usepackage{tikz}
\newcommand\Loadedframemethod{TikZ}
\usepackage[framemethod=\Loadedframemethod]{mdframed}
\tikzstyle{titregris} =
[draw=gray, thick, fill=white, shading = exersicetitle, %
text=black, rectangle, rounded corners, right,minimum height=.7cm]
\pgfdeclarehorizontalshading{exersicebackground}{100bp}
{color(0bp)=(white); color(100bp)=(white!5)}
\pgfdeclarehorizontalshading{exersicetitle}{100bp}
{color(0bp)=(white);color(100bp)=(black!5)}
\newcounter{exercise}
\renewcommand*\theexercise{Example:~\arabic{exercise}}
\makeatletter
\def\mdf@@exercisepoints{}%new mdframed key:
\define@key{mdf}{exercisepoints}{%
\def\mdf@@exercisepoints{#1}
}
\mdfdefinestyle{exercisestyle}{%
outerlinewidth=1em,outerlinecolor=white,%
leftmargin=-1em,rightmargin=-1em,%
middlelinewidth=1.2pt,roundcorner=5pt,linecolor=gray,
apptotikzsetting={\tikzset{mdfbackground/.append style ={%
shading = exersicebackground}}},
innertopmargin=1.2\baselineskip,
skipabove={\dimexpr0.5\baselineskip+\topskip\relax},
skipbelow={-1em},
needspace=3\baselineskip,
frametitlefont=\sffamily\bfseries,
settings={\global\stepcounter{exercise}},
singleextra={%
\node[titregris,xshift=1cm] at (P-|O) %
{~\mdf@frametitlefont{\theexercise}~};
\ifdefempty{\mdf@@exercisepoints}%
{}%
{\node[titregris,left,xshift=-1cm] at (P)%
{~\mdf@frametitlefont{\mdf@@exercisepoints points}~};}%
},
firstextra={%
\node[titregris,xshift=1cm] at (P-|O) %
{~\mdf@frametitlefont{\theexercise}~};
\ifdefempty{\mdf@@exercisepoints}%
{}%
{\node[titregris,left,xshift=-1cm] at (P)%
{~\mdf@frametitlefont{\mdf@@exercisepoints points}~};}%
},
}
\makeatother
\begin{document}
\begin{mdframed}[style=exercisestyle]
Near what I want
\end{mdframed}
\end{document}

thmbox-package. It doesn't exactly the style you showed as an example but something similar. – Stephan Lukasczyk Feb 09 '13 at 09:29