Ejemplo n.º 1
0
void TwpmAssignTask::TaskFocus(){
   if( !idProject )
      return;

   QString strText = ui.txtTask->text();
   LoadTasks( idProject, strText );
}
Ejemplo n.º 2
0
void InitShared() {
	if (sha->instance > 0) {
		sha->instance++;
	}
	else {
		sha->instance=1;
		sha->running=0;
		sha->loaded=0;
		memset(sha->task, 0, MAXTASK*sizeof(Task));
		if (FORCE_TASKS_LOAD) LoadTasks();
	}
	addedCommand.cmd[0]='\0';
}
Ejemplo n.º 3
0
//----------------------------------------
CEndedPanel::CEndedPanel( wxWindow *parent, wxWindowID id,
    const wxPoint &position, const wxSize& size, long style ) :
    wxPanel( parent, id, position, size, style )
{
  wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );

  //----------------------------
  wxSizer* sizer = EndedListPanel( this, false, true );
  //----------------------------
  
  item0->Add( this, 1, wxGROW|wxALL, 5 );

  parent->SetSizer( item0 );

  LoadTasks();

}
Ejemplo n.º 4
0
void TwpmAssignTask::TaskEdited( QString strTask ){
   if( idProject && !bBlockTask )
      LoadTasks( idProject, strTask );
   bBlockTask = false;
}
Ejemplo n.º 5
0
void wxGISTaskManager::OnGisNetEvent(wxGISNetEvent& event)
{
    wxNetMessage msg = event.GetNetMessage();
    wxString sErrMsg;
    switch(msg.GetCommand())
    {
    case enumGISNetCmdBye: //server disconnected
        DeleteAllTasks();
        //start task manager server
        StartTaskManagerServer();
        //start timer to connect task server
        m_timer.Start(5000, false);
        break;
    case enumGISNetCmdHello:
        {
            wxNetMessage msg(enumGISNetCmdCmd, enumGISCmdGetChildren, enumGISPriorityHigh);
            m_pConn->SendNetMessage(msg);
        //QuereTasks(sErrMsg);
        }
        break;
    case enumGISNetCmdNote:
        //if message id != -1 add to notify
        if(msg.GetId() != wxNOT_FOUND)
        {
            TSKMNGR_RESULT Res = {msg.GetId(), msg.GetMessage(), msg.GetState()};
            PushResult(Res);
        }
        else
        {
            switch(msg.GetState())
            {
            case enumGISNetCmdStOk:
                wxLogMessage(msg.GetMessage());
                break;
            case enumGISNetCmdStErr:
                wxLogError(msg.GetMessage());
                break;
            //case enumGISCmdNoteVol:
            //    UpdateVolume(msg.GetXMLRoot()->GetChildren());
            //    break;
            //case enumGISCmdNotePercent:
            //    UpdatePercent(msg.GetXMLRoot()->GetChildren());
            //    break;
            case enumGISCmdNoteMsg:
                AddMessage(msg.GetXMLRoot()->GetChildren());
                break;
            default:
                wxLogVerbose(msg.GetMessage());
                break;
            }
        }
        break;
    case enumGISNetCmdCmd: //do something usefull
        if(msg.GetId() != wxNOT_FOUND)
        {
            TSKMNGR_RESULT Res = {msg.GetId(), msg.GetMessage(), msg.GetState()};
            PushResult(Res);
        }
        if(msg.GetXMLRoot())
        {
            switch(msg.GetState())
            {
            case enumGISCmdStAdd:
                AddTask(msg.GetXMLRoot()->GetChildren());
                break;
            case enumGISCmdStDel:
                DeleteTask(msg.GetXMLRoot()->GetChildren());
                break;
            case enumGISCmdStStart:
            case enumGISCmdStStop:
            case enumGISCmdStChng:
                ChangeTask(msg.GetXMLRoot()->GetChildren());
                break;
            case enumGISCmdGetChildren:
                LoadTasks(msg.GetXMLRoot()->GetChildren());
                break;
            case enumGISCmdStPriority://TODO: change priority for all task simultaniasly
            default:
                break;
            }
        }
        break;
    default:
        break;
    }
}