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;
|
typedef enum { _normal, _holiday, _full } _type;
|
||||||
TString_array _content;
|
TString_array _content;
|
||||||
_type _t[64];
|
_type _t[64];
|
||||||
|
int _curr_period;
|
||||||
int _curr_node;
|
int _curr_node;
|
||||||
TString4 _dett;
|
TString4 _dett;
|
||||||
int _month;
|
int _month;
|
||||||
@ -50,6 +51,8 @@ public:
|
|||||||
const TString &id() const { return *(TString *)curr_node(); }
|
const TString &id() const { return *(TString *)curr_node(); }
|
||||||
const TString &id(int pos) const { return _content.row(pos); }
|
const TString &id(int pos) const { return _content.row(pos); }
|
||||||
virtual void node2id(const TObject* obj, TString& id) const;
|
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_root() const;
|
||||||
virtual bool has_father() const { return false; }
|
virtual bool has_father() const { return false; }
|
||||||
@ -60,7 +63,7 @@ public:
|
|||||||
virtual TImage* image(bool selected) const;
|
virtual TImage* image(bool selected) const;
|
||||||
|
|
||||||
public:
|
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
|
TImage* TRil_tree::image(bool selected) const
|
||||||
{
|
{
|
||||||
|
if (_curr_period == _curr_node)
|
||||||
|
return get_res_icon(ICO_CHECK_ON);
|
||||||
switch (_t[_curr_node])
|
switch (_t[_curr_node])
|
||||||
{
|
{
|
||||||
case _normal:
|
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;
|
_mese = ((TRil_tree *) tfield(F_CALENDARIO).tree())->pos() + 1;
|
||||||
else
|
else
|
||||||
_giorno = atoi(*((TString *) ((TRil_tree *) tfield(F_CALENDARIO).tree())->curr_node()));
|
_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();
|
riempi_sheet();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1465,18 +1471,22 @@ bool TRilevamento_cons_msk::on_field_event(TOperable_field& f, TField_event e, l
|
|||||||
{
|
{
|
||||||
hide(F_ANNO);
|
hide(F_ANNO);
|
||||||
hide(F_MESE);
|
hide(F_MESE);
|
||||||
|
hide(F_GIORNO);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (dett == "M")
|
if (dett == "M")
|
||||||
{
|
{
|
||||||
show(F_ANNO);
|
show(F_ANNO);
|
||||||
hide(F_MESE);
|
hide(F_MESE);
|
||||||
|
hide(F_GIORNO);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
show(F_ANNO);
|
show(F_ANNO);
|
||||||
show(F_MESE);
|
show(F_MESE);
|
||||||
|
show(F_GIORNO);
|
||||||
}
|
}
|
||||||
|
((TRil_tree *)tfield(F_CALENDARIO).tree())->reset_curr_period();
|
||||||
update_tree();
|
update_tree();
|
||||||
riempi_sheet();
|
riempi_sheet();
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#define F_INTERVALLO 331
|
#define F_INTERVALLO 331
|
||||||
#define F_OREDIS 332
|
#define F_OREDIS 332
|
||||||
#define F_ORECONS 333
|
#define F_ORECONS 333
|
||||||
|
#define F_GIORNO 334
|
||||||
|
|
||||||
#define DLG_RESET 900
|
#define DLG_RESET 900
|
||||||
#define DLG_CERCA 901
|
#define DLG_CERCA 901
|
||||||
|
@ -58,9 +58,15 @@ BEGIN
|
|||||||
FLAGS "M"
|
FLAGS "M"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
NUMBER F_GIORNO 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 45 2 "Giorno "
|
||||||
|
FLAGS "D"
|
||||||
|
END
|
||||||
|
|
||||||
STRING F_TPORA 2
|
STRING F_TPORA 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 44 2 "Tipo ora "
|
PROMPT 56 2 "Tipo ora "
|
||||||
USE &ORE
|
USE &ORE
|
||||||
INPUT CODTAB F_TPORA
|
INPUT CODTAB F_TPORA
|
||||||
DISPLAY "Codice@16" CODTAB
|
DISPLAY "Codice@16" CODTAB
|
||||||
|
Loading…
x
Reference in New Issue
Block a user