/// <summary> /// Saves template texts. /// </summary> public void Save() { if (GatewayCount > 10) { return; } foreach (Control ctrl in plcTexts.Controls) { Panel pnl = ctrl as Panel; if (pnl != null) { TemplateTextEdit tte = ControlsHelper.GetControlOfTypeRecursive <TemplateTextEdit>(pnl); if (tte != null) { tte.SaveData(); } } } }