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


C# Config.LoadFile方法代码示例

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


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

示例1: GraphicString

 /// <summary>
 /// gfファイル用
 /// </summary>
 /// <param name="h">gfパス</param>
 public GraphicString(string h)
 {
     Config cf = new Config();
     cf.LoadFile(h);
     CharacterWidth = (double)cf["Font#CharacterSize"][0];
     CharacterHeight = (double)cf["Font#CharacterSize"][1];
     var t = new int[256];
     var fp = Path.GetDirectoryName(Path.GetFullPath(h));
     DX.LoadDivGraph(Path.Combine(fp, cf["Font#File"].StringValue), 256, 16, 16, (int)CharacterWidth, (int)CharacterHeight, out t[0]);
     CharacterHandles = t;
     Transparency = 1.0;
 }
开发者ID:kb10uy,项目名称:Kb10uy,代码行数:16,代码来源:Base.cs

示例2: LoadMessages

        private void LoadMessages(string file)
        {
            LanguageSetting = new Config();
            LanguageSetting.LoadFile(file);
            MessageStateYou = LanguageSetting["Kbtter.Message.FollowState.You"].StringValue;
            MessageStateFFed = LanguageSetting["Kbtter.Message.FollowState.FFed"].StringValue;
            MessageStateBlocking = LanguageSetting["Kbtter.Message.FollowState.Blocking"].StringValue;
            MessageStateBlocked = LanguageSetting["Kbtter.Message.FollowState.Blocked"].StringValue;
            MessageStateFollowing = LanguageSetting["Kbtter.Message.FollowState.Following"].StringValue;
            MessageStateFollowed = LanguageSetting["Kbtter.Message.FollowState.Followed"].StringValue;
            MessageStateNone = LanguageSetting["Kbtter.Message.FollowState.None"].StringValue;

            MessageFollowButtonYou = LanguageSetting["Kbtter.Message.FollowButton.You"].StringValue;
            MessageFollowButtonFollow = LanguageSetting["Kbtter.Message.FollowButton.Follow"].StringValue;
            MessageFollowButtonUnfollow = LanguageSetting["Kbtter.Message.FollowButton.Unfollow"].StringValue;
            MessageFollowButtonUnblock = LanguageSetting["Kbtter.Message.FollowButton.Unblock"].StringValue;
            MessageFollowButtonCantFollow = LanguageSetting["Kbtter.Message.FollowButton.Can'tFollow"].StringValue;

            MessageInfoUserFormat = LanguageSetting["Kbtter.Message.Infomation.UserFormat"].StringValue;
            MessageInfoRetweetFormat = LanguageSetting["Kbtter.Message.Infomation.RetweetFormat"].StringValue;
            MessageInfoDeleted = LanguageSetting["Kbtter.Message.Infomation.Deleted"].StringValue;
            MessageInfoRetweetButtonText = LanguageSetting["Kbtter.Message.Infomation.Buttons.Retweet"].StringValue;
            MessageInfoFavoriteButtonText = LanguageSetting["Kbtter.Message.Infomation.Buttons.Favorite"].StringValue;
            MessageInfoDescriptionButtonText = LanguageSetting["Kbtter.Message.Infomation.Buttons.Description"].StringValue;
            MessageInfoDeleteButtonText = LanguageSetting["Kbtter.Message.Infomation.Buttons.Delete"].StringValue;
            MessageInfoNotifyRetweet = LanguageSetting["Kbtter.Message.Infomation.Notify.Retweet"].StringValue;
            MessageInfoNotifyDelete = LanguageSetting["Kbtter.Message.Infomation.Notify.Delete"].StringValue;

            MessageHeaderSearchResultFormat = LanguageSetting["Kbtter.Message.Header.SearchResultFormat"].StringValue;
            MessageHeaderUserTweetsFormat = LanguageSetting["Kbtter.Message.Header.UserTweetsFormat"].StringValue;
            MessageHeaderUserFollowingFormat = LanguageSetting["Kbtter.Message.Header.UserFollowingFormat"].StringValue;
            MessageHeaderUserFollowerFormat = LanguageSetting["Kbtter.Message.Header.UserFollowerFormat"].StringValue;
            MessageHeaderUserFavoritesFormat = LanguageSetting["Kbtter.Message.Header.UserFavoritesFormat"].StringValue;

            MessageMentionFavoritedFormat = LanguageSetting["Kbtter.Message.Mention.FavoritedFormat"].StringValue;
            MessageMentionUnfavoritedFormat = LanguageSetting["Kbtter.Message.Mention.UnfavoritedFormat"].StringValue;
            MessageMentionRetweetedFormat = LanguageSetting["Kbtter.Message.Mention.RetweetedFormat"].StringValue;

            MessageDMReceivedFormat = LanguageSetting["Kbtter.Message.DM.ReceivedFormat"].StringValue;

            MessagePluginLoadingErrorText = LanguageSetting["Kbtter.Message.Plugin.LoadingError.Text"].StringValue;
            MessagePluginLoadingErrorCaption = LanguageSetting["Kbtter.Message.Plugin.LoadingError.Caption"].StringValue;

            //UI要素

            AB_Search.Text = LanguageSetting["Kbtter.UI.AccessBar.Search"].StringValue;
            AB_EasyTweet.Text = LanguageSetting["Kbtter.UI.AccessBar.EasyTweet"].StringValue;

            UV_Tweet.Content = LanguageSetting["Kbtter.UI.UserView.Tweet"].StringValue;
            UVTweets.Content = LanguageSetting["Kbtter.UI.UserView.UserTweets"].StringValue;
            UVFollowing.Content = LanguageSetting["Kbtter.UI.UserView.UserFollowing"].StringValue;
            UVFollowed.Content = LanguageSetting["Kbtter.UI.UserView.UserFollowed"].StringValue;
            UVFavorites.Content = LanguageSetting["Kbtter.UI.UserView.UserFavorites"].StringValue;

            MT_Timeline.Header = LanguageSetting["Kbtter.UI.MainTab.Timeline"].StringValue;
            MT_Mention.Header = LanguageSetting["Kbtter.UI.MainTab.Mention"].StringValue;
        }
开发者ID:kb10uy,项目名称:Kbtter,代码行数:57,代码来源:MainWindow.Logic.cs

示例3: NineSlice

        /// <summary>
        /// 指定のファイル名の情報を元に、
        /// 9sliceオブジェクトを作成します。
        /// </summary>
        /// <param name="path">9sliceの定義ファイル</param>
        public NineSlice(string path)
        {
            Transparency = 1.0;
            SliceHandles = new int[9];
            SliceRegions = new Region[9];

            Config cf = new Config();
            cf.LoadFile(path);
            var fp = Path.GetDirectoryName(Path.GetFullPath(path));
            GraphicHandle = DX.LoadGraph(Path.Combine(fp, cf["9Slice#File"].StringValue));
            SliceRegions[0] = new Region((double)cf["9Slice#TLSlice"][0], (double)cf["9Slice#TLSlice"][1], (double)cf["9Slice#TLSlice"][2], (double)cf["9Slice#TLSlice"][3]);
            SliceRegions[1] = new Region((double)cf["9Slice#TSlice"][0], (double)cf["9Slice#TSlice"][1], (double)cf["9Slice#TSlice"][2], (double)cf["9Slice#TSlice"][3]);
            SliceRegions[2] = new Region((double)cf["9Slice#TRSlice"][0], (double)cf["9Slice#TRSlice"][1], (double)cf["9Slice#TRSlice"][2], (double)cf["9Slice#TRSlice"][3]);
            SliceRegions[3] = new Region((double)cf["9Slice#MLSlice"][0], (double)cf["9Slice#MLSlice"][1], (double)cf["9Slice#MLSlice"][2], (double)cf["9Slice#MLSlice"][3]);
            SliceRegions[4] = new Region((double)cf["9Slice#MSlice"][0], (double)cf["9Slice#MSlice"][1], (double)cf["9Slice#MSlice"][2], (double)cf["9Slice#MSlice"][3]);
            SliceRegions[5] = new Region((double)cf["9Slice#MRSlice"][0], (double)cf["9Slice#MRSlice"][1], (double)cf["9Slice#MRSlice"][2], (double)cf["9Slice#MRSlice"][3]);
            SliceRegions[6] = new Region((double)cf["9Slice#BLSlice"][0], (double)cf["9Slice#BLSlice"][1], (double)cf["9Slice#BLSlice"][2], (double)cf["9Slice#BLSlice"][3]);
            SliceRegions[7] = new Region((double)cf["9Slice#BSlice"][0], (double)cf["9Slice#BSlice"][1], (double)cf["9Slice#BSlice"][2], (double)cf["9Slice#BSlice"][3]);
            SliceRegions[8] = new Region((double)cf["9Slice#BRSlice"][0], (double)cf["9Slice#BRSlice"][1], (double)cf["9Slice#BRSlice"][2], (double)cf["9Slice#BRSlice"][3]);
            SliceHandles[0] = ExtraDxLib.DerivationGraphFromRegion(GraphicHandle, SliceRegions[0]);
            SliceHandles[1] = ExtraDxLib.DerivationGraphFromRegion(GraphicHandle, SliceRegions[1]);
            SliceHandles[2] = ExtraDxLib.DerivationGraphFromRegion(GraphicHandle, SliceRegions[2]);
            SliceHandles[3] = ExtraDxLib.DerivationGraphFromRegion(GraphicHandle, SliceRegions[3]);
            SliceHandles[4] = ExtraDxLib.DerivationGraphFromRegion(GraphicHandle, SliceRegions[4]);
            SliceHandles[5] = ExtraDxLib.DerivationGraphFromRegion(GraphicHandle, SliceRegions[5]);
            SliceHandles[6] = ExtraDxLib.DerivationGraphFromRegion(GraphicHandle, SliceRegions[6]);
            SliceHandles[7] = ExtraDxLib.DerivationGraphFromRegion(GraphicHandle, SliceRegions[7]);
            SliceHandles[8] = ExtraDxLib.DerivationGraphFromRegion(GraphicHandle, SliceRegions[8]);
        }
开发者ID:kb10uy,项目名称:Kb10uy,代码行数:34,代码来源:Sprite.cs


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