void AutoLinkChangeString::OnCbnSelchangeComboMatchdev()
{
	CString strListTemp;
	int iIndex = m_DevInfoDropList.GetCurSel();
	m_DevInfoDropList.GetLBText(iIndex, strListTemp);
	
	// 第一次打开
	if (m_bFirstUseDropLise && !strListTemp.IsEmpty())
	{
		m_ChangeEdit.SetWindowText("");
		m_bFirstUseDropLise = false;
	}

	if ("设备IP" == strListTemp)
	{
		ShowText("$(DeviceIP)");
	}
	else if ("设备编号" == strListTemp)
	{
		ShowText("$(DeviceNo)");
	}
	else
	{
		ShowText("");
	}
}
Exemple #2
0
void CTab4::OnBnClickedButton1()
{
	// TODO: 在此添加控件通知处理程序代码
	GetDlgItem(IDC_BUTTON1)->EnableWindow(FALSE);
	m_text = "";
	CString str;
	long num[] = { 50000, 100000, 200000, 300000, 500000 };
	long maxnode[] = { 5,10,20,50,100,120,150,200 };
	int color[5][3] = { { 255,0,0 },{ 100,200,100 },{ 0,0,255 },{ 255,0,255 },{ 0,0,0 } };

	for (int i = 0; i < 5; i++)
	{
		str.Format(_T("矩形数:%d:"), num[i]);
		ShowText(str);
		CPen pen(PS_SOLID, 1, RGB(color[i][0], color[i][1], color[i][2]));
		CPen *pOldPen = MemDC.SelectObject(&pen);
		for (int j = 0; j < 8; j++)
		{
			long t = Test(maxnode[j], num[i]);
			str.Format(_T("  内部节点最大条目数:%d:\r\n  耗时:%dms\r\n"), maxnode[j], t);
			ShowText(str);
			long y = (long)((1000.0 - t) * dif_y / 200.0 + r.top);
			if (j == 0)
			{
				MemDC.MoveTo(r.left + dif_x * (j + 1), y);
			}
			MemDC.LineTo(r.left + dif_x * (j + 1), y);
			pDC->BitBlt(0, 0, x_m, y_m, &MemDC, 0, 0, SRCAND);
		}
		MemDC.SelectObject(pOldPen);
	}
	GetDlgItem(IDC_BUTTON1)->EnableWindow(TRUE);
}
void AutoLinkChangeString::OnCbnSelchangeComboMatchother()
{
	CString strListTemp;
	int iIndex = m_OtherDropList.GetCurSel();
	m_OtherDropList.GetLBText(iIndex, strListTemp);

	// 第一次打开
	if (m_bFirstUseDropLise && !strListTemp.IsEmpty())
	{
		m_ChangeEdit.SetWindowText("");
		m_bFirstUseDropLise = false;
	}

	if ("路口名称" == strListTemp)
	{
		ShowText("$(StreetName)");
	}
	else if ("路口方向" == strListTemp)
	{
		ShowText("$(StreetDirection)");
	}
	else
	{
		ShowText("");
	}
}
void CVFD::showRCLock(int duration)
{
	if (!has_lcd || !g_settings.lcd_notify_rclock)
	{
		sleep(duration);
		return;
	}

	std::string _text = text;
	ShowText(g_Locale->getText(LOCALE_RCLOCK_LOCKED));
	sleep(duration);
	ShowText(_text.c_str());
}
void CVFD::Clear()
{
	j00zekDBG(DEBUG_DEBUG,"j00zek>CVFD::Clear()\n");
	if (g_settings.lcd_vfd_size == 16)
		ShowText("                ");
	else if (g_settings.lcd_vfd_size == 8)
		ShowText("        ");
	else if (g_settings.lcd_vfd_size == 4)
		ShowText("    ");
	else if (g_settings.lcd_vfd_size >= 1)
		ShowText(" ");
	ClearIcons();
}
void CVFD::showRCLock(int duration)
{
	//j00zekDBG(DEBUG_DEBUG,"j00zek>%s:%s >>>\n", "CVFD::", __func__);
	if (!g_settings.lcd_notify_rclock) {
		sleep(duration);
		return;
	}

	std::string _text = text;
	ShowText(g_Locale->getText(LOCALE_RCLOCK_LOCKED));
	sleep(duration);
	ShowText(_text.c_str());
}
Exemple #7
0
//-----------------------------------------------------------------------------
//!	\CDialog class virtual function
//-----------------------------------------------------------------------------
BOOL CDisplayMsgDlg::OnInitDialog()
{
	char* buf;
	m_TitleIndex = CLanguage::IDX_PURCHASE;
	CLanguage::GetTextFromIndex(CLanguage::IDX_PURCHASE,&buf);
	m_Title = CString(buf);

	CBaseDlg::OnInitDialog();

	if(m_time > 0)
		SetTimer(1, m_time, NULL);
	else	
		SetTimer(1, 10000, NULL); //DEFAULT TIME 10 SEC IF TIMER NOT SET

	m_strMsg.ShowWindow(SW_SHOW);
	m_strMsg1.ShowWindow(SW_SHOW);
	m_strMsg2.ShowWindow(SW_SHOW);
	m_strMsg.m_nFormat = DT_LEFT;
	m_strMsg1.m_nFormat = DT_LEFT;
	m_strMsg2.m_nFormat = DT_LEFT;

	CDisplay::SetDisplayWnd(m_hWnd);
	CLanguage::SetDisplayWnd(m_hWnd);

	ShowText(m_str1, m_str2, m_str3);
	SetFocus();
	return TRUE;  // retur TRUE unless you set the focus to a control
}
Exemple #8
0
void Screen::Display(const char *Text, int x, int y)
{
	if (x >= 0) this->OutputPosition.x = x;
	if (y >= 0) this->OutputPosition.y = y;
	for (int i = 0; i < (int)strlen(Text); i++)
	{
		if (Text[i] == 10)
		{
			NewLine();
		} else if (Text[i] == 9) {
			this->OutputPosition.x += this->FontWidth * 8;
			CheckPosition();
		} else {
			int len = SDL2Function::GetAllowCharNum(Text);
			char *t = (char*)malloc(len + 1);
			strncpy(t, Text + i, len);
			t[len] = '\0';
			i += len - 1;
			char *text = GB2312toUTF8(t);
			free(t);
			SDL_Surface *SDLText;
			SDL_Color FrontColor;
			Uint8 r, g, b;
			SDL_GetRGB(this->TextColor, this->ScreenSurface->format, &r, &g, &b);
			FrontColor.a = 255; FrontColor.r = r; FrontColor.g = g; FrontColor.b = b;
			SDLText = TTF_RenderUTF8_Solid((TTF_Font*)this->Font, text, FrontColor);
			Rect RefRect = ShowText(SDLText, this->OutputPosition.x, this->OutputPosition.y, 0, 0, this->ScreenSurface);
			this->Refresh(&RefRect);
		}
	}
}
void _WriteBuf(char *Buffer, WORD Count)
{
    int L, R;

    __InitEasyWin();
    L = _Cursor.x;
    R = _Cursor.x;
    while (Count > 0)
        {
        if (Buffer[0] == -1)
            Buffer[0] = ' ';
        switch (Buffer[0])
            {
            case 13:
            NewLine(L, R);
                break;
            case 10:
                break;
            case  9:
                do
                    {
                    *(ScreenPtr(_Cursor.x, _Cursor.y)) = ' ';
                    ++_Cursor.x;
                    if (_Cursor.x > R)
                        R = _Cursor.x;
                    if (_Cursor.x == _ScreenSize.x)
                        {
                        NewLine(L, R);
                        break;
                        }
                    } while (_Cursor.x % 8);
                break;
            case  8:
            if (_Cursor.x > 0)
                {
                --_Cursor.x;
                *(ScreenPtr(_Cursor.x, _Cursor.y)) = ' ';
                if (_Cursor.x < L )
                        L = _Cursor.x;
                }
                break;
            case  7:
                MessageBeep(0);
                break;
            default:
                *(ScreenPtr(_Cursor.x, _Cursor.y)) = Buffer[0];
                ++_Cursor.x;
                if (_Cursor.x > R)
                    R = _Cursor.x;
                if (_Cursor.x == _ScreenSize.x)
                    NewLine(L, R);
            }

        ++Buffer;
        --Count;
        }
    ShowText(L, R);
    if (_AutoTracking)
        _TrackCursor();
}
Exemple #10
0
bool MpvHandler::PlayFile(QString f)
{
    if(f == QString()) // ignore if file doesn't exist
        return false;

    if(path == QString()) // web url
    {
        OpenFile(f);
        setFile(f);
    }
    else
    {
        QFile qf(path+f);
        if(qf.exists())
        {
            OpenFile(path+f);
            setFile(f);
            Play();
        }
        else
        {
            ShowText(tr("File no longer exists")); // tell the user
            return false;
        }
    }
    return true;
}
void CVFD::showVolume(const char vol, const bool force_update)
{
	//j00zekDBG(DEBUG_DEBUG,"j00zek>%s:%s >>>\n", "CVFD::", __func__);
	static int oldpp = 0;
	
	if (j00zekVFDsize < 4)
		return;

	ShowIcon(FP_ICON_MUTE, muted);

	if(!force_update && vol == volume)
		return;
	volume = vol;

	bool allowed_mode = (mode == MODE_TVRADIO || mode == MODE_AUDIO || mode == MODE_MENU_UTF8);
	if (!allowed_mode)
		return;

	if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] == 1) {
		wake_up();
		int pp = (int) round((double) vol / (double) 2);
		if(oldpp != pp)
		{
			char vol_chr[64] = "";
			if (j00zekVFDsize==4)
				snprintf(vol_chr, sizeof(vol_chr)-1, "v%3d", (int)vol);
			else if (j00zekVFDsize==8)
				snprintf(vol_chr, sizeof(vol_chr)-1, "VOL %d%%", (int)vol);
			else
				snprintf(vol_chr, sizeof(vol_chr)-1, "Volume: %d%%", (int)vol);
			ShowText(vol_chr);
			oldpp = pp;
		}
	}
}
// ##################################### endif !HAVE_DUCKBOX_HARDWARE ###########################################
void CVFD::showServicename(const std::string & name, int number) // UTF-8
{
	//j00zekDBG(DEBUG_DEBUG,"j00zek>%s:%s >>>\n", "CVFD::", __func__);

	if (name.length() > 1)
		servicename = name;
	if (number > 0)
		service_number = number;

	if (mode != MODE_TVRADIO) {
		j00zekDBG(J00ZEK_DBG,"CVFD::showServicename: not in MODE_TVRADIO\n");
		return;
	}
	j00zekDBG(J00ZEK_DBG,"CVFD::showServicename: support_text=%d, g_settings.lcd_info_line=%d\n",support_text, g_settings.lcd_info_line);
	if (support_text && g_settings.lcd_info_line != 2) //show all, clock, current event
	{
		//int aqq = name.length();
		if ( name.length()<1) {
		    j00zekDBG(J00ZEK_DBG,"CVFD::showServicename: empty string, end.\n");
		    return;
		}
		ShowText(name.c_str());
	}
	else
		ShowNumber(service_number);
	wake_up();
}
// Process a key-up or -down event.  A key is "registered" when it is
// pressed and then released, with no other keypresses or releases in
// between.  Registered keys are passed to CheckKey() to see if it
// should trigger a visibility toggle, an immediate reboot, or be
// queued to be processed next time the foreground thread wants a key
// (eg, for the menu).
//
// We also keep track of which keys are currently down so that
// CheckKey can call IsKeyPressed to see what other keys are held when
// a key is registered.
//
// updown == 1 for key down events; 0 for key up events
void RecoveryUI::process_key(int key_code, int updown) {
    bool register_key = false;
    bool long_press = false;
    bool reboot_enabled;

    pthread_mutex_lock(&key_queue_mutex);
    key_pressed[key_code] = updown;
    if (updown) {
        ++key_down_count;
        key_last_down = key_code;
        key_long_press = false;
        pthread_t th;
        key_timer_t* info = new key_timer_t;
        info->ui = this;
        info->key_code = key_code;
        info->count = key_down_count;
        pthread_create(&th, NULL, &RecoveryUI::time_key_helper, info);
        pthread_detach(th);
    } else {
        if (key_last_down == key_code) {
            long_press = key_long_press;
            register_key = true;
        }
        key_last_down = -1;
    }
    reboot_enabled = enable_reboot;
    pthread_mutex_unlock(&key_queue_mutex);

    if (register_key) {
        NextCheckKeyIsLong(long_press);
        switch (CheckKey(key_code)) {
        case RecoveryUI::IGNORE:
            break;

        case RecoveryUI::TOGGLE:
            ShowText(!IsTextVisible());
            break;

        case RecoveryUI::REBOOT:
#ifdef ANDROID_RB_RESTART
            if (reboot_enabled) {
                android_reboot(ANDROID_RB_RESTART, 0, 0);
            }
#endif
            break;

        case RecoveryUI::ENQUEUE:
            EnqueueKey(key_code);
            break;

        case RecoveryUI::MOUNT_SYSTEM:
#ifndef NO_RECOVERY_MOUNT
            ensure_path_mounted("/system");
            Print("Mounted /system.");
#endif
            break;
        }
    }
}
Exemple #14
0
void MpvHandler::Deinterlace(bool deinterlace)
{
    if(mpv)
    {
        mpv_set_property_string(mpv, "deinterlace", deinterlace ? "yes" : "auto");
        ShowText(tr("Deinterlacing: %0").arg(deinterlace ? tr("enabled") : tr("disabled")));
    }
}
void CVFD::showAudioTrack(const std::string & /*artist*/, const std::string & title, const std::string & /*album*/)
{
	//j00zekDBG(DEBUG_DEBUG,"j00zek>%s:%s >>>\n", "CVFD::", __func__);
	if (mode != MODE_AUDIO)
		return;
	ShowText(title.c_str());
	wake_up();
}
void mepp_component_Compression_Valence_plugin::OnJCWdecompress(void)
{
	// active viewer
	if (mw->activeMdiChild() != 0)
	{
		Viewer* viewer = (Viewer *)mw->activeMdiChild();
		PolyhedronPtr polyhedron_ptr = viewer->getScenePtr()->get_polyhedron();

		Compression_Valence_ComponentPtr component_ptr = findOrCreateComponentForViewer<Compression_Valence_ComponentPtr, Compression_Valence_Component>(viewer, polyhedron_ptr);
		{
			if (!component_ptr->IsDecompress)
			{				
				QMessageBox::information(mw, APPLICATION, tr("Decompression not possible: please load .p3d file first."));
				return;
			}		

			if (component_ptr->Possible_change_sequence == true)
				component_ptr->Possible_change_sequence = false;


			// read from file
			if (component_ptr->Sequence == false)
			{
				component_ptr->JCW_Decompression_From_File(*viewer->getScenePtr()->get_polyhedron(0));				
			}

			// from sequence
			else
			{
				component_ptr->Visu_level = viewer->getScenePtr()->get_current_polyhedron();

				if (component_ptr->Visu_level >= component_ptr->Total_layer)
					return;

				// if the next mesh already exists in the sequence
				if (component_ptr->Visu_level < component_ptr->Process_level)
				{
					component_ptr->Visu_level++;
					viewer->getScenePtr()->set_current_polyhedron(component_ptr->Visu_level);					
				}

				// Insert a mesh into the sequence
				else
				{					

					PolyhedronPtr New_mesh(new Polyhedron());	//Polyhedron * New_mesh = new Polyhedron;	// MT

					component_ptr->JCW_Decompression_From_Sequence(*viewer->getScenePtr()->get_polyhedron(component_ptr->Process_level), *New_mesh);					
					vector<PolyhedronPtr/*Polyhedron**/>::iterator it = viewer->getScenePtr()->get_begin_polyhedrons();	// MT
					viewer->getScenePtr()->insert_polyhedron(it + component_ptr->Process_level-1, New_mesh);
					viewer->getScenePtr()->set_current_polyhedron(component_ptr->Process_level);					
				}
			}
			ShowText();
			viewer->recreateListsAndUpdateGL();
		}
	}
}
void CVFD::showMenuText(const int /*position*/, const char * ptext, const int /*highlight*/, const bool /*utf_encoded*/)
{
	j00zekDBG(DEBUG_DEBUG,"j00zek>%s:%s >>>, mode=%d\n", "CVFD::", __func__,MODE_MENU_UTF8);
	if ((mode != MODE_MENU_UTF8))
		return;

	ShowText(ptext);
	wake_up();
}
Exemple #18
0
void CVFD::showMenuText(const int /*position*/, const char * ptext, const int /*highlight*/, const bool /*utf_encoded*/)
{
	if(fd < 0) return;
	if (mode != MODE_MENU_UTF8)
		return;

	ShowText(ptext);
	wake_up();
}
Exemple #19
0
void CVFD::showMenuText(const int position, const char * text, const int highlight, const bool utf_encoded)
{
	if(!has_lcd) return;
	if (mode != MODE_MENU_UTF8)
		return;

	ShowText((char *) text);
	wake_up();
}
void CVFD::setMode(const MODES m, const char * const title)
{
	//j00zekDBG(DEBUG_DEBUG,"j00zek>%s:%s >>>\n", "CVFD::", __func__);

	// Clear colon in display if it is still there

	if(strlen(title))
		ShowText(title);
	mode = m;
	setlcdparameter();

	switch (m) {
	case MODE_TVRADIO:
		if (StandbyIconID >=0) SetIcon(StandbyIconID, false);
		if (PowerOnIconID >=0) SetIcon(PowerOnIconID, true);
		if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] == 1) {
			showVolume(volume, false);
			break;
		}
		showServicename(servicename);
		showclock = true;
		if(g_settings.lcd_info_line)
			TIMING_INFOBAR_counter = g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] + 10;
		break;
	case MODE_AUDIO:
	{
		showAudioPlayMode(AUDIO_MODE_STOP);
		showVolume(volume, false);
		showclock = true;
		//showTime();      /* "showclock = true;" implies that "showTime();" does a "displayUpdate();" */
		break;
	}
	case MODE_SCART:
		showVolume(volume, false);
		showclock = true;
		//showTime();      /* "showclock = true;" implies that "showTime();" does a "displayUpdate();" */
		break;
	case MODE_MENU_UTF8:
		showclock = false;
		//fonts.menutitle->RenderString(0,28, 140, title, CLCDDisplay::PIXEL_ON);
		break;
	case MODE_SHUTDOWN:
		showclock = false;
		Clear();
		break;
	case MODE_STANDBY:
		ClearIcons();
		if (StandbyIconID >=0 && g_settings.lcd_vfd_led_in_standby == 1) SetIcon(StandbyIconID, true);
		showclock = true;
		showTime(true);      /* "showclock = true;" implies that "showTime();" does a "displayUpdate();" */
		                 /* "showTime()" clears the whole lcd in MODE_STANDBY                         */
		break;
	}
	wake_up();
}
Exemple #21
0
bool FirstTimeMsgThisSession(const std::string& text, MsgNum msgNumber, bool storyMode)
{
  if (DoShowMsg(msgNumber))
  {
    ShowText(text, storyMode);
    return true;
  }
  else
  {
    return false;
  }
}
Exemple #22
0
void CVFD::showServicename(const std::string & name) // UTF-8
{
	if(!has_lcd) return;

printf("CVFD::showServicename: %s\n", name.c_str());
	servicename = name;
	if (mode != MODE_TVRADIO)
		return;

	ShowText((char *) name.c_str());
	wake_up();
}
Exemple #23
0
/*void TextPoint::SetMarkDescription( wxString sMarkDescription )
{
    ODPoint::SetMarkDescription( sMarkDescription );
    return;
    bool bMarkup;
    bMarkup = m_pstText->SetLabelMarkup( sMarkDescription );
    if (!bMarkup)
        m_pstText->SetLabel( sMarkDescription );
    ShowText();
    m_iDisplayTextTexture = 0;
}
*/
void TextPoint::SetPointText( wxString sTextPointText )
{
    m_TextPointText = ( sTextPointText );
    return;
#if wxCHECK_VERSION(3,0,0)
    bool bMarkup;
    bMarkup = m_pstText->SetLabelMarkup( sTextPointText );
    if (!bMarkup)
#endif
        m_pstText->SetLabel( sTextPointText );
    ShowText();
    m_iDisplayTextTexture = 0;
}
void mepp_component_Compression_Valence_plugin::OnDecompress_all()
{
	Timer timer;
	timer.start();

	// active viewer
	if (mw->activeMdiChild() != 0)
	{
		Viewer* viewer = (Viewer *)mw->activeMdiChild();
		PolyhedronPtr polyhedron_ptr = viewer->getScenePtr()->get_polyhedron();

		Compression_Valence_ComponentPtr component_ptr = findOrCreateComponentForViewer<Compression_Valence_ComponentPtr, Compression_Valence_Component>(viewer, polyhedron_ptr);
		{

			if (!component_ptr->IsDecompress)
			{				
				QMessageBox::information(mw, APPLICATION, tr("Decompression not possible: please load .p3d file first."));
				return;
			}			

			if (component_ptr->Possible_change_sequence == true)
				component_ptr->Possible_change_sequence = false;

			// read from file
			if (!component_ptr->Sequence)
			{
				component_ptr->Decompression_All_From_File(*viewer->getScenePtr()->get_polyhedron(0));				
			}

			// read from sequence
			else
			{
				while(component_ptr->Process_level != component_ptr->Total_layer)
				{
					PolyhedronPtr New_mesh(new Polyhedron());
					component_ptr->Decompression_From_Sequence(*viewer->getScenePtr()->get_polyhedron(component_ptr->Process_level), *New_mesh);					
					vector<PolyhedronPtr/*Polyhedron**/>::iterator it = viewer->getScenePtr()->get_begin_polyhedrons();	// MT
					viewer->getScenePtr()->insert_polyhedron(it + component_ptr->Process_level-1, New_mesh);				
				}
				viewer->getScenePtr()->set_current_polyhedron(component_ptr->Process_level);				
			}
			ShowText();
			viewer->recreateListsAndUpdateGL();
		}
	}
	timer.stop();
	double Time = timer.time();
	QString Total_time = QString("Processing time : %1 s \n\n").arg(double(Time), 4, 'f', 3);			
	QMessageBox::information(mw, APPLICATION, Total_time);
	//QApplication::restoreOverrideCursor();
}
void AutoLinkChangeString::InitChangeDlg()
{
	ShowText(m_chInitText);

	m_TimeDropList.ResetContent();  // 清空所有内容
	m_TimeDropList.SetCurSel(1);  // 设置当前选项
	m_TimeDropList.AddString("");
	m_TimeDropList.AddString("年");
	m_TimeDropList.AddString("月");
	m_TimeDropList.AddString("日");
	m_TimeDropList.AddString("时");
	m_TimeDropList.AddString("分");
	m_TimeDropList.AddString("秒");
	m_TimeDropList.AddString("毫秒");

	m_PlateDropList.ResetContent();  // 清空所有内容
	m_PlateDropList.SetCurSel(1);  // 设置当前选项
	m_PlateDropList.AddString("");
	m_PlateDropList.AddString("车牌号");
	m_PlateDropList.AddString("车牌颜色");
	m_PlateDropList.AddString("违法信息");
	m_PlateDropList.AddString("车辆类型");
	m_PlateDropList.AddString("车速");
	m_PlateDropList.AddString("限速");
	m_PlateDropList.AddString("图片字母ID");
	m_PlateDropList.AddString("图片ID");
	m_PlateDropList.AddString("图片数量");
	m_PlateDropList.AddString("车道号");

	m_DevInfoDropList.ResetContent();  // 清空所有内容
	m_DevInfoDropList.SetCurSel(1);  // 设置当前选项
	m_DevInfoDropList.AddString("");
	m_DevInfoDropList.AddString("设备IP");
	m_DevInfoDropList.AddString("设备编号");

	m_OtherDropList.ResetContent();  // 清空所有内容
	m_OtherDropList.SetCurSel(1);  // 设置当前选项
	m_OtherDropList.AddString("");
	m_OtherDropList.AddString("路口名称");
	m_OtherDropList.AddString("路口方向");

	m_TypeDropList.ResetContent();  // 清空所有内容
	m_TypeDropList.SetCurSel(1);  // 设置当前选项
	m_TypeDropList.AddString("");
	m_TypeDropList.AddString("jpg");
	m_TypeDropList.AddString("bmp");
	m_TypeDropList.AddString("txt");
	m_TypeDropList.AddString("inf");
	m_TypeDropList.AddString("bin");
}
Exemple #26
0
static byte InitMenuBox(void) {
    int i, y;
    if (ShowText()) {
	y = CountNewLines(text) + 2;
	for (i = 0; i < listN; i++) {
	    TwGotoXYWindow(Dialog_Win, 3, i+y);
	    TwWriteAsciiWindow(Dialog_Win, strlen(list[i].tag), list[i].tag);
	    TwGotoXYWindow(Dialog_Win, 10, i+y);
	    TwWriteAsciiWindow(Dialog_Win, strlen(list[i].item), list[i].item);
	}
	return InitButtons("  OK  ", "Cancel");
    }
    return FALSE;
}
Exemple #27
0
void CVFD::Clear()
{
	if(fd < 0) return;
#if !HAVE_DUCKBOX_HARDWARE
	int ret = ioctl(fd, IOC_FP_CLEAR_ALL, 0);
	if(ret < 0)
		perror("IOC_FP_SET_TEXT");
	else
		text[0] = 0;
#else
#if defined (BOXMODEL_HS7810A) || defined (BOXMODEL_HS7119) || defined (BOXMODEL_HS7819) || defined (BOXMODEL_CUBEREVO_250HD) || defined (BOXMODEL_IPBOX55)
	ShowText("    ");
#elif defined (BOXMODEL_OCTAGON1008) || defined (BOXMODEL_TF7700)
	ShowText("        ");
#elif defined (BOXMODEL_FORTIS_HDBOX) || defined (BOXMODEL_ATEVIO7500)
	ShowText("            ");
#elif defined (BOXMODEL_IPBOX9900) || defined (BOXMODEL_IPBOX99)
	ShowText("              ");
#elif !defined (BOXMODEL_HS7110)
	ShowText("                ");
#endif
#endif
}
Exemple #28
0
void MpvHandler::Volume(int level, bool osd)
{
    if(level > 100) level = 100;
    else if(level < 0) level = 0;

    if(playState > 0)
    {
        double v = level;
        mpv_set_property_async(mpv, MPV_REPLY_PROPERTY, "volume", MPV_FORMAT_DOUBLE, &v);
        if(osd)
            ShowText(tr("Volume: %0%").arg(QString::number(level)));
    }
    else
        setVolume(level);
}
Exemple #29
0
void CFginstDlg::OnRButtonDblClk(UINT nFlags, CPoint point)
{
    if(_access("config.ini", 0) != -1) {
        if(0 > GetKeyState(VK_SHIFT)) {
            if(bRunning) {
                MessageBox("请等待操作完成再试。", "提示", 0);
            } else {
                AfxBeginThread(_TestAllDownloadThread, this);
                ShowText("测试下载全部连接。");
                SetTimer(5, 400, NULL);
            }
        }
    }
    CDialog::OnRButtonDblClk(nFlags, point);
}
Exemple #30
0
void MpvHandler::AddAudioTrack(QString f)
{
    if(f == QString())
        return;
    const QByteArray tmp = f.toUtf8();
    const char *args[] = {"audio-add", tmp.constData(), NULL};
    Command(args);
    auto old = fileInfo.tracks;
    LoadTracks();
    auto current = fileInfo.tracks;
    for(auto track : old)
        current.removeOne(track);
    Mpv::Track &track = current.first();
    ShowText(QString("%0: %1 (%2)").arg(QString::number(track.id), track.title, track.external ? "external" : track.lang));
}