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


C# ISettings.Write方法代码示例

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


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

示例1: OnCreate

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate (savedInstanceState);
            //Typeface.Default = Typeface.CreateFromAsset (Assets, "SourceSansPro-Regular.ttf");
            //Typeface.DefaultBold = Typeface.CreateFromAsset (Assets, "SourceSansPro-Bold.ttf");
            // Set our view from the "main" layout resource
            SetContentView (Resource.Layout.Main);
            _fetcher = new Fetcher();
            _fetcher.RaiseErrorMessage += (sender, args) =>
            {
                Toast(args.MessageBody);
            };
            _fetcher.RaiseReadyToClearView += (sender, args) =>
            {
                Clear();
            };
            _fetcher.RaiseRetreivedScheduleItems += (sender, args) =>
            {
                Refresh(args.Schedule);
            };
            var toolbar = FindViewById<Toolbar>(Resource.Id.toolbar);
            //Toolbar will now take on default actionbar characteristics
            SetSupportActionBar (toolbar);
            SupportActionBar.Title = "CWS Informant";
            _pd = ProgressDialog.Show (this, "", "Vertretungen werden geladen" );
            _lv = FindViewById<ListView>(Resource.Id.lv);
            var fab = FindViewById<FloatingActionButton>(Resource.Id.fab);
            fab.Click += (sender, e) => {
                var set1 = new Intent(this, typeof(NewsActivity));
                StartActivity(set1);
            };

            fab.AttachToListView (_lv);

            _settings = new Settings (this);
            if (_settings.Read("notifies") == null) {
                StartService (new Intent ("setup", Android.Net.Uri.Parse (VConfig.Url), this, typeof(NotifyService)));
                _settings.Write ("notifies", 1);
            }
            try {
                int group = (int)_settings.Read ("group");
                _fetcher.GetTimes (group);
                _fetching = true;
                _list.Clear();
            } catch (NullReferenceException) {
                var set = new Intent(this, typeof(SettingsActivity));
                StartActivityForResult(set, 0);
            }
        }
开发者ID:reknih,项目名称:informant-droid,代码行数:49,代码来源:MainActivity.cs


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