Patch level : 12.00 1326
Files correlati : ci2.exe ci2200a.msk Commento : Evidenziato il periodo corrente
This commit is contained in:
parent
d9029aba30
commit
d5b3500eae
@ -28,6 +28,7 @@ class TRil_tree : public TBidirectional_tree
|
||||
typedef enum { _normal, _holiday, _full } _type;
|
||||
TString_array _content;
|
||||
_type _t[64];
|
||||
int _curr_period;
|
||||
int _curr_node;
|
||||
TString4 _dett;
|
||||
int _month;
|
||||
@ -50,6 +51,8 @@ public:
|
||||
const TString &id() const { return *(TString *)curr_node(); }
|
||||
const TString &id(int pos) const { return _content.row(pos); }
|
||||
virtual void node2id(const TObject* obj, TString& id) const;
|
||||
void set_curr_period() { _curr_period = _curr_node; }
|
||||
void reset_curr_period() { _curr_period = -1; }
|
||||
|
||||
virtual bool has_root() const;
|
||||
virtual bool has_father() const { return false; }
|
||||
@ -60,7 +63,7 @@ public:
|
||||
virtual TImage* image(bool selected) const;
|
||||
|
||||
public:
|
||||
TRil_tree() : _curr_node(0), _dett("") {}
|
||||
TRil_tree() : _curr_node(0), _curr_period(-1), _dett("") {}
|
||||
};
|
||||
|
||||
|
||||
@ -249,6 +252,8 @@ void TRil_tree::node2id(const TObject* obj, TString& id) const
|
||||
|
||||
TImage* TRil_tree::image(bool selected) const
|
||||
{
|
||||
if (_curr_period == _curr_node)
|
||||
return get_res_icon(ICO_CHECK_ON);
|
||||
switch (_t[_curr_node])
|
||||
{
|
||||
case _normal:
|
||||
@ -1441,8 +1446,9 @@ bool TRilevamento_cons_msk::on_field_event(TOperable_field& f, TField_event e, l
|
||||
_mese = ((TRil_tree *) tfield(F_CALENDARIO).tree())->pos() + 1;
|
||||
else
|
||||
_giorno = atoi(*((TString *) ((TRil_tree *) tfield(F_CALENDARIO).tree())->curr_node()));
|
||||
|
||||
|
||||
set(F_GIORNO, _giorno);
|
||||
((TRil_tree *)tfield(F_CALENDARIO).tree())->set_curr_period();
|
||||
tfield(F_CALENDARIO).force_update();
|
||||
riempi_sheet();
|
||||
}
|
||||
break;
|
||||
@ -1465,18 +1471,22 @@ bool TRilevamento_cons_msk::on_field_event(TOperable_field& f, TField_event e, l
|
||||
{
|
||||
hide(F_ANNO);
|
||||
hide(F_MESE);
|
||||
hide(F_GIORNO);
|
||||
}
|
||||
else
|
||||
if (dett == "M")
|
||||
{
|
||||
show(F_ANNO);
|
||||
hide(F_MESE);
|
||||
hide(F_GIORNO);
|
||||
}
|
||||
else
|
||||
{
|
||||
show(F_ANNO);
|
||||
show(F_MESE);
|
||||
show(F_GIORNO);
|
||||
}
|
||||
((TRil_tree *)tfield(F_CALENDARIO).tree())->reset_curr_period();
|
||||
update_tree();
|
||||
riempi_sheet();
|
||||
}
|
||||
|
@ -29,6 +29,7 @@
|
||||
#define F_INTERVALLO 331
|
||||
#define F_OREDIS 332
|
||||
#define F_ORECONS 333
|
||||
#define F_GIORNO 334
|
||||
|
||||
#define DLG_RESET 900
|
||||
#define DLG_CERCA 901
|
||||
|
@ -58,9 +58,15 @@ BEGIN
|
||||
FLAGS "M"
|
||||
END
|
||||
|
||||
NUMBER F_GIORNO 2
|
||||
BEGIN
|
||||
PROMPT 45 2 "Giorno "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_TPORA 2
|
||||
BEGIN
|
||||
PROMPT 44 2 "Tipo ora "
|
||||
PROMPT 56 2 "Tipo ora "
|
||||
USE &ORE
|
||||
INPUT CODTAB F_TPORA
|
||||
DISPLAY "Codice@16" CODTAB
|
||||
|
Loading…
x
Reference in New Issue
Block a user