void UPersonaOptions::SetViewFOV( float InViewFOV )
{
	ViewFOV = InViewFOV;
	SaveConfig();
}
void UPersonaOptions::SetGridSize( int32 InGridSize )
{
	GridSize = InGridSize;
	SaveConfig();
}
void UPersonaOptions::SetShowFloor( bool bInShowFloor )
{
	bShowFloor = bInShowFloor;
	SaveConfig();
}
void UPersonaOptions::SetBranchingPointTimingNodeColor(const FLinearColor& InColor)
{
	BranchingPointTimingNodeColor = InColor;
	SaveConfig();
}
void UPersonaOptions::SetShowGrid( bool bInShowGrid )
{
	bShowGrid = bInShowGrid;
	SaveConfig();
}
void UPersonaOptions::SetDefaultLocalAxesSelection( uint32 InDefaultLocalAxesSelection )
{
	DefaultLocalAxesSelection = InDefaultLocalAxesSelection;
	SaveConfig();
}
void UPersonaOptions::SetSectionTimingNodeColor(const FLinearColor& InColor)
{
	SectionTimingNodeColor = InColor;
	SaveConfig();
}
Exemple #8
0
void aisradar_pi::OnRadarFrameClose() {
    m_pRadarFrame = 0;
    SaveConfig();
}
Exemple #9
0
SConfig::~SConfig()
{
       SaveConfig(ConfigPath);
      DestroyNode();
      log.Log("SConfig:~SConfig",COMMON,"SConfig结束");
}
/*-------------------------------------------------------------------------*/
static KEY filter( KEY k )
{
    INT         code;

    if( k.scan == 9 )  k.key = KEY_ASTERISK;
    if( k.scan == 55 ) k.key = KEY_ASTERISK;

    switch( k.key )
    {
#ifndef _LITE_
        
        case KEY_F1:
            ViewHelp( "PktSelect" );
            SetBar( BarList  );
            break;
                
        case KEY_F2:
            if( !Update )
            {
                k.key = 0;
                break;
            }
            SetBar( BarNull );
            if( !UpdatePkt( filename ))
                Update = 0;
            if( PktFile == NULL )
            {
                k.key = KEY_ESC;
                break;
            }
            SetBar( BarList  );
            k.key = 0;
            break;

        case KEY_F3:
            newload = 1;
            k.key = KEY_ESC;
            break;

        case KEY_F4:
            k.key = 0;
            EditHeader();
            SetBar( BarList );
            break;

        case KEY_F5:
            k.key = 0;
            if( !pktcount )
                break;
            CheckUpdatePkt( filename );
            CopyPkt( filename );
            SetBar( BarList );
            break;

        case KEY_F6:
            k.key = 0;
            if( !pktcount )
                break;
            CheckUpdatePkt( filename );
            code = MovePkt( filename );
            SetBar( BarList );
            if( code )
                break;
            if( mode == FILE_TYPE_MSG )
                k.key = ReindexPkt();
            if( mode == FILE_TYPE_PKT )
            {
                reload = 1;
                k.key = KEY_ESC;
            }
            break;

        case KEY_F8: case KEY_DEL:
            k.key = 0;
            if( !pktcount )
                break;
            code = DelPkt( filename );
            SetBar( BarList );
            if( code )
                break;
            if( mode == FILE_TYPE_MSG )
                k.key = ReindexPkt();
            if( mode == FILE_TYPE_PKT )
            {
                reload = 1;
                k.key = KEY_ESC;
            }
            break;

        case KEY_SPACE: case KEY_INS:
            if( !pktcount )
            {
                k.key = 0;
                break;
            }
            if( Current -> sel != ' ' )
            {   Current -> sel = ' ';
                selected--;
            }
            else
            {   Current -> sel = '*';
                selected++;
            }
            ViewSelCount();
            WPShow( popup, FALSE, TRUE, -1, -1 );
            k.key = KEY_DOWN;
            break;
            
        case KEY_s: case KEY_S: case ALT_S:
            if( cfgCurrent.sort && pktcount > 1 )
            {
                PktSort();
                SetBar( BarList );
                before( pktNumber );
            }
            k.key = 0;
            break;
            
        case KEY_i: case KEY_I: case ALT_I:
            k.key = 0;
            if( mode == FILE_TYPE_MSG )
                break;
            ShowInfo( filename );
            SetBar( BarList );
            break;
            
        case KEY_PLUS:
            if( pktcount > 1 )
            {
                PktSelect();
                SetBar( BarList );
                ViewSelCount();
                WPShow( popup, FALSE, TRUE, -1, -1 );
            }
            k.key = 0;
            break;
            
        case KEY_MINUS:
            if( pktcount > 1 )
            {
                PktUnSelect();
                SetBar( BarList );
                ViewSelCount();
                WPShow( popup, FALSE, TRUE, -1, -1 );
            }
            k.key = 0;
            break;
            
        case KEY_ASTERISK:
            if( pktcount > 1 )
            {
                MsgInvert();
                ViewSelCount();
                WPShow( popup, FALSE, TRUE, -1, -1 );
            }
            k.key = 0;
            break;

        case KEY_F9:
            ChangeConfig();
            SetBar( BarList );
            if( altx )
                k.key = KEY_ESC;
            else
                k.key = 0;
            break;
            
        case SHIFT_F9:
            SaveConfig( ConfFile );
            k.key = 0;
            break;

#endif

        case KEY_ENTER: case KEY_GRENTER: case KEY_RIGHT: case KEY_LEFT:
            if( !pktcount )
            {
                k.key = 0;
                break;
            }
            if( mode == FILE_TYPE_MSG )
            {
                filename = Current -> name;
                code = 1;
            }

            if( mode == FILE_TYPE_PKT )
                code = 0;
            
            if( ReadText( code ))
            {
                k.key = KEY_ESC;
                break;
            }

            k.key = ViewMsg( filename, 1 );

            FreeTxtIndex();

            if( reload )
            {
                k.key = KEY_ESC;
                break;
            }

            switch( k.key )
            {
                case KEY_LEFT:
                    k.key = KEY_ENTER;
                    MPutKey( k );
                    k.key = KEY_UP;
                    break;

                case KEY_RIGHT:
                    k.key = KEY_ENTER;
                    MPutKey( k );
                    k.key = KEY_DOWN;
                    break;

                case KEY_F3:
                    newload = 1;
                    k.key = KEY_ESC;
                    break;

                case KEY_ESC: case KEY_F10:
#ifndef _LITE_
                    BarList[4].status = BarList[5].status = BarList[7].status= 1;
                    SetBar( BarList );
                    ViewSelCount();
#endif
                    if( altx )
                        k.key = KEY_ESC;
                    else
                        k.key = 0;
                    break;
            }
            return( k );

        case KEY_ESC: case KEY_F10:
            k.key = KEY_ESC;
            break;

        case ALT_X:
            altx = 1;
            k.key = KEY_ESC;
            break;
    }
    return( k );
}
/*-------------------------------------------------------------------------*/
INT ViewMsg( CHAR *file, INT renew )
{
    INT              y = 0;
    KEY              k;
    INDEXTXT        *p;
#ifndef _LITE_
    INT              code;
#endif

    WActive ( wmain );
    WActive ( wtext );
    WActive ( wbar  );
#ifndef _LITE_
    SetBar  ( BarView );
#endif
    if( renew )
    {
        ViewHeader( file );
        ViewPage  ( maxXtext, maxYtext, 0 );
    }

    while( 1 )
    {
        k = MGetKey( FALSE );

        switch( k.key )
        {
#ifndef _LITE_
            
            case KEY_F1:
                ViewHelp( "PktView" );
                SetBar( BarView );
                break;

            case KEY_F5:
                CheckUpdatePkt( file );
                CopyPkt( file );
                SetBar( BarView );
                break;
                
            case KEY_F6:
                CheckUpdatePkt( file );
                code = MovePkt( file );
                SetBar( BarView );
                if( code ) break;
                if( mode == FILE_TYPE_MSG )
                {
                    ReindexPkt();
                    WDeactive( wmain );
                    WDeactive( wtext );
                    return( KEY_ESC );
                }
                if( mode == FILE_TYPE_PKT )
                {
                    reload = 1;
                    return( KEY_ESC );
                }
                return( 0 );
                
            case KEY_F8: case KEY_DEL:
                code = DelPkt( file );
                SetBar( BarView );
                if( code ) break;
                if( mode == FILE_TYPE_MSG )
                {
                    ReindexPkt();
                    WDeactive( wmain );
                    WDeactive( wtext );
                    return( KEY_ESC );
                }
                if( mode == FILE_TYPE_PKT )
                {
                    reload = 1;
                    return( KEY_ESC );
                }
                return( 0 );

            case KEY_i: case KEY_I: case ALT_I:
                ShowInfo( file );
                SetBar( BarView );
                break;
                
            case KEY_SPACE: case KEY_INS:
                if( pktIndex == NULL )
                    break;
                if( Current -> sel != ' ' )
                {
                    Current -> sel = ' ';
                    selected--;
                }
                else
                {
                    Current -> sel = '*';
                    selected++;
                }
                ViewSelected();
                break;
                
            case KEY_F3:
                return( KEY_F3 );
                
            case ALT_C:
                SetAttr();
                SetBar( BarView );
                break;
                
            case KEY_F9:
                ChangeConfig();
                SetBar( BarView );
                if( altx )
                {
                    WDeactive( wmain );
                    WDeactive( wtext );
                    return( KEY_ESC );
                }
                break;
                
            case SHIFT_F9:
                SaveConfig( ConfFile );
                break;

#endif

            case KEY_HOME:
                if( y == 0 )
                    break;
                y = 0;
                ViewPage( maxXtext, maxYtext, y );
                break;

            case KEY_DOWN:
                if( txtcount < y + maxYtext + 1 )
                    break;
                y++;
                WSetXY( wtext, 0, 0 ); WDelLine( wtext );
                p = GetCurrentTxt( y + maxYtext - 1 );
                ViewStr ( wtext, maxYtext - 1, maxXtext, p -> str, p -> color );
                break;

            case KEY_UP:
                if( y == 0 )
                    break;
                y--;
                WSetXY( wtext, 0, 0 ); WInsLine( wtext );
                p = GetCurrentTxt( y );
                ViewStr ( wtext, 0, maxXtext, p -> str, p -> color );
                break;

            case KEY_PAGEUP:
                if( y == 0 )
                    break;
                if( y < maxYtext - 1 )
                    y = 0;
                else
                    y -= maxYtext - 1;
                ViewPage( maxXtext, maxYtext, y );
                break;

            case KEY_PAGEDOWN:
                if( txtcount < maxYtext )
                    break;
                if( y + 2 * maxYtext < txtcount )
                    y += maxYtext - 1;
                else
                    y  = txtcount - maxYtext;
                ViewPage( maxXtext, maxYtext, y );
                break;

            case KEY_END:
                if( txtcount < maxYtext )
                    break;
                y = txtcount - maxYtext;
                ViewPage( maxXtext, maxYtext, y );
                break;

            case KEY_LEFT: case CTRL_ENTER: case SHIFT_TAB:
                if( pktcount > 1 && pktNumber > 0 )
                    return( KEY_LEFT );
                break;

            case KEY_RIGHT: case KEY_ENTER: case KEY_GRENTER: case KEY_TAB:
                if( pktcount > 1 && pktNumber + 1 != pktcount )
                    return( KEY_RIGHT );
                break;

            case ALT_X:
                altx = 1;
                
            case KEY_ESC: case KEY_F10: case KEY_L: case KEY_l: case ALT_L:
                WDeactive( wmain );
                WDeactive( wtext );
                return( KEY_ESC );

        }
    }
}
void CNetServerPPPOE::OnOK() 
{
	m_ensure = TRUE;
	SaveConfig();
	CDialog::OnOK();
}
Exemple #13
0
void iacfleet_pi::OnDialogClose()
{
    m_pDialog = NULL;
    SaveConfig();

}
Exemple #14
0
Ztamp::~Ztamp()
{
	SaveConfig();
}
void SaveConfig_f(void)
{
	SaveConfig(COM_SkipPath(Cmd_Argv(1)));
}
void UGameUserSettings::SaveSettings()
{
    Scalability::SaveState(GGameUserSettingsIni);
    SaveConfig(CPF_Config, *GGameUserSettingsIni);
}
void Config_QuitSave(void)
{
	if (cfg_save_onquit.integer) {
		SaveConfig("");
	}
}
Exemple #18
0
Shader::~Shader()
{
	SaveConfig();
}
void UPersonaOptions::SetShowMeshStats( int32 InShowMeshStats )
{
	ShowMeshStats = InShowMeshStats;
	SaveConfig();
}
void UShaderPlatformQualitySettings::PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent)
{
	Super::PostEditChangeProperty(PropertyChangedEvent);
	SaveConfig(); // needed?
}
void UPersonaOptions::SetNotifyTimingNodeColor(const FLinearColor& InColor)
{
	NotifyTimingNodeColor = InColor;
	SaveConfig();
}
Exemple #22
0
void OnNet_Clicked(GtkDialog *dialog, gint arg1, gpointer user_data) {
	GetComboText(NetConfS.Combo, NetConfS.plist, Config.Net);
	SaveConfig();
	gtk_widget_destroy(GTK_WIDGET(dialog));
	NetDlg = NULL;
}
void UPersonaOptions::SetViewportBackgroundColor( const FLinearColor& InViewportBackgroundColor)
{
	ViewportBackgroundColor = InViewportBackgroundColor;
	SaveConfig();
}
Exemple #24
0
void grib_pi::ShowPreferencesDialog( wxWindow* parent )
{
    GribPreferencesDialog *Pref = new GribPreferencesDialog(parent);

    DimeWindow( Pref );                                     //aplly global colours scheme
    SetDialogFont( Pref );                                  //Apply global font

    Pref->m_cbUseHiDef->SetValue(m_bGRIBUseHiDef);
    Pref->m_cbUseGradualColors->SetValue(m_bGRIBUseGradualColors);
    Pref->m_cbCopyFirstCumulativeRecord->SetValue(m_bCopyFirstCumRec);
    Pref->m_cbCopyMissingWaveRecord->SetValue(m_bCopyMissWaveRec);
    Pref->m_rbTimeFormat->SetSelection( m_bTimeZone );
    Pref->m_rbLoadOptions->SetSelection( m_bLoadLastOpenFile );
    Pref->m_rbStartOptions->SetSelection( m_bStartOptions );

     if( Pref->ShowModal() == wxID_OK ) {
         m_bGRIBUseHiDef= Pref->m_cbUseHiDef->GetValue();
         m_bGRIBUseGradualColors= Pref->m_cbUseGradualColors->GetValue();
         m_bLoadLastOpenFile= Pref->m_rbLoadOptions->GetSelection();
          if( m_pGRIBOverlayFactory )
              m_pGRIBOverlayFactory->SetSettings( m_bGRIBUseHiDef, m_bGRIBUseGradualColors );

         int updatelevel = 0;

         if( m_bStartOptions != Pref->m_rbStartOptions->GetSelection() ) {
             m_bStartOptions = Pref->m_rbStartOptions->GetSelection();
             updatelevel = 1;
         }

         if( m_bTimeZone != Pref->m_rbTimeFormat->GetSelection() ) {
             m_bTimeZone = Pref->m_rbTimeFormat->GetSelection();
             if( m_pGRIBOverlayFactory )
                m_pGRIBOverlayFactory->SetTimeZone( m_bTimeZone );
             updatelevel = 2;
         }

         bool copyrec = Pref->m_cbCopyFirstCumulativeRecord->GetValue();
         bool copywave = Pref->m_cbCopyMissingWaveRecord->GetValue();
         if( m_bCopyFirstCumRec != copyrec || m_bCopyMissWaveRec != copywave ) {
             m_bCopyFirstCumRec = copyrec;
             m_bCopyMissWaveRec = copywave;
             updatelevel = 3;
         }

         if(m_pGribCtrlBar ) {
             switch( updatelevel ) {
             case 0:
                 break;
             case 3:
                 //rebuild current activefile with new parameters and rebuil data list with current index
                 m_pGribCtrlBar->CreateActiveFileFromName( m_pGribCtrlBar->m_bGRIBActiveFile->GetFileName() );
                 m_pGribCtrlBar->PopulateComboDataList();
                 m_pGribCtrlBar->TimelineChanged();
                 break;
             case 2 :
                 //only rebuild  data list with current index and new timezone
                 m_pGribCtrlBar->PopulateComboDataList();
                 m_pGribCtrlBar->TimelineChanged();
                 break;
             case 1:
                 //only re-compute the best forecast
                 m_pGribCtrlBar->ComputeBestForecastForNow();
                 break;
             }
         }

         SaveConfig();
     }
}
void UPersonaOptions::SetHighlightOrigin( bool bInHighlightOrigin )
{
	bHighlightOrigin = bInHighlightOrigin;
	SaveConfig();
}
Exemple #26
0
void LoadConfig()
{
	int err = 0;
	memset(&conf, 0, sizeof(conf));
	conf.interlace = 0; // on, mode 1
	conf.mrtdepth = 1;
	conf.bilinear = 1;
	conf.log = 1;
	conf.SkipDraw = 0;
	conf.width = 800;
	conf.height = 600;
	conf.disableHacks = 0;

	const wxString iniFile_s(Path::Combine(s_strIniPath, L"zzogl-pg-cg.ini"));
	std::string iniFile = std::string(iniFile_s.mb_str());

	FILE* f = fopen(iniFile.c_str(), "r");

	if (f == NULL)
	{
		ZZLog::Error_Log("Failed to open '%s'", iniFile.c_str());
		SaveConfig();//save and return
		return;
	}

	err = fscanf(f, "interlace = %hhx\n", &conf.interlace);

	err = fscanf(f, "mrtdepth = %hhx\n", &conf.mrtdepth);
	err = fscanf(f, "zzoptions = %x\n", &conf.zz_options._u32);
	err = fscanf(f, "options = %x\n", &conf.hacks._u32);
	err = fscanf(f, "bilinear = %hhx\n", &conf.bilinear);
	err = fscanf(f, "aliasing = %hhx\n", &conf.aa);
	err = fscanf(f, "width = %x\n", &conf.width);
	err = fscanf(f, "height = %x\n", &conf.height);
	err = fscanf(f, "x = %x\n", &conf.x);
	err = fscanf(f, "y = %x\n", &conf.y);
	err = fscanf(f, "log = %x\n", &conf.log);
	err = fscanf(f, "skipdraw = %x\n", &conf.SkipDraw);
	err = fscanf(f, "disablehacks = %x\n", &conf.disableHacks);
	fclose(f);

	// turn off all hacks by default
	conf.setWireframe(false);
	conf.setCaptureAvi(false);
	conf.setLoaded(true);
	
	conf.isWideScreen = conf.widescreen();
	
	// filter bad files
	if (conf.interlace > 2) conf.interlace = 0;
	if (conf.aa > 4) conf.aa = 0;
	if (conf.width <= 0 || conf.height <= 0)
	{
		conf.width = 800;
		conf.height = 600;
	}

	if (conf.x < 0 || conf.y < 0)
	{
		conf.x = 0;
		conf.y = 0;
	}
}
void UPersonaOptions::SetViewModeIndex( EViewModeIndex InViewModeIndex )
{
	ViewModeIndex = InViewModeIndex;
	SaveConfig();
}
Exemple #28
0
bool CCVar::SaveConfig(const char *szFilename)
{	return SaveConfig(CString(szFilename)); }
void UPersonaOptions::SetShowSky( bool bInShowSky )
{
	bShowSky = bInShowSky;
	SaveConfig();
}
void UPersonaOptions::SetMuteAudio( bool bInMuteAudio )
{
	bMuteAudio = bInMuteAudio;
	SaveConfig();
}