• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# MvxValueEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中MvxValueEventArgs的典型用法代码示例。如果您正苦于以下问题:C# MvxValueEventArgs类的具体用法?C# MvxValueEventArgs怎么用?C# MvxValueEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MvxValueEventArgs类属于命名空间,在下文中一共展示了MvxValueEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: MoveJoystickOnNewCoordinates

 private void MoveJoystickOnNewCoordinates(object sender, MvxValueEventArgs<CartesianPositionParameters> eventArgs)
 {
     if (ViewModel != null)
     {
         ViewModel.Movement.RollCommand.Execute(eventArgs.Value);
     }
 }
开发者ID:jihlee,项目名称:BallControl,代码行数:7,代码来源:SpheroView.xaml.cs


示例2: ImageHelperOnImageChanged

 private void ImageHelperOnImageChanged(object sender, MvxValueEventArgs<UIImage> mvxValueEventArgs)
 {
     InvokeOnMainThread(() =>
     {
         if (ImageView != null)
             ImageView.Image = mvxValueEventArgs.Value;
     });
 }
开发者ID:talisqualis,项目名称:MvvmCross-Build,代码行数:8,代码来源:GeneralTableViewCell.cs


示例3: HandleCreateCalled

        protected override void HandleCreateCalled(object sender, MvxValueEventArgs<Bundle> bundleArgs)
        {
            FragmentView.EnsureSetupInitialized();

            // Create is called after Fragment is attached to Activity
            // it's safe to assume that Fragment has activity
            if (!FragmentView.GetType().IsFragmentCacheable(Fragment.Activity.GetType()))
                return;

            FragmentView.RegisterFragmentViewToCacheIfNeeded(Fragment.Activity.GetType());

            Bundle bundle = null;
            MvxViewModelRequest request = null;
            if (bundleArgs?.Value != null)
            {
                // saved state
                bundle = bundleArgs.Value;
            }
            else
            {
                var fragment = FragmentView as Fragment;
                if (fragment?.Arguments != null)
                {
                    bundle = fragment.Arguments;
                    var json = bundle.GetString("__mvxViewModelRequest");
                    if (!string.IsNullOrEmpty(json))
                    {
                        IMvxNavigationSerializer serializer;
                        if (!Mvx.TryResolve(out serializer))
                        {
                            MvxTrace.Warning(
                                "Navigation Serializer not available, deserializing ViewModel Request will be hard");
                        }
                        else
                        {
                            request = serializer.Serializer.DeserializeObject<MvxViewModelRequest>(json);
                        }
                    }
                }
            }

            IMvxSavedStateConverter converter;
            if (!Mvx.TryResolve(out converter))
            {
                MvxTrace.Warning("Saved state converter not available - saving state will be hard");
            }
            else
            {
                if (bundle != null)
                {
                    var mvxBundle = converter.Read(bundle);
                    FragmentView.OnCreate(mvxBundle, request);
                }
            }
        }
开发者ID:thefex,项目名称:MvvmCross-AndroidSupport,代码行数:55,代码来源:MvxBindingFragmentAdapter.cs


示例4: NewIntent

        protected override void NewIntent(MvxValueEventArgs<Intent> e)
        {
            string id=GetIdFromTag(e.Value);
            var tagAsNdefMessage = e.Value.GetParcelableArrayExtra(NfcAdapter.ExtraNdefMessages);
            if (tagAsNdefMessage != null)
            {

                var tag = tagAsNdefMessage[0] as NdefMessage;
                byte[] message = tag.ToByteArray();
                var ndefMessage = NdefLibrary.Ndef.NdefMessage.FromByteArray(message);
                NewMessage(id,ndefMessage);
            }
        }
开发者ID:rossdargan,项目名称:MvxPlugins,代码行数:13,代码来源:ReadBase.cs


示例5: HandleCreateCalled

        protected override void HandleCreateCalled(object sender, MvxValueEventArgs<Bundle> bundleArgs)
        {
            FragmentView.EnsureSetupInitialized();

            if (!FragmentView.GetType().IsOwnedViewModelFragment())
                return;

            Bundle bundle = null;
            MvxViewModelRequest request = null;
            if (bundleArgs != null && bundleArgs.Value != null)
            {
                // saved state
                bundle = bundleArgs.Value;
            }
            else
            {
                var fragment = FragmentView as Fragment;
                if (fragment != null && fragment.Arguments != null)
                {
                    bundle = fragment.Arguments;
                    var json = bundle.GetString("__mvxViewModelRequest");
                    if (!string.IsNullOrEmpty(json))
                    {
                        IMvxNavigationSerializer serializer;
                        if (!Mvx.TryResolve(out serializer))
                        {
                            MvxTrace.Warning(
                                "Navigation Serializer not available, deserializing ViewModel Request will be hard");
                        }
                        else
                        {
                            request = serializer.Serializer.DeserializeObject<MvxViewModelRequest>(json);
                        }
                    }
                }
            }

            IMvxSavedStateConverter converter;
            if (!Mvx.TryResolve(out converter))
            {
                MvxTrace.Warning("Saved state converter not available - saving state will be hard");
            }
            else
            {
                if (bundle != null)
                {
                    var mvxBundle = converter.Read(bundle);
                    FragmentView.OnCreate(mvxBundle, request);
                }
            }
        }
开发者ID:Everbridge,项目名称:sm-MvvmCross,代码行数:51,代码来源:MvxBindingFragmentAdapter.cs


示例6: EventSourceOnStartActivityForResultCalled

 protected override void EventSourceOnStartActivityForResultCalled(object sender,
                                                                   MvxValueEventArgs
                                                                       <MvxStartActivityForResultParameters>
                                                                       MvxValueEventArgs)
 {
     var requestCode = MvxValueEventArgs.Value.RequestCode;
     switch (requestCode)
     {
         case (int)MvxIntentRequestCode.PickFromFile:
             MvxTrace.Warning("Warning - activity request code may clash with Mvx code for {0}",
                            (MvxIntentRequestCode)requestCode);
             break;
     }
 }
开发者ID:MvvmCross,项目名称:MvvmCross,代码行数:14,代码来源:MvxActivityAdapter.cs


示例7: AccelerometerOnReadingAvailable

        private void AccelerometerOnReadingAvailable(object sender, MvxValueEventArgs<Reading> mvxValueEventArgs)
        {
            // note that the switchover between Y and X here is deliberate!
            // and that we invert Y
            // this may need tweaking platform-by-platform 
            // and phone by phone - and maybe at runtime too!

            var parameters = new CartesianPositionParameters
                {
                    X = MakeSafe(-mvxValueEventArgs.Value.Y),
                    Y = MakeSafe(mvxValueEventArgs.Value.X),
                };

            DoRoll(parameters);
        }
开发者ID:slodge,项目名称:BallControl,代码行数:15,代码来源:SpheroAccelMovementViewModel.cs


示例8: EventSourceOnSaveInstanceStateCalled

 protected override void EventSourceOnSaveInstanceStateCalled(object sender, MvxValueEventArgs<Bundle> bundleArgs)
 {
     var mvxBundle = AndroidView.CreateSaveStateBundle();
     if (mvxBundle != null)
     {
         IMvxSavedStateConverter converter;
         if (!Mvx.TryResolve<IMvxSavedStateConverter>(out converter))
         {
             MvxTrace.Warning("Saved state converter not available - saving state will be hard");
         }
         else
         {
             converter.Write(bundleArgs.Value, mvxBundle);
         }
     }
     var cache = Mvx.Resolve<IMvxSingleViewModelCache>();
     cache.Cache(AndroidView.ViewModel, bundleArgs.Value);
 }
开发者ID:talisqualis,项目名称:MvvmCross-Build,代码行数:18,代码来源:MvxActivityAdapter.cs


示例9: SpeechListenerOnHeard

        private void SpeechListenerOnHeard(object sender, MvxValueEventArgs<PossibleWord> e)
        {
            if (!SpeechIsOn)
                return;

            MethodInfo methodInfo;
            if (!_speechMethods.TryGetValue(e.Value.Word, out methodInfo))
                return;

            methodInfo.Invoke(this, new object[0]);

            this.InvokeOnMainThread(() =>
                {
                    HeardSoFar.Insert(0, e.Value.Word);
                    while (HeardSoFar.Count > 100)
                    {
                        HeardSoFar.RemoveAt(HeardSoFar.Count - 1);
                    }
                });
        }
开发者ID:jihlee,项目名称:BallControl,代码行数:20,代码来源:SpheroSpeechViewModel.cs


示例10: HandleAttachCalled

 protected virtual void HandleAttachCalled(object sender, MvxValueEventArgs<Activity> e)
 {
 }
开发者ID:darkice-matt-crombie,项目名称:MvxSpinnerTest,代码行数:3,代码来源:MvxBaseFragmentAdapter.cs


示例11: HandleCreateCalled

 protected virtual void HandleCreateCalled(object sender, MvxValueEventArgs<Bundle> e)
 {
 }
开发者ID:Everbridge,项目名称:sm-MvvmCross,代码行数:3,代码来源:MvxBaseFragmentAdapter.cs


示例12: HandleSaveInstanceStateCalled

 protected virtual void HandleSaveInstanceStateCalled(object sender, MvxValueEventArgs<Bundle> e)
 {
 }
开发者ID:Everbridge,项目名称:sm-MvvmCross,代码行数:3,代码来源:MvxBaseFragmentAdapter.cs


示例13: EventSourceOnCreateCalled

 protected override void EventSourceOnCreateCalled(object sender, MvxValueEventArgs<Bundle> eventArgs)
 {
     this.AndroidView.OnViewCreate(eventArgs.Value);
 }
开发者ID:MvvmCross,项目名称:MvvmCross,代码行数:4,代码来源:MvxActivityAdapter.cs


示例14: ImageHelperOnImageChanged

 private void ImageHelperOnImageChanged(object sender, MvxValueEventArgs<Bitmap> mvxValueEventArgs)
 {
     using (var h = new Handler(Looper.MainLooper)) h.Post(() => { this.SetImageBitmap(mvxValueEventArgs.Value); });
 }
开发者ID:lothrop,项目名称:MvvmCross-AndroidSupport,代码行数:4,代码来源:MvxAppCompatImageView.cs


示例15: HandleViewDidAppearCalled

 public virtual void HandleViewDidAppearCalled(object sender, MvxValueEventArgs<bool> e)
 {
 }
开发者ID:talisqualis,项目名称:MvvmCross-Build,代码行数:3,代码来源:MvxBaseViewControllerAdapter.cs


示例16: HandleAwakeCalled

 public override void HandleAwakeCalled(object sender, MvxValueEventArgs<NSObject> e)
 {
     this.WatchOSView.OnViewCreate();
     base.HandleAwakeCalled(sender, e);
 }
开发者ID:jonaswisplinghoff,项目名称:WearableSmarthomeRemote,代码行数:5,代码来源:MvxInterfaceControllerAdapter.cs


示例17: ImageHelperOnImageChanged

 private void ImageHelperOnImageChanged(object sender, MvxValueEventArgs<UIImage> mvxValueEventArgs)
 {
     Image = mvxValueEventArgs.Value;
 }
开发者ID:JoanMiro,项目名称:MvxMod,代码行数:4,代码来源:MvxTouchImageView.cs


示例18: ImageHelperOnImageChanged

 private void ImageHelperOnImageChanged(object sender, MvxValueEventArgs<Bitmap> mvxValueEventArgs)
 {
     SetImageBitmap(mvxValueEventArgs.Value);
 }
开发者ID:darkice-matt-crombie,项目名称:MvxSpinnerTest,代码行数:4,代码来源:MvxImageView.cs


示例19: HandleCreateViewCalled

 protected virtual void HandleCreateViewCalled(object sender,
                                               MvxValueEventArgs<MvxCreateViewParameters> mvxValueEventArgs)
 {
 }
开发者ID:darkice-matt-crombie,项目名称:MvxSpinnerTest,代码行数:4,代码来源:MvxBaseFragmentAdapter.cs


示例20: EventSourceOnSaveInstanceStateCalled

 protected virtual void EventSourceOnSaveInstanceStateCalled(object sender,
                                                             MvxValueEventArgs<Bundle> mvxValueEventArgs)
 {
 }
开发者ID:darkice-matt-crombie,项目名称:MvxSpinnerTest,代码行数:4,代码来源:MvxBaseActivityAdapter.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# MxWeiXinPF类代码示例发布时间:2022-05-24
下一篇:
C# MvxTraceLevel类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap