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


C# Section.GetValue方法代码示例

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


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

示例1: RepositoryLink

        public RepositoryLink(Section section)
        {
            Verify.Argument.IsNotNull(section, "section");

            _path = section.GetValue("Path", string.Empty);
            _type = section.GetValue("Type", string.Empty);
            _description = section.GetValue("Description", string.Empty);
        }
开发者ID:Kuzq,项目名称:gitter,代码行数:8,代码来源:RepositoryLink.cs

示例2: SelectableFont

        public SelectableFont(string id, string name, Section section)
        {
            Verify.Argument.IsNeitherNullNorWhitespace(name, "name");
            Verify.Argument.IsNotNull(section, "section");

            var fontName	= section.GetValue<string>("Name", null);
            var size		= section.GetValue<float>("Size", 0);
            var style		= section.GetValue<FontStyle>("Style", FontStyle.Regular);

            Verify.Argument.IsTrue(fontName != null, "section", "Section does not contain a valid font name.");
            Verify.Argument.IsTrue(size > 0, "section", "Section contains invalid font size.");

            _font	= new Font(fontName, size, style, GraphicsUnit.Point);
            _id		= id;
            _name	= name;
        }
开发者ID:Kuzq,项目名称:gitter,代码行数:16,代码来源:SelectableFont.cs

示例3: TryLoadGroupFrom

        private static RepositoryGroup TryLoadGroupFrom(Section section)
        {
            Assert.IsNotNull(section);

            var name = section.GetValue<string>("Name", string.Empty);
            if(string.IsNullOrWhiteSpace(name))
            {
                return null;
            }
            var group = new RepositoryGroup(name.Trim());
            LoadGroupContent(group, section);
            return group;
        }
开发者ID:Kuzq,项目名称:gitter,代码行数:13,代码来源:RepositoryManagerService.cs

示例4: LoadFrom

        public void LoadFrom(Section section)
        {
            Verify.Argument.IsNotNull(section, "section");

            var name	= section.GetValue<string>("Name", null);
            var size	= section.GetValue<float>("Size", 0);
            var style	= section.GetValue<FontStyle>("Name", FontStyle.Regular);

            Assert.IsNeitherNullNorWhitespace(name);
            Assert.BoundedDoubleInc(0, size, 100);

            if(_font.Name != name || _font.Size != size || _font.Style != style)
            {
                Font font = null;
                try
                {
                    font = new Font(name, size, style, GraphicsUnit.Point);
                }
                catch(Exception exc)
                {
                    if(exc.IsCritical())
                    {
                        throw;
                    }
                }
                if(font != null)
                {
                    _font = font;
                }
                Changed.Raise(this);
            }
        }
开发者ID:Kuzq,项目名称:gitter,代码行数:32,代码来源:SelectableFont.cs

示例5: LoadMoreFrom

 protected override void LoadMoreFrom(Section section)
 {
     base.LoadMoreFrom(section);
     AlignToGraph = section.GetValue("AlignToGraph", AlignToGraph);
     ShowLocalBranches = section.GetValue("ShowLocalBranches", ShowLocalBranches);
     ShowRemoteBranches = section.GetValue("ShowRemoteBranches", ShowRemoteBranches);
     ShowTags = section.GetValue("ShowTags", ShowTags);
     ShowStash = section.GetValue("ShowStash", ShowStash);
 }
开发者ID:Kuzq,项目名称:gitter,代码行数:9,代码来源:SubjectColumn.cs

示例6: LoadMoreFrom

 protected override void LoadMoreFrom(Section section)
 {
     base.LoadMoreFrom(section);
     Abbreviate = section.GetValue("Abbreviate", Abbreviate);
 }
开发者ID:Kuzq,项目名称:gitter,代码行数:5,代码来源:HashColumn.cs

示例7: ViewEntry

            public ViewEntry(Section section)
            {
                Verify.Argument.IsNotNull(section, "section");

                _guid = section.GetValue<Guid>("Guid");
            }
开发者ID:Kuzq,项目名称:gitter,代码行数:6,代码来源:ViewLayout.cs

示例8: LoadFrom

        public void LoadFrom(Section section)
        {
            Verify.Argument.IsNotNull(section, "section");

            IsVisible = section.GetValue("Visible", _isVisible);
            if(_sizeMode != ColumnSizeMode.Fill)
            {
                Width = section.GetValue("Width", _width);
            }
            LoadMoreFrom(section);
        }
开发者ID:Kuzq,项目名称:gitter,代码行数:11,代码来源:CustomListBoxColumn.cs

示例9: HostEntry

            public HostEntry(Section section)
                : this()
            {
                Verify.Argument.IsNotNull(section, "section");

                _isRoot = section.GetValue<bool>("IsRoot");
                _isDocumentWell = section.GetValue<bool>("IsDocumentHost");
                var tools = section.GetSection("Views");
                foreach(var t in tools.Sections)
                {
                    _views.Add(new ViewEntry(t));
                }
            }
开发者ID:Kuzq,项目名称:gitter,代码行数:13,代码来源:ViewLayout.cs

示例10: FloatEntry

            public FloatEntry(Section section)
            {
                Verify.Argument.IsNotNull(section, "section");

                _bounds = section.GetValue<Rectangle>("Bounds");
                _root = ToLayout(section.GetSection("Root"));
            }
开发者ID:Kuzq,项目名称:gitter,代码行数:7,代码来源:ViewLayout.cs

示例11: ToLayout

        private static ILayoutBase ToLayout(Section section)
        {
            Verify.Argument.IsNotNull(section, "section");

            switch(section.GetValue<string>("Type"))
            {
                case "Split":
                    return new SplitEntry(section);
                case "Host":
                    return new HostEntry(section);
                default:
                    throw new ArgumentException("section");
            }
        }
开发者ID:Kuzq,项目名称:gitter,代码行数:14,代码来源:ViewLayout.cs

示例12: LoadMoreFrom

 protected override void LoadMoreFrom(Section section)
 {
     base.LoadMoreFrom(section);
     DateFormat = section.GetValue("DateFormat", DateFormat);
 }
开发者ID:Kuzq,项目名称:gitter,代码行数:5,代码来源:DateColumn.cs

示例13: LoadMoreFrom

 protected override void LoadMoreFrom(Section section)
 {
     base.LoadMoreFrom(section);
     ShowColors = section.GetValue("ShowColors", ShowColors);
 }
开发者ID:Kuzq,项目名称:gitter,代码行数:5,代码来源:GraphColumn.cs

示例14: LoadMoreViewFrom

        protected override void LoadMoreViewFrom(Section section)
        {
            base.LoadMoreViewFrom(section);

            _toolbar.TreeModeButton.Checked = _treeMode = section.GetValue<bool>("TreeMode", true);
            var stagedListSection = section.TryGetSection("StagedList");
            if(stagedListSection != null)
            {
                _lstStaged.LoadViewFrom(stagedListSection);
            }
            var unstagedListSection = section.TryGetSection("UnstagedList");
            if(unstagedListSection != null)
            {
                _lstUnstaged.LoadViewFrom(unstagedListSection);
            }
        }
开发者ID:Kuzq,项目名称:gitter,代码行数:16,代码来源:CommitView.cs

示例15: LoadFor

        public bool LoadFor(IWorkingEnvironment environment, Section section)
        {
            Verify.Argument.IsNotNull(environment, "environment");

            if(section != null)
            {
                var providerName = section.GetValue<string>("AccessorProvider", string.Empty);
                if(!string.IsNullOrWhiteSpace(providerName))
                {
                    ActiveGitAccessorProvider = GitAccessorProviders.FirstOrDefault(
                        prov => prov.Name == providerName);
                }
                if(ActiveGitAccessorProvider == null)
                {
                    ActiveGitAccessorProvider = GitAccessorProviders.First();
                }
                var gitAccessorSection = section.TryGetSection(ActiveGitAccessorProvider.Name);
                if(gitAccessorSection != null)
                {
                    GitAccessor.LoadFrom(gitAccessorSection);
                }
            }
            else
            {
                ActiveGitAccessorProvider = GitAccessorProviders.First();
            }
            Version gitVersion;
            try
            {
                gitVersion = _gitAccessor.GitVersion;
            }
            catch(Exception exc)
            {
                if(exc.IsCritical())
                {
                    throw;
                }
                gitVersion = null;
            }
            if(gitVersion == null || gitVersion < MinimumRequiredGitVersion)
            {
                using(var dlg = new VersionCheckDialog(environment, this, MinimumRequiredGitVersion, gitVersion))
                {
                    dlg.Run(environment.MainForm);
                    gitVersion = dlg.InstalledVersion;
                    if(gitVersion == null || gitVersion < _minVersion)
                    {
                        return false;
                    }
                }
            }
            GlobalOptions.RegisterPropertyPageFactory(
                new PropertyPageFactory(
                    GitOptionsPage.Guid,
                    Resources.StrGit,
                    null,
                    PropertyPageFactory.RootGroupGuid,
                    env => new GitOptionsPage(env)));
            GlobalOptions.RegisterPropertyPageFactory(
                new PropertyPageFactory(
                    ConfigurationPage.Guid,
                    Resources.StrConfig,
                    null,
                    GitOptionsPage.Guid,
                    env => new ConfigurationPage(env)));
            _environment = environment;
            _configSection = section;
            return true;
        }
开发者ID:Kuzq,项目名称:gitter,代码行数:69,代码来源:RepositoryProvider.cs


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