void LandscapeEditorBase::Toggle()
{
    if(ELE_ACTIVE == state)
    {
        state = ELE_CLOSING;
        
        SaveTexture();
    }
    else if(ELE_NONE == state)
    {
        touchID = INVALID_TOUCH_ID;
        
        state = ELE_ACTIVE;
        
        SetTool(toolsPanel->CurrentTool());
        
        if(delegate)
        {
            delegate->LandscapeEditorStarted();
        }
        
        ShowAction();
        
        RecreateHeightmapNode();
    }
}
示例#2
0
void LandscapeEditorBase::Toggle()
{
    if(ELE_ACTIVE == state)
    {
        state = ELE_CLOSING;
        
        SaveTexture();
    }
    else if(ELE_NONE == state)
    {
        touchID = INVALID_TOUCH_ID;
        
        SafeRelease(heightmapNode);
        heightmapNode = new HeightmapNode(workingScene, workingLandscape);
        workingScene->AddNode(heightmapNode);
                
        state = ELE_ACTIVE;
        
        SetTool(toolsPanel->CurrentTool());
        
        if(delegate)
        {
            delegate->LandscapeEditorStarted();
        }
        
        ShowAction();
    }
}
//-----------------------------------------------------------------------------
// Purpose: Restores the active tool to what it was when PushTool was called.
//			If the stack is underflowed somehow, the pointer is restored.
//-----------------------------------------------------------------------------
void CToolManager::PopTool()
{
	int nCount = m_ToolIDStack.Count();
	if (nCount > 0)
	{
		ToolID_t eNewTool = m_ToolIDStack.Element(0);
		m_ToolIDStack.Remove(0);

		SetTool(eNewTool);
	}
}
//-----------------------------------------------------------------------------
// Purpose: Pushes a new tool onto the tool stack and activates it. The active
//			tool will be deactivated and reactivated when PopTool is called.
//-----------------------------------------------------------------------------
void CToolManager::PushTool(ToolID_t eToolID)
{
	//
	// Add the new tool to the top of the tool stack.
	//
	if (eToolID != GetActiveToolID())
	{
		m_ToolIDStack.AddToHead(GetActiveToolID());
	}

	SetTool(eToolID);
}
示例#5
0
void LevelEditor::HandleEvents(sf::Event &event)
{
    if(event.Type == sf::Event::MouseButtonPressed)
    {
        if(event.MouseButton.Button == sf::Mouse::Left)
        {
            Vec2D mousePos((Real)event.MouseButton.X, (Real)event.MouseButton.Y);

            if(!SetTool(mousePos))
            {
                Entity *entity = 0;
                switch(m_currentTool)
                {
                case WALL:
                    entity = new Wall();
                    break;
                case ENEMY_SPAWN_POINT:
                    entity = new EnemySpawnPoint();
                    break;
                };

                if(entity)
                {
                    mousePos += gWorld.m_camera.m_position.Opposite();
                    int cell = gWorld.GetLevel().GetCellFromPoint(mousePos);
                    entity->SetPosition(gWorld.GetLevel().SnapToCenter(mousePos));
                    gWorld.GetLevel().AddEntity(cell, entity);
                }
            }
        }
        else if(event.MouseButton.Button == sf::Mouse::Right)
        {
            Vec2D mousePos((Real)event.MouseButton.X, (Real)event.MouseButton.Y);
            mousePos += gWorld.m_camera.m_position.Opposite();

            int cell = gWorld.GetLevel().GetCellFromPoint(mousePos);
            gWorld.GetLevel().RemoveEntityFromCell(cell);
        }
    }
}
示例#6
0
Compiler::Compiler(wxXmlNode* node, Compiler::eRegexType regexType)
    : m_objectNameIdenticalToFileName(false)
    , m_isDefault(false)
{
    // ensure all relevant entries exist in switches map (makes sure they show up in build settings dlg)
    SetSwitch("Include", "");
    SetSwitch("Debug", "");
    SetSwitch("Preprocessor", "");
    SetSwitch("Library", "");
    SetSwitch("LibraryPath", "");
    SetSwitch("Source", "");
    SetSwitch("Output", "");
    SetSwitch("Object", "");
    SetSwitch("ArchiveOutput", "");
    SetSwitch("PreprocessOnly", "");

    // ensure all relevant entries exist in tools map (makes sure they show up in build settings dlg)
    SetTool("LinkerName", "");
    SetTool("SharedObjectLinkerName", "");
    SetTool("CXX", "");
    SetTool("CC", "");
    SetTool("AR", "");
    SetTool("ResourceCompiler", "");
    SetTool("MAKE", "");
    SetTool("AS", "as"); // Assembler, default to as

    m_fileTypes.clear();
    if(node) {
        m_name = XmlUtils::ReadString(node, wxT("Name"));
        m_compilerFamily = XmlUtils::ReadString(node, "CompilerFamily");

        if(m_compilerFamily == "GNU GCC") {
            // fix wrong name
            m_compilerFamily = COMPILER_FAMILY_GCC;
        }

        m_isDefault = XmlUtils::ReadBool(node, "IsDefault");

        if(!node->HasProp(wxT("GenerateDependenciesFiles"))) {
            if(m_name == wxT("gnu g++") || m_name == wxT("gnu gcc")) {
                m_generateDependeciesFile = true;
            } else
                m_generateDependeciesFile = false;
        } else {
            m_generateDependeciesFile = XmlUtils::ReadBool(node, wxT("GenerateDependenciesFiles"));
        }

        if(!node->HasProp(wxT("ReadObjectsListFromFile"))) {
            m_readObjectFilesFromList = true;
        } else {
            m_readObjectFilesFromList = XmlUtils::ReadBool(node, wxT("ReadObjectsListFromFile"));
        }

        m_objectNameIdenticalToFileName = XmlUtils::ReadBool(node, wxT("ObjectNameIdenticalToFileName"));

        wxXmlNode* child = node->GetChildren();
        while(child) {
            if(child->GetName() == wxT("Switch")) {
                m_switches[XmlUtils::ReadString(child, wxT("Name"))] = XmlUtils::ReadString(child, wxT("Value"));
            }

            else if(child->GetName() == wxT("Tool")) {
                m_tools[XmlUtils::ReadString(child, wxT("Name"))] = XmlUtils::ReadString(child, wxT("Value"));
            }

            else if(child->GetName() == wxT("Option")) {
                wxString name = XmlUtils::ReadString(child, wxT("Name"));
                if(name == wxT("ObjectSuffix")) {
                    m_objectSuffix = XmlUtils::ReadString(child, wxT("Value"));
                } else if(name == wxT("DependSuffix")) {
                    m_dependSuffix = XmlUtils::ReadString(child, wxT("Value"));
                } else if(name == wxT("PreprocessSuffix")) {
                    m_preprocessSuffix = XmlUtils::ReadString(child, wxT("Value"));
                }
            } else if(child->GetName() == wxT("File")) {
                Compiler::CmpFileTypeInfo ft;
                ft.compilation_line = XmlUtils::ReadString(child, wxT("CompilationLine"));
                ft.extension = XmlUtils::ReadString(child, wxT("Extension")).Lower();

                long kind = (long)CmpFileKindSource;
                if(XmlUtils::ReadLong(child, wxT("Kind"), kind) == CmpFileKindSource) {
                    ft.kind = CmpFileKindSource;
                } else {
                    ft.kind = CmpFileKindResource;
                }
                m_fileTypes[ft.extension] = ft;
            }

            else if(child->GetName() == wxT("Pattern")) {
                if(XmlUtils::ReadString(child, wxT("Name")) == wxT("Error")) {
                    // found an error description
                    CmpInfoPattern errPattern;
                    errPattern.fileNameIndex = XmlUtils::ReadString(child, wxT("FileNameIndex"));
                    errPattern.lineNumberIndex = XmlUtils::ReadString(child, wxT("LineNumberIndex"));
                    errPattern.columnIndex = XmlUtils::ReadString(child, "ColumnIndex", "-1");
                    errPattern.pattern = child->GetNodeContent();
                    m_errorPatterns.push_back(errPattern);
                } else if(XmlUtils::ReadString(child, wxT("Name")) == wxT("Warning")) {
                    // found a warning description
                    CmpInfoPattern warnPattern;
                    warnPattern.fileNameIndex = XmlUtils::ReadString(child, wxT("FileNameIndex"));
                    warnPattern.lineNumberIndex = XmlUtils::ReadString(child, wxT("LineNumberIndex"));
                    warnPattern.columnIndex = XmlUtils::ReadString(child, "ColumnIndex", "-1");
                    warnPattern.pattern = child->GetNodeContent();
                    m_warningPatterns.push_back(warnPattern);
                }
            }

            else if(child->GetName() == wxT("GlobalIncludePath")) {
                m_globalIncludePath = child->GetNodeContent();
            }

            else if(child->GetName() == wxT("GlobalLibPath")) {
                m_globalLibPath = child->GetNodeContent();
            }

            else if(child->GetName() == wxT("PathVariable")) {
                m_pathVariable = child->GetNodeContent();
            }

            else if(child->GetName() == wxT("CompilerOption")) {
                CmpCmdLineOption cmpOption;
                cmpOption.name = XmlUtils::ReadString(child, wxT("Name"));
                cmpOption.help = child->GetNodeContent();
                m_compilerOptions[cmpOption.name] = cmpOption;
            }

            else if(child->GetName() == wxT("LinkerOption")) {
                CmpCmdLineOption cmpOption;
                cmpOption.name = XmlUtils::ReadString(child, wxT("Name"));
                cmpOption.help = child->GetNodeContent();
                m_linkerOptions[cmpOption.name] = cmpOption;
            }

            else if(child->GetName() == wxT("InstallationPath")) {
                m_installationPath = child->GetNodeContent();
            }

            child = child->GetNext();
        }

        if(GetTool("MAKE").IsEmpty()) {
            BuilderConfigPtr bldr = BuildSettingsConfigST::Get()->GetBuilderConfig("");
            if(bldr) {
                SetTool("MAKE", wxString() << bldr->GetToolPath() << " -j " << bldr->GetToolJobs());
            }
        }

        // Default values for the assembler
        if(GetTool("AS").IsEmpty() && GetName().CmpNoCase("vc++") == 0) {
            SetTool("AS", "nasm");

        } else if(GetTool("AS").IsEmpty()) {
            SetTool("AS", "as");
        }

        // For backward compatibility, if the compiler / linker options are empty - add them
        if(IsGnuCompatibleCompiler() && m_compilerOptions.empty()) {
            AddDefaultGnuComplierOptions();
        }

        if(IsGnuCompatibleCompiler() && m_linkerOptions.empty()) {
            AddDefaultGnuLinkerOptions();
        }

    } else {
        // Create a default compiler: g++
        m_name = "";
        m_compilerFamily = COMPILER_FAMILY_GCC;
        m_isDefault = false;
        SetSwitch("Include", "-I");
        SetSwitch("Debug", "-g ");
        SetSwitch("Preprocessor", "-D");
        SetSwitch("Library", "-l");
        SetSwitch("LibraryPath", "-L");
        SetSwitch("Source", "-c ");
        SetSwitch("Output", "-o ");
        SetSwitch("Object", "-o ");
        SetSwitch("ArchiveOutput", " ");
        SetSwitch("PreprocessOnly", "-E");

        m_objectSuffix = ".o";
        m_preprocessSuffix = ".i";

        if(regexType == kRegexGNU) {
            AddPattern(eErrorPattern,
                       "^([^ ][a-zA-Z:]{0,2}[ a-zA-Z\\.0-9_/\\+\\-]+ *)(:)([0-9]*)([:0-9]*)(: )((fatal "
                       "error)|(error)|(undefined reference))",
                       1,
                       3,
                       4);
            AddPattern(eErrorPattern,
                       "^([^ ][a-zA-Z:]{0,2}[ a-zA-Z\\.0-9_/\\+\\-]+ *)(:)([^ ][a-zA-Z:]{0,2}[ a-zA-Z\\.0-9_/\\+\\-]+ "
                       "*)(:)(\\(\\.text\\+[0-9a-fx]*\\))",
                       3,
                       1,
                       -1);
            AddPattern(eErrorPattern,
                       "^([^ ][a-zA-Z:]{0,2}[ a-zA-Z\\.0-9_/\\+\\-]+ *)(:)([^ ][a-zA-Z:]{0,2}[ a-zA-Z\\.0-9_/\\+\\-]+ "
                       "*)(:)([0-9]+)(:)",
                       3,
                       1,
                       -1);
            AddPattern(eErrorPattern, "undefined reference to", -1, -1, -1);
            AddPattern(eErrorPattern, "\\*\\*\\* \\[[a-zA-Z\\-_0-9 ]+\\] (Error)", -1, -1, -1);

            AddPattern(eWarningPattern,
                       "([a-zA-Z:]{0,2}[ a-zA-Z\\.0-9_/\\+\\-]+ *)(:)([0-9]+ *)(:)([0-9:]*)?( warning)",
                       1,
                       3,
                       4);
            AddPattern(eWarningPattern,
                       "([a-zA-Z:]{0,2}[ a-zA-Z\\.0-9_/\\+\\-]+ *)(:)([0-9]+ *)(:)([0-9:]*)?( note)",
                       1,
                       3,
                       -1);
            AddPattern(eWarningPattern,
                       "([a-zA-Z:]{0,2}[ a-zA-Z\\.0-9_/\\+\\-]+ *)(:)([0-9]+ *)(:)([0-9:]*)?([ ]+instantiated)",
                       1,
                       3,
                       -1);
            AddPattern(eWarningPattern,
                       "(In file included from *)([a-zA-Z:]{0,2}[ a-zA-Z\\.0-9_/\\+\\-]+ *)(:)([0-9]+ *)(:)([0-9:]*)?",
                       2,
                       4,
                       -1);

            AddDefaultGnuComplierOptions();
            AddDefaultGnuLinkerOptions();

        } else {

            AddPattern(
                eErrorPattern, "^windres: ([a-zA-Z:]{0,2}[ a-zA-Z\\\\.0-9_/\\+\\-]+) *:([0-9]+): syntax error", 1, 2);
            AddPattern(eErrorPattern, "(^[a-zA-Z\\\\.0-9 _/\\:\\+\\-]+ *)(\\()([0-9]+)(\\))( \\: )(error)", 1, 3);
            AddPattern(eErrorPattern, "(LINK : fatal error)", 1, 1);
            AddPattern(eErrorPattern, "(NMAKE : fatal error)", 1, 1);
            AddPattern(eWarningPattern, "(^[a-zA-Z\\\\.0-9 _/\\:\\+\\-]+ *)(\\()([0-9]+)(\\))( \\: )(warning)", 1, 3);
            AddPattern(eWarningPattern, "([a-z_A-Z]*\\.obj)( : warning)", 1, 1);
            AddPattern(eWarningPattern, "(cl : Command line warning)", 1, 1);
        }

        SetTool("LinkerName", "g++");
#ifdef __WXMAC__
        SetTool("SharedObjectLinkerName", "g++ -dynamiclib -fPIC");
#else
        SetTool("SharedObjectLinkerName", "g++ -shared -fPIC");
#endif

        SetTool("CXX", "g++");
        SetTool("CC", "gcc");
        SetTool("AR", "ar rcu");
        SetTool("ResourceCompiler", "windres");
        SetTool("AS", "as");

#ifdef __WXMSW__
        SetTool("MAKE", "mingw32-make");
#else
        SetTool("MAKE", "make");
#endif

        m_globalIncludePath = wxEmptyString;
        m_globalLibPath = wxEmptyString;
        m_pathVariable = wxEmptyString;
        m_generateDependeciesFile = false;
        m_readObjectFilesFromList = true;
        m_objectNameIdenticalToFileName = false;
    }

    if(m_generateDependeciesFile && m_dependSuffix.IsEmpty()) {
        m_dependSuffix = m_objectSuffix + wxT(".d");
    }

    if(!m_switches[wxT("PreprocessOnly")].IsEmpty() && m_preprocessSuffix.IsEmpty()) {
        m_preprocessSuffix = m_objectSuffix + wxT(".i");
    }

    if(m_fileTypes.empty()) {
        AddCmpFileType("cpp",
                       CmpFileKindSource,
                       "$(CXX) $(SourceSwitch) \"$(FileFullPath)\" $(CXXFLAGS) "
                       "$(ObjectSwitch)$(IntermediateDirectory)/$(ObjectName)$(ObjectSuffix) "
                       "$(IncludePath)");
        AddCmpFileType("cxx",
                       CmpFileKindSource,
                       "$(CXX) $(SourceSwitch) \"$(FileFullPath)\" $(CXXFLAGS) "
                       "$(ObjectSwitch)$(IntermediateDirectory)/$(ObjectName)$(ObjectSuffix) "
                       "$(IncludePath)");
        AddCmpFileType("c++",
                       CmpFileKindSource,
                       "$(CXX) $(SourceSwitch) \"$(FileFullPath)\" $(CXXFLAGS) "
                       "$(ObjectSwitch)$(IntermediateDirectory)/$(ObjectName)$(ObjectSuffix) "
                       "$(IncludePath)");
        AddCmpFileType("c",
                       CmpFileKindSource,
                       "$(CC) $(SourceSwitch) \"$(FileFullPath)\" $(CFLAGS) "
                       "$(ObjectSwitch)$(IntermediateDirectory)/$(ObjectName)$(ObjectSuffix) "
                       "$(IncludePath)");
        AddCmpFileType("cc",
                       CmpFileKindSource,
                       "$(CXX) $(SourceSwitch) \"$(FileFullPath)\" $(CXXFLAGS) "
                       "$(ObjectSwitch)$(IntermediateDirectory)/$(ObjectName)$(ObjectSuffix) "
                       "$(IncludePath)");
        AddCmpFileType("m",
                       CmpFileKindSource,
                       "$(CXX) -x objective-c $(SourceSwitch) \"$(FileFullPath)\" $(CXXFLAGS) "
                       "$(ObjectSwitch)$(IntermediateDirectory)/$(ObjectName)$(ObjectSuffix) "
                       "$(IncludePath)");
        AddCmpFileType("mm",
                       CmpFileKindSource,
                       "$(CXX) -x objective-c++ $(SourceSwitch) \"$(FileFullPath)\" "
                       "$(CXXFLAGS) "
                       "$(ObjectSwitch)$(IntermediateDirectory)/$(ObjectName)$(ObjectSuffix) "
                       "$(IncludePath)");
        AddCmpFileType("s",
                       CmpFileKindSource,
                       "$(AS) \"$(FileFullPath)\" $(ASFLAGS) "
                       "$(ObjectSwitch)$(IntermediateDirectory)/$(ObjectName)$(ObjectSuffix) "
                       "-I$(IncludePath)");
        AddCmpFileType("rc",
                       CmpFileKindResource,
                       "$(RcCompilerName) -i \"$(FileFullPath)\" $(RcCmpOptions)   "
                       "$(ObjectSwitch)$(IntermediateDirectory)/"
                       "$(ObjectName)$(ObjectSuffix) $(RcIncludePath)");
    }

    // Add support for assembler file
    if(m_fileTypes.count("s") == 0) {
        AddCmpFileType("s",
                       CmpFileKindSource,
                       "$(AS) \"$(FileFullPath)\" $(ASFLAGS) "
                       "$(ObjectSwitch)$(IntermediateDirectory)/$(ObjectName)$(ObjectSuffix) "
                       "-I$(IncludePath)");
    }
}
示例#7
0
void LandscapeEditorBase::OnToolSelected(LandscapeTool *newTool)
{
    SetTool(newTool);
}
示例#8
0
void CPPgEastShare::Localize(void)
{	
	if(m_hWnd)
	{
		GetDlgItem(IDC_WARNINGEASTSHARE)->SetWindowText(GetResString(IDS_WARNINGMORPH));

		if (m_htiEnablePreferShareAll) m_ctrlTreeOptions.SetItemText(m_htiEnablePreferShareAll, GetResString(IDS_PREFER_SHARE_ALL));//EastShare - PreferShareAll by AndCycle
		if (m_htiIsPayBackFirst) m_ctrlTreeOptions.SetItemText(m_htiIsPayBackFirst, GetResString(IDS_PAYBACKFIRST));//EastShare - added by AndCycle, Pay Back First
		if (m_htiPayBackFirstLimit) m_ctrlTreeOptions.SetEditLabel(m_htiPayBackFirstLimit, GetResString(IDS_PAYBACKFIRSTLIMIT));//MORPH - Added by SiRoB, Pay Back First Tweak
		// ==> Pay Back First for insecure clients - Stulle
		if (m_htiIsPayBackFirst2) m_ctrlTreeOptions.SetItemText(m_htiIsPayBackFirst2, GetResString(IDS_PAYBACKFIRST2));
		if (m_htiPayBackFirstLimit2) m_ctrlTreeOptions.SetEditLabel(m_htiPayBackFirstLimit2, GetResString(IDS_PAYBACKFIRSTLIMIT2));
		// <== Pay Back First for insecure clients - Stulle
		if (m_htiOnlyDownloadCompleteFiles) m_ctrlTreeOptions.SetItemText(m_htiOnlyDownloadCompleteFiles,GetResString(IDS_ONLY_DOWNLOAD_COMPLETE_FILES));//EastShare - Added by AndCycle, Only download complete files v2.1 (shadow)
		if (m_htiSaveUploadQueueWaitTime) m_ctrlTreeOptions.SetItemText(m_htiSaveUploadQueueWaitTime,GetResString(IDS_SAVE_UPLOAD_QUEUE_WAIT_TIME));//Morph - added by AndCycle, Save Upload Queue Wait Time (MSUQWT)
		if (m_htiEnableChunkDots) m_ctrlTreeOptions.SetItemText(m_htiEnableChunkDots, GetResString(IDS_ENABLE_CHUNKDOTS));//EastShare - Added by Pretender, Option for ChunkDots
		if (m_htiFineCS) m_ctrlTreeOptions.SetItemText(m_htiFineCS, GetResString(IDS_FINECS));//EastShare - added by Pretender, modified Fine Credit System

		//EastShare START - Added By TAHO, .met file control // Modified by Pretender
		if (m_htiKnownMet) m_ctrlTreeOptions.SetEditLabel(m_htiKnownMet, (GetResString(IDS_EXPIRED_KNOWN)));
		if (m_htiRemoveAichImmediatly) m_ctrlTreeOptions.SetItemText(m_htiRemoveAichImmediatly, GetResString(IDS_REMOVE_AICH_IMMEDIATLY));
		//EastShare END - Added By TAHO, .met file control
		
		// MORPH START - leuk_he tooltipped
		SetTool(m_htiEnablePreferShareAll,IDS_PREFER_SHARE_ALL_TIP);
		SetTool(m_htiOnlyDownloadCompleteFiles,IDS_ONLY_DOWNLOAD_COMPLETE_FILES_TIP);
		SetTool(m_htiSaveUploadQueueWaitTime,IDS_SAVE_UPLOAD_QUEUE_WAIT_TIME_TIP);
		SetTool(m_htiEnableChunkDots,IDS_ENABLE_CHUNKDOTS_TIP);
		SetTool(m_htiEnableEqualChanceForEachFile,IDS_ECFEF_TIP);
		SetTool(m_htiFollowTheMajority, IDS_FOLLOW_THE_MAJORITY_TIP); // EastShare       - FollowTheMajority by AndCycle
		// ==> Integer based FairPlay - Stulle
		/*
		SetTool(m_htiFairPlay, IDS_FAIR_PLAY_TIP); //EastShare	- FairPlay by AndCycle
		*/
		SetTool(m_htiFairPlay, IDS_FAIR_PLAY_TIP_STULLE);
		// <== Integer based FairPlay - Stulle
		SetTool(m_htiIP2CountryName,IDS_IP2COUNTRY_TIP);
		SetTool(m_htiIP2CountryName_DISABLE,IDS_DISABLED_TIP);
		SetTool(m_htiIP2CountryShowFlag,IDS_COUNTRYNAME_SHOWFLAG_TIP);
		SetTool(m_htiCreditSystem,IDS_CREDIT_SYSTEM_TIP);
		SetTool(m_htiOfficialCredit,IDS_OFFICIAL_CREDIT_TIP);
		SetTool(m_htiLovelaceCredit,IDS_LOVELACE_CREDIT_TIP);
	//	SetTool(m_htiRatioCredit,IDS_RATIO_CREDIT_TIP);
		SetTool(m_htiPawcioCredit,IDS_PAWCIO_CREDIT_TIP);
		SetTool(m_htiESCredit,IDS_EASTSHARE_CREDIT_TIP);
		SetTool(m_htiIsPayBackFirst,IDS_PAYBACKFIRST_TIP);
		SetTool(m_htiPayBackFirstLimit,IDS_PAYBACKFIRSTLIMI_TIP);
		//SetTool(m_htiMetControl,IDS_MET_FILE_CONTROL_TIP);
		SetTool(m_htiKnownMet,IDS_EXPIRED_KNOWN_TIP);
		SetTool(m_htiDontPurge,IDS_MET_PURGE_DONT_TIP);
		SetTool(m_htiPartiallyPurge,IDS_MET_PURGE_PART_TIP);
		SetTool(m_htiCompletelyPurge,IDS_MET_PURGE_COMPL_TIP);
		SetTool(m_htiRemoveAichImmediatly,IDS_REMOVE_AICH_TIP);
		// MORPH END - leuk_he tooltipped
	}	

}
示例#9
0
void CPPgScheduler::Localize(void)
{
	if(m_hWnd)
	{
		SetWindowText(GetResString(IDS_SCHEDULER));

		GetDlgItem(IDC_ENABLE)->SetWindowText(GetResString(IDS_ENABLED));
		GetDlgItem(IDC_S_ENABLE)->SetWindowText(GetResString(IDS_ENABLED));
		GetDlgItem(IDC_STATIC_S_TITLE)->SetWindowText(GetResString(IDS_TITLE));
		GetDlgItem(IDC_STATIC_DETAILS)->SetWindowText(GetResString(IDS_DETAILS));
		GetDlgItem(IDC_STATIC_S_TIME)->SetWindowText(GetResString(IDS_TIME));
		
		GetDlgItem(IDC_STATIC_S_ACTION)->SetWindowText(GetResString(IDS_ACTION));
     /* MORPH START  leuk_he: Remove 2nd apply in scheduler 
		GetDlgItem(IDC_APPLY)->SetWindowText(GetResString(IDS_PW_APPLY));
    /* MORPH START  leuk_he: Remove 2nd apply in scheduler */
		GetDlgItem(IDC_REMOVE)->SetWindowText(GetResString(IDS_REMOVE));
		GetDlgItem(IDC_NEW)->SetWindowText(GetResString(IDS_NEW));
		GetDlgItem(IDC_CHECKNOENDTIME)->SetWindowText(GetResString(IDS_CHECKNOENDTIME));
		
		while (m_timesel.GetCount()>0) m_timesel.DeleteString(0);
		for (int i=0;i<11;i++) 
			m_timesel.AddString(GetDayLabel(i));
		m_timesel.SetCurSel(0);
		if (m_list.GetSelectionMark()!=-1) m_timesel.SetCurSel(theApp.scheduler->GetSchedule(m_timesel.GetCurSel())->day);

		// leuk_he tooltipped
		SetTool(IDC_ENABLE,IDS_ENABLE_SCHED_TIP);
		SetTool(IDC_REMOVE,IDS_REMOVE_SCHED_TIP);
		SetTool(IDC_NEW,IDS_NEW_SCHED_TIP);
		SetTool(IDC_SCHEDLIST,IDS_SCHEDLIST_TIP);
		SetTool(IDC_S_ENABLE,IDS_S_ENABLE_TIP);
		SetTool(IDC_S_TITLE,IDS_S_TITLE_TIP);
		SetTool(IDC_TIMESEL,IDS_TIMESEL_SCHED_TIP);
		SetTool(IDC_DATETIMEPICKER1,IDS_DATETIMEPICKER1_TIP);
		SetTool(IDC_DATETIMEPICKER2,IDS_DATETIMEPICKER2_TIP);
		SetTool(IDC_CHECKNOENDTIME,IDS_CHECKNOENDTIME_SCHED_TIP);
		SetTool(IDC_SCHEDACTION,IDS_SCHEDACTION_TIP);
		// leuk_he tooltips end
	}
}
示例#10
0
void CPPgWebServer::Localize(void)
{
	if(m_hWnd){
		SetWindowText(GetResString(IDS_PW_WS));

		// MORPH start tabbed options [leuk_he]
		InitTab(true);
		m_tabCtr.SetCurSel(theApp.emuledlg->preferenceswnd->StartPageWebServer);
		// MORPH end tabbed options [leuk_he]

		GetDlgItem(IDC_WSPASS_LBL)->SetWindowText(GetResString(IDS_WS_PASS));
		GetDlgItem(IDC_WSPORT_LBL)->SetWindowText(GetResString(IDS_PORT));
		GetDlgItem(IDC_WSENABLED)->SetWindowText(GetResString(IDS_ENABLED));
		GetDlgItem(IDC_WSRELOADTMPL)->SetWindowText(GetResString(IDS_SF_RELOAD));
		GetDlgItem(IDC_WSENABLED)->SetWindowText(GetResString(IDS_ENABLED));
		SetDlgItemText(IDC_WS_GZIP,GetResString(IDS_WEB_GZIP_COMPRESSION));
		SetDlgItemText(IDC_WSUPNP, GetResString(IDS_WEBUPNPINCLUDE));

		GetDlgItem(IDC_WSPASS_LBL2)->SetWindowText(GetResString(IDS_WS_PASS));
		GetDlgItem(IDC_WSENABLEDLOW)->SetWindowText(GetResString(IDS_ENABLED));
		GetDlgItem(IDC_STATIC_GENERAL)->SetWindowText(GetResString(IDS_PW_GENERAL));

		GetDlgItem(IDC_STATIC_ADMIN)->SetWindowText(GetResString(IDS_ADMIN));
		GetDlgItem(IDC_STATIC_LOWUSER)->SetWindowText(GetResString(IDS_WEB_LOWUSER));
		GetDlgItem(IDC_WSENABLEDLOW)->SetWindowText(GetResString(IDS_ENABLED));

		GetDlgItem(IDC_TEMPLATE)->SetWindowText(GetResString(IDS_WS_RELOAD_TMPL));
		SetDlgItemText(IDC_WSTIMEOUTLABEL,GetResString(IDS_WEB_SESSIONTIMEOUT)+_T(":"));
		SetDlgItemText(IDC_MINS,GetResString(IDS_LONGMINS) );

		GetDlgItem(IDC_MMENABLED)->SetWindowText(GetResString(IDS_ENABLEMM));
		GetDlgItem(IDC_STATIC_MOBILEMULE)->SetWindowText(GetResString(IDS_MOBILEMULE));
		GetDlgItem(IDC_MMPASSWORD)->SetWindowText(GetResString(IDS_WS_PASS));
		GetDlgItem(IDC_MMPORT_LBL)->SetWindowText(GetResString(IDS_PORT));

		GetDlgItem(IDC_WS_ALLOWHILEVFUNC)->SetWindowText(GetResString(IDS_WEB_ALLOWHILEVFUNC));
		//MORPH START leuk_he tooltipped
		SetTool(IDC_WSPASS,IDC_WSPASS_TIP);
		SetTool(IDC_WSPASSLOW,IDC_WSPASSLOW_TIP);
		SetTool(IDC_MMPASSWORDFIELD,IDC_MMPASSWORDFIELD_TIP);
		SetTool(IDC_WSPORT,IDC_WSPORT_TIP);
		SetTool(IDC_MMPORT_FIELD,IDC_MMPORT_FIELD_TIP);
		SetTool(IDC_TMPLPATH,IDC_TMPLPATH_TIP);
		SetTool(IDC_WSTIMEOUT,IDC_WSTIMEOUT_TIP);
		SetTool(IDC_WSENABLED,IDC_WSENABLED_TIP);
		SetTool(IDC_WSENABLEDLOW,IDC_WSENABLEDLOW_TIP);
		SetTool(IDC_MMENABLED,IDC_MMENABLED_TIP);
		SetTool(IDC_WS_GZIP,IDC_WS_GZIP_TIP);
		SetTool(IDC_WS_ALLOWHILEVFUNC,IDC_WS_ALLOWHILEVFUNC_TIP);
		SetTool(IDC_WSRELOADTMPL,IDC_WSRELOADTMPL_TIP);
	    SetTool(IDC_TMPLBROWSE,IDC_TMPLBROWSE_TIP);
		SetTool(IDC_GUIDELINK,IDC_GUIDELINK_TIP);
		SetTool(IDC_WSUPNP,IDS_WSUPNP_TIP);
		//MORPH END leuk_he tooltipped
	}
}
示例#11
0
void CPPgNTService::Localize(void)
{
	if(m_hWnd){
		SetWindowText(GetResString(IDS_TAB_NT_SERVICE));
		// MORPH start tabbed options [leuk_he]
		InitTab(true,2);
		m_tabCtr.SetCurSel(theApp.emuledlg->preferenceswnd->StartPageWebServer);
		// MORPH end tabbed options [leuk_he]

		GetDlgItem(IDC_SVC_INSTALLSERVICE)->SetWindowText(GetResString(IDS_SVC_INSTALLSERVICE));
		GetDlgItem(IDC_SVC_SERVERUNINSTALL)->SetWindowText(GetResString(IDS_SVC_SERVERUNINSTALL));
		GetDlgItem(IDC_SVC_STARTWITHSYSTEM)->SetWindowText(GetResString(IDS_SVC_STARTWITHSYSTEM));
		GetDlgItem(IDC_SVC_MANUALSTART)->SetWindowText(GetResString(IDS_SVC_MANUALSTART));
		GetDlgItem(IDC_SVC_SETTINGS)->SetWindowText(GetResString(IDS_SVC_SETTINGS));
		GetDlgItem(IDC_SVC_RUNBROWSER)->SetWindowText(GetResString(IDS_SVC_RUNBROWSER));
		GetDlgItem(IDC_SVC_REPLACESERVICE )->SetWindowText(GetResString(IDS_SVC_REPLACESERVICE));
		GetDlgItem(IDC_SVC_ONSTARTBOX)->SetWindowText(GetResString(IDS_SVC_ONSTARTBOX));
		GetDlgItem(IDC_SVC_STARTUPBOX)->SetWindowText(GetResString(IDS_SVC_STARTUPBOX));
		GetDlgItem(IDC_SVC_CURRENT_STATUS_LABEL)->SetWindowText(GetResString(IDS_SVC_CURRENT_STATUS_LABEL));
		GetDlgItem(IDC_SERVICE_OPT_GROUP)->SetWindowText(GetResString(IDS_SERVICE_OPT_GROUP));
		GetDlgItem(IDC_SERVICE_OPT_LABEL)->SetWindowText(GetResString(IDS_SERVICE_OPT_LABEL));
		InitOptLvlCbn();

		//MORPH START - Added by Stulle, Adjustable NT Service Strings
		GetDlgItem(IDC_SERVICE_STR_GROUP)->SetWindowText(GetResString(IDS_SERVICE_STR_GROUP));
		GetDlgItem(IDC_SERVICE_NAME_LABEL)->SetWindowText(GetResString(IDS_SERVICE_NAME));
		GetDlgItem(IDC_SERVICE_DISP_NAME_LABEL)->SetWindowText(GetResString(IDS_SERVICE_DISP_NAME));
		GetDlgItem(IDC_SERVICE_DESCR_LABEL)->SetWindowText(GetResString(IDS_SERVICE_DESCR));
		//MORPH END   - Added by Stulle, Adjustable NT Service Strings

		SetTool(IDC_SVC_INSTALLSERVICE,IDS_SVC_INSTALLSERVICE_TIP);
		SetTool(IDC_SVC_SERVERUNINSTALL,IDS_SVC_SERVERUNINSTALL_TIP);
		SetTool(IDC_SVC_STARTWITHSYSTEM,IDS_SVC_STARTWITHSYSTEM_TIP);
		SetTool(IDC_SVC_MANUALSTART,IDS_SVC_MANUALSTART_TIP);
		SetTool(IDC_SVC_SETTINGS,IDS_SVC_SETTINGS_TIP);
		SetTool(IDC_SVC_RUNBROWSER,IDS_SVC_RUNBROWSER_TIP);
		SetTool(IDC_SVC_REPLACESERVICE ,IDS_SVC_REPLACESERVICE_TIP);
		SetTool(IDC_SVC_CURRENT_STATUS,IDS_SVC_CURRENT_STATUS_TIP);
		SetTool(IDC_SERVICE_OPT_BOX,IDS_SERVICE_OPT_BOX_TIP);
		//MORPH START - Added by Stulle, Adjustable NT Service Strings
		SetTool(IDC_SERVICE_NAME,IDS_SERVICE_NAME_TIP);
		SetTool(IDC_SERVICE_DISP_NAME,IDS_SERVICE_DISP_NAME_TIP);
		SetTool(IDC_SERVICE_DESCR,IDS_SERVICE_DESCR_TIP);
		//MORPH END   - Added by Stulle, Adjustable NT Service Strings
	}
}
示例#12
0
  LIBRARY_API CanonReturn CrpiRobotiq::Couple (const char *targetID)
  {
    int param;
    if (strcmp(targetID, "gripper_gear") == 0)
    {
      param = 1;
      SetParameter("ADVANCED_CONTROL", &param);
      SetParameter("SCISSOR_CONTROL", &param);
      param=100;
      SetParameter("SPEED_FINGER_A", &param);
      SetParameter("SPEED_FINGER_B", &param);
      SetParameter("SPEED_FINGER_C", &param);
      SetParameter("SPEED_SCISSOR", &param);
      param=100;
      SetParameter("FORCE_FINGER_A", &param);
      SetParameter("FORCE_FINGER_B", &param);
      SetParameter("FORCE_FINGER_C", &param);
      SetParameter("FORCE_SCISSOR", &param);
      param=200;
      SetParameter("POSITION_SCISSOR", &param);
      param=10;
      SetParameter("POSITION_FINGER_A", &param);
      param=30;
      SetParameter("POSITION_FINGER_B", &param);
      SetParameter("POSITION_FINGER_C", &param);
      SetTool (0.9);
    }
    else if (strcmp(targetID, "gripper_top_cover") == 0)
    {
      param = 1;
      SetParameter("ADVANCED_CONTROL", &param);
      SetParameter("SCISSOR_CONTROL", &param);
      param=100;
      SetParameter("SPEED_FINGER_A", &param);
      SetParameter("SPEED_FINGER_B", &param);
      SetParameter("SPEED_FINGER_C", &param);
      SetParameter("SPEED_SCISSOR", &param);
      param=100;
      SetParameter("FORCE_FINGER_A", &param);
      SetParameter("FORCE_FINGER_B", &param);
      SetParameter("FORCE_FINGER_C", &param);
      SetParameter("FORCE_SCISSOR", &param);
      param=240;
      SetParameter("POSITION_SCISSOR", &param);
      param=0;
      SetParameter("POSITION_FINGER_A", &param);
      param=30;
      SetParameter("POSITION_FINGER_B", &param);
      SetParameter("POSITION_FINGER_C", &param);
      SetTool (0.9);
    }
    else if (strcmp(targetID, "gripper_bottom_cover") == 0)
    {
      param = 1;
      SetParameter("ADVANCED_CONTROL", &param);
      SetParameter("SCISSOR_CONTROL", &param);
      param=100;
      SetParameter("SPEED_FINGER_A", &param);
      SetParameter("SPEED_FINGER_B", &param);
      SetParameter("SPEED_FINGER_C", &param);
      SetParameter("SPEED_SCISSOR", &param);
      param=100;
      SetParameter("FORCE_FINGER_A", &param);
      SetParameter("FORCE_FINGER_B", &param);
      SetParameter("FORCE_FINGER_C", &param);
      SetParameter("FORCE_SCISSOR", &param);
      param=180;
      SetParameter("POSITION_SCISSOR", &param);
      param=0;
      SetParameter("POSITION_FINGER_A", &param);
      param=30;
      SetParameter("POSITION_FINGER_B", &param);
      SetParameter("POSITION_FINGER_C", &param);
      SetTool (0.9);
    }
    else if (strcmp(targetID, "gripper_finger_test_a") == 0)
    {
      param = 1;
      SetParameter("ADVANCED_CONTROL", &param);
      SetParameter("SCISSOR_CONTROL", &param);
      param=100;
      SetParameter("SPEED_FINGER_A", &param);
      SetParameter("SPEED_FINGER_B", &param);
      SetParameter("SPEED_FINGER_C", &param);
      SetParameter("SPEED_SCISSOR", &param);
      param=100;
      SetParameter("FORCE_FINGER_A", &param);
      SetParameter("FORCE_FINGER_B", &param);
      SetParameter("FORCE_FINGER_C", &param);
      SetParameter("FORCE_SCISSOR", &param);
      param=180;
      SetParameter("POSITION_SCISSOR", &param);
      param=0;
      SetParameter("POSITION_FINGER_A", &param);
      param=30;
      SetParameter("POSITION_FINGER_B", &param);
      SetParameter("POSITION_FINGER_C", &param);
      SetTool (0.9);
    }
      else if (strcmp(targetID, "gripper_finger_test_b") == 0)
    {
      param = 1;
      SetParameter("ADVANCED_CONTROL", &param);
      SetParameter("SCISSOR_CONTROL", &param);
      param=100;
      SetParameter("SPEED_FINGER_A", &param);
      SetParameter("SPEED_FINGER_B", &param);
      SetParameter("SPEED_FINGER_C", &param);
      SetParameter("SPEED_SCISSOR", &param);
      param=100;
      SetParameter("FORCE_FINGER_A", &param);
      SetParameter("FORCE_FINGER_B", &param);
      SetParameter("FORCE_FINGER_C", &param);
      SetParameter("FORCE_SCISSOR", &param);
      param=180;
      SetParameter("POSITION_SCISSOR", &param);
      param=0;
      SetParameter("POSITION_FINGER_A", &param);
      param=30;
      SetParameter("POSITION_FINGER_B", &param);
      SetParameter("POSITION_FINGER_C", &param);
      SetTool (0.9);
    }
    else if (strcmp(targetID, "gripper_finger_test_c") == 0)
    {
      param = 1;
      SetParameter("ADVANCED_CONTROL", &param);
      SetParameter("SCISSOR_CONTROL", &param);
      param=100;
      SetParameter("SPEED_FINGER_A", &param);
      SetParameter("SPEED_FINGER_B", &param);
      SetParameter("SPEED_FINGER_C", &param);
      SetParameter("SPEED_SCISSOR", &param);
      param=100;
      SetParameter("FORCE_FINGER_A", &param);
      SetParameter("FORCE_FINGER_B", &param);
      SetParameter("FORCE_FINGER_C", &param);
      SetParameter("FORCE_SCISSOR", &param);
      param=180;
      SetParameter("POSITION_SCISSOR", &param);
      param=0;
      SetParameter("POSITION_FINGER_A", &param);
      param=30;
      SetParameter("POSITION_FINGER_B", &param);
      SetParameter("POSITION_FINGER_C", &param);
      SetTool (0.9);
    }
    else
    {
      return CANON_FAILURE;
    }
    strcpy (configName, targetID);

    return CANON_SUCCESS;
  }