Пример #1
0
void Actions_OnEndTask_GetActions (LPTASKPACKET ptp)
{
   if (l.pActionList)
      {
      asc_ActionListFree (&l.pActionList);
      }
   if (ptp->rc && TASKDATA(ptp)->pActionList)
      {
      l.pActionList = TASKDATA(ptp)->pActionList;
      TASKDATA(ptp)->pActionList = NULL; // don't let FreeTaskPacket free this

      // Zip through the listed actions and change the reported csec-elapsed
      // into an estimated starting tick.
      //
      for (size_t ii = 0; ii < l.pActionList->cEntries; ++ii)
         {
         FixActionTime (&l.pActionList->aEntries[ ii ].Action.csecActive);
         }
      }
   Actions_Refresh();
}
Пример #2
0
BOOL CALLBACK Actions_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
{
   if (Display_HandleColumnNotify (hDlg, msg, wp, lp, &gr.viewAct))
      return FALSE;

   if (msg == WM_INITDIALOG)
      l.hAction = hDlg;

   switch (msg)
      {
      case WM_INITDIALOG:
         {
         HWND hList = GetDlgItem (hDlg, IDC_ACTION_LIST);
         FL_RestoreView (hList, &gr.viewAct);

         if (gr.rActions.right == 0)
            GetWindowRect (hDlg, &gr.rActions);
         ResizeWindow (hDlg, awdActions, rwaMoveToHere, &gr.rActions);

         SetTimer (hDlg, ID_ACTION_TIMER, 1000, NULL);  // timer message every sec

         StartTask (taskGET_ACTIONS, l.hAction);
         gr.fShowActions = TRUE;
         break;
         }

      case WM_DESTROY:
         gr.fShowActions = FALSE;
         l.hAction = NULL;
         Main_SetMenus();
         KillTimer (hDlg, ID_ACTION_TIMER);

         if (l.pActionList)
            asc_ActionListFree (&l.pActionList);
         break;

      case WM_TIMER:
         if ((FastList_GetItemCount (GetDlgItem (hDlg, IDC_ACTION_LIST))) || (l.pActionList && l.pActionList->cEntries))
            Actions_Refresh();
         break;

      case WM_SIZE:
         // if (lp==0), we're minimizing--don't call ResizeWindow().
         //
         if (lp != 0)
            {
            ResizeWindow (hDlg, awdActions, rwaFixupGuts);
            GetWindowRect (hDlg, &gr.rActions);
            }
         break;

      case WM_MOVE:
         GetWindowRect (hDlg, &gr.rActions);
         break;

      case WM_ENDTASK:
         LPTASKPACKET ptp;
         if ((ptp = (LPTASKPACKET)lp) != NULL)
            {
            if (ptp->idTask == taskGET_ACTIONS)
               Actions_OnEndTask_GetActions (ptp);
            FreeTaskPacket (ptp);
            }
         break;

      case WM_COMMAND:
         switch (LOWORD(wp))
            {
            case IDOK:
            case IDCANCEL:
               DestroyWindow (hDlg);
               break;
            }
         break;
      }

   return FALSE;
}
Пример #3
0
EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListFree (LPASACTIONLIST *ppList)
{
   return asc_ActionListFree (ppList);
}