Exemple #1
0
bool CTuopList::triggerSlot(WObject *sender, const WSlot_ *slot, void **args)
{
  if (slot == slots_ + 0) {
    sender_ = sender;    EditUserName(*((const std::string *)args[0]));
    return true;
  }
  if (slot == slots_ + 1) {
    sender_ = sender;    OpenTuop(*((const std::string *)args[0]));
    return true;
  }
  if (slot == slots_ + 2) {
    sender_ = sender;    SelAll();
    return true;
  }
  if (slot == slots_ + 3) {
    sender_ = sender;    SelNone();
    return true;
  }
  if (slot == slots_ + 4) {
    sender_ = sender;    SelInvert();
    return true;
  }
  if (slot == slots_ + 5) {
    sender_ = sender;    BeforeDelUser();
    return true;
  }
  if (slot == slots_ + 6) {
    sender_ = sender;    DelUser();
    return true;
  }
  if (slot == slots_ + 7) {
    sender_ = sender;    EditReturn(*((int *)args[0]));
    return true;
  }
  if (slot == slots_ + 8) {
    sender_ = sender;    Translate();
    return true;
  }
  if (slot == slots_ + 9) {
    sender_ = sender;    ExChange();
    return true;
  }
  if (slot == slots_ + 10) {
    sender_ = sender;    Sort();
    return true;
  }
  if (slot == slots_ + 11) {
    sender_ = sender;    SortOk();
    return true;
  }
  return WContainerWidget::triggerSlot(sender, slot, args);
}
Exemple #2
0
bool CTopnReportList::triggerSlot(WObject *sender, const WSlot_ *slot, void **args)
{
  if (slot == slots_ + 0) {
    sender_ = sender;    FastGenReport();
    return true;
  }
  if (slot == slots_ + 1) {
    sender_ = sender;    Translate();
    return true;
  }
  if (slot == slots_ + 2) {
    sender_ = sender;    ExChange();
    return true;
  }
  if (slot == slots_ + 3) {
    sender_ = sender;    SelAll();
    return true;
  }
  if (slot == slots_ + 4) {
    sender_ = sender;    SelNone();
    return true;
  }
  if (slot == slots_ + 5) {
    sender_ = sender;    SelInvert();
    return true;
  }
  if (slot == slots_ + 6) {
    sender_ = sender;    BeforeDelList();
    return true;
  }
  if (slot == slots_ + 7) {
    sender_ = sender;    DelList();
    return true;
  }
  if (slot == slots_ + 8) {
    sender_ = sender;    ReturnMainTopnReport();
    return true;
  }
  return WContainerWidget::triggerSlot(sender, slot, args);
}
Exemple #3
0
bool CSVReportSet::triggerSlot(WObject *sender, const WSlot_ *slot, void **args)
{
  if (slot == slots_ + 0) {
    sender_ = sender;    hideSmsList();
    return true;
  }
  if (slot == slots_ + 1) {
    sender_ = sender;    showSmsList();
    return true;
  }
  if (slot == slots_ + 2) {
    sender_ = sender;    hideSmsList1();
    return true;
  }
  if (slot == slots_ + 3) {
    sender_ = sender;    showSmsList1();
    return true;
  }
  if (slot == slots_ + 4) {
    sender_ = sender;    hideSmsList2();
    return true;
  }
  if (slot == slots_ + 5) {
    sender_ = sender;    showSmsList2();
    return true;
  }
  if (slot == slots_ + 6) {
    sender_ = sender;    SaveConfig();
    return true;
  }
  if (slot == slots_ + 7) {
    sender_ = sender;    SaveConfig1();
    return true;
  }
  if (slot == slots_ + 8) {
    sender_ = sender;    ShowSendForm();
    return true;
  }
  if (slot == slots_ + 9) {
    sender_ = sender;    SelAll();
    return true;
  }
  if (slot == slots_ + 10) {
    sender_ = sender;    SelNone();
    return true;
  }
  if (slot == slots_ + 11) {
    sender_ = sender;    SelInvert();
    return true;
  }
  if (slot == slots_ + 12) {
    sender_ = sender;    BeforeDelPhone();
    return true;
  }
  if (slot == slots_ + 13) {
    sender_ = sender;    DelPhone();
    return true;
  }
  if (slot == slots_ + 14) {
    sender_ = sender;    AddPhone();
    return true;
  }
  if (slot == slots_ + 15) {
    sender_ = sender;    EditRow(*((const std::string *)args[0]));
    return true;
  }
  if (slot == slots_ + 16) {
    sender_ = sender;    MainHelp();
    return true;
  }
  if (slot == slots_ + 17) {
    sender_ = sender;    Translate();
    return true;
  }
  if (slot == slots_ + 18) {
    sender_ = sender;    ExChange();
    return true;
  }
  return WContainerWidget::triggerSlot(sender, slot, args);
}
Exemple #4
0
void CTuopList::ShowMainTable()
{
	//strNullList = "空的列表";

	m_pMainTable = new WSVMainTable(this,strMainTitle,false);
	//if(m_pMainTable->pHelpImg)
	//{
	//	connect(m_pMainTable->pHelpImg,SIGNAL(click()),this,SLOT(ShowHelp()));
	//}

	//拓扑列表界面
	m_pTopologyListTable = new WSVFlexTable(m_pMainTable->GetContentTable()->elementAt(0,0),List, strTitle);

	if (m_pTopologyListTable->GetContentTable() != NULL)
	{
		m_pTopologyListTable->AppendColumn("",WLength(40,WLength::Pixel));
		m_pTopologyListTable->SetDataRowStyle("table_data_grid_item_text");

		m_pTopologyListTable->AppendColumn(strLoginLabel,WLength(70,WLength::Percentage));
		m_pTopologyListTable->SetDataRowStyle("table_data_grid_item_text");

		m_pTopologyListTable->AppendColumn(strNameUse,WLength(10,WLength::Percentage));
		m_pTopologyListTable->SetDataRowStyle("table_data_grid_item_text");

		m_pTopologyListTable->AppendColumn(strNameEdit,WLength(10,WLength::Percentage));
		m_pTopologyListTable->SetDataRowStyle("table_data_grid_item_text");
	}

	if (m_pTopologyListTable->GetActionTable() != NULL)
	{
		m_pTopologyListTable->AddStandardSelLink(strAllSel ,strAllNotSel,strFanSel);
		connect(m_pTopologyListTable->pSelAll, SIGNAL(clicked()), this, SLOT(SelAll()));
		connect(m_pTopologyListTable->pSelNone, SIGNAL(clicked()), this, SLOT(SelNone()));
		connect(m_pTopologyListTable->pSelReverse, SIGNAL(clicked()), this, SLOT(SelInvert()));
	
		WTable *pTbl;
		m_pTopologyListTable->GetActionTable()->elementAt(0,1)->setContentAlignment(AlignCenter);
		m_pTopologyListTable->GetActionTable()->elementAt(0,1)->setStyleClass("textbold");
		
		pTbl = new WTable(m_pTopologyListTable->GetActionTable()->elementAt(0,1));
		pTbl->setStyleClass("widthauto");
		WSVButton * pDel = new WSVButton(pTbl->elementAt(0,1),strDelete, "button_bg_del.png", "", false);
		if (pDel)
		{
			connect(pDel, SIGNAL(clicked()), this, SLOT(BeforeDelUser()));
		} 

		//新增
		//WSVButton * pSort = new WSVButton(pTbl->elementAt(0,2), "排序", "button_bg_taxis.png", "", false);
		WSVButton * pSort = new WSVButton(pTbl->elementAt(0,2), strSort, "button_bg_taxis.png", "", false);
		if (pSort)
		{
			connect(pSort, SIGNAL(clicked()), this, SLOT(Sort()));
		}

		//WTable *pTbl2;
		m_pTopologyListTable->GetActionTable()->elementAt(0, 2)->setContentAlignment(AlignRight);		
		strcpy(m_pTopologyListTable->GetActionTable()->elementAt(0, 2)->contextmenu_, "nowrap");			

		//Tuopu 发布插件下载
		string strTuopPluginJs = "window.open('../TuopoClient.exe','newwindow')";
		
		string szLink = "<a href='#'>" + szTuopDown + "</a>&nbsp;&nbsp;";
		WText * pTuopPlugin = new WText(szLink, (WContainerWidget *)m_pTopologyListTable->GetActionTable()->elementAt(0, 2));
		connect(pTuopPlugin, SIGNAL(clicked()),strTuopPluginJs.c_str() ,WObject::JAVASCRIPT);
	}

	m_pTopologyListTable->SetNullTipInfo(strNullList);


	//拓扑排序列表界面
	//pSortTable = new WSVFlexTable(m_pMainTable->GetContentTable()->elementAt(1,0), List, "拓扑排序列表");
	pSortTable = new WSVFlexTable(m_pMainTable->GetContentTable()->elementAt(1,0), List, strTuoPuSortList);
	if (pSortTable->GetContentTable() != NULL)
	{
		pSortTable->AppendColumn("",WLength(40,WLength::Pixel));
		pSortTable->SetDataRowStyle("table_data_grid_item_text");

		//pSortTable->AppendColumn("名称",WLength(50,WLength::Percentage));
		pSortTable->AppendColumn(strName,WLength(50,WLength::Percentage));
		pSortTable->SetDataRowStyle("table_data_grid_item_text");

		//pSortTable->AppendColumn("序号",WLength(50,WLength::Percentage));
		pSortTable->AppendColumn(strSequenceNo,WLength(50,WLength::Percentage));
		pSortTable->SetDataRowStyle("table_data_grid_item_text");
	}

	if (pSortTable->GetActionTable() != NULL)
	{
		WTable *pTbl1;
		pSortTable->GetActionTable()->elementAt(0,1)->setContentAlignment(AlignCenter);
		pSortTable->GetActionTable()->elementAt(0,1)->setStyleClass("textbold");
		
		pTbl1 = new WTable(pSortTable->GetActionTable()->elementAt(0,1));
		pTbl1->setStyleClass("widthauto");
		//WSVButton * pSortOkBtn = new WSVButton(pTbl1->elementAt(0, 1), "确 定", "button_bg_m.png", "", false);
		WSVButton * pSortOkBtn = new WSVButton(pTbl1->elementAt(0, 1), strAffirm, "button_bg_m.png", "", false);

		if(pSortOkBtn)
		{
			connect(pSortOkBtn,SIGNAL(clicked()),this,SLOT(SortOk()));
		}
	}
	
	//编辑事件
	std::string strIndex;

	std::list<string> m_pList;
	std::list<string>::iterator m_pItem;

	#ifdef	 Tuopu
		m_pList = ReadFileName(GetSiteViewRootPath() + "\\htdocs\\tuoplist");		
	#else
		m_pList = ReadFileName(GetSiteViewRootPath() + "\\htdocs\\maintainlist");
	#endif

	std::list<string> m_pVList;
	std::list<string>::iterator m_pVItem;

	#ifdef	 Tuopu
		m_pVList = ReadVSDName(GetSiteViewRootPath() + "\\htdocs\\tuoplist");
	#else
		m_pVList = ReadVSDName(GetSiteViewRootPath() + "\\htdocs\\maintainlist");
	#endif

	m_pVItem = m_pVList.begin();	
	for(m_pItem = m_pList.begin(); m_pItem != m_pList.end(); m_pItem++)
	{
		std::string strUserName = *m_pItem;
		std::string strVSD = *m_pVItem; 
		OneRecord list;
		list.strUserName = strUserName;
		//vsd文件始终不会更改, 所以用它来制造key
		list.strBackName = ReplaceStdString(strVSD, ".vsd", ".htm");
		list.strTuop = strVSD;

		//读取tuopfile.ini的sort信息并赋值给OneRecord变量。:
		//如果没有预先设置的sort信息则按什么规则自动赋值? ---》先是读预先设置的序号, 为默认值 则不存在 意味着是新发布的 
		//---》规则(读一遍ini, 找到序号最大值, 加1 并写到tuopfile.ini文件中)
		int nSort = GetIniFileInt("sort", strVSD, -1, "tuopfile.ini");
		if(nSort != -1)
		{
			list.nSort = nSort;
		}
		else
		{
			//获取序号最大值, 加1
			list.nSort = GetMaxSortId() + 1;

			//写序号值到ini
		#ifdef	 Tuopu
			WriteIniFileInt("sort", strVSD, list.nSort, "tuopfile.ini");
		#else
			WriteIniFileInt("sort", strVSD, list.nSort, "maintainfile.ini");
		#endif
		}

		RecordList.push_back(list);

		m_pVItem++;
	}	
	
	
	//绑定编辑事件
	connect(&m_userMapper, SIGNAL(mapped(const std::string)), this, SLOT(EditUserName(const std::string)));

	//显示列表
	int i = 1;
	std::string strOpen;

	for(m_pRecordList=RecordList.begin(); m_pRecordList != RecordList.end(); m_pRecordList ++)
	{
		m_pTopologyListTable->InitRow(i);
		pSortTable->InitRow(i);
		i++;
	}

	i = 1;
	for(m_pRecordList=RecordList.begin(); m_pRecordList != RecordList.end(); m_pRecordList ++)
	{
		//列表数据界面初始化
		m_pTopologyListTable->GeDataTable()->elementAt(m_pRecordList->nSort, 0)->setContentAlignment(AlignCenter);
		m_pRecordList->pCheckBox = new WCheckBox("", (WContainerWidget*)m_pTopologyListTable->GeDataTable()->elementAt(m_pRecordList->nSort, 0));		

		strOpen = "<a href=./showtuopu.exe?pageid=";
		strOpen += ReplaceStdString(m_pRecordList->strBackName, ".htm", "");
	#ifdef	 Tuopu
		strOpen += "&version=0";
	#else
		strOpen += "&version=0&usrleader=0&maintain=1";
	#endif
		strOpen += " target=_blank>";
		strOpen += m_pRecordList->strUserName;
		strOpen += "</a>";

		m_pTopologyListTable->GeDataTable()->elementAt(m_pRecordList->nSort, 2)->setContentAlignment(AlignCenter);
		m_pRecordList->pstrUserName = new WText(strOpen, (WContainerWidget*)m_pTopologyListTable->GeDataTable()->elementAt(m_pRecordList->nSort, 2));
		

		m_pRecordList->pLineEdit = new WLineEdit(m_pRecordList->strUserName,m_pTopologyListTable->GeDataTable()->elementAt(m_pRecordList->nSort, 2));
		m_pRecordList->pLineEdit->hide();


		m_pTopologyListTable->GeDataTable()->elementAt(m_pRecordList->nSort, 4)->setContentAlignment(AlignCenter);		
		m_pRecordList->pTuop = new WImage("../Images/resource.gif",m_pTopologyListTable->GeDataTable()->elementAt(m_pRecordList->nSort, 4));
		m_pRecordList->pTuop->setToolTip(strTuopTip);
		m_pRecordList->pTuop->setStyleClass("hand");

		//绑定visio事件
		std::string strJavascript;

	#ifdef	 Tuopu
		strJavascript = "window.open('../tuoplist/" + m_pRecordList->strTuop + "','newwindow')";	
	#else
		strJavascript = "window.open('../maintainlist/" + m_pRecordList->strTuop + "','newwindow')";	
	#endif

		connect(m_pRecordList->pTuop, SIGNAL(clicked()),strJavascript.c_str() ,WObject::JAVASCRIPT );

		m_pTopologyListTable->GeDataTable()->elementAt(m_pRecordList->nSort, 6)->setContentAlignment(AlignCenter);
		m_pRecordList->pEdit = new WImage("/Images/edit.gif",m_pTopologyListTable->GeDataTable()->elementAt(m_pRecordList->nSort, 6));		
		m_pRecordList->pEdit->setToolTip(strEditTip);
		m_pRecordList->pEdit->setStyleClass("hand");
		
		strIndex=m_pRecordList->strUserName.c_str();

		m_userMapper.setMapping(m_pRecordList->pEdit, strIndex); 
		
		connect(m_pRecordList->pEdit, SIGNAL(clicked()), &m_userMapper, SLOT(map()));
		connect(m_pRecordList->pLineEdit, SIGNAL(keyWentDown(int)), this, SLOT(EditReturn(int)));
		i++;

		//排序数据界面初始化
		pSortTable->GeDataTable()->elementAt(m_pRecordList->nSort, 2)->setContentAlignment(AlignCenter);
		WText * pTmpText = new WText(m_pRecordList->strUserName, pSortTable->GeDataTable()->elementAt(m_pRecordList->nSort, 2));

		char chItem[32]  = {0};	
		sprintf(chItem, "%d", m_pRecordList->nSort);
		string strSort = chItem;

		pSortTable->GeDataTable()->elementAt(m_pRecordList->nSort, 4)->setContentAlignment(AlignCenter);
		WLineEdit * pTmpEdit = new WLineEdit(strSort, pSortTable->GeDataTable()->elementAt(m_pRecordList->nSort, 4));

		//放到sv_table里去
		SVTableCell ce;
		ce.setType(adText);
		ce.setValue(pTmpText);
		m_svSortList.WriteCell(m_pRecordList->strTuop, 0, ce);

		ce.setType(adLineEdit);
		ce.setValue(pTmpEdit);
		m_svSortList.WriteCell(m_pRecordList->strTuop, 1, ce);
	}
	
	m_pList.clear();
	m_pVList.clear();
	
	//列表为空
	if(RecordList.size() <= 0)
	{
		m_pTopologyListTable->ShowNullTip();
	}
	else
	{
		m_pTopologyListTable->HideNullTip();
	}

	pSortTable->hide();


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

	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();
	}
}
Exemple #5
0
bool CSVPlanSet::triggerSlot(WObject *sender, const WSlot_ *slot, void **args)
{
  if (slot == slots_ + 0) {
    sender_ = sender;    hidePlanList();
    return true;
  }
  if (slot == slots_ + 1) {
    sender_ = sender;    showPlanList();
    return true;
  }
  if (slot == slots_ + 2) {
    sender_ = sender;    Save();
    return true;
  }
  if (slot == slots_ + 3) {
    sender_ = sender;    AddPlan();
    return true;
  }
  if (slot == slots_ + 4) {
    sender_ = sender;    BeforeDelPlan();
    return true;
  }
  if (slot == slots_ + 5) {
    sender_ = sender;    DelPlan();
    return true;
  }
  if (slot == slots_ + 6) {
    sender_ = sender;    SelAll();
    return true;
  }
  if (slot == slots_ + 7) {
    sender_ = sender;    EditPlan(*((const std::string *)args[0]));
    return true;
  }
  if (slot == slots_ + 8) {
    sender_ = sender;    hidePlanList1();
    return true;
  }
  if (slot == slots_ + 9) {
    sender_ = sender;    showPlanList1();
    return true;
  }
  if (slot == slots_ + 10) {
    sender_ = sender;    Save1();
    return true;
  }
  if (slot == slots_ + 11) {
    sender_ = sender;    AddPlan1();
    return true;
  }
  if (slot == slots_ + 12) {
    sender_ = sender;    BeforeDelPlan1();
    return true;
  }
  if (slot == slots_ + 13) {
    sender_ = sender;    DelPlan1();
    return true;
  }
  if (slot == slots_ + 14) {
    sender_ = sender;    SelAll1();
    return true;
  }
  if (slot == slots_ + 15) {
    sender_ = sender;    EditPlan1(*((const std::string *)args[0]));
    return true;
  }
  if (slot == slots_ + 16) {
    sender_ = sender;    SelNone();
    return true;
  }
  if (slot == slots_ + 17) {
    sender_ = sender;    SelNone1();
    return true;
  }
  if (slot == slots_ + 18) {
    sender_ = sender;    SelInvert();
    return true;
  }
  if (slot == slots_ + 19) {
    sender_ = sender;    SelInvert1();
    return true;
  }
  if (slot == slots_ + 20) {
    sender_ = sender;    AdjustAbsDelState();
    return true;
  }
  if (slot == slots_ + 21) {
    sender_ = sender;    AdjustRangeDelState();
    return true;
  }
  return WContainerWidget::triggerSlot(sender, slot, args);
}
LRESULT CALLBACK stream_WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    RECT		rect ;
    int cxClient, cyClient;
    static HMENU	hMenu ;
    POINT point ;
    int ret, idx;
    TCHAR  buf[64];
    char file_name[MAX_FILE_PATH_LEN];

    static int edit_iItem=-1 ;
    static int edit_iSubItem;

     LVITEM lv_item;
    switch (message)
    {
        case WM_CREATE:
            hwnd_stream= hwnd;
            hMenu = LoadMenu (g_hInstance, TEXT("my_popup_menu")) ;
            hMenu = GetSubMenu (hMenu, 0) ;

            hwnd_dynamic_edit=CreateWindow (TEXT("edit"), TEXT(""),
                WS_CHILD|ES_AUTOHSCROLL,
                CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
                hwnd, (HMENU)ID_DYNAMIC_EDIT, g_hInstance, NULL) ;

            SendMessage(hwnd_dynamic_edit, WM_SETFONT, (WPARAM)char_font_2, 0); 

            hwnd_lv = CreateListView(hwnd);
            //InitListViewImageLists(hwnd_lv);
            InitListViewColumns(hwnd_lv);
            lv_row_color_init();
            old_lv_proc = (WNDPROC) SetWindowLong (hwnd_lv, 
                                 	GWL_WNDPROC, (LONG)my_lv_proc) ;

            ShowWindow(hwnd_lv, 1) ;
            refresh_window(hwnd_lv) ;

           add_tip(hwndTip, hwnd_lv, TEXT("点击鼠标右键进行操作"));

            return 0 ;

        case WM_SIZE:
      		cxClient = LOWORD (lParam) ;
      		cyClient = HIWORD (lParam) ;

            MoveWindow(hwnd_lv, 	0, 0,
                cxClient, cyClient, TRUE) ;

            return 0 ;

case WM_NOTIFY:
{

   NMHDR *pt_nmhdr=(void *)lParam;
   switch(LOWORD(wParam))
   { 
     case ID_LV:

     // if code == NM_CLICK - Single click on an item
     if(pt_nmhdr->code == NM_CLICK || pt_nmhdr->code == NM_DBLCLK) 
     {
        int iItem = ((LPNMITEMACTIVATE)lParam)->iItem;
        int iSubItem=((LPNMITEMACTIVATE)lParam)->iSubItem;

        if (iItem>=0 && ((iSubItem>=3 && iSubItem<=5) || iSubItem==7)) 
        {

            ListView_GetSubItemRect(hwnd_lv,iItem,iSubItem,LVIR_LABEL,&rect);
            ListView_GetItemText(hwnd_lv, iItem, iSubItem, buf, sizeof(buf));
            MoveWindow	(hwnd_dynamic_edit
                ,rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, TRUE);
            SetWindowText(hwnd_dynamic_edit, buf);
            ShowWindow (hwnd_dynamic_edit, 1) ;
            SetFocus(hwnd_dynamic_edit);
            SendMessage(hwnd_dynamic_edit, EM_SETSEL, (WPARAM)0, (LPARAM)-1);

            edit_iItem = iItem;
            edit_iSubItem = iSubItem;

        }

            return 0;
     }
    else if (pt_nmhdr->code == NM_RCLICK)
    {
        point = ((LPNMITEMACTIVATE)lParam)->ptAction;
        ListView_GetItem(hwnd_lv, &lv_item);

        ClientToScreen (hwnd_lv, &point) ;
  		TrackPopupMenu (hMenu, TPM_LEFTBUTTON, point.x, point.y, 0, hwnd_stream, NULL) ;
        return 0;

    }
    else if (pt_nmhdr->code == LVN_ITEMCHANGED)
    {
        if (!init_over) break;
        if (lv_in_op)   break;
        //if((((LPNMLISTVIEW)lParam)->uOldState&LVIS_STATEIMAGEMASK) != 
        //    (((LPNMLISTVIEW)lParam)->uNewState&LVIS_STATEIMAGEMASK)) 
        {
            int iItem = ((LPNMITEMACTIVATE)lParam)->iItem;
            int selected = ListView_GetCheckState(hwnd_lv, iItem);

            if (g_apt_streams[iItem]->selected!=selected)
            {
                doc_modified=1;
                g_apt_streams[iItem]->selected=selected;
                update_statusbar();
            }
        }
        return 0;

    }
    
    break;

   }

   break;
}

        case 	WM_COMMAND:
            switch (LOWORD(wParam))
            {
                  
                case    IDM_STREAM_NEW:
                    init_stream(&gt_edit_stream);
                    gt_edit_stream.len=gat_sample_pkts[0].len;
                    memcpy(gt_edit_stream.data, gat_sample_pkts[0].pkt_data, gt_edit_stream.len);

                    ret=DialogBox(g_hInstance, TEXT("STREAM_EDIT_DLG"), hwnd, StreamEditDlgProc);
                    if (IDOK==ret)
                    {
                        add_stream(&gt_edit_stream);
                        re_populate_items();
                    }
               	return 0 ;

                case    IDM_STREAM_NEW_HEX:
                {
                    int len;
                    char buf[MAX_PACKET_LEN];
                    if (get_open_file_name(file_name, hwnd, ALL_FILE_FILTER))
                        return 0;

                    len = read_file_to_buf(buf, sizeof(buf)-1, file_name);
                    if (len>0)
                        add_stream_from_hex_text(buf, len);
                    else
                        err_msg_box("读取文件内容失败");
                   	return 0 ;
                }

                case    IDM_STREAM_NEW_BIN:
                {
                    int len;
                    char buf[MAX_PACKET_LEN];
                    if (get_open_file_name(file_name, hwnd, ALL_FILE_FILTER))
                        return 0;

                    len = read_file_to_buf(buf, sizeof(buf)-1, file_name);
                    if (len>0)
                        add_stream_from_raw_data(buf, len);
                    else
                        err_msg_box("读取文件内容失败");
                   	return 0 ;
                }

                case    IDM_STREAM_NEW_PCAP:
                {
                    if (get_open_file_name(file_name, hwnd, PCAP_FILE_FILTER))
                        return 0;
                    add_stream_from_pcap(file_name);
                   	return 0 ;
                }
                                
                case    IDM_STREAM_DEL:
                    idx=GetIndex(hwnd_lv);
       				//ListView_DeleteItem(hwnd_lv, idx);
                    delete_stream(idx);
                    re_populate_items();
                    update_statusbar();
       				return 0 ;
                case    IDM_STREAM_EDIT:
                    cur_strm_idx=GetIndex(hwnd_lv);
                    if (cur_strm_idx<0) return 0;
                    cpy_stream(&gt_edit_stream, g_apt_streams[cur_strm_idx]);
                    ret=DialogBox(g_hInstance, TEXT("STREAM_EDIT_DLG"), hwnd, StreamEditDlgProc);
                    if (IDOK==ret)
                    {
                        doc_modified=1;
                        cpy_stream(g_apt_streams[cur_strm_idx], &gt_edit_stream);
                        re_populate_items();
                    }
       				//ListView_DeleteAllItems(hwnd_lv);
       				return 0 ;
                case    IDM_STREAM_DEL_SEL:
       				//DelSel(hwnd_lv);
                    delete_sel_stream();
                    re_populate_items();
                    update_statusbar();
       				return 0 ;

                case    IDM_STREAM_SEL_ALL:
       				SelAll(hwnd_lv);
       				return 0 ;

                case    IDM_STREAM_SEL_RVS:
       				SelRvs(hwnd_lv);
       				return 0 ;
                    
                case    IDM_STREAM_COPY:
       				copy_idx = GetIndex(hwnd_lv);
       				return 0 ;

                case    IDM_STREAM_PASTE:
       				cpy_stream(&gt_edit_stream, g_apt_streams[copy_idx]);
                    add_stream(&gt_edit_stream);
                    re_populate_items();
       				return 0 ;

                case    IDM_STREAM_MAKE_FRAGS:
                {
       				ret=DialogBox(g_hInstance, TEXT("FRAG_DLG"), hwnd, FragDlgProc);
       				return 0 ;
                }

                case    IDM_STREAM_SEL2PCAP:
                {
                    ret=get_save_file_name(file_name, hwnd, PCAP_FILE_FILTER, PCAP_FILE_SUFFIX);
                    if (ret) return 0 ;

       				stream2dump(file_name);
                    update_pcap_file_history(file_name);
       				return 0 ;
                }

                case    IDM_STREAM_2_BIN:
                {
                    ret=get_save_file_name(file_name, hwnd, BIN_FILE_FILTER, BIN_FILE_SUFFIX);
                    if (ret) return 0 ;

       				stream_2_bin(file_name);
       				return 0 ;
                }

                case    IDM_STREAM_2_TEXT:
                {
                    ret=get_save_file_name(file_name, hwnd, TEXT_FILE_FILTER, TEXT_FILE_SUFFIX);
                    if (ret) return 0 ;

       				stream_2_text(file_name);
       				return 0 ;
                }
                
                case    ID_DYNAMIC_EDIT:
       				if (HIWORD(wParam)==EN_KILLFOCUS)
                    {

            update_grid_from_edit(edit_iItem, edit_iSubItem);
            edit_iItem=-1;

           				return 0 ;
                    }

            }
            break;

case   WM_KEYDOWN:
    if (VK_RETURN==wParam)
    {

        SetFocus(hwnd);

         return 0;

    }
    break;

        case 	WM_INITMENUPOPUP:
        {
            int idx=GetIndex(hwnd_lv);
            t_stream *pt_stream = g_apt_streams[idx];
            int sel_cnt=GetSelCnt(hwnd_lv);
            int item_cnt=ListView_GetItemCount(hwnd_lv);
            if (lParam == 0)
            {
                UINT add_stream_menu_state = nr_cur_stream<MAX_STREAM_NUM ? MF_ENABLED : MF_GRAYED;
                EnableMenuItem ((HMENU) wParam, IDM_STREAM_NEW, add_stream_menu_state);
                EnableMenuItem ((HMENU) wParam, IDM_STREAM_NEW_HEX, add_stream_menu_state);
                EnableMenuItem ((HMENU) wParam, IDM_STREAM_NEW_BIN, add_stream_menu_state);
                EnableMenuItem ((HMENU) wParam, IDM_STREAM_NEW_PCAP, add_stream_menu_state);
                EnableMenuItem ((HMENU) wParam, IDM_STREAM_EDIT, idx>=0 ? MF_ENABLED : MF_GRAYED);
                EnableMenuItem ((HMENU) wParam, IDM_STREAM_DEL, idx>=0 ? MF_ENABLED : MF_GRAYED);
                EnableMenuItem ((HMENU) wParam, IDM_STREAM_COPY, idx>=0 ? MF_ENABLED : MF_GRAYED);
                EnableMenuItem ((HMENU) wParam, IDM_STREAM_PASTE, copy_idx>=0 && item_cnt>copy_idx ? MF_ENABLED : MF_GRAYED);
                EnableMenuItem ((HMENU) wParam, IDM_STREAM_DEL_SEL, sel_cnt ? MF_ENABLED : MF_GRAYED);
                EnableMenuItem ((HMENU) wParam, IDM_STREAM_SEL_ALL, item_cnt ? MF_ENABLED : MF_GRAYED);
                EnableMenuItem ((HMENU) wParam, IDM_STREAM_SEL_RVS, item_cnt ? MF_ENABLED : MF_GRAYED);
                EnableMenuItem ((HMENU) wParam, IDM_STREAM_MAKE_FRAGS, idx>=0&&stream_fragable(pt_stream) ? MF_ENABLED : MF_GRAYED);
                EnableMenuItem ((HMENU) wParam, IDM_STREAM_SEL2PCAP, sel_cnt ? MF_ENABLED : MF_GRAYED);
                EnableMenuItem ((HMENU) wParam, IDM_STREAM_2_BIN, idx>=0 ? MF_ENABLED : MF_GRAYED);
                EnableMenuItem ((HMENU) wParam, IDM_STREAM_2_TEXT, idx>=0 ? MF_ENABLED : MF_GRAYED);

                return 0;

            }

            break;
        }

    }
    
    return DefWindowProc (hwnd, message, wParam, lParam) ;
}
Exemple #7
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);

}
Exemple #8
0
void CSVReportSet::AddGroupOperate(WTable * pTable)
{
	PrintDebugString("begin Init AddOperator function\n");

    m_pGroupOperate = new WTable((WContainerWidget *)pTable->elementAt( 8, 0));
   
	if ( m_pGroupOperate )
    {

        WImage * pSelAll = new WImage("../icons/selall.gif", (WContainerWidget *)m_pGroupOperate->elementAt(0, 1));
        if (pSelAll)
        {
            pSelAll->setStyleClass("imgbutton");
			pSelAll->setToolTip(m_formText.szTipSelAll1);
			connect(pSelAll, SIGNAL(clicked()), this, SLOT(SelAll()));
        }

        WImage * pSelNone = new WImage("../icons/selnone.gif", (WContainerWidget *)m_pGroupOperate->elementAt(0, 2));
        if (pSelAll)
        {
            pSelNone->setStyleClass("imgbutton");
			pSelNone->setToolTip(m_formText.szTipSelNone);
			connect(pSelNone, SIGNAL(clicked()), this, SLOT(SelNone()));
        }

        WImage * pSelinvert = new WImage("../icons/selinvert.gif", (WContainerWidget *)m_pGroupOperate->elementAt(0, 3));
        if (pSelinvert)
        {
            pSelinvert->setStyleClass("imgbutton");
			pSelinvert->setToolTip(m_formText.szTipSelInv);
			connect(pSelinvert, SIGNAL(clicked()), this, SLOT(SelInvert()));
        }

		
		pDel = new WImage("../icons/del.gif", (WContainerWidget *)m_pGroupOperate->elementAt(0, 4));
		if(!GetUserRight("m_reportlistDel"))
			pDel->hide();
		else
			pDel->show();

        if (pDel)
        {
           
			pDel->setStyleClass("imgbutton");
			pDel->setToolTip(m_formText.szTipDel);
			connect(pDel , SIGNAL(clicked()),this, SLOT(BeforeDelPhone()));
        }

		
		pAdd = new WPushButton(m_formText.szAddPhoneBut, (WContainerWidget *)m_pGroupOperate->elementAt(0, 6));
		pAdd->setStyleClass("wizardbutton");
		if(!GetUserRight("m_reportlistAdd"))
			pAdd->hide();
		else
			pAdd->show();

        if (pAdd)
        {
            pAdd->setToolTip(m_formText.szTipAddNew);
			WObject::connect(pAdd, SIGNAL(clicked()),"showbar();", this, SLOT(AddPhone())
				, WObject::ConnectionType::JAVASCRIPTDYNAMIC);
        }
		m_pGroupOperate->elementAt(0, 6)->resize(WLength(100,WLength::Percentage),WLength(100,WLength::Percentage));
		m_pGroupOperate->elementAt(0, 6)->setContentAlignment(AlignRight);
		
    }

	PrintDebugString("Init AddOperator function\n");

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

	PrintDebugString("Init AddOperator function finish\n");
}
Exemple #9
0
void CSVPlanSet::InitFlexTable(std::string strTitle1, std::string strTitle2)
{
	ReceiveAddrSetTable = new WSVFlexTable(pMainTable->GetContentTable()->elementAt(1,0), List, strTitle1);

	//new WText("\n<SCRIPT language='JavaScript' src='/basic.js'></SCRIPT>", this);
	//WTable * m_pGeneral4 = new WTable(this);
	//WTable * m_pGeneral = new WTable( this );
	//m_pGeneral ->setStyleClass("t2");
    //if ( m_pGeneral )

	ReceiveAddrSetTable->SetDivId("listpan1");
	if(ReceiveAddrSetTable->GetContentTable()!=NULL)
    {
		strListHeights += "200";
		strListHeights += ",";
		strListPans += ReceiveAddrSetTable->GetDivId();
		strListPans += ",";
		strListTitles +=  ReceiveAddrSetTable->dataTitleTable->formName();
		strListTitles += ",";
		
		ReceiveAddrSetTable->AppendColumn("", WLength(5, WLength::Percentage));
		ReceiveAddrSetTable->SetDataRowStyle("table_data_grid_item_img");
		ReceiveAddrSetTable->AppendColumn(m_FormShowText.szColName, WLength(70, WLength::Percentage));
		ReceiveAddrSetTable->SetDataRowStyle("table_data_grid_item_img");
		ReceiveAddrSetTable->AppendColumn(m_FormShowText.szColMod, WLength(25, WLength::Percentage));
		ReceiveAddrSetTable->SetDataRowStyle("table_data_grid_item_text");
		
//older list table header
//		// 列表
//		ContainerReceiveAddrSetTable = new WTable((WContainerWidget *) m_pGeneral->elementAt(1,0));
//		ContainerReceiveAddrSetTable -> setStyleClass("t3");
//		ReceiveAddrSetTable = new WTable((WContainerWidget *) ContainerReceiveAddrSetTable->elementAt(0,0));
//		nullTable = new WTable((WContainerWidget *) ContainerReceiveAddrSetTable->elementAt(1, 0));
//
//		ReceiveAddrSetTable->setStyleClass("t3");
//		ReceiveAddrSetTable->setCellPadding(0);
//		ReceiveAddrSetTable->setCellSpaceing(0);
//		nullTable -> setStyleClass("t8");
//
//		// 添加表头
//		// 全选  clicked 事件处理 函数 SelAll
////		new WText(m_FormShowText.szColStatus, (WContainerWidget*)ReceiveAddrSetTable->elementAt(0, 0));
//		new WText("", (WContainerWidget*)ReceiveAddrSetTable->elementAt(0, 0));
//		new WText(m_FormShowText.szColName, (WContainerWidget*)ReceiveAddrSetTable->elementAt(0, 1));
////		new WText(m_FormShowText.szColType, (WContainerWidget*)ReceiveAddrSetTable->elementAt(0, 2));
//		new WText(m_FormShowText.szColMod, (WContainerWidget*)ReceiveAddrSetTable->elementAt(0, 2));
//		ReceiveAddrSetTable->elementAt(0, 0)->setStyleClass("t3title");
//		ReceiveAddrSetTable->elementAt(0, 1)->setStyleClass("t3title");
//		ReceiveAddrSetTable->elementAt(0, 2)->setStyleClass("t3title");
//		ReceiveAddrSetTable->elementAt(0, 3)->setStyleClass("t3title");

		updateRangeSchedule();
	}

	if(ReceiveAddrSetTable->GetActionTable()!=NULL)
	{
		ReceiveAddrSetTable->AddStandardSelLink(m_FormShowText.szTipSelAll , m_FormShowText.szTipNotSelAll, m_FormShowText.szTipInvSel );
		WObject::connect(ReceiveAddrSetTable->pSelAll, SIGNAL(clicked()), this, SLOT(SelAll()));
		WObject::connect(ReceiveAddrSetTable->pSelNone, SIGNAL(clicked()), this, SLOT(SelNone()));
		WObject::connect(ReceiveAddrSetTable->pSelReverse, SIGNAL(clicked()), this, SLOT(SelInvert()));

		WTable *pTbl;
		ReceiveAddrSetTable->GetActionTable()->elementAt(0,1)->setContentAlignment(AlignCenter);
		ReceiveAddrSetTable->GetActionTable()->elementAt(0,1)->setStyleClass("textbold");

		pTbl = new WTable(ReceiveAddrSetTable->GetActionTable()->elementAt(0,1));
		pTbl->setStyleClass("widthauto");
		WSVButton * DelBtn = new WSVButton(pTbl->elementAt(0,0),m_FormShowText.szTipDel,"button_bg_del.png",m_FormShowText.szTipDel, false);
		connect(DelBtn, SIGNAL(clicked()) ,this, SLOT(BeforeDelPlan()));

		pTbl = new WTable(ReceiveAddrSetTable->GetActionTable()->elementAt(0,2));
		ReceiveAddrSetTable->GetActionTable()->elementAt(0,2)->setContentAlignment(AlignRight);
		WSVButton * btn = new WSVButton(ReceiveAddrSetTable->GetActionTable()->elementAt(0,2),m_FormShowText.szAddRelPlanBut,"button_bg_add_black.png",m_FormShowText.szAddRelPlanBut, true);
		connect(btn, SIGNAL(clicked()), this, SLOT(AddPlan()));
	

//
		//ft = new CFlexTable();
		//ft->AddGroupOperate(m_pGeneral,m_FormShowText.szValDel);
		//ft->AddGroupAddBtn(m_pGeneral,m_FormShowText.szAddRelPlanBut);
		//WObject::connect(ft->pSelAll, SIGNAL(clicked()), this, SLOT(SelAll()));
		//WObject::connect(ft->pSelNone, SIGNAL(clicked()), this, SLOT(SelNone()));
		//WObject::connect(ft->pSelinvert, SIGNAL(clicked()), this, SLOT(SelInvert()));
  //      WObject::connect(ft->pDel , SIGNAL(clicked()) ,this, SLOT(BeforeDelPlan()));
		//WObject::connect(ft->pAdd, SIGNAL(clicked()), this, SLOT(AddPlan()));

		connect(&m_signalMapper, SIGNAL(mapped(const std::string)), this, SLOT(EditPlan(const std::string)));
		
		//ReceiveAddrSetTable->SetNullTipInfo(strSepPlanNull);


		ReceiveAddrSetTable->SetNullTipInfo(strSepPlanNull);

		if(m_pListPlan.size() <= 0)
		{
			//OutputDebugString("---------------- NO S ------------------\n");
			//OutputDebugString(("---------------- NO S"+ strSepPlanNull + " ------------------\n").c_str());
			ReceiveAddrSetTable->ShowNullTip();
		}
		else
		{
			//OutputDebugString("---------------- Yes S------------------\n");
			ReceiveAddrSetTable->HideNullTip();
		}

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

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