9 namespace sage.ew.formul.ButtonsPanelSage
17 private oResultadoAyuda _oResultadoAyuda =
new oResultadoAyuda();
24 public override string _Tooltip =>
"Ver panel Sage 50";
29 public override Bitmap _Icon => images.Properties.Resources.informacion_pantalla;
36 base.OnCreateControl();
38 CambiarBotonAyudaMensaje();
45 protected override bool DoClick(
object sender)
50 if (_oUserPagesOnBoarding == null)
52 _oUserPagesOnBoarding =
new UserPagesOnBoarding(_Form._Pantalla, loOnBoardingController, _oResultadoAyuda._AyudaContextual);
53 _oUserPagesOnBoarding.
_Collapse += _oUserPagesOnBoarding__Collapse;
55 _oUserPagesOnBoarding.
_Load();
58 _Parent._Expand(_oUserPagesOnBoarding, 400);
59 _oUserPagesOnBoarding.
_Expand();
65 private void CambiarBotonAyudaMensaje()
67 if (_oResultadoAyuda._AyudaContextual != null && !_Form.IsDisposed)
69 int lnNum = _oResultadoAyuda._AyudaContextual._NoticiasPendientesLeer;
76 ewNum.Text = $
"{(lnNum < 100 ? lnNum.ToString() : "99+
")}";
77 ewNum.AutoSize =
true;
79 Size =
new Size(30, 34);
85 Size =
new Size(26, 26);
92 _oToolTip.SetToolTip(_Image, _GetToolTip(lnNum));
93 _Image.BackgroundImageLayout = ImageLayout.Center;
97 private string _GetToolTip(
int tnNum)
99 return tnNum > 0 ? $
"{(tnNum < 100 ? tnNum.ToString() : "99+
")} Noticia{(tnNum > 1 ? "s
" : "")}" : _Tooltip;
102 private void _oUserPagesOnBoarding__RefreshNoticiasPendientes()
104 CambiarBotonAyudaMensaje();
107 private void _oUserPagesOnBoarding__Collapse(
bool tlCollapse,
bool tlUserAction)
116 private void FormAyuda__RefreshNoticiasPendientes()
118 CambiarBotonAyudaMensaje();
127 InitializeComponent();
128 _oResultadoAyuda = toResultadoAyuda;
137 InitializeComponent();
151 _oUserPagesOnBoarding.
_Collapse -= _oUserPagesOnBoarding__Collapse;
153 _oUserPagesOnBoarding.
Dispose();
154 _oUserPagesOnBoarding = null;
static System.Drawing.Bitmap informacion_pantalla
Busca un recurso adaptado de tipo System.Drawing.Bitmap.
static System.Drawing.Bitmap noticias_pantalla
Busca un recurso adaptado de tipo System.Drawing.Bitmap.
void _Expand()
En formato no widget necesitamos saber cuando expandimos y el comportamiento es diferente a cuando es...
Clase de recurso fuertemente tipado, para buscar cadenas traducidas, etc.
override void Dispose(bool disposing)
Limpiar los recursos que se estén usando.
UserControl UserPagesOnBoarding
Interfaz BoardingController
void _Load()
Cargamos la página activa desde el formulario de FormAyuda
_CollapserOnBoarding_Handler _Collapse
Desencadena el evento del Collapse - Abrir/Contraer el panel de ayuda
_RefreshNoticiasPendientes_Handler _RefreshNoticiasPendientes
Desencadena el evento de la noticias pendientes