During the trial, the mediation can be processed any time before the Judgement not only in Civil Case but also Criminal Case.
Please keep in mind that in a Criminal Case only some charges can be mediated or settled, for instance, fraud, embezzlement, etc.
Some charges in a Criminal Case, for which the State is also considered an injured party, such as, theft, robbery, murder, etc. These cannot be mediated or settled.