当前位置: 首页>>代码示例>>C#>>正文


C# StructuredText.Get方法代码示例

本文整理汇总了C#中StructuredText.Get方法的典型用法代码示例。如果您正苦于以下问题:C# StructuredText.Get方法的具体用法?C# StructuredText.Get怎么用?C# StructuredText.Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在StructuredText的用法示例。


在下文中一共展示了StructuredText.Get方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Deserialize

 public void Deserialize(LocalShellParameter tp, StructuredText node)
 {
     base.Deserialize(tp, node);
     tp.Home = node.Get("home", CygwinUtil.DefaultHome);
     tp.ShellName = node.Get("shellName", CygwinUtil.DefaultShell);
     tp.CygwinDir = node.Get("cygwin-directory", CygwinUtil.DefaultCygwinDir);
 }
开发者ID:poderosaproject,项目名称:poderosa,代码行数:7,代码来源:TerminalParameterSerialize.cs

示例2: Deserialize

        public object Deserialize(StructuredText node) {
            TerminalSettings ts = new TerminalSettings();
            ts.BeginUpdate();

            ts.Encoding = ParseEncodingType(node.Get("encoding", ""), EncodingType.ISO8859_1);
            ts.TerminalType = ParseUtil.ParseEnum<TerminalType>(node.Get("terminal-type"), TerminalType.XTerm);
            ts.LocalEcho = ParseUtil.ParseBool(node.Get("localecho"), false);
            ts.LineFeedRule = ParseUtil.ParseEnum<LineFeedRule>(node.Get("linefeedrule"), LineFeedRule.Normal);
            ts.TransmitNL = ParseUtil.ParseEnum<NewLine>(node.Get("transmit-nl"), NewLine.CR);
            ts.EnabledCharTriggerIntelliSense = ParseUtil.ParseBool(node.Get("char-trigger-intellisense"), false);
            string shellscheme = node.Get("shellscheme", ShellSchemeCollection.DEFAULT_SCHEME_NAME);
            if (shellscheme.Length > 0)
                ts.SetShellSchemeName(shellscheme);
            ts.Caption = node.Get("caption", "");
#if !UNITTEST
            //現在テストではRenderProfileは対象外
            StructuredText rp = node.FindChild(typeof(RenderProfile).FullName);
            if (rp != null)
                ts.RenderProfile = _serializeService.Deserialize(rp) as RenderProfile;
#endif
            ts.EndUpdate();
            return ts;
        }
开发者ID:Ricordanza,项目名称:poderosa,代码行数:23,代码来源:TerminalSettingsSerialize.cs

示例3: Deserialize

        public object Deserialize(StructuredText node) {
            PipeTerminalParameter tp = new PipeTerminalParameter();

            tp.ExeFilePath = node.Get("exeFilePath", null);
            tp.CommandLineOptions = node.Get("commandLineOptions", null);
            List<PipeTerminalParameter.EnvironmentVariable> envList = new List<PipeTerminalParameter.EnvironmentVariable>();
            foreach (StructuredText s in node.FindMultipleNote("environmentVariable")) {
                string name = s.Get("name", null);
                string value = s.Get("value", null);
                if (name != null && value != null) {
                    envList.Add(new PipeTerminalParameter.EnvironmentVariable(name, value));
                }
            }
            tp.EnvironmentVariables = (envList.Count > 0) ? envList.ToArray() : null;
            tp.InputPipePath = node.Get("inputPipePath", null);
            tp.OutputPipePath = node.Get("outputPipePath", null);
            tp.SetTerminalName(node.Get("terminal-type", "vt100"));
            tp.AutoExecMacroPath = node.Get("autoexec-macro", null);
            return tp;
        }
开发者ID:Ricordanza,项目名称:poderosa,代码行数:20,代码来源:PipeTerminalParameterSerializer.cs

示例4: GetBoolValue

 private bool GetBoolValue(StructuredText node, string key, bool defaultValue)
 {
     string str = node.Get(key);
     if (str != null) {
         bool val;
         if (Boolean.TryParse(str, out val)) {
             return val;
         }
     }
     return defaultValue;
 }
开发者ID:poderosaproject,项目名称:poderosa,代码行数:11,代码来源:TerminalParameterSerialize.cs

示例5: Deserialize

 public object Deserialize(StructuredText node) {
     SerialTerminalParam tp = new SerialTerminalParam();
     if (node.Get("Port") != null) {
         // accept old parameter.
         // "PortName" setting overwrites this setting.
         tp.PortName = "COM" + node.Get("Port");
     }
     tp.PortName = node.Get("PortName", tp.PortName);
     tp.SetTerminalName(node.Get("TerminalType", "vt100"));
     tp.AutoExecMacroPath = node.Get("autoexec-macro", null);
     return tp;
 }
开发者ID:Ricordanza,项目名称:poderosa,代码行数:12,代码来源:SerialSettings.cs

示例6: Deserialize

 public object Deserialize(StructuredText node)
 {
     SerialTerminalParam tp = new SerialTerminalParam();
     tp.Port = ParseUtil.ParseInt(node.Get("Port"), 1);
     tp.SetTerminalName(node.Get("TerminalType", "vt100"));
     tp.AutoExecMacroPath = node.Get("autoexec-macro", null);
     return tp;
 }
开发者ID:VirusFree,项目名称:Poderosa,代码行数:8,代码来源:SerialSettings.cs

示例7: LoadFrom

 public void LoadFrom(StructuredText node) {
     Init();
     foreach (Tag tag in _data) {
         string key_description = node.Get(tag.Command.CommandID);
         Keys key = key_description == null ? tag.Command.DefaultShortcutKey : WinFormsUtil.ParseKey(key_description.Split('+'));
         tag.Key = key;
         if (key != Keys.None)
             _keyToTag.Add(key, tag);
     }
 }
开发者ID:Ricordanza,项目名称:poderosa,代码行数:10,代码来源:CommandManager.cs

示例8: GetIntValue

 private int GetIntValue(StructuredText node, string key, int defaultValue)
 {
     string str = node.Get(key);
     if (str != null) {
         int val;
         if (Int32.TryParse(str, out val)) {
             return val;
         }
     }
     return defaultValue;
 }
开发者ID:poderosaproject,项目名称:poderosa,代码行数:11,代码来源:TerminalParameterSerialize.cs

示例9: Deserialize

 public void Deserialize(SSHSubsystemParameter tp, StructuredText node)
 {
     base.Deserialize(tp, node);
     tp.SubsystemName = node.Get("subsystemName", "");
 }
开发者ID:FNKGino,项目名称:poderosa,代码行数:5,代码来源:TerminalParameterSerialize.cs

示例10: Deserialize

        public object Deserialize(StructuredText storage)
        {
            RenderProfile prof = new RenderProfile();
            prof.FontName = storage.Get("font-name", "Courier New");
            prof.CJKFontName = storage.Get("cjk-font-name",
                               storage.Get("japanese-font-name",
                               storage.Get("chinese-font-name", "Courier New")));
            prof.FontSize = ParseUtil.ParseFloat(storage.Get("font-size"), 10.0f);
            prof.LineSpacing = ParseUtil.ParseInt(storage.Get("line-spacing"), 0);
            prof.UseClearType = ParseUtil.ParseBool(storage.Get("clear-type"), false);
            prof.EnableBoldStyle = ParseUtil.ParseBool(storage.Get("enable-bold-style"), true);
            prof.ForceBoldStyle = ParseUtil.ParseBool(storage.Get("force-bold-style"), false);
            prof.ForeColor = ParseUtil.ParseColor(storage.Get("text-color"), Color.FromKnownColor(KnownColor.WindowText));
            prof.BackColor = ParseUtil.ParseColor(storage.Get("back-color"), Color.FromKnownColor(KnownColor.Window));
            prof.ImageStyle = ParseUtil.ParseEnum<ImageStyle>(storage.Get("back-style"), ImageStyle.Center);
            prof.BackgroundImageFileName = storage.Get("back-image", "");

            prof.ESColorSet = new EscapesequenceColorSet();
            string escolor = storage.Get("escape-sequence-color");
            if (escolor != null)
                prof.ESColorSet.Load(escolor);
            prof.DarkenEsColorForBackground = ParseUtil.ParseBool(storage.Get("darken-escolor-for-background"), true);

            return prof;
        }
开发者ID:FNKGino,项目名称:poderosa,代码行数:25,代码来源:RenderProfileSerialize.cs


注:本文中的StructuredText.Get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。