示例#1
0
cSatipMenuInfo::cSatipMenuInfo()
: cOsdMenu(tr("SAT>IP Information")),
  textM(""),
  timeoutM(),
  pageM(SATIP_DEVICE_INFO_GENERAL)
{
  SetMenuCategory(mcText);
  timeoutM.Set(eInfoTimeoutMs);
  UpdateInfo();
  SetHelp(tr("General"), tr("Pids"), tr("Filters"), tr("Bits/bytes"));
}
示例#2
0
void TileDlg::OnSize( wxCommandEvent &event )
{
	if (m_bSetting)
		return;

	TransferDataFromWindow();
	UpdateInfo();

	if (m_pView)
		m_pView->ShowGridMarks(m_area, m_iColumns, m_iRows, -1, -1);
}
示例#3
0
void FIFOPlayerWindow::StartRecording()
{
  // Start recording
  FifoRecorder::GetInstance().StartRecording(m_frame_record_count->value(), [this] {
    QueueOnObject(this, [this] { OnRecordingDone(); });
  });

  UpdateControls();

  UpdateInfo();
}
示例#4
0
void ViewSceneScreen::Update(float32 timeElapsed)
{
    uint64 startTime = SystemTimer::Instance()->GetAbsoluteNano();

    BaseScreen::Update(timeElapsed);
    
    updateTime += (SystemTimer::Instance()->GetAbsoluteNano() - startTime);

//    UpdateCamera(timeElapsed);
    UpdateInfo(timeElapsed);
}
示例#5
0
void MapWindow::Initialize() {
#ifndef ENABLE_OPENGL
    ScopeLock Lock(Surface_Mutex);
#endif
    // Reset common topology and waypoint label declutter, first init. Done also in other places.
    ResetLabelDeclutter();

    // Default draw area is full screen, no opacity
    MapRect = MainWindow.GetClientRect();
    DrawRect = MapRect;
    UpdateActiveScreenZone(MapRect);

    UpdateTimeStats(true);

#ifndef ENABLE_OPENGL
    // paint draw window black to start
    DrawSurface.SetBackgroundTransparent();
	DrawSurface.Blackness(MapRect.left, MapRect.top,MapRect.right-MapRect.left, MapRect.bottom-MapRect.top);

    hdcMask.SetBackgroundOpaque();
    BackBufferSurface.Blackness(MapRect.left, MapRect.top,MapRect.right-MapRect.left, MapRect.bottom-MapRect.top);
#endif

    // This is just here to give fully rendered start screen
    UpdateInfo(&GPS_INFO, &CALCULATED_INFO);
    MapDirty = true;

    FillScaleListForEngineeringUnits();
    zoom.RequestedScale(zoom.Scale());
    zoom.ModifyMapScale();

    LKUnloadFixedBitmaps();
    LKUnloadProfileBitmaps();

	LKLoadFixedBitmaps();
	LKLoadProfileBitmaps();

	// This will reset the function for the new ScreenScale
	PolygonRotateShift((POINT*)NULL,0,0,0,DisplayAngle+1);

	// Restart from moving map
	if (MapSpaceMode!=MSM_WELCOME) SetModeType(LKMODE_MAP, MP_MOVING);

	// These should be better checked. first_run is forcing also cache update for topo.
	ForceRenderMap=true;
	first_run=true;
    // Signal that draw thread can run now
    Initialised = TRUE;
#ifndef ENABLE_OPENGL
    drawTriggerEvent.set();
#endif
}
示例#6
0
void IRCQuery::UpdateStatus( void )
{
  BuildDescriptionString();  
  if (m_pChildWnd)
  {
    CHILDFRAMEPTR(m_pChildWnd)->UpdateStatus();
    CHILDFRAMEPTR(m_pChildWnd)->m_HeaderView.UpdateHeader(m_DescriptionString);    
    UpdateInfo();
  }

  ::PostMessage(m_pServer->m_pChildWnd->m_hWnd,WM_UPDATEINFOPANE, (WPARAM)0, (LPARAM)NULL);
  g_pMainWnd->m_ServerListView.Update(this);
}
示例#7
0
void CUIFactionWarWnd::Update()
{
	inherited::Update();
	if ( !IsShown() )
	{
		Reset();
	}	
	if ( Device.dwTimeGlobal - m_previous_time > m_update_delay )
	{
		m_previous_time = Device.dwTimeGlobal;
		UpdateInfo();
	}
}
void FitPosCB (Widget w, XtPointer clientData, XtPointer callData)
/* menu callback routine to fit position */
{
  int          isOK;
  ImageDisplay *IDdata = (ImageDisplay *)clientData;

/* use last position selected */
  image[CurImag].iFitted = FitPos(IDdata);
  UpdateInfo(IDdata);  /* write info in control info area*/
  isOK = image[CurImag].iFitted==1;
  if (doLog &&  isOK) DoLogger(); /* log if necessary */
  FitPos(IDdata);
} /* End FitPosCB */
示例#9
0
    Status UpdatePositionArgs::initialize(const BSONObj& argsObj) {
        Status status = bsonCheckOnlyHasFields("UpdatePositionArgs",
                                               argsObj,
                                               kLegalUpdatePositionFieldNames);

        if (!status.isOK())
            return status;

        // grab the array of changes
        BSONElement updateArray;
        status = bsonExtractTypedField(argsObj, kUpdateArrayFieldName, Array, &updateArray);
        if (!status.isOK())
            return status;

        // now parse each array entry into an update
        BSONObjIterator i(updateArray.Obj());
        while(i.more()) {
            BSONObj entry = i.next().Obj();
            status = bsonCheckOnlyHasFields("UpdateInfoArgs",
                                            entry,
                                            kLegalUpdateInfoFieldNames);
            if (!status.isOK())
                return status;

            OpTime ts;
            status = bsonExtractOpTimeField(entry, kOpTimeFieldName, &ts);
            if (!status.isOK())
                return status;

            // TODO(spencer): The following three fields are optional in 2.8, but should be made
            // required or ignored in 3.0
            long long cfgver;
            status = bsonExtractIntegerFieldWithDefault(entry, kConfigVersionFieldName, -1, &cfgver);
            if (!status.isOK())
                return status;

            OID rid;
            status = bsonExtractOIDFieldWithDefault(entry, kMemberRIDFieldName, OID(), &rid);
            if (!status.isOK())
                return status;

            long long memberID;
            status = bsonExtractIntegerFieldWithDefault(entry, kMemberIdFieldName, -1, &memberID);
            if (!status.isOK())
                return status;

            _updates.push_back(UpdateInfo(rid, ts, cfgver, memberID));
        }

        return Status::OK();
    }
示例#10
0
void EKFLocalization::step(void) {


	_GoalDetector->step();
	_LineDetector->step();

	if (isTime2Run()) {
		startDebugInfo();
		UpdateInfo();
		run();
		endDebugInfo();

	}
}
示例#11
0
// copy constructor
CAttachInfo::CAttachInfo (const CAttachInfo& ai)
	: m_lpszPath(NULL), m_lpszDesc(NULL), m_lpszID(NULL),
	  m_lpszType(NULL), m_lpszSubType(NULL),
	  m_lpszSuperType(NULL), m_lpszSuperSubType(NULL),
	  m_attEnc(RFC822_NONE_ENC), m_ulSize((UINT32) (-1)), m_ulDuration(0),
	  m_CDispProps((UINT32) 0, FALSE), m_CTypeProps((UINT32) 0, FALSE),
	  m_fIsVirtualName(FALSE)
{
	const CStr2StrMapper&	dp=ai.GetDispositionProps();
	const CStr2StrMapper&	cp=ai.GetContentTypeProps();

	EXC_TYPE	exc1=m_CDispProps.InitMap(dp.GetSize(), FALSE), exc2=m_CTypeProps.InitMap(cp.GetSize(), FALSE);

	UpdateInfo(ai);
}
示例#12
0
eOSState cSatipMenuDeviceStatus::ProcessKey(eKeys keyP)
{
  eOSState state = cOsdMenu::ProcessKey(keyP);

  if (state == osUnknown) {
     switch (keyP) {
       case kOk: state = osBack;     break;
       default:  if (timeoutM.TimedOut())
                    UpdateInfo();
                 state = osContinue;
                 break;
       }
     }
  return state;
}
示例#13
0
void VkAccount::handleUserState (qulonglong id, bool isOnline)
{
    if (!Entries_.contains (id))
    {
        qWarning () << Q_FUNC_INFO
                    << "unknown user"
                    << id;
        Conn_->RerequestFriends ();
        return;
    }

    auto entry = Entries_.value (id);
    auto info = entry->GetInfo ();
    info.IsOnline_ = isOnline;
    entry->UpdateInfo (info);
}
示例#14
0
void FIFOPlayerWindow::OnFIFOLoaded()
{
  FifoDataFile* file = FifoPlayer::GetInstance().GetFile();

  auto object_count = FifoPlayer::GetInstance().GetFrameObjectCount();
  auto frame_count = file->GetFrameCount();

  m_frame_range_to->setMaximum(frame_count);
  m_object_range_to->setMaximum(object_count);

  m_frame_range_to->setValue(frame_count);
  m_object_range_to->setValue(object_count);

  UpdateInfo();
  UpdateLimits();
  UpdateControls();
}
示例#15
0
int main()
{
    int a[]={2,2,2,1,1};
    float discount[]={1,0.95,0.9,0.8,0.75};
    int len=sizeof(a)/sizeof(a[0]);
    Info info=GetInfo(a,len);
    float sum=0.0;
    while(info.kind!=0)
    {
        sum+=info.kind*8*info.min*discount[info.kind-1];
        printf("%f\n",sum);
        UpdateInfo(a,len,info);
        info=GetInfo(a,len);
    }
    printf("You need to pay %f EUR!\n",sum);
    return 0;
}
示例#16
0
	//	初期化
	bool Player::Initialize( void )
	{
		//	読み込み
		bool loadSuccess = Load( "DATA/CHR/Y2009/Y2009.IEM" );

		if ( loadSuccess )
		{
			SetMotion( 1 );		//	仮
			SetPos( INIT_POS );
			SetAngle( INIT_ANGLE );
			SetScale( INIT_SCALE );
			UpdateInfo();
			return	true;
		}

		return	false;
	}
示例#17
0
void CHostManager::UpdateHostInfo(const BroadCastFtpInfo &info)
{
	TLock(m_locker);
	j_string_t strHostId = info.host_id;
	HostMap::iterator it = m_hostMap.find(strHostId);
	if (it == m_hostMap.end())
	{
		DownLoadFtpInfo mInfo = {0};
		FillInfo(info, mInfo);
		m_hostMap[strHostId] = mInfo;
	}
	else
	{
		UpdateInfo(it->second);
	}
	TUnlock(m_locker);
}
示例#18
0
void CShortPathDlg::OnShowWindow(BOOL bShow, UINT nStatus)
{
	if( bShow == TRUE )
	{
		if (key !="")
		{
			int  index = ctrlBeginKeyCombo.FindString( -1 ,key);
			if(index!=-1)
			{
				ctrlBeginKeyCombo.SetCurSel(index);
				UpdateInfo( key  );
			}
		}
	}

	CDialog::OnShowWindow(bShow, nStatus);
}
示例#19
0
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
//		¥ UpdateHandleAndInfo						/*e*/
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// allows the parent container to update the resource data associated with this resource when
// it is changed. Don't use this from out side of the resoruce container class
void CHandleResource::UpdateHandleAndInfo(
	ResType				inNewType,
	TResId				inNewId,
	const TResName		inNewName,
	Handle				inNewDataH,
	bool				inAdoptHandle)
{
	if (inNewDataH && inNewDataH!=mHandle)
	{
		if (mHandle && mOwnsHandle)
			::BetterDisposeHandle(mHandle);		
		mHandle=inNewDataH;
		mOwnsHandle=inAdoptHandle;
	}

	UpdateInfo(inNewType,inNewId,inNewName);
}
示例#20
0
// Runs the game
TSize App::Run()
{
    Timer t; // to switch the clock

    t.Start(1);

    for (;;)
    {
        Mouse.Update();

        // Current control tag
        status = controls.Tag();

        // If anything was updated, show it
        if (controls.Update() != 0 || t.Done())
        {
            if (t.Done()) // Start new timer
                t.Start(1);

            if (maze.Found()) // Increase number of crystals
                if (!--crystals)
                    return (clock() - Start) / CLK_TCK;

            UpdateInfo(); // Updates information labels

            controls.Show(); // Shows the controls

            Mouse.Hide(); // Hide mouse

            g_Screen.Switch(Delay); // Switch pages
            Mouse.Page(g_Screen.Visual()); // Switch mouse

            Mouse.Show(); // Show mouse
        }

        ButtonInput(); // Get buttons input

        if (done.Click()) // Exit if "Exit" is clicked
            return 0;

        if (!KeyInput()) // Escape pressed
            return 0;

    }
}
示例#21
0
UpdateInfo UpdateInfo::parseString( const QString &xml, bool *ok )
{
  QString errorMsg;
  int errorLine, errorCol;
  QDomDocument doc;
  if ( !doc.setContent( xml, false, &errorMsg, &errorLine, &errorCol ) ) {
    qCritical() << errorMsg << " at " << errorLine << "," << errorCol;
    if ( ok ) *ok = false;
    return UpdateInfo();
  }

  bool documentOk;
  UpdateInfo c = parseElement( doc.documentElement(), &documentOk );
  if ( ok ) {
    *ok = documentOk;
  }
  return c;
}
示例#22
0
	MRIMBuddy* MRIMAccount::GetBuddy (const Proto::ContactInfo& info)
	{
		if (Buddies_.contains (info.Email_))
		{
			auto buddy = Buddies_ [info.Email_];
			buddy->UpdateInfo (info);
			return buddy;
		}

		MRIMBuddy *buddy = new MRIMBuddy (info, this);
		Buddies_ [info.Email_] = buddy;

		if (info.Email_ != "*****@*****.**" ||
				XmlSettingsManager::Instance ()
					.property ("ShowSupportContact").toBool ())
			emit gotCLItems (QList<QObject*> () << buddy);

		return buddy;
	}
void CAppManager::StartUninstall()
{
    if (m_AppVec.empty())
        return;

    if (!m_pUninstallWindow->Start(m_pCurrentAppEntry))
        return;
    
    m_pAppList->remove(m_pAppList->value());
    
    std::vector<app_entry_s *>::iterator it = std::find(m_AppVec.begin(), m_AppVec.end(), m_pCurrentAppEntry);
    if (it != m_AppVec.end())
        m_AppVec.erase(it);
    
    fl_message(GetTranslation("Uninstallation of %s complete!"), m_pCurrentAppEntry->name.c_str());

    delete m_pCurrentAppEntry;
    UpdateInfo(false);
}
示例#24
0
void CShortPathDlg::InitCtrl(void)
{
	ctrlBeginKeyCombo.ResetContent();
	for (int i=0 ;i<MAX_VERTEX_NUM;i++)
	{
		if (OrthGrap.xlist[i].m_bUsed)
		{
			ctrlBeginKeyCombo.AddString(OrthGrap.xlist[i].data.key);
		}
	}
	if (key !="")
	{
		int  index = ctrlBeginKeyCombo.FindString( -1 ,key);
		if(index!=-1)
		{
			ctrlBeginKeyCombo.SetCurSel(index);
			UpdateInfo( key  );
		}
	}
	Invalidate(FALSE);
}
示例#25
0
void CGUIControl::UpdateVisibility(const CGUIListItem *item)
{
  if (m_visibleCondition)
  {
    bool bWasVisible = m_visibleFromSkinCondition;
    m_visibleFromSkinCondition = m_visibleCondition->Get(item);
    if (!bWasVisible && m_visibleFromSkinCondition)
    { // automatic change of visibility - queue the in effect
  //    CLog::Log(LOGDEBUG, "Visibility changed to visible for control id %i", m_controlID);
      QueueAnimation(ANIM_TYPE_VISIBLE);
    }
    else if (bWasVisible && !m_visibleFromSkinCondition)
    { // automatic change of visibility - do the out effect
  //    CLog::Log(LOGDEBUG, "Visibility changed to hidden for control id %i", m_controlID);
      QueueAnimation(ANIM_TYPE_HIDDEN);
    }
  }
  // check for conditional animations
  for (unsigned int i = 0; i < m_animations.size(); i++)
  {
    CAnimation &anim = m_animations[i];
    if (anim.GetType() == ANIM_TYPE_CONDITIONAL)
      anim.UpdateCondition(item);
  }
  // and check for conditional enabling - note this overrides SetEnabled() from the code currently
  // this may need to be reviewed at a later date
  bool enabled = m_enabled;
  if (m_enableCondition)
    m_enabled = m_enableCondition->Get(item);

  if (m_enabled != enabled)
    MarkDirtyRegion();

  m_allowHiddenFocus.Update(item);
  if (UpdateColors())
    MarkDirtyRegion();
  // and finally, update our control information (if not pushed)
  if (!m_pushedUpdates)
    UpdateInfo(item);
}
示例#26
0
void WeatherFeed::DownloadCompleted(HttpItem* itm)
{
	m_lastTickUpdated = GetTickCount();

	DebugMsg("WeatherFeed", "%s", itm->getTag().c_str());
	if(strcmp(itm->getTag().c_str(), "WeatherFeed")==0)
	{
		if(itm->getResponseCode() == 200)
		{
			MemoryBuffer& buffer = itm->GetMemoryBuffer();
			
			if(buffer.GetDataLength() > 0)
			{
				DebugMsg("WeatherFeed", "File Found");
				//Parse XML
				WeatherXML xml;
				ATG::XMLParser parser;
				parser.RegisterSAXCallbackInterface(&xml);
				parser.ParseXMLBuffer((CONST CHAR*)buffer.GetData(), (UINT)buffer.GetDataLength());

				if(xml.isKeyValid())
				{
					WeatherInfo inf;

					inf.currentConditions = xml.getCurrentConditions();
					inf.m_Forecast = xml.getForecastItem();
					inf.currentGlobalConditions = xml.getCurrentGlobalConditions();
					inf.currentLocaleInfo = xml.getCurrentLocaleInfo();

					setWeather(inf);
				}
				else//Key Error Redownload Info
				{
					DebugMsg("WeatherFeed","Key Index %x is Invalid trying new key",itm->getTag2());
					UpdateInfo((int)itm->getTag2());
				}
			}
		}
	}
}
示例#27
0
int _tmain(int argc, _TCHAR* argv[])
{
	const unsigned int kAmountOfStudents = 50;
	struct student list[kAmountOfStudents];
	struct student* listPtr = &list[0];
	int choice = 0;

	srand( (unsigned)time(NULL) );

	SequentialWrite( listPtr, kAmountOfStudents );
	while( choice >= 0 )
	{
		printf( "Enter 1 to edit test score(s). Enter -1 to quit.\n");
		scanf( "%d", &choice );
		if( choice >= 0 )
		{
			UpdateInfo( listPtr, kAmountOfStudents );
		}
	}

	return 0;
}
示例#28
0
SettingPanel&
SettingPanel::operator<<(const ReaderSetting& s)
{
	auto& node(dynWgts.WidgetNode);
	DeclDynWidgetNode(DropDownList, ddlFont)
	DeclDynWidgetNode(CheckButton, cbSmoothScroll)

	yunseq(
	lblAreaUp.ForeColor = s.FontColor,
	lblAreaUp.Background = SolidBrush(s.UpColor),
	lblAreaUp.Font = s.Font,
	lblAreaDown.ForeColor = s.FontColor,
	lblAreaDown.Background = SolidBrush(s.DownColor),
	lblAreaDown.Font = s.Font,
	ddlFont.Text = s.Font.GetFamilyName(),
	scroll_duration = s.ScrollDuration,
	smooth_scroll_duration = s.SmoothScrollDuration
	),
	cbSmoothScroll.Tick(s.SmoothScroll);
	UpdateInfo();
	return *this;
}
示例#29
0
void CDetailInfo::Localize()
{
	if (NULL == GetSafeHwnd())
		return;

	LVCOLUMN	lc;
	CString		str;

	lc.mask = LVCF_TEXT;

	str = GetResString(IDS_DETAILINFO_NAME);
	lc.pszText = str.LockBuffer();
	m_ListDetail.SetColumn(0, &lc);
	str.UnlockBuffer();

	str = GetResString(IDS_DETAILINFO_VALUE);
	lc.pszText = str.LockBuffer();
	m_ListDetail.SetColumn(1, &lc);
	str.UnlockBuffer();

	UpdateInfo(m_pCurFile, m_dwCurMask);
}
CAppManager::CAppManager()
{
    const int mainw = 560, mainh = 330;
    m_pMainWindow = new Fl_Window(mainw, mainh, "Nixstaller - App Manager");

    m_pAppList = new Fl_Hold_Browser(20, 40, 180, 240, "Installed applications");
    m_pAppList->align(FL_ALIGN_TOP);
    GetRegisterEntries(&m_AppVec);
    for (std::vector<app_entry_s *>::iterator it=m_AppVec.begin(); it!=m_AppVec.end(); it++)
        m_pAppList->add(MakeCString((*it)->name));
    m_pAppList->callback(AppListCB, this);
    m_pAppList->value(1);

    Fl_Tabs *pTabs = new Fl_Tabs((m_pAppList->x()+m_pAppList->w())+20, 20, 300, 260);
    
    Fl_Group *pInfoTab = new Fl_Group((m_pAppList->x()+m_pAppList->w())+20, 40, 300, 260, "Info");
    m_pInfoOutput = new Fl_Help_View((m_pAppList->x()+m_pAppList->w())+20, 40, 300, 240);
    m_pInfoOutput->align(FL_ALIGN_TOP);
    pInfoTab->end();
    
    Fl_Group *pFilesTab = new Fl_Group((m_pAppList->x()+m_pAppList->w())+20, 40, 300, 260, "Files");
    m_pFilesTextDisplay = new Fl_Text_Display((m_pAppList->x()+m_pAppList->w())+20, 40, 300, 240);
    m_pFilesTextBuffer = new Fl_Text_Buffer;
    m_pFilesTextDisplay->buffer(m_pFilesTextBuffer);
    
    pFilesTab->end();
    
    pTabs->end();
    m_pUninstallButton = new Fl_Button(20, (m_pAppList->y()+m_pAppList->h())+20, 120, 25, "Uninstall");
    m_pUninstallButton->callback(UninstallCB, this);
    m_pExitButton = new Fl_Button((mainw-140), (m_pAppList->y()+m_pAppList->h())+20, 120, 25, "Exit");
    m_pExitButton->callback(ExitCB);
    
    UpdateInfo(true);

    m_pUninstallWindow = new CUninstallWindow(this);
    
    m_pMainWindow->end();
}