Can you do not stop, and continued

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Can you do not stop, and continued

#1 Post by Eugene Lutsenko »

Can you do not stop, and continued:

Code: Select all

  // Отображение стадии исполнения. Будет написано прямо в окне Progress-bar
   d = 0
   @ 0,0 DCGROUP oGroup1 CAPTION 'Стадии исполнения процесса' FONT "6.Helv" SIZE 105+d,19.5 PARENT oTabPage1
   @21,0 DCGROUP oGroup2 CAPTION 'Прогноз времени исполнения' FONT "6.Helv" SIZE 105+d, 5.0 PARENT oTabPage2

    s = 1
   @s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT aSay[ 1] FONT "10.Helv"      // 1. Копирование всей обучающей выборки в распознаваемую
   @s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT aSay[ 2] FONT "10.Helv"      // 2. Расчет стат.модели ABS
   @s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT aSay[ 3] FONT "10.Helv"      // 3. Расчет стат.моделей PRC1 и PRC2
   @s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT aSay[ 4] FONT "10.Helv"      // 4. Расчет моделей знаний INF-1INF7

   @s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT aSay[ 5] FONT "10.Helv"      // Начало цикла по частным и интегральным критериям----
   @s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT aSay[ 6] FONT "10.Helv"      // 5. Задание модели № M_NumMod в качестве текущей
   @s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT aSay[ 7] FONT "10.Helv"      // 6. Пакетное распознавание в модели № M_NumMod
   @s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT aSay[ 8] FONT "10.Helv"      // 7. Измерение достоверности модели: № M_NumMod
   @s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT aSay[ 9] FONT "10.Helv"      // Конец цикла по частным и интегральным критериям----

   @s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT aSay[10] FONT "10.Helv"      // 8. Объединение БД DostRsp# в БД DostRasp
   @s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT aSay[11] FONT "10.Helv"      // 9. Печать сводной формы по результатам верификации моделей
   @s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT aSay[12] FONT "10.Helv"      // 10.Запись информации о верифицированных моделях
   @s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT aSay[13] FONT "10.Helv"      // 11.Этапы распознавания
   @s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT aSay[14] FONT "10.Helv"      // 12.Сделать заданную модель текущей
   @s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT aSay[15] FONT "10.Helv"      // 13.
   @s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT aSay[16] FONT "10.Helv"      // 14.
   @s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT aSay[17] FONT "10.Helv"      // 15.
   @s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT aSay[18] FONT "10.Helv"      // 16.
    s++
   @s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT oSay97 FONT "10.HelvBold"
    s++
   @0.2+s++,1 DCSAY "" SAYSIZE 100 SAYOBJECT oSay98 FONT "9.Helv Bold" COLOR GRA_CLR_BLUE
   @1.5+s  ,1 DCSAY "" SAYSIZE 100 SAYOBJECT oSay99 FONT "9.Helv Bold" COLOR GRA_CLR_BLUE

   @s  ,1 DCPROGRESS oProgress ;
          SIZE 95,1.5 ;
          PERCENT ;
          EVERY 1+INT(Wsego/nEvery) ;       // Кол-во обновлений изображения
          MAXCOUNT Wsego ;
          COLOR GRA_CLR_CYAN           // Цвет полосы
   @s++,97 DCPUSHBUTTON  CAPTION '&Cancel' ;
          ACTION {||lOk:=.T.} OBJECT oButton ;
          SIZE 7,1.5
   DCREAD GUI ;
          TITLE '3.5. Синтез и верификация заданных из 10 моделей' ;
          PARENT @oDialog ;
          FIT ;
          EXIT ;
          MODAL
   oDialog:show()
[/size]

Code: Select all

oSay97:SetCaption("Синтез и верификация заданных стат.моделей и моделей знаний упешно завершена !!!")
oSay97:SetCaption(oSay97:caption)
oButton:SetCaption('&Ok')      // Деструктурирование окна отображения графического Progress-bar
oButton:activate := {||PostAppEvent(xbeP_Close,,,oDialog)}  //<<<<<< Add This
DC_AppEvent( @lOk )
oDialog:Destroy()
[/size]

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Can you do not stop, and continued

#2 Post by rdonnay »

Can you do not stop, and continued
?????????????? :?: :?: :?: :?: :?:
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Can you do not stop, and continued

#3 Post by Eugene Lutsenko »

I have in the system has a mode that performs many different calculations. Earlier I this mode I used only once, i.e. run it, he did all the calculations and stayed. This process was displayed on screen with the form below. Now there is a need to start this mode in a loop. The display of the phases and stages of its execution do not change. But in the end after finishing the work, he should not stop and continue later in the next cycle. As it looks now, just account at the end of each cycle press "OK". But it is not very convenient, or rather inconvenient. It would be nice if at the end of the performance, he simply closed the screen with the mapping stage and the implementation stage (; e, as if I had pressed "OK"), and then the cycle would continue on without user intervention. These calculations can go quite a long time and do not want to sit, shake and click. And I would like to go have coffee and come back and everything is ready.
Attachments
Без имени-1.jpg
Без имени-1.jpg (208.26 KiB) Viewed 9665 times

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: Can you do not stop, and continued

#4 Post by Auge_Ohr »

try this :

a.) run Code in Thread
b.) start Thread again, after timeout, for a loop
c.) change OK to Exit

when Code in Thread is running use Exit Button to terminate Thread
you can use o:setInterval() to start Thread() again or use 4th Parameter (nTimeout) of AppEvent()
if a Thread is o:active than i can't be running twice
greetings by OHR
Jimmy

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Can you do not stop, and continued

#5 Post by rdonnay »

At the end of the calculation you can push an event into the event queue to press the OK button.

PostAppEvent(xbeP_Activate,,,oOkButton)

or

PostAppEvent(xbeP_Activate,,,DC_GetObject(GetList,'DCGUI_BUTTON_OK'))
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Can you do not stop, and continued

#6 Post by Eugene Lutsenko »

Where is insert? This software sends a code "OK"?

Code: Select all

oSay97:SetCaption("Синтез и верификация заданных стат.моделей и моделей знаний упешно завершена !!!")
oSay97:SetCaption(oSay97:caption)
oButton:SetCaption('&Ok')             // Деструктурирование окна отображения графического Progress-bar
oButton:activate := {||PostAppEvent(xbeP_Close,,,oDialog)}  //<<<<<< Add This
DC_AppEvent( @lOk )
*PostAppEvent(xbeP_Activate,,,DC_GetObject(GetList,'DCGUI_BUTTON_OK'))       // Роджер
oDialog:Destroy()

Post Reply