diff --git a/ci/ci0300.cpp b/ci/ci0300.cpp index 3248dff18..4a1d25c60 100755 --- a/ci/ci0300.cpp +++ b/ci/ci0300.cpp @@ -170,16 +170,28 @@ void TConfigurazioneIndustriale_app::file_to_sheet() void TConfigurazioneIndustriale_app::sheet_to_file() { TConfig configfile(CONFIG_DITTA, "ci"); + int totlen = 0; int items; items = mask().items(); configfile.remove_all(); + if (items>_maxelem) + { + message_box("Il massimo numero di filtri gestibili è pari a %d, pertanto verranno considerate solamente le prime %d righe", _maxelem, _maxelem); + items=16; + } + for (int i=0;i_maxlen) + message_box("E' probabile che la lunghezza delle descrizioni inserite ne impedisca la totale visualizzazione sullo schermo"); } diff --git a/ci/ci0300.h b/ci/ci0300.h index ddf225226..8509efa33 100755 --- a/ci/ci0300.h +++ b/ci/ci0300.h @@ -9,9 +9,6 @@ class TConfigurazioneIndustriale_mask : public TAutomask { -private: - int _maxelem; - protected: virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly); @@ -29,7 +26,7 @@ public: TToken_string& row(int i) { return sheet().row(i); } public: - TConfigurazioneIndustriale_mask(int maxelem = 16) : TAutomask("ci0300a"), _maxelem(maxelem) {} + TConfigurazioneIndustriale_mask() : TAutomask("ci0300a") {} }; @@ -39,8 +36,11 @@ public: class TConfigurazioneIndustriale_app: public TSkeleton_application { +private: TConfigurazioneIndustriale_mask* _mask; - + int _maxelem; + int _maxlen; + private: void file_to_sheet(); void sheet_to_file(); @@ -54,7 +54,7 @@ public: TConfigurazioneIndustriale_mask& mask() const {return *_mask; } public: - TConfigurazioneIndustriale_app() {} + TConfigurazioneIndustriale_app(int maxelem = 16, int maxlen = 100) : _maxelem(maxelem), _maxlen(maxlen) {} virtual ~TConfigurazioneIndustriale_app() {} };