Patch level : 10.0 770
Files correlati : ba0 Ricompilazione Demo : [ ] Commento : 0001656: Rinumerazione n.protocollo - se sbaglio password si blocca tutto l'applicativo. Rinumerazione n.protocollo - se sbaglio password si blocca tutto l'applicativo.Riesco ad uscire solo dal task manager! git-svn-id: svn://10.65.10.50/trunk@20627 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									4233014219
								
							
						
					
					
						commit
						8d91494a26
					
				| @ -1824,7 +1824,22 @@ long TMenu_application::handler(WINDOW win, EVENT* ep) | ||||
|         TOutlook_mask& m = (TOutlook_mask&)*_mask; | ||||
|         m.handler(m.win(), ep); | ||||
|       } | ||||
|     default       : break; | ||||
|       break; | ||||
|     case E_SIZE: | ||||
|       if (_tree_view == 3) | ||||
|       { | ||||
|         WINDOW winm = _mask->win(); | ||||
|         RCT rctw; xvt_vobj_get_client_rect(win, &rctw); | ||||
|         RCT rctm; xvt_vobj_get_client_rect(winm, &rctm); | ||||
|         if (rctm.right != rctw.right || rctm.bottom != rctw.bottom) | ||||
|         { | ||||
|           xvt_vobj_move(winm, &rctw); | ||||
|           _mask->force_update(); | ||||
|         } | ||||
|       } | ||||
|       break; | ||||
|     default:  | ||||
|       break; | ||||
|     }   | ||||
|   }   | ||||
|   return ret;   | ||||
|  | ||||
| @ -282,11 +282,14 @@ bool TMenuitem::perform_submenu() const | ||||
| } | ||||
| 
 | ||||
| // Alcuni programmi devono essere eseguiti singolarmente: ba1, ba2, cg6
 | ||||
| // oppure tutti quelli protetti da password di manutenzione come cg1 -1 
 | ||||
| bool TMenuitem::run_modal() const | ||||
| { | ||||
|   bool yes = true; | ||||
|   if (submenu().menu().mask_mode() == 3) | ||||
|     yes = _action.match("ba[12] -*", true) || _action.starts_with("cg6", true); | ||||
|   if (submenu().menu().mask_mode() == 3) // outlook mode
 | ||||
|   { | ||||
|     yes = _password || _action.match("ba[12] -*", true) || _action.starts_with("cg6", true); | ||||
|   } | ||||
|   return yes; | ||||
| } | ||||
| 
 | ||||
| @ -315,12 +318,12 @@ bool TMenuitem::perform_program() const | ||||
|     if (mask.run() == K_ENTER) | ||||
|     {                     | ||||
|       const TDate oggi(TODAY); | ||||
|       TString pwd;  | ||||
|       TString80 pwd;  | ||||
|       pwd << dongle().administrator() << (oggi.month() + oggi.day()); | ||||
|       ok = pwd == mask.get(F_PASSWORD); | ||||
|     } | ||||
|     if (!ok)  | ||||
|       error_box("Password di servizio errata!\nAccesso negato."); | ||||
|       return error_box("Password di servizio errata!\nAccesso negato."); | ||||
|   } | ||||
| 
 | ||||
|   if (_firm && main_app().get_firm() == 0) | ||||
|  | ||||
| @ -482,6 +482,7 @@ public: | ||||
|   void set_back(const TString& image); | ||||
|   WINDOW page_win(short page); | ||||
|   void remove_all_pages(); | ||||
|   void remove_page(short page); | ||||
| 
 | ||||
|   void kill_processes() { ((TBook_window&)win()).kill_processes(); } | ||||
|   TBook_field(TMask* m) : TWindowed_field(m) {} | ||||
| @ -523,6 +524,19 @@ void TBook_field::remove_all_pages() | ||||
|   bw.remove_page(NULL_WIN); | ||||
| } | ||||
| 
 | ||||
| void TBook_field::remove_page(short page) | ||||
| { | ||||
|   TBook_window& bw = (TBook_window&)win(); | ||||
|   if (page >= 0) | ||||
|   { | ||||
|     WINDOW pw = bw.page_win(page); | ||||
|     if (pw != NULL_WIN) | ||||
|       bw.remove_page(pw); | ||||
|   } | ||||
|   else | ||||
|     bw.remove_page(NULL_WIN); | ||||
| } | ||||
| 
 | ||||
| TField_window* TBook_field::create_window(int x, int y, int dx, int dy, WINDOW parent) | ||||
| { | ||||
|   return new TBook_window(x, y, dx, dy, parent, this); | ||||
| @ -700,8 +714,8 @@ bool TOutlook_mask::on_field_event(TOperable_field& o, TField_event e, long joll | ||||
|             const short pg = add_page(mi); | ||||
|             if (pg >= 0) | ||||
|             { | ||||
|   		        mi.perform();                      // Esegui in asincrono in pagina nuova
 | ||||
| 
 | ||||
|   		        if (mi.perform()) // Esegui in asincrono in pagina nuova
 | ||||
|               { | ||||
|                 for (int i = 0; i < 20; i++) | ||||
|                 { | ||||
|                   xvt_sys_sleep(500); | ||||
| @ -720,6 +734,9 @@ bool TOutlook_mask::on_field_event(TOperable_field& o, TField_event e, long joll | ||||
|                 } | ||||
|                 set_page_caption(pg, mi.caption(), ico); | ||||
|               } | ||||
|               else | ||||
|                 book_field().remove_page(pg); // Rimuovi pagina inm caso d'errore
 | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|  | ||||
| @ -371,7 +371,7 @@ int TInstaller_mask::get_module_number(const TString& module) const | ||||
|   if (module.full()) | ||||
|   { | ||||
|     if (module == "ba" || module == "sy") //moduli base e sistema: deve ritornare 0;
 | ||||
|       return 0; | ||||
|       return BAAUT; | ||||
| 
 | ||||
|     aut = dongle().module_name2code(module); | ||||
|     ok = aut < ENDAUT; | ||||
|  | ||||
| @ -489,14 +489,15 @@ bool TReport_base_mask::draw_3d_rect(short id, COLOR rgb) const | ||||
|   if (ok) | ||||
|   { | ||||
|     TMask_field& f = fld(pos); | ||||
|     if (f.active() && f.parent() == curr_win()) | ||||
|     WINDOW pw = f.parent(); | ||||
|     if (f.active() && pw == curr_win()) | ||||
|     { | ||||
|       RCT rctfld; f.get_rect(rctfld);  | ||||
|       const int x = rctfld.right / CHARX + 1; | ||||
|       const int y = rctfld.top / ROWY + 1; | ||||
|       RCT rct = resize_rect(x, y, -3, 1, W_PLAIN, f.parent()); | ||||
|       RCT rct = resize_rect(x, y, -3, 1, W_PLAIN, pw); | ||||
|       rct.top =  rctfld.top; rct.bottom = rctfld.bottom; | ||||
|       xi_draw_3d_rect((XinWindow)f.parent(), (XI_RCT*)&rct, TRUE, 2, BTN_LIGHT_COLOR, rgb, BTN_DARK_COLOR); | ||||
|       xi_draw_3d_rect((XinWindow)pw, (XI_RCT*)&rct, TRUE, 2, BTN_LIGHT_COLOR, rgb, BTN_DARK_COLOR); | ||||
|     } | ||||
|   } | ||||
|   return ok; | ||||
| @ -517,31 +518,31 @@ bool TReport_base_mask::choose_printer_font(XVT_FNTID font) | ||||
| void TReport_base_mask::update() | ||||
| { | ||||
|   const TMask_field& fld = field(F_FONT_SELECT); | ||||
|   if (fld.active() && curr_win() == fld.parent()) | ||||
|   WINDOW pw = fld.parent(); | ||||
|   if (fld.active() && curr_win() == pw) | ||||
|   { | ||||
|     RCT rctfld; fld.get_rect(rctfld);  | ||||
|     const int x = rctfld.right / CHARX + 1; | ||||
|     const int y = rctfld.top / ROWY + 1; | ||||
|     RCT& rct = resize_rect(x, y, -3, 2, W_PLAIN, fld.parent());  | ||||
|     RCT& rct = resize_rect(x, y, -3, 2, W_PLAIN, pw);  | ||||
|     rct.top =  rctfld.top; rct.bottom = rctfld.bottom; | ||||
|     xi_draw_3d_rect((XinWindow)fld.parent(), (XI_RCT*)&rct, TRUE, 2, MASK_LIGHT_COLOR,  | ||||
|     xi_draw_3d_rect((XinWindow)pw, (XI_RCT*)&rct, TRUE, 2, MASK_LIGHT_COLOR,  | ||||
|       _bgcolor, MASK_DARK_COLOR); | ||||
| 
 | ||||
|     rct.left += 2; rct.right -= 2; | ||||
|     rct.top += 2; rct.bottom -= 2; | ||||
|     xvt_rect_deflate(&rct, 2, 2); | ||||
|     xvt_dwin_set_clip(win(), &rct); | ||||
| 
 | ||||
|     XVT_FNTID fontid = xvt_font_create(); | ||||
|     xvt_font_copy(fontid, _font.get_xvt_font(*this), XVT_FA_ALL); | ||||
|     xvt_font_set_size(fontid, _font.size()); | ||||
|     xvt_dwin_set_font(fld.parent(), fontid); | ||||
|     xvt_dwin_set_font(pw, fontid); | ||||
|     set_opaque_text(false); | ||||
|     set_color(_fgcolor, _bgcolor); | ||||
|     advanced_draw_text_line(fld.parent(), _font.name(), rct, _halign, _valign); | ||||
|     advanced_draw_text_line(pw, _font.name(), rct, _halign, _valign); | ||||
|     xvt_font_destroy(fontid); | ||||
|   } | ||||
| 
 | ||||
|   const short cid[3] = { F_FGCOLOR, F_BGCOLOR, F_SHCOLOR }; | ||||
|   const COLOR col[3] = {  _fgcolor,  _bgcolor,  _shcolor }; | ||||
|   const short cid[4] = { F_FGCOLOR, F_BGCOLOR, F_SHCOLOR, 0 }; | ||||
|   const COLOR col[4] = {  _fgcolor,  _bgcolor,  _shcolor, 0 }; | ||||
|   for (int i = 0; i < 3; i++) | ||||
|     draw_3d_rect(cid[i], col[i]); | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user