Page 1 of 1

Can you do not stop, and continued

Posted: Sat Feb 04, 2017 10:11 am
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]

Re: Can you do not stop, and continued

Posted: Sat Feb 04, 2017 12:12 pm
by rdonnay
Can you do not stop, and continued
?????????????? :?: :?: :?: :?: :?:

Re: Can you do not stop, and continued

Posted: Sat Feb 04, 2017 1:12 pm
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.

Re: Can you do not stop, and continued

Posted: Mon Feb 06, 2017 1:10 am
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

Re: Can you do not stop, and continued

Posted: Mon Feb 06, 2017 10:06 am
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'))

Re: Can you do not stop, and continued

Posted: Tue Feb 07, 2017 7:00 am
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()