Example #1
0
void TrendReportFrame::initTreeTable()
{
	strListHeights = "";
	strListPans = "";
	strListTitles = "";
	//
	m_treePanelTable = new WSTreeAndPanTable(this);
	//AddJsParamToTable("treeviewPanel", m_treePanelTable->formName());
	AddJsParam("treeviewPanel", m_treePanelTable->formName());

	//TreeTable
	new WText("<div id='tree_panel' name='tree_panel' class='panel_tree'>", m_treePanelTable->elementAt(0, 0));
	WTable * pTreeTable = new WTable(m_treePanelTable->elementAt(0, 0));
	new WText(" &nbsp;",pTreeTable->elementAt(0,0));
	pTreeTable->elementAt(0,0)->setContentAlignment(AlignCenter | AlignTop);
	m_pTrendReportTree = new CCheckBoxTreeView((WTableCell*)pTreeTable->elementAt(0,0));
	//new WText("<br>", m_pTrendReportTree->elementAt(0, 0));
	if(m_pTrendReportTree)
	{
		string strSection = GetWebUserID();
		m_pTrendReportTree->InitTree("", false, false, false, strSection);
		WObject::connect(m_pTrendReportTree, SIGNAL(ReportQueryRequest()), this, SLOT(ReportQueryResponse()));
	}
	m_pTrendReportTree->setStyleClass("viewtreebody");
	new WText("</div>", pTreeTable->elementAt(0, 0));

	//DragTable
	AddJsParam("drag_tree", m_treePanelTable->elementAt(0, 1)->formName());
	//AddJsParamToTable("drag_tree", m_treePanelTable->elementAt(0, 1)->formName());

	//PanTable
	new WText("<div id='view_panel' class='panel_view'>", m_treePanelTable->elementAt(0, 2));

	m_pMainTable = new WSVMainTable(m_treePanelTable->elementAt(0, 2), strTrendTitle, true);

	if (m_pMainTable->pHelpImg)
	{
		connect(m_pMainTable->pHelpImg,SIGNAL(click()),this,SLOT(ShowHelp()));
	}

	initQueryTable(&m_pQueryTable, 1, "", m_pMainTable);

	new WText("</div>", m_treePanelTable->elementAt(0, 2));
}
Example #2
0
void usermain(int argc, char * argv[])
{
    WApplication app(argc, argv);
    app.setTitle("拓扑视图");

	new WText("<SCRIPT language='JavaScript' src='/basic.js'></SCRIPT>", app.root());
	new WText("<div id='view_panel' class='panel_view'>", app.root());

    CTuopList setform(app.root());
	setform.appSelf = &app;
	app.setBodyAttribute("class ='workbody'");

	new WText("</div>", app.root());

	AddJsParam("uistyle", "viewpan", app.root());
	AddJsParam("fullstyle", "true", app.root());
	AddJsParam("bGeneral", "false", app.root());
	new WText("<SCRIPT language='JavaScript' src='/Script.js'></SCRIPT>", app.root());

    app.exec();
}
Example #3
0
void CSVPlanSet::PlanSetForm()
{
	strListHeights = "";
	strListTitles = "";
	strListPans = "";

	//pMainTable = new WSVMainTable(this, strMainTitle);
	//pUserTable = new WSVFlexTable(pMainTable->elementAt(2,0), Group, strTitle);
	//pMainTable = new WSVMainTable(this, "strMainTitle", false);

	
	new WText("<SCRIPT language='JavaScript' src='/basic.js'></SCRIPT>", this);
	new WText("<div id='view_panel' class='panel_view'>", this);

	pMainTable = new WSVMainTable(this, szTitle, false);
	InitFlexTable(m_FormShowText.szTitle1, m_FormShowText.szTitle2);


	new WText("</div>", this);


	AddJsParam("listheight", strListHeights);
	AddJsParam("listtitle", strListTitles);
	AddJsParam("listpan", strListPans);
	

	AddJsParam("uistyle", "viewpanandlist");
	AddJsParam("fullstyle", "true");
	AddJsParam("bGeneral", "false");
	new WText("<SCRIPT language='JavaScript' src='/Script.js'></SCRIPT>",this);

}
Example #4
0
void SVDeviceTest::NewInitForm()
{
	strListHeights = "";
	strListPans = "";
	strListTitles = "";
	
	new WText("<SCRIPT language='JavaScript' src='/basic.js'></SCRIPT>", this);
	new WText("<div id='view_panel' class='panel_view'>",this);

    NewCreateContain();

	new WText("</div>", this);
	AddJsParam("listheight", strListHeights, this);
	AddJsParam("listtitle", strListTitles, this);
	AddJsParam("listpan", strListPans, this);
	AddJsParam("uistyle", "viewpanandlist", this);
	AddJsParam("fullstyle", "true", this);
	AddJsParam("bGeneral", "false", this);
	new WText("<SCRIPT language='JavaScript' src='/Script2.js'></SCRIPT>", this);
}
Example #5
0
void CSVReportSet::initForm()
{

	new WText("<SCRIPT language='JavaScript' src='/Calendar.js'></SCRIPT>",this);
	new WText("<SCRIPT language='JavaScript' src='/basic.js'></SCRIPT>", this);
	new WText("<div id='view_panel' class='panel_view'>",this);


	m_pMainTable = new WSVMainTable(this,m_formText.szMainTitle,false);

	m_pReportListTable = new WSVFlexTable(m_pMainTable->GetContentTable()->elementAt(0,0), List, m_formText.szTBTitle);
	

	if (m_pReportListTable->GetContentTable() != NULL)
	{
		m_pReportListTable->AppendColumn("",WLength(5,WLength::Percentage));
		m_pReportListTable->SetDataRowStyle("table_data_grid_item_img");

		m_pReportListTable->AppendColumn(m_formText.szColName,WLength(55,WLength::Percentage));
		m_pReportListTable->SetDataRowStyle("table_data_grid_item_text");

		m_pReportListTable->AppendColumn(m_formText.szColPeriod,WLength(20,WLength::Percentage));
		m_pReportListTable->SetDataRowStyle("table_data_grid_item_img");

		m_pReportListTable->AppendColumn(m_formText.szColEdit,WLength(20,WLength::Percentage));
		m_pReportListTable->SetDataRowStyle("table_data_grid_item_text");
	}

	addPhoneListNew();
	connect(&m_signalMapper, SIGNAL(mapped(const std::string)), this, SLOT(EditRow(const std::string)));

	if (m_pReportListTable->GetActionTable() != NULL)
	{
		
		m_pReportListTable->SetNullTipInfo(szListEmpty);

		if(m_pListReport.size() <= 0)
		{
			m_pReportListTable->ShowNullTip();
		}
		else
		{
			m_pReportListTable->HideNullTip();
		}
		
		m_pReportListTable->AddStandardSelLink(m_formText.szTipSelAll1 ,m_formText.szTipSelNone,m_formText.szTipSelInv);
		connect(m_pReportListTable->pSelAll, SIGNAL(clicked()), this, SLOT(SelAll()));
		connect(m_pReportListTable->pSelNone, SIGNAL(clicked()), this, SLOT(SelNone()));
		connect(m_pReportListTable->pSelReverse, SIGNAL(clicked()), this, SLOT(SelInvert()));


		WTable *pTbl;

		m_pReportListTable->GetActionTable()->elementAt(0,1)->setContentAlignment(AlignCenter);
		m_pReportListTable->GetActionTable()->elementAt(0,1)->setStyleClass("textbold");
		pTbl = new WTable(m_pReportListTable->GetActionTable()->elementAt(0,1));

		pTbl->setStyleClass("widthauto");
		m_pDel = new WSVButton(pTbl->elementAt(0,1),m_formText.szTipDel, "button_bg_del.png", "", false);

		if(!GetUserRight("m_reportlistDel"))
			m_pDel->hide();
		else
			m_pDel->show();

		if (m_pDel)
		{
			m_pDel->setToolTip(m_formText.szTipDel);
			connect(m_pDel , SIGNAL(clicked()),this, SLOT(BeforeDelPhone()));
		}

		m_pReportListTable->GetActionTable()->elementAt(0,2)->setContentAlignment(AlignRight);
		m_pAdd = new WSVButton(m_pReportListTable->GetActionTable()->elementAt(0,2),m_formText.szAddPhoneBut, "button_bg_add_black.png", m_formText.szTipAddNew, true);
		if(!GetUserRight("m_reportlistAdd"))
			m_pAdd->hide();
		else
			m_pAdd->show();

		if (m_pAdd)
		{
			m_pAdd->setToolTip(m_formText.szTipAddNew);
			WObject::connect(m_pAdd, SIGNAL(clicked()),"showbar();", this, SLOT(AddPhone())
				, WObject::ConnectionType::JAVASCRIPTDYNAMIC);
		}

		//隐藏按钮
		pHideBut = new WPushButton("hide button",this);
		if(pHideBut)
		{
			pHideBut->setToolTip("Hide Button");
			connect(pHideBut,SIGNAL(clicked()),this,SLOT(DelPhone()));
			pHideBut->hide();
		}
		
	}








//	new WText("\n<SCRIPT language='JavaScript' src='/basic.js'></SCRIPT>", this);
////	new WText("<SCRIPT language='JavaScript' src='/Calendar.js'></SCRIPT>", this);
//	//CMainTable * T1table = new CMainTable(this ,"统计报告");
//		
//	WTable* T1table = new WTable(this);
//	T1table->setStyleClass("t1");
//	new WText(m_formText.szMainTitle, T1table->elementAt(0,0));
//	T1table->elementAt(0,0)->setStyleClass("t1title");
//	
//
//	WTable * TitleTable = new WTable(T1table->elementAt(1,0));
//
//	TitleTable->setStyleClass("t3");
		



	//Jansion.zhou 2006-12-25
	m_pConnErr = new WText("", (WContainerWidget *)this);
	m_pConnErr->decorationStyle().setForegroundColor(Wt::red);
	m_pConnErr ->hide();



	//if(m_pReportListTable->GetContentTable() != NULL)
	//{
	//	m_pReportListTable->AppendRows("");
	//	//int NowRows = m_pReportListTable->GeDataTable()->numRows();
	//	m_pConnErr = new WText("", m_pReportListTable->AppendRowsContent(0, "","",m_formText.szConnErr));
	//	m_pConnErr->decorationStyle().setForegroundColor(Wt::red);
	//}

	
	//测试连接SVDB
	std::list<string> sectionlist;
	bool IsConn = GetIniFileSections(sectionlist, "smsconfig.ini");
	if(!IsConn)
	{
		//连接SVDB失败
		m_pConnErr ->setText(m_formText.szConnErr);
		m_pConnErr ->show();
	}





	pTranslateBtn = new WPushButton(strTranslate, this);
	connect(pTranslateBtn, SIGNAL(clicked()), this, SLOT(Translate()));	
    pTranslateBtn->setToolTip(strTranslateTip);
	pTranslateBtn->hide();

	pExChangeBtn = new WPushButton(strRefresh, this);
	connect(pExChangeBtn, SIGNAL(clicked()), this, SLOT(ExChange()));	
	pExChangeBtn->setToolTip(strRefreshTip);
	pExChangeBtn->hide();
	//翻译
	int bTrans = GetIniFileInt("translate", "translate", 0, "general.ini");
	if(bTrans == 1)
	{
		pTranslateBtn->show();
		pExChangeBtn->show();
	}
	else
	{
		pTranslateBtn->hide();
		pExChangeBtn->hide();
	}

	////主框架帮助按钮	
	//m_pHelpImg = new WImage("../icons/help.gif", (WContainerWidget *)TitleTable->elementAt( 0, 1));
	//m_pHelpImg -> hide();
	//m_pHelpImg ->setStyleClass("helpimg");
	//TitleTable->elementAt(0, 1) -> setContentAlignment(AlignTop | AlignRight);
	//WObject::connect(m_pHelpImg, SIGNAL(clicked()), this, SLOT(MainHelp()));

	//

	////接受列表
	////WTable * m_pListGeneral = new WTable(this);
	//WTable * m_pListGeneral = new WTable(T1table->elementAt(2,0));
	//
	//m_pListGeneral ->setStyleClass("t2");
	//
	////接受列表收/放显示栏
	//pHide2 = new WImage("../icons/open.gif", (WContainerWidget *)m_pListGeneral->elementAt( 0, 0));
 //   if ( pHide2 )
 //   {
 //       pHide2->decorationStyle().setCursor(WCssDecorationStyle::Pointer);
 //       WObject::connect(pHide2, SIGNAL(clicked()), this, SLOT(showSmsList2()));   
 //       pHide2->hide();        
 //   }
 //   pShow2 = new WImage("../icons/close.gif", (WContainerWidget *)m_pListGeneral->elementAt( 0, 0));
 //   if ( pShow2 )
 //   {
 //       pShow2->decorationStyle().setCursor(WCssDecorationStyle::Pointer);
 //       WObject::connect(pShow2, SIGNAL(clicked()), this, SLOT(hideSmsList2())); 
 //   }
	//m_pListGeneral->elementAt(0, 0)->setStyleClass("t2title");
	//new WText(m_formText.szTBTitle, (WContainerWidget *)m_pListGeneral->elementAt( 0, 0));

	//table2 = new WTable((WContainerWidget *)m_pListGeneral->elementAt(1,0));
	////table2 -> setStyleClass("bg_Border");
	//table2 ->setStyleClass("t3");

	//PrintDebugString("Init Old Table\n");

 //   if ( table2 )
 //   {
 //       addPhoneList(table2);
	//	connect(&m_signalMapper, SIGNAL(mapped(const std::string)), this, SLOT(EditRow(const std::string)));

	//	PrintDebugString("Init Old Table2\n");

	//	//AddGroupOperate(table2);
	//}
		
	new WText("</div>", this);

	AddJsParam("uistyle", "viewpan");
	AddJsParam("fullstyle", "true");
	AddJsParam("bGeneral", "false");
	new WText("<SCRIPT language='JavaScript' src='/Script.js'></SCRIPT>", this);

}
Example #6
0
TrendReportFrame::TrendReportFrame(WContainerWidget *parent)
: WContainerWidget(parent)
{
    loadString();

	new WText("<SCRIPT language='JavaScript' src='/menu.js'></SCRIPT>", this);
	new WText("<SCRIPT language='JavaScript' src='/basic.js'></SCRIPT>", this);
	new WText("<SCRIPT language='JavaScript' src='/Calendar.js'></SCRIPT>", this);

	initTreeTable();

	m_trendReport = NULL;

	//pMainTable = new CMainTable(this, strTrendTitle);
 //   
	//pMainTable->setStyleClass("t5");
	//pMainTable->elementAt(3, 0)->setStyleClass("t5"); 

	//WTable * wholetable = new WTable(pMainTable->elementAt(3, 0));

	////WTable * wholetable = new WTable(this);
 //   wholetable->resize(WLength(100,WLength::Percentage), WLength(100,WLength::Percentage));
 //   wholetable->elementAt(0, 0)->resize(WLength(200), WLength(100,WLength::Percentage));

 //   WTable * MenuWholetable = new WTable(wholetable->elementAt(0, 0));
 //   MenuWholetable->resize(WLength(100,WLength::Percentage), WLength(100,WLength::Percentage));
	//
	//m_pTrendReportTree = new CCheckBoxTreeView((WTableCell*)MenuWholetable->elementAt(0,0));
	////PrintDebugString("----------------* CCheckBoxTreeView *----------------");
 //   if(m_pTrendReportTree)
	//{
 //       string strSection = GetWebUserID();
	//	m_pTrendReportTree->InitTree("", false, false, false, strSection);
	//	WObject::connect(m_pTrendReportTree, SIGNAL(ReportQueryRequest()), this, SLOT(ReportQueryResponse()));
	//}
	//m_pTrendReportTree->setStyleClass("viewtreebody");

 //   WScrollArea * table = new WScrollArea(MenuWholetable->elementAt(0,0));
 //   table->resize(WLength(200,WLength::Pixel), WLength(100,WLength::Percentage));
 //   table->setWidget(m_pTrendReportTree);
 //   table->setStyleClass("treebackgroup"); 
	//m_szObjID = table->formName();	

 //   WImage * spaceImage = new WImage("../Images/space.gif", (WContainerWidget *)wholetable->elementAt(0, 1));
 //   wholetable->elementAt(0, 1)->setStyleClass("menuresize");
 //   strcpy(wholetable->elementAt(0, 1)->contextmenu_, 
 //       "onmousedown='_canResize=true;this.setCapture(true)' onmouseup='this.releaseCapture();_canResize=false;'");

	//WTable *rightTable = new WTable((WContainerWidget *)wholetable->elementAt(0, 2));

 //   rightTable->setStyleClass("t5");
 //   rightTable->elementAt(0, 0)->setContentAlignment(AlignTop);
 //   rightTable->elementAt(0, 0)->setStyleClass("t5");

	//WTable * rightContentTble = new WTable((WContainerWidget *)rightTable->elementAt(0, 0));
	//rightContentTble->setStyleClass("t5");
	//
	//WTable * QueryTitleTable = new WTable((WContainerWidget *)rightContentTble->elementAt(0, 0));
	//QueryTitleTable->setStyleClass("t6");
	//rightTable->elementAt(0, 0)->setContentAlignment(AlignCenter);

	//WTable * QueryTitleTable1 = new WTable((WContainerWidget *)QueryTitleTable->elementAt(0, 0));
	//QueryTitleTable->elementAt(0, 0)->setContentAlignment(AlignTop | AlignCenter);
	//
	//WText * p2HourText = new WText("&nbsp;&nbsp;2h&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 1));
	//p2HourText->setStyleClass("nullLink");
	//connect(p2HourText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query2HourText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);	
	//new WText("&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 1));

	//WText * p4HourText = new WText("&nbsp;&nbsp;4h&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 2));
	//p4HourText->setStyleClass("nullLink");
	//connect(p4HourText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query4HourText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);	
	//new WText("&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 2));

	//WText * p8HourText = new WText("&nbsp;&nbsp;8h&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 3));
	//p8HourText->setStyleClass("nullLink");
	//connect(p8HourText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query8HourText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);	
	//new WText("&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 3));

	//WText * p1DayText = new WText("&nbsp;&nbsp;1d&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 4));
	//p1DayText->setStyleClass("nullLink");
	//connect(p1DayText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query1DayText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);	
	//new WText("&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 4));

	//WText * p3DayText = new WText("&nbsp;&nbsp;3d&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 5));
	//p3DayText->setStyleClass("nullLink");
	//connect(p3DayText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query3DayText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);	
	//new WText("&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 5));

	//WText * p5DayText = new WText("&nbsp;&nbsp;5d&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 6));
	//p5DayText->setStyleClass("nullLink");
	//connect(p5DayText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query5DayText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);	
	//new WText("&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 6));

	//WText * p1WeekText = new WText("&nbsp;&nbsp;1w&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 7));
	//p1WeekText->setStyleClass("nullLink");
	//connect(p1WeekText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query1WeekText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);	
	//new WText("&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 7));

	//WText * pCurWeekText = new WText(strWeek, QueryTitleTable1->elementAt(0, 8));
	//pCurWeekText->setStyleClass("nullLink");
	//connect(pCurWeekText, SIGNAL(clicked()), "showbar();" ,this, SLOT(QueryCurWeekText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);	
	//new WText("&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 8));

	//WText * p1MonthText = new WText("&nbsp;&nbsp;1m&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 9));
	//p1MonthText->setStyleClass("nullLink");
	//connect(p1MonthText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query1MonthText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);	
	//new WText("&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 9));

	//WText * p3MonthText = new WText("&nbsp;&nbsp;3m&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 10));
	//p3MonthText->setStyleClass("nullLink");
	//connect(p3MonthText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query3MonthText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);	
	//new WText("&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 10));

	//WText * p6MonthText = new WText("&nbsp;&nbsp;6m&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 11));
	//p6MonthText->setStyleClass("nullLink");
	//connect(p6MonthText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query6MonthText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);	
	//new WText("&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 11));

	//WText * pCurDayText = new WText(strDay, QueryTitleTable1->elementAt(0, 12));
	//pCurDayText->setStyleClass("nullLink");
	//connect(pCurDayText, SIGNAL(clicked()), "showbar();" ,this, SLOT(QueryCurDayText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);	
	//new WText("&nbsp;&nbsp;", QueryTitleTable1->elementAt(0, 12));

	//WTable * QueryTitleTable2 = new WTable((WContainerWidget *)QueryTitleTable->elementAt(1, 0));
	//QueryTitleTable->elementAt(1, 0)->setContentAlignment(AlignTop | AlignCenter);

	//WTable * leftQueryTable = new WTable(QueryTitleTable2->elementAt(0, 0));
	//WTable * rightQueryTable = new WTable(QueryTitleTable2->elementAt(0, 1));

	//QueryTitleTable2->elementAt(0, 0)->setStyleClass("tleft");
	//QueryTitleTable2->elementAt(0, 1)->setStyleClass("trigtht");

	//TTime curTime = TTime::GetCurrentTimeEx();
	//new WText(strStartTimeLabel, leftQueryTable->elementAt(2, 0));
	//new WText("&nbsp;&nbsp;", leftQueryTable->elementAt(2, 0));
	//pAlertStartTime = new WLineEdit("", leftQueryTable->elementAt(2, 1));
	//TTimeSpan ts(0,24,0,0);
	//curTime -= ts;
	//pAlertStartTime->setText(curTime.Format());
	//pAlertStartTime->setStyleClass("ttext");
 //   //strcpy(pAlertStartTime->contextmenu_ , "onkeyDown=\"validate(this,3)\"");
	//strcpy(pAlertStartTime->contextmenu_ , "onFocus=\"calendar()\"");
	////pMainTable->AddHelpText(leftTable, strStartTimeDes, 3, 1);

	//curTime = TTime::GetCurrentTimeEx();
	//new WText(strEndTimeLabel, rightQueryTable->elementAt(2, 0));
	//new WText("&nbsp;&nbsp;", rightQueryTable->elementAt(2, 0));
	//pAlertEndTime = new WLineEdit("", rightQueryTable->elementAt(2, 1));
	//pAlertEndTime->setText(curTime.Format());
	//pAlertEndTime->setStyleClass("ttext");
	//strcpy(pAlertEndTime->contextmenu_ , "onFocus=\"calendar()\"");
	////pMainTable->AddHelpText(rightTable, strEndTimeDes, 3, 1);

	//new WText("&nbsp;&nbsp;&nbsp;&nbsp;", (WContainerWidget *)rightQueryTable->elementAt(2, 2));
	//WPushButton * pQueryBtn = new WPushButton(strQueryBtn, (WContainerWidget *)rightQueryTable->elementAt(2, 2));
	//rightQueryTable->elementAt(2, 2)->setContentAlignment(AlignCenter);
	//pQueryBtn->setStyleClass("wizardbutton");	
	//connect(pQueryBtn, SIGNAL(clicked()), "showbar();" ,this, SLOT(TrendReportQuery()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);	

	//reportTable = new WTable((WContainerWidget *)rightContentTble->elementAt(1, 0));
	//rightContentTble->elementAt(1, 0)->setStyleClass("t5");
	//reportTable->setStyleClass("t5");

	//WScrollArea * scrollarea = new WScrollArea(rightContentTble->elementAt(1,0));
	//scrollarea->setStyleClass("t5");	
	//scrollarea->setWidget(reportTable);

	//AddJsParam("tableName", wholetable->formName());


	//翻译 & 刷新 Button
	pTranslateBtn = new WPushButton("Translate",this);
	pExChangeBtn = new WPushButton("Refresh",this);

	int bTrans = GetIniFileInt("translate", "translate", 0, "general.ini");
	if(bTrans == 1)
	{
		this->pTranslateBtn->show();
		connect(this->pTranslateBtn, SIGNAL(clicked()), this, SLOT(Translate()));	

		this->pExChangeBtn->show();
		connect(this->pExChangeBtn, SIGNAL(clicked()), this, SLOT(ExChange()));	
	}
	else
	{
		this->pTranslateBtn->hide();
		this->pExChangeBtn->hide();
	}


	AddJsParam("listheight", strListHeights);
	AddJsParam("listtitle", strListTitles);
	AddJsParam("listpan", strListPans);
	AddJsParam("bGeneral","true");
	AddJsParam("uistyle", "treepan");
	AddJsParam("fullstyle", "true");
	new WText("<SCRIPT language='JavaScript' src='/Script2.js'></SCRIPT>", this);
//	new WText("<Script language='javascript'>SetTreeViewPanel();</script>",this); // 该行代码因为主动刷新页面引起AJAX自动刷新机制偶尔出现页面不能完整显示而被注释
}
Example #7
0
void CSVAddPlan::showMainForm()
{
	
	string szMon,szThurs,szWed,szTues,szFri,szSat,szSun,szDisable,szEnable,szfrom,szTo,szAddRelPlanBut;
	//Resource
	OBJECT objRes=LoadResource("default", "localhost");  
	if( objRes !=INVALID_VALUE )
	{	
		MAPNODE ResNode=GetResourceNode(objRes);
		if( ResNode != INVALID_VALUE )
		{
			FindNodeValue(ResNode,"IDS_Time_Area_Task_Add",szAddRelPlanBut);

			FindNodeValue(ResNode,"IDS_Disable",szDisable);
			FindNodeValue(ResNode,"IDS_Enable",szEnable);
			FindNodeValue(ResNode,"IDS_Monday",szMon);
			FindNodeValue(ResNode,"IDS_Tuesday",szThurs);
			FindNodeValue(ResNode,"IDS_Wednesday",szWed);
			FindNodeValue(ResNode,"IDS_Thursday",szTues);
			FindNodeValue(ResNode,"IDS_Friday",szFri);
			FindNodeValue(ResNode,"IDS_Saturday",szSat);
			FindNodeValue(ResNode,"IDS_Sunday",szSun);
			FindNodeValue(ResNode,"IDS_From",szfrom);
			FindNodeValue(ResNode,"IDS_To",szTo);
		}
		CloseResource(objRes);
	}

	
	new WText("<SCRIPT language='JavaScript' src='/basic.js'></SCRIPT>", this);
	new WText("<div id='view_panel' class='panel_view'>", this);


OutputDebugString("----------------strUser----------------\n");
	pMainTable = new WSVMainTable(this, szTitle, true);
	if(pMainTable->pHelpImg)
	{
		connect(pMainTable->pHelpImg, SIGNAL(clicked()),this,SLOT(AddPlanHelp()));
	}
	

	AddRangeTable = new WSVFlexTable((WContainerWidget *)pMainTable->GetContentTable()->elementAt(1,0), Group, m_FormShowText.szAddReTitle);

	if (AddRangeTable->GetContentTable() != NULL)
	{
		AddRangeTable->AppendRows(m_FormShowText.szBasicAdd);

		m_pName = new WLineEdit("", AddRangeTable->AppendRowsContent(0, m_FormShowText.szRunName+"<span class =required>*</span>", m_FormShowText.szRunNameHelp, m_FormShowText.szErrorMsg));
		//m_pName -> setTextSize(50);
		m_pName->resize(WLength(300, WLength::Pixel),WLength(20, WLength::Pixel));
		m_pName->setStyleClass("input_text");
		
		new WText("", AddRangeTable->AppendRowsContent(0, "", "", m_FormShowText.szErrorMsg1));

		m_pTasklist = new CTaskList(NULL, AddRangeTable,m_FormShowText.strWeekHelp);
		/*
		m_pCombo[0] = new WComboBox(RecList->elementAt(0, 1));
		m_pCombo[0]->addItem(szEnable);
		m_pCombo[0]->addItem(szDisable);
		pFrom[0] = new WText(szfrom, RecList->elementAt(0, 2));
		m_pStart[0] = new WLineEdit("00:00", RecList->elementAt(0, 3));
		m_pStart[0]->setStyleClass("input_text");
		pTo[0] = new WText(szTo, RecList->elementAt(0, 4));
		m_pEnd[0] = new WLineEdit("23:59", RecList->elementAt(0, 5));
		m_pEnd[0]->setStyleClass("input_text");

		for (int i=1; i<7; i++)
		{
			WTable *RecList = new WTable(AddRangeTable->AppendRowsContent(0, DayType[i], "", ""));
			RecList->setStyleClass("widthauto");
			m_pCombo[i] = new WComboBox(RecList->elementAt(0, 1));
			m_pCombo[i]->addItem(szEnable);
			m_pCombo[i]->addItem(szDisable);
			pFrom[i] = new WText(szfrom, RecList->elementAt(0, 2));
			m_pStart[i] = new WLineEdit("00:00", RecList->elementAt(0, 3));
			m_pStart[i]->setStyleClass("input_text");
			pTo[i] = new WText(szTo, RecList->elementAt(0, 4));
			m_pEnd[i] = new WLineEdit("23:59", RecList->elementAt(0, 5));
			m_pEnd[i]->setStyleClass("input_text");
		}
		*/
		AddRangeTable->AppendRows(m_FormShowText.szAdvanceAdd);
		textarea = new WTextArea("", AddRangeTable->AppendRowsContent(1, m_FormShowText.szDescript, "", ""));
		textarea->resize(WLength(400, WLength::Pixel),WLength(100, WLength::Pixel));
		textarea->setStyleClass("input_text");

		AddRangeTable->ShowOrHideHelp();
		AddRangeTable->HideAllErrorMsg();
	}

	if (AddRangeTable->GetActionTable() != NULL)
	{
		WTable *pGroupOperate = new WTable(AddRangeTable->GetActionTable()->elementAt(0, 1));
		pGroupOperate->setStyleClass("widthauto");

		WSVButton * pSave = new WSVButton(pGroupOperate->elementAt(0,0),m_FormShowText.szSaveBut,"button_bg_m_black.png",m_FormShowText.szSaveBut,true);
		WObject::connect(pSave, SIGNAL(clicked()), this, SLOT(Save()));
		//pGroupOperate->elementAt(0,0)-> addWidget(pSave);

		WSVButton * pCancel = new WSVButton(pGroupOperate->elementAt(0,1),m_FormShowText.szCancelBut,"button_bg_m.png",m_FormShowText.szCancelBut,false);
		WObject::connect(pCancel, SIGNAL(clicked()), this, SLOT(Cancel()));

		//pGroupOperate->elementAt(0,0)-> addWidget(pCancel);
		//pGroupOperate->elementAt(0,0)->setContentAlignment(AlignCenter);
		
	}

	//new WText("</div>");

	//Jansion.zhou 2006-12-25
 //   WTable * TitleTable = new WTable(this);
	//TitleTable->setStyleClass("t3");
	//m_pErrMsg = new WText("", (WContainerWidget *)TitleTable->elementAt(0,0));
 //   m_pErrMsg->decorationStyle().setForegroundColor(Wt::red);
 //   m_pErrMsg->hide();

	//Jansion.zhou 2006-12-25
	////connect svdb failure WText
	//m_pConnErr = new WText("", (WContainerWidget *)TitleTable->elementAt(0, 0));
	//m_pConnErr->decorationStyle().setForegroundColor(Wt::red);
	//m_pConnErr ->hide();
	



	new WText("</div>", this);

	AddJsParam("uistyle", "viewpan");
	AddJsParam("fullstyle", "true");
	AddJsParam("bGeneral", "false");
	new WText("<SCRIPT language='JavaScript' src='/Script.js'></SCRIPT>", this);
}