void CMainFrame::OnItemSelectionChanged(CTreeNode *node, bool bSelected) { if ( !bSelected ) return; if (CComQIPtr<CModulePairNode> moduleNode = node) { std::_tstring lhsInfo, rhsInfo; if (moduleNode->hasLHS()) lhsInfo = (boost::_tformat(_T("%1% (crc: %2%)\r\n")) % moduleNode->m_lhs->GetQualifiedLabel() % moduleNode->m_lhs->GetChecksum()).str(); if (moduleNode->hasRHS()) rhsInfo = (boost::_tformat(_T("%1% (crc: %2%)\r\n")) % moduleNode->m_rhs->GetQualifiedLabel() % moduleNode->m_rhs->GetChecksum()).str(); ShowDiff(_T(""), lhsInfo, _T(""), rhsInfo); } else if (CComQIPtr<CAttributePairNode> attributeNode = node) { clib::thread run(__FUNCTION__, boost::bind(&thread_GetBothEcl, this, attributeNode)); } else if (CComQIPtr<CAttributeHistoryPairNode> historyNode = node) { clib::thread run(__FUNCTION__, boost::bind(&thread_GetHistoryBothEcl, this, historyNode)); } else { //m_other->SelectNode(node, m_view->GetNodeIndex(node)); //Repository Node //m_diffViewer->ShowLog(); } }
void E131_Send() { struct itimerval tout_val; ShowDiff(); if(E131status == E131_STATUS_IDLE) { return; } if(MusicPlayerStatus==PLAYING_MPLAYER_STATUS && !syncedToMusic && (musicStatus.secondsElasped < 3)) { //Playlist_SyncToMusic(); } if(filePosition < currentSequenceFileSize - stepSize) { bytesRead=fread(fileData,1,stepSize,seqFile); filePosition+=bytesRead; if(bytesRead == 0) { E131_CloseSequenceFile(); } else { E131_SetTimer(usTimerValue); } for(i=0;i<UniverseCount;i++) { if(sendBlankingData) { memset(E131packet+E131_HEADER_LENGTH,0,universes[i].size); LogWrite("sending Zeros\n"); } else { memcpy((void*)(E131packet+E131_HEADER_LENGTH),(void*)(fileData+universes[i].startAddress-1),universes[i].size); } E131packet[E131_SEQUENCE_INDEX] = E131sequenceNumber;; E131packet[E131_UNIVERSE_INDEX] = (char)(universes[i].universe/256); E131packet[E131_UNIVERSE_INDEX+1] = (char)(universes[i].universe%256); E131packet[E131_COUNT_INDEX] = (char)((universes[i].size+1)/256); E131packet[E131_COUNT_INDEX+1] = (char)((universes[i].size+1)%256); if(sendto(sendSocket, E131packet, universes[i].size + E131_HEADER_LENGTH, 0, (struct sockaddr*)&E131address[i], sizeof(E131address[i])) < 0) { return; } } E131sequenceNumber++; E131secondsElasped = (int)((float)(filePosition-CHANNEL_DATA_OFFSET)/((float)stepSize*(float)20.0)); E131secondsRemaining = E131totalSeconds-E131secondsElasped; // Send data to pixelnet board E131_SendPixelnetDMXdata(); } else { E131_CloseSequenceFile(); } }
void CMainFrame::OnEditRefresh() { ShowDiff(); m_repositoryDlg.Clear(); ClearRepositorySingletons(true); m_repositoryDlg.Load(NULL, false); m_repositoryDlg.ClearSelection(); }
void CMainFrame::DoLogout() { ShowDiff(); m_repositoryDlg.Kill(); ::ReleaseAllSingletons(); m_dependees.SetConfig(NULL); }
void CMainFrame::OnEditShow() { int show = AMT_SHOW_NONE; if (m_bCheckBoxMatching) show |= AMT_SHOW_MATCHING; if (m_bCheckBoxNotMatching) show |= AMT_SHOW_NOT_MATCHING; if (m_bCheckBoxOrphans) show |= AMT_SHOW_ORPHANS; if (m_repositoryDlg.SetFilter(show)) ShowDiff(); }
LRESULT CMainFrame::OnGetEclLoaded(WPARAM wParam, LPARAM lParam) { bool showHiddenChar = false; m_repositoryDlg.m_repositoryView->Invalidate(); std::_tstring lhs, lhsHeader; std::_tstring rhs, rhsHeader; if (CComQIPtr<CAttributePairNode> attrNode = m_repositoryDlg.GetSelectedItem()) { CComQIPtr<CAttributePairNode> attributeNode = (CTreePairNode *)wParam; if (attrNode.p != attributeNode) return 0; if (attributeNode->hasLHS()) showHiddenChar = GenerateHeader(attributeNode->m_lhs, attributeNode->m_rhs, lhsHeader); if (attributeNode->hasRHS()) showHiddenChar = GenerateHeader(attributeNode->m_rhs, attributeNode->m_lhs, rhsHeader) ? true : showHiddenChar; lhs = attributeNode->m_lhs->GetText(false); rhs = attributeNode->m_rhs->GetText(false); } else if (CComQIPtr<CAttributeHistoryPairNode> histNode = m_repositoryDlg.GetSelectedItem()) { CComQIPtr<CAttributeHistoryPairNode> historyNode = (CTreePairNode *)wParam; if (histNode.p != historyNode) return 0; CComQIPtr<CAttributePairNode> attributeNode = histNode->GetParentNode(); lhsHeader = (boost::_tformat(_T("%1% (When: %2%, By: %3%)\r\n")) % attributeNode->m_lhs->GetQualifiedLabel() % historyNode->m_lhs->GetModifiedDate() % historyNode->m_lhs->GetModifiedBy()).str(); if (historyNode->hasLHS()) rhsHeader = (boost::_tformat(_T("%1% (crc: %2%)\r\n")) % historyNode->m_rhs->GetQualifiedLabel() % historyNode->m_rhs->GetChecksum()).str(); lhs = historyNode->m_lhs->GetText(); rhs = historyNode->m_rhs->GetText(false); } if (lhs.length() || rhs.length() || lhsHeader.length() || rhsHeader.length()) { ShowDiff(lhs, lhsHeader, rhs, rhsHeader); } return 0; }
LRESULT CMainFrame::OnClearDiff(WPARAM wParam, LPARAM lParam) { ShowDiff(); return 0; }
void cbDiffEditor::Reload() { if(!leftFile_.IsEmpty() && !rightFile_.IsEmpty()) ShowDiff(); }