From 31fcb2ec622c8f8f7fa2330bf74a269fac2d6535 Mon Sep 17 00:00:00 2001 From: david Date: Mon, 22 Dec 2008 10:38:38 +0000 Subject: [PATCH] =?UTF-8?q?General=20->=20Sincronizar=20la=20barra=20later?= =?UTF-8?q?al=20con=20la=20elecci=C3=B3n=20de=20empresa=20hecha=20en=20la?= =?UTF-8?q?=20pantalla=20de=20selecci=C3=B3n=20de=20empresa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@808 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- Source/ApplicationBase/uFactuGES_App.pas | 2 +- Source/Cliente/uPantallaPrincipal.dfm | 28 ++++++++++++------------ Source/Cliente/uPantallaPrincipal.pas | 12 ++++++++++ 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/Source/ApplicationBase/uFactuGES_App.pas b/Source/ApplicationBase/uFactuGES_App.pas index e765ba64..f42dbf37 100644 --- a/Source/ApplicationBase/uFactuGES_App.pas +++ b/Source/ApplicationBase/uFactuGES_App.pas @@ -353,7 +353,7 @@ begin JsDialog.Content.Add('Selección de empresa'); JsDialog.Instruction.Text := 'Elija la empresa con la que desea trabajar.'; JsDialog.DialogOptions := [doCommandLinks, doModal]; - JsDialog.ButtonBar.Buttons := [cbOk]; + JsDialog.ButtonBar.Buttons := [cbCancel]; JsDialog.Width := 600; diff --git a/Source/Cliente/uPantallaPrincipal.dfm b/Source/Cliente/uPantallaPrincipal.dfm index 1fd2a6d2..f7beac59 100644 --- a/Source/Cliente/uPantallaPrincipal.dfm +++ b/Source/Cliente/uPantallaPrincipal.dfm @@ -2,8 +2,8 @@ object fPantallaPrincipal: TfPantallaPrincipal Left = 358 Top = 250 Caption = 'Pantalla principal' - ClientHeight = 453 - ClientWidth = 751 + ClientHeight = 553 + ClientWidth = 886 Color = clWindow Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -23,8 +23,8 @@ object fPantallaPrincipal: TfPantallaPrincipal object pnlContenido: TTBXAlignmentPanel Left = 0 Top = 0 - Width = 751 - Height = 431 + Width = 886 + Height = 531 Margins.Left = 5 Margins.Top = 5 Margins.Right = 5 @@ -36,7 +36,7 @@ object fPantallaPrincipal: TfPantallaPrincipal Left = 215 Top = 5 Width = 5 - Height = 421 + Height = 521 ResizeStyle = rsPattern ExplicitLeft = 210 ExplicitHeight = 570 @@ -45,7 +45,7 @@ object fPantallaPrincipal: TfPantallaPrincipal Left = 5 Top = 5 Width = 210 - Height = 421 + Height = 521 ActivePage = pagInicio Align = alLeft AutoHeaders = True @@ -90,7 +90,7 @@ object fPantallaPrincipal: TfPantallaPrincipal Left = 0 Top = 0 Width = 208 - Height = 348 + Height = 448 Background.Stretch = False Background.Proportional = False Background.Center = False @@ -100,7 +100,7 @@ object fPantallaPrincipal: TfPantallaPrincipal ImageIndex = 0 object Panel1: TPanel Left = 0 - Top = 262 + Top = 362 Width = 208 Height = 86 Align = alBottom @@ -153,8 +153,8 @@ object fPantallaPrincipal: TfPantallaPrincipal object pnlBorde: TJvXPContainer Left = 220 Top = 5 - Width = 526 - Height = 421 + Width = 661 + Height = 521 BoundColor = clActiveCaption BoundLines = [blLeft, blTop, blRight, blBottom] Caption = 'pnlBorde' @@ -162,8 +162,8 @@ object fPantallaPrincipal: TfPantallaPrincipal object pnlMain: TTBXAlignmentPanel Left = 1 Top = 1 - Width = 524 - Height = 419 + Width = 659 + Height = 519 Align = alClient Color = clWindow TabOrder = 0 @@ -203,8 +203,8 @@ object fPantallaPrincipal: TfPantallaPrincipal end object TBXStatusBar1: TTBXStatusBar Left = 0 - Top = 431 - Width = 751 + Top = 531 + Width = 886 Images = StatusPanelImageList Panels = < item diff --git a/Source/Cliente/uPantallaPrincipal.pas b/Source/Cliente/uPantallaPrincipal.pas index 9d511c2e..0a7b9930 100644 --- a/Source/Cliente/uPantallaPrincipal.pas +++ b/Source/Cliente/uPantallaPrincipal.pas @@ -186,6 +186,8 @@ begin end; procedure TfPantallaPrincipal.FormShow(Sender: TObject); +var + AIDEmpresa : Integer; begin InicializarUI; @@ -197,11 +199,13 @@ begin //Sacamos la lista de empresas para que el usuario elija con la que va a trabajar AppFactuGES.SeleccionarEmpresa; + RefrescarUI; end; procedure TfPantallaPrincipal.RefrescarUI; var ATitulo : String; + i: Integer; begin ATitulo := AppFactuGES.GetAppFullName; @@ -220,6 +224,14 @@ begin TBXStatusBar1.Panels[1].Caption := AppFactuGES.UsuarioActivo.UserName else TBXStatusBar1.Panels[1].Caption := ''; + + + // Comprobar que el panel lateral tiene la empresa activa + if Assigned(AppFactuGES.EmpresaActiva) then + for i := 0 to JvNavigationPane.PageCount - 1 do + if (JvNavigationPane.Pages[i].Tag = AppFactuGES.EmpresaActiva.ID) and + (JvNavigationPane.ActivePageIndex <> i) then + JvNavigationPane.ActivePageIndex := i; end; procedure TfPantallaPrincipal.ReleaseEmbedded;