当前位置: 首页>>代码示例>>C++>>正文


C++ LPIDENT::fIsCell方法代码示例

本文整理汇总了C++中LPIDENT::fIsCell方法的典型用法代码示例。如果您正苦于以下问题:C++ LPIDENT::fIsCell方法的具体用法?C++ LPIDENT::fIsCell怎么用?C++ LPIDENT::fIsCell使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LPIDENT的用法示例。


在下文中一共展示了LPIDENT::fIsCell方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Server_Salvage_OnServer

void Server_Salvage_OnServer (HWND hDlg, LPIDENT lpi)
{
   LPIDENT lpiServer;
   if ((lpiServer = (LPIDENT)CB_GetSelectedData (GetDlgItem (hDlg, IDC_SERVER))) != NULL)
      {
      LPAGG_ENUM_TO_COMBOBOX_PACKET lpp = New (AGG_ENUM_TO_COMBOBOX_PACKET);
      memset (lpp, 0x00, sizeof(AGG_ENUM_TO_COMBOBOX_PACKET));
      lpp->hCombo = GetDlgItem (hDlg, IDC_AGGREGATE);
      lpp->lpiServer = lpiServer;
      lpp->lpiSelect = (lpi && (!lpi->fIsCell()) && (!lpi->fIsServer()) && (lpiServer == lpi->GetServer())) ? (lpi->GetAggregate()) : NULL;
      StartTask (taskAGG_ENUM_TO_COMBOBOX, hDlg, lpp);
      }
}
开发者ID:maxendpoint,项目名称:openafs_cvs,代码行数:13,代码来源:svr_salvage.cpp

示例2: Server_Salvage_OnEndTask_EnumServers

void Server_Salvage_OnEndTask_EnumServers (HWND hDlg, LPIDENT lpi, LPTASKPACKET ptp)
{
   // We'll only fill the Servers list once, and that during initialization.
   // When the filling completes, find out what server is currently selected
   // (it should already be the one the user chose earlier), and fill the
   // aggregates list for it. We won't enable anything yet.
   //
   LPIDENT lpiServer;
   if ((lpiServer = (LPIDENT)CB_GetSelectedData (GetDlgItem (hDlg, IDC_SERVER))) != NULL)
      {
      LPAGG_ENUM_TO_COMBOBOX_PACKET lpp = New (AGG_ENUM_TO_COMBOBOX_PACKET);
      memset (lpp, 0x00, sizeof(AGG_ENUM_TO_COMBOBOX_PACKET));
      lpp->hCombo = GetDlgItem (hDlg, IDC_AGGREGATE);
      lpp->lpiServer = lpiServer;
      lpp->lpiSelect = (lpi && (!lpi->fIsCell()) && (!lpi->fIsServer()) && (lpiServer == lpi->GetServer())) ? (lpi->GetAggregate()) : NULL;
      StartTask (taskAGG_ENUM_TO_COMBOBOX, hDlg, lpp);
      }
}
开发者ID:maxendpoint,项目名称:openafs_cvs,代码行数:18,代码来源:svr_salvage.cpp

示例3: DispatchNotification_MainThread

void DispatchNotification_MainThread (NOTIFYEVENT evt, PNOTIFYPARAMS pParams)
{
   LPIDENT lpiEvt = pParams->lpi1;

   // There are several notifications which are sent when beginning or ending
   // lengthy operations.  These "actions" each get a window indicating
   // progress, and get added to our ongoing list of actions-in-progress.
   //
   ActionNotification_MainThread (evt, pParams);

   // The real reason for this routine is as a dispatcher for the AFSClass's
   // notifications: various windows throughout the app register themselves
   // with this dispatcher, and thereby get a message whenever a particular
   // event of interest to that window happens.  Just what notifications
   // are "of interest" is specified by the window when it registers with
   // this dispatcher.
   //
   for (size_t iDispatch = 0; iDispatch < nDispatchList; ++iDispatch)
      {
      if (!aDispatchList[ iDispatch ].hWnd)
         continue;

      BOOL fDispatch = FALSE;

      // WHEN_CELL_OPENED + NULL      -> notify if any new cell is opened
      // WHEN_OBJECT_CHANGES + NULL   -> notify if anything at all changes
      // WHEN_OBJECT_CHANGES + lpi    -> notify if this object changes
      // WHEN_SVCS(etc)_CHANGE + NULL -> notify if any service at all changes
      // WHEN_SVCS(etc)_CHANGE + lpi  -> notify if any svc on this svr changes

      switch (aDispatchList[ iDispatch ].when)
         {
         case WHEN_CELL_OPENED:
            if (evt == evtCreate && lpiEvt->fIsCell())
               fDispatch = TRUE;
            break;

         case WHEN_OBJECT_CHANGES:
            if ( (aDispatchList[ iDispatch ].lpiObject == lpiEvt) ||
                 (aDispatchList[ iDispatch ].lpiObject == NULL) )
               {
               if (evt != evtCreate)
                  fDispatch = TRUE;
               }
            break;

         case WHEN_SVRS_CHANGE:
            switch (evt)
               {
               case evtInvalidate:
               case evtRefreshServersBegin:
               case evtRefreshServersEnd:
                  if ( (lpiEvt && lpiEvt->fIsCell()) ||
                       (aDispatchList[ iDispatch ].lpiObject == lpiEvt) ||
                       (aDispatchList[ iDispatch ].lpiObject == NULL) )
                     {
                     if (lpiEvt && lpiEvt->fIsCell())
                        fDispatch = TRUE;
                     }
                  break;

               case evtCreate:
               case evtDestroy:
               case evtRefreshStatusBegin:
               case evtRefreshStatusEnd:
               case evtAlertsChanged:
                  if (lpiEvt && lpiEvt->fIsServer())
                     {
                     if (aDispatchList[ iDispatch ].lpiObject == NULL)
                        fDispatch = TRUE;
                     else
                        {
                        LPIDENT lpiEvtCell = lpiEvt->GetCell();

                        if (aDispatchList[ iDispatch ].lpiObject == lpiEvtCell)
                           fDispatch = TRUE;
                        }
                     }
                  break;
               }
            break;

         case WHEN_SETS_CHANGE:
            switch (evt)
               {
               case evtInvalidate:
               case evtRefreshFilesetsBegin:
               case evtRefreshFilesetsEnd:
                  {
                  LPIDENT lpiEvtSvr = NULL;
                  if (lpiEvt && !lpiEvt->fIsCell())
                     lpiEvtSvr = lpiEvt->GetServer();

                  if ( (lpiEvt && lpiEvt->fIsCell()) ||
                       (aDispatchList[ iDispatch ].lpiObject == lpiEvt)    ||
                       (aDispatchList[ iDispatch ].lpiObject == lpiEvtSvr) ||
                       (aDispatchList[ iDispatch ].lpiObject == NULL) )
                     {
                     if (lpiEvt && (lpiEvt->fIsCell() || lpiEvt->fIsServer() || lpiEvt->fIsAggregate()))
                        fDispatch = TRUE;
//.........这里部分代码省略.........
开发者ID:maxendpoint,项目名称:openafs_cvs,代码行数:101,代码来源:dispatch.cpp

示例4: DispatchNotification_AltThread

void DispatchNotification_AltThread (NOTIFYEVENT evt, PNOTIFYPARAMS pParams)
{
   LPIDENT lpiEvt = pParams->lpi1;

   switch (evt)
      {
      case evtRefreshStatusEnd:
         if (lpiEvt && (lpiEvt->fIsService() || lpiEvt->fIsAggregate() || lpiEvt->fIsFileset()))
            {
            Alert_RemoveSecondary (lpiEvt);
            Alert_Scout_QueueCheckServer (lpiEvt);
            }
         if (lpiEvt && lpiEvt->fIsServer())
            {
            LPSERVER_PREF lpsp;
            if ((lpsp = (LPSERVER_PREF)lpiEvt->GetUserParam()) != NULL)
               {
               LPSERVER lpServer;
               if ((lpServer = lpiEvt->OpenServer()) != NULL)
                  {
                  if (lpsp->fIsMonitored != lpServer->fIsMonitored())
                     {
                     g.sub = Subsets_SetMonitor (g.sub, lpiEvt, lpServer->fIsMonitored());
                     UpdateDisplay_ServerWindow (FALSE, lpiEvt);
                     }
                  lpsp->fIsMonitored = lpServer->fIsMonitored();
                  lpServer->Close();
                  }
               }

            Alert_Scout_ServerStatus (lpiEvt, pParams->status);
            }
         break;

      // When we get a create request, use the object's Get/SetUserParam()
      // methods to attach an allocated structure to the thing--the structure
      // contains the preferences for the server/fileset/etc (for instance,
      // its warning threshholds, any current scout problems, etc).
      // On delete requests, free that structure.
      //
      case evtCreate:
         if (lpiEvt->fIsServer())
            {
            PVOID pPref = Server_LoadPreferences (lpiEvt);
            lpiEvt->SetUserParam (pPref);

            // Should this server be monitored?
            //
            if (!Subsets_fMonitorServer (g.sub, lpiEvt))
               {
               LPSERVER lpServer;
               if ((lpServer = lpiEvt->OpenServer()) != NULL)
                  {
                  lpServer->SetMonitor (FALSE);
                  lpServer->Close();
                  }
               }

            Alert_Scout_SetOutOfDate (lpiEvt);
            }
         else if (lpiEvt->fIsService())
            {
            PVOID pPref = Services_LoadPreferences (lpiEvt);
            lpiEvt->SetUserParam (pPref);
            }
         else if (lpiEvt->fIsAggregate())
            {
            PVOID pPref = Aggregates_LoadPreferences (lpiEvt);
            lpiEvt->SetUserParam (pPref);
            }
         else if (lpiEvt->fIsFileset())
            {
            PVOID pPref = Filesets_LoadPreferences (lpiEvt);
            lpiEvt->SetUserParam (pPref);
            }
         if (!lpiEvt->fIsCell())
            {
            Alert_Scout_QueueCheckServer (lpiEvt);
            }
         break;

      // When we get a create request, use the object's Get/SetUserParam()
      // methods to attach an allocated structure to the thing--the structure
      // contains the preferences for the server/fileset/etc (for instance,
      // its warning threshholds, any current scout problems, etc).
      // On delete requests, free that structure.
      //
      case evtDestroy:
         if (lpiEvt->fIsServer())
            {
            PVOID pPref = lpiEvt->GetUserParam();
            lpiEvt->SetUserParam (0);
            if (pPref)  Delete (pPref);
            }
         else if (lpiEvt->fIsService() || lpiEvt->fIsAggregate() || lpiEvt->fIsFileset())
            {
            Alert_RemoveSecondary (lpiEvt);
            PVOID pPref = lpiEvt->GetUserParam();
            lpiEvt->SetUserParam (0);
            if (pPref)  Delete (pPref);
//.........这里部分代码省略.........
开发者ID:maxendpoint,项目名称:openafs_cvs,代码行数:101,代码来源:dispatch.cpp

示例5: StartContextCommand

void StartContextCommand (HWND hDialog,
                          LPIDENT lpiRepresentedByWindow,
                          LPIDENT lpiChosenByClick,
                          int cmd)
{
   CHILDTAB iTab = Server_GetDisplayedTab (hDialog);
   LPIDENT lpi = (lpiChosenByClick) ? lpiChosenByClick : lpiRepresentedByWindow;

   if (lpi && lpi->fIsCell())
      lpi = NULL;

   switch (cmd)
      {
      case M_COLUMNS:
         if (iTab == tabSERVICES)
            ShowColumnsDialog (hDialog, &gr.viewSvc);
         else if (iTab == tabAGGREGATES)
            ShowColumnsDialog (hDialog, &gr.viewAgg);
         else if (iTab == tabFILESETS)
            ShowColumnsDialog (hDialog, &gr.viewSet);
         else
            ShowColumnsDialog (hDialog, NULL);
         break;

      case M_SVR_VIEW_ONEICON:
      case M_SVR_VIEW_TWOICONS:
      case M_SVR_VIEW_STATUS:
         Command_OnIconView (hDialog, TRUE, iTab, cmd);
         break;

      case M_VIEW_ONEICON:
      case M_VIEW_TWOICONS:
      case M_VIEW_STATUS:
         Command_OnIconView (hDialog, FALSE, iTab, cmd);
         break;

      case M_PROPERTIES:
         if (lpi)
            Command_OnProperties (lpi);
         break;

      case M_SUBSET:
         ShowSubsetsDialog();
         break;

      case M_REFRESHALL:
         if (g.lpiCell)
            StartTask (taskREFRESH, NULL, g.lpiCell);
         break;

      case M_REFRESH:
         if (lpi)
            StartTask (taskREFRESH, NULL, lpi);
         else if (g.lpiCell)
            StartTask (taskREFRESH, NULL, g.lpiCell);
         break;

      case M_SYNCVLDB:
         if (lpi)
            Server_SyncVLDB (lpi);
         break;

      case M_SALVAGE:
         if (lpi)
            Server_Salvage (lpi);
         break;

      case M_SET_CREATE:
         Filesets_Create (lpi);
         break;

      case M_SET_REPLICATION:
         if (lpi && lpi->fIsFileset())
            Filesets_ShowReplication (Server_GetWindowForChild (hDialog), lpi);
         break;

      case M_SET_DELETE:
         if (lpi && lpi->fIsFileset())
            Filesets_Delete (lpi);
         break;

      case M_SET_CLONE:
         Filesets_Clone (lpi);
         break;

      case M_SET_DUMP:
         if (lpi && lpi->fIsFileset())
            Filesets_Dump (lpi);
         break;

      case M_SET_RESTORE:
         Filesets_Restore (lpi);
         break;

      case M_SET_RELEASE:
         if (lpi && lpi->fIsFileset())
            Filesets_Release (lpi);
         break;

      case M_SET_MOVETO:
//.........这里部分代码省略.........
开发者ID:maxendpoint,项目名称:openafs_cvs,代码行数:101,代码来源:command.cpp

示例6: Filesets_DlgProc


//.........这里部分代码省略.........
         break;

      case WM_RBUTTONDOWN:
         if (l.fDragging && !l.fRightBtn)
            Filesets_FinishDrag (hDlg, FALSE, FALSE);
         break;

      case WM_LBUTTONUP:
         if (l.fDragging && !l.fRightBtn)
            Filesets_FinishDrag (hDlg, TRUE, FALSE);
         break;

      case WM_RBUTTONUP:
         if (l.fDragging && l.fRightBtn)
            Filesets_FinishDrag (hDlg, TRUE, TRUE);
         break;

      case WM_ENDTASK:
         LPTASKPACKET ptp;
         if ((ptp = (LPTASKPACKET)lp) != NULL)
            {
            if (ptp->idTask == taskSET_SELECT)
               Filesets_OnEndTask_Select (hDlg, ptp);
            else if (ptp->idTask == taskSET_BEGINDRAG)
               Filesets_OnEndTask_BeginDrag (hDlg, ptp);
            else if (ptp->idTask == taskSET_DRAGMENU)
               Filesets_OnEndTask_DragMenu (hDlg, ptp);
            else if (ptp->idTask == taskSET_MENU)
               Filesets_OnEndTask_Menu (hDlg, ptp);
            FreeTaskPacket (ptp);
            }
         break;

      case WM_NOTIFY:
         switch (((LPNMHDR)lp)->code)
            { 
            case FLN_ITEMSELECT:
               if (((LPNMHDR)lp)->hwndFrom == GetDlgItem (hDlg, IDC_SET_LIST))
                  {
                  Filesets_OnSelect (hDlg);
                  }
               break;

            case FLN_ITEMEXPAND:
               if (((LPNMHDR)lp)->hwndFrom == GetDlgItem (hDlg, IDC_SET_LIST))
                  {
                  HLISTITEM hItem = ((LPFLN_ITEMEXPAND_PARAMS)lp)->hItem;
                  LPIDENT lpi = (LPIDENT)FastList_GetItemParam (GetDlgItem (hDlg, IDC_SET_LIST), hItem);
                  BOOL fExpanded = ((LPFLN_ITEMEXPAND_PARAMS)lp)->fExpanded;

                  if (lpi && lpi->fIsServer())
                     {
                     LPSERVER_PREF lpsp;
                     if ((lpsp = (LPSERVER_PREF)lpi->GetUserParam()) != NULL)
                        {
                        lpsp->fExpandTree = fExpanded;
                        Server_SavePreferences (lpi);
                        }
                     }
                  else if (lpi && lpi->fIsAggregate())
                     {
                     LPAGGREGATE_PREF lpap;
                     if ((lpap = (LPAGGREGATE_PREF)lpi->GetUserParam()) != NULL)
                        {
                        lpap->fExpandTree = fExpanded;
                        Aggregates_SavePreferences (lpi);
                        }
                     }
                  }
               break;

            case FLN_BEGINDRAG:
               return Filesets_BeginDrag (hDlg, ((LPFLN_DRAG_PARAMS)lp)->fRightButton);

            case FLN_LDBLCLICK:
               if (((LPNMHDR)lp)->hwndFrom == GetDlgItem (hDlg, IDC_SET_LIST))
                  {
                  BOOL fShowProperties = TRUE;

                  HLISTITEM hItem;
                  if ((hItem = FastList_GetFocus (GetDlgItem (hDlg, IDC_SET_LIST))) != NULL)
                     {
                     if (FastList_FindFirstChild (GetDlgItem (hDlg, IDC_SET_LIST), hItem))
                        fShowProperties = FALSE;
                     }

                  LPIDENT lpi = Filesets_GetFocused (hDlg);
                  if (lpi && !lpi->fIsCell() && fShowProperties)
                     {
                     PostMessage (GetDlgItem (hDlg, IDC_SET_LIST), WM_COMMAND, M_PROPERTIES, 0);
                     return TRUE;
                     }
                  }
               break;
            }
         break;
      }

   return FALSE;
}
开发者ID:maxendpoint,项目名称:openafs_cvs,代码行数:101,代码来源:set_tab.cpp


注:本文中的LPIDENT::fIsCell方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。