internal static Version ConvertLanguageVersion(LangVersion ver) { switch (ver) { case LangVersion.ISO_1: return(new Version(1, 0, 0, 0)); case LangVersion.ISO_2: return(new Version(2, 0, 0, 0)); case LangVersion.Version3: return(new Version(3, 0, 0, 0)); case LangVersion.Version4: return(new Version(4, 0, 0, 0)); case LangVersion.Version5: return(new Version(5, 0, 0, 0)); case LangVersion.Version6: return(new Version(6, 0, 0, 0)); case LangVersion.Default: break; } return(new Version(6, 0, 0, 0));; }
static string GetLangString (LangVersion ver) { switch (ver) { case LangVersion.Default: return "Default"; case LangVersion.ISO_1: return "ISO-1"; case LangVersion.ISO_2: return "ISO-2"; } return "Default"; }
public override void CopyFrom(ItemConfiguration config) { var LuaConfig = config as LuaConfiguration; if (LuaConfig == null) { throw new ArgumentException("Not a Lua configuration", "config"); } base.CopyFrom(config); _MainFile = LuaConfig._MainFile; _InterpreterArgs = LuaConfig._InterpreterArgs; _LangVersion = LuaConfig._LangVersion; }
static Mono.CSharp.LanguageVersion ConvertLanguageVersion(LangVersion ver) { switch (ver) { case LangVersion.Default: return(Mono.CSharp.LanguageVersion.Default); case LangVersion.ISO_1: return(Mono.CSharp.LanguageVersion.ISO_1); case LangVersion.ISO_2: return(Mono.CSharp.LanguageVersion.ISO_2); } return(Mono.CSharp.LanguageVersion.Default); }
static Version ConvertLanguageVersion(LangVersion ver) { switch (ver) { case LangVersion.Default: return(new Version(4, 0, 0, 0)); case LangVersion.ISO_1: return(new Version(1, 0, 0, 0)); case LangVersion.ISO_2: return(new Version(2, 0, 0, 0)); } return(new Version(4, 0, 0, 0));; }
/// <summary> /// 取得语言包最新版本号及其内容 /// </summary> /// <param name="strType"></param> /// <returns></returns> public static LangVersion GetLangVersion(string strType) { try { LangVersion langVersion = factory.GetLangVersion(strType); return(langVersion); } catch (Exception ex) { LogHelper.WriteLog(new Log() { message = ex.Message }, "GetLangVersion"); return(null); } }
/// <summary> /// 取得语言包最新版本号及其内容 /// </summary> /// <param name="strType"></param> /// <returns></returns> public LangVersion GetLangVersion(string strType) { string strSql = " SELECT APPNAME " + " , VERSIONGUID " + " FROM LANGVERSION " + " WHERE APPNAME = '{0}' "; LangVersion langVersion = SqlServerHelper.GetEntity <LangVersion>(SqlServerHelper.salesorderConn(), string.Format(strSql, strType)); if (langVersion == null) { return(null); } langVersion.lstLangMast = GetLangMast(strType); return(langVersion); }
protected virtual LuaExecutionCommand CreateExecutionCommand(ConfigurationSelector config_sel, LuaConfiguration configuration) { LangVersion vers = configuration.LangVersion; FilePath LuaPath = GetLuaPath(vers); string arguments = "\"" + configuration.MainFile + "\" " + configuration.CommandLineParameters; var command = new LuaExecutionCommand(LuaPath) { Arguments = arguments, WorkingDirectory = BaseDirectory, EnvironmentVariables = configuration.GetParsedEnvironmentVariables(), Configuration = configuration }; return(command); }
internal static string TryLangVersionToString(LangVersion value) { switch (value) { case LangVersion.Default: return("Default"); case LangVersion.ISO_1: return("ISO-1"); case LangVersion.ISO_2: return("ISO-2"); case LangVersion.Version3: return("3"); case LangVersion.Version4: return("4"); case LangVersion.Version5: return("5"); default: return(null); } }
static FilePath GetLuaPath(LangVersion ver) { switch (ver) { case LangVersion.Lua: return((FilePath)PropertyService.Get <string>("Lua.DefaultInterpreterPath")); case LangVersion.Lua51: return((FilePath)PropertyService.Get <string>("Lua.51InterpreterPath")); case LangVersion.Lua52: return((FilePath)PropertyService.Get <string>("Lua.52InterpreterPath")); case LangVersion.LuaJIT: return((FilePath)PropertyService.Get <string>("Lua.JITInterpreterPath")); } return(null); }
public override void CopyFrom(ItemConfiguration config) { var pyConfig = config as PythonConfiguration; if (pyConfig == null) { throw new ArgumentException("Not a python configuration", "item"); } base.CopyFrom(config); mainModule = pyConfig.mainModule; extraPaths = pyConfig.ExtraPaths; interpreterArgs = pyConfig.interpreterArgs; langVersion = pyConfig.langVersion; optimize = pyConfig.optimize; showExceptionDetails = pyConfig.showExceptionDetails; showClrExceptions = pyConfig.showClrExceptions; warnInconsistentTabbing = pyConfig.warnInconsistentTabbing; }
/// <summary> /// 检查是否需要更新语言包 /// </summary> /// <param name="appName"></param> /// <param name="guid"></param> /// <returns></returns> public bool CheckLangVersion(string appName, string guid) { if (string.IsNullOrWhiteSpace(guid)) { return(true); } string strSql = " SELECT VERSIONGUID " + " FROM LANGVERSION " + " WHERE APPNAME = '{0}' "; LangVersion langVersion = SqlServerHelper.GetEntity <LangVersion>(SqlServerHelper.salesorderConn(), string.Format(strSql, appName)); if (langVersion == null) { return(false); } return(!guid.Equals(langVersion.versionGuid)); }
internal static Microsoft.CodeAnalysis.CSharp.LanguageVersion ConvertLanguageVersion (LangVersion ver) { switch (ver) { case LangVersion.ISO_1: return Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp1; case LangVersion.ISO_2: return Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp2; case LangVersion.Version3: return Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp3; case LangVersion.Version4: return Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp4; case LangVersion.Version5: return Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp5; case LangVersion.Version6: return Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp6; case LangVersion.Default: break; } return Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp6; }
internal static string TryLangVersionToString (LangVersion value) { switch (value) { case LangVersion.Default: return "Default"; case LangVersion.ISO_1: return "ISO-1"; case LangVersion.ISO_2: return "ISO-2"; case LangVersion.Version3: return "3"; case LangVersion.Version4: return "4"; case LangVersion.Version5: return "5"; case LangVersion.Version6: return "6"; default: return null; } }
internal static Microsoft.CodeAnalysis.CSharp.LanguageVersion ConvertLanguageVersion(LangVersion ver) { switch (ver) { case LangVersion.ISO_1: return(Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp1); case LangVersion.ISO_2: return(Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp2); case LangVersion.Version3: return(Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp3); case LangVersion.Version4: return(Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp4); case LangVersion.Version5: return(Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp5); case LangVersion.Version6: return(Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp6); case LangVersion.Default: break; } return(Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp6); }
public bool Equals(Asp330Device that) { if (that is null) { return(false); } if (ReferenceEquals(this, that)) { return(true); } if (!Asp330TestId.Equals(that.Asp330TestId)) { return(false); } if (!Asp330Sn.Equals(that.Asp330Sn)) { return(false); } if (!Asp330Model.Equals(that.Asp330Model)) { return(false); } if (!SamSn.Equals(that.SamSn)) { return(false); } if (!LcdContrast.Equals(that.LcdContrast)) { return(false); } if (!CpuSn.Equals(that.CpuSn)) { return(false); } if (!UimSn.Equals(that.UimSn)) { return(false); } if (!PimSn.Equals(that.PimSn)) { return(false); } if (!Asp330Firmware.Equals(that.Asp330Firmware)) { return(false); } if (!BootVersion.Equals(that.BootVersion)) { return(false); } if (!LangVersion.Equals(that.LangVersion)) { return(false); } if (!ConfigVersion.Equals(that.ConfigVersion)) { return(false); } if (!ConfigFileNumber.Equals(that.ConfigFileNumber)) { return(false); } if (!Note.Equals(that.Note)) { return(false); } if (!ResultCheckBox.Equals(that.ResultCheckBox)) { return(false); } return(true); }
public void Store(ItemConfigurationCollection <ItemConfiguration> configs) { int codePage; CompileTarget compileTarget = (CompileTarget)compileTargetCombo.Active; LangVersion langVersion = (LangVersion)langVerCombo.Active; if (codepageEntry.Entry.Text.Length > 0) { // Get the codepage. If the user specified an encoding name, find it. int trialCodePage = -1; foreach (TextEncoding e in TextEncoding.SupportedEncodings) { if (e.Id == codepageEntry.Entry.Text) { trialCodePage = e.CodePage; break; } } if (trialCodePage != -1) { codePage = trialCodePage; } else { if (!int.TryParse(codepageEntry.Entry.Text, out trialCodePage)) { return; } codePage = trialCodePage; } } else { codePage = 0; } project.CompileTarget = compileTarget; CSharpProjectParameters projectParameters = (CSharpProjectParameters)project.LanguageParameters; projectParameters.CodePage = codePage; if (iconEntry.Sensitive) { projectParameters.Win32Icon = iconEntry.Path; } if (mainClassEntry.Sensitive) { projectParameters.MainClass = mainClassEntry.Entry.Text; } foreach (DotNetProjectConfiguration configuration in configs) { CSharpCompilerParameters compilerParameters = (CSharpCompilerParameters)configuration.CompilationParameters; compilerParameters.UnsafeCode = allowUnsafeCodeCheckButton.Active; compilerParameters.LangVersion = langVersion; } }
public override void CopyFrom(ItemConfiguration config) { var pyConfig = config as PythonConfiguration; if (pyConfig == null) throw new ArgumentException ("Not a python configuration", "item"); base.CopyFrom (config); mainModule = pyConfig.mainModule; extraPaths = pyConfig.ExtraPaths; interpreterArgs = pyConfig.interpreterArgs; langVersion = pyConfig.langVersion; optimize = pyConfig.optimize; showExceptionDetails = pyConfig.showExceptionDetails; showClrExceptions = pyConfig.showClrExceptions; warnInconsistentTabbing = pyConfig.warnInconsistentTabbing; }