Ejemplo n.º 1
0
void FSNewsAboutController::tableViewDidSelectRowAtIndexPath(CATableView* table, unsigned int section, unsigned int row){
//       string strTitle = unicode_to_utf8(aboutMenuTag[row];
    switch (row) {
        case 0:
        {
            FSWebViewController *fswebviewcontroller = FSWebViewController::create();
            string strTitle="金庸介绍";
            string fileName = "web2/index.html";
            
            string fileTestPath = CCFileUtils::sharedFileUtils()->fullPathForFilename("web2/index.html");
            fswebviewcontroller->setTitleAndFileName(strTitle, fileTestPath);
            CAWindow* window = CAApplication::getApplication()->getRootWindow();
            CANavigationController *nav = (CANavigationController*)window->getRootViewController();
            nav->pushViewController(fswebviewcontroller, true);
            
            
            break;
            


        }
        case 1:
        {
            FSNewsAboutDetailController *fsnewsaboutdetailcontroller = FSNewsAboutDetailController::create();
            CAWindow* window = CAApplication::getApplication()->getRootWindow();
            CANavigationController *nav = (CANavigationController*)window->getRootViewController();
            nav->pushViewController(fsnewsaboutdetailcontroller, true);
            break;
        }
            
        default:
            break;
    }
    
}
Ejemplo n.º 2
0
void FSNewsView2::openCatalog()
{
    int curNewsId = this->getChapterInfo()->getNewsID();
    FSNewsCatalog *fsnewscatalog = new FSNewsCatalog(curNewsId);
    
    fsnewscatalog->loadChapter =   &FSNewsView2::staticLoadChapter;
    fsnewscatalog->gotoChapterProgress = &FSNewsView2::staticgotoChapterProgress;
    
    CANavigationController *nav = FSContext::GetInstance().getMainNavController();
    nav->pushViewController(fsnewscatalog, true);
    

}