Example #1
0
void CollectAllChildInfo(MYTREE *c)
{
	for (;c;c=c->next)	
	{
		CollectInfo(c);
		if (c->hasChild())
			CollectAllChildInfo(c->child);

	}

}
Example #2
0
static void ProcessInfo(AttrList* ad,bool GroupRollup,bool HierFlag)
{
  int NumElem=CountElem(ad);
  if ( NumElem <= 0 ) {
	  return;
  }
  LineRec* LR=new LineRec[NumElem];
  CollectInfo(NumElem,ad,LR,GroupRollup);

  // check to see if all of the visible users are in the none group.
  bool all_users_in_none_group = true;
  for (int j = 0; j < NumElem; ++j) {
     if (LR[j].LastUsage<MinLastUsageTime) 
        continue;
     if (LR[j].GroupId > 0) {
        all_users_in_none_group = false;
        HideNoneGroupIfPossible = false;
        break;
     }
  }

  // if Group details are not available, or if all visible users 
  // are in the none group. then do not show Hierarchical
  if ( ! (DetailAvailFlag & DetailGroup) || (HideNoneGroupIfPossible && all_users_in_none_group)) {
     HierFlag = false;
  }

  // if not showing groups, don't show quota fields unless explicitly requested
  if (HideGroups || all_users_in_none_group) {
     if ( ! DashQuota && ! UsersHaveQuotas) DetailFlag &= ~DetailQuotas;
  }

  // don't show users if we are only showing group-only columns
  if ((DetailFlag & DetailQuotas) != 0 && (DetailFlag & ~DetailQuotas) == 0 && !UsersHaveQuotas) {
     HideUsers = true;
  }

  int order = SortByColumn1; // sort by prio or by useage depending on which is in column 1
  bool none_last = false;
  if (HierFlag) {
     none_last = (GlobalSurplusPolicy == SurplusRegroup);
     order = SortHierByGroupId;
     if (DetailFlag & (DetailPriority | DetailUsage))
        order = SortHierByDisplayOrder;
  } else if (GroupOrder) {
     order = SortGroupsFirstByIndex;
  }
  std::sort(LR, LR+NumElem, LineRecLT(DetailFlag, order, none_last));

  PrintInfo(ad,LR,NumElem,HierFlag);
  delete[] LR;
} 
Example #3
0
wxVideoXANIM::wxVideoXANIM(const wxString& filename)
{
    m_internal       = new wxXANIMinternal;
    m_xanim_detector = new wxVideoXANIMProcess(this);
    m_xanim_started  = false;
    m_paused         = false;

    m_filename       = filename;
    m_remove_file    = false;
    m_size[0]        = 0;
    m_size[1]        = 0;

    CollectInfo();
}
Example #4
0
wxVideoXANIM::wxVideoXANIM(wxInputStream& str)
    : wxVideoBaseDriver(str)
{
    m_internal       = new wxXANIMinternal;
    m_xanim_detector = new wxVideoXANIMProcess(this);
    m_xanim_started  = false;
    m_paused         = false;
    m_size[0]        = 0;
    m_size[1]        = 0;

    m_filename       = wxGetTempFileName(_T("vidxa"));
    m_remove_file    = true;
    wxFileOutputStream fout(m_filename);

    fout << str;

    CollectInfo();
}
Example #5
0
LRESULT CMultiSpliltWnd::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
{
	CollectInfo();
	bHandled=FALSE;
	return 1;
}
Example #6
0
int main(){
    GiveInstructions();
    CollectInfo();    
    string result = CheckInfo();
    printf("%s您好,身高%.2fm,体重%.2fkg,计算结果:%s\n",name,height,weight,result);
}