本文整理汇总了C#中IMvxMessenger类的典型用法代码示例。如果您正苦于以下问题:C# IMvxMessenger类的具体用法?C# IMvxMessenger怎么用?C# IMvxMessenger使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IMvxMessenger类属于命名空间,在下文中一共展示了IMvxMessenger类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: MainViewModel
public MainViewModel(ISampleAppService sampleappservice, IMvxMessenger messenger)
{
_sampleAppService = sampleappservice;
ReloadList();
_messenger = messenger;
_listChangedToken = _messenger.Subscribe<SampleAppChangedMessage>(OnListChanged);
}
开发者ID:kohlerb,项目名称:SampleApp641,代码行数:7,代码来源:MainViewModel.cs
示例2: FolderControllerViewModel
public FolderControllerViewModel(IFolderObserver observer, IMvxMessenger hub)
{
this.observer = observer;
this.hub = hub;
this.files = new Dictionary<string, DateTime>(64);
this.mvxSubscriptionToken = hub.Subscribe<NewFileMessage>(this.NewFileReceived);
}
开发者ID:descorp,项目名称:PluginTask,代码行数:7,代码来源:FolderControllerViewModel.cs
示例3: SettingsViewModel
public SettingsViewModel (IMvxMessenger messenger) : base()
{
_messenger = messenger;
ServerAddress = AppSettings.ServerlUrl;
AzureADAuthorizationEnabled = Settings.ADAuthenticationEnabled;
}
开发者ID:rub8n,项目名称:HealthClinic.biz,代码行数:7,代码来源:SettingsViewModel.cs
示例4: BettrFitDataSource
/// <summary>
/// Konstruktor
/// </summary>
/// <param name="nav"></param>
/// <param name="events"></param>
/// <param name="sync"></param>
public BettrFitDataSource()
{
_sync = new SyncDataViewModel();
Server = "https://www.bettrfit.com";
UserData = new UserVM();
UserGoals = new ObservableCollection<UserGoalVM>();
Auth = new WebAccess.ServiceReference.AuthData();
UserDaily = new ObservableCollection<UserDailyVM>();
NutritionPlanFavorites = new ObservableCollection<NutritionPlanFavoriteVM>();
NutritionPlanLeb = new ObservableCollection<LebensmittelVM>();
SummaryConsumedDaytime = new WebAccess.ServiceReference.SummaryData();
SummaryConsumedDay = new WebAccess.ServiceReference.SummaryData();
_messenger = Mvx.Resolve<IMvxMessenger>();
_mapper = new InitMapper();
_messenger.Subscribe<NetworkEvent>(m => IsNetworkAvailable = m.IsAvailable);
LoadAll();
CheckLogin();
//if (ret == 0)
//{
// _EventAggregator = Container.Resolve<IEventAggregator>();
// _EventAggregator.GetEvent<LoggedInEvent>().Publish(true);
// _ds._loggedIn = true;
//}
}
开发者ID:obiwan007,项目名称:bettrdiet,代码行数:34,代码来源:BettrFitDataSource.cs
示例5: JabbrService
public JabbrService()
{
Connections = new ObservableCollection<JabbrConnection> ();
Settings = Mvx.Resolve<ISettingsService> ();
Messenger = Mvx.Resolve<IMvxMessenger> ();
Settings.Accounts.CollectionChanged += (sender, e) => {
if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Remove)
{
foreach (Account a in e.OldItems)
{
var cons = Connections.Where(c => c.Account.Id == a.Id);
if (cons != null)
foreach (var con in cons)
con.Client.Disconnect();
}
}
else if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
{
foreach (Account a in e.NewItems)
{
if (Connections.Where(con => con.Account.Id == a.Id).Count() <= 0)
AddClient(a);
}
}
Messenger.Publish<AccountsChangedMessage>(new AccountsChangedMessage(this));
};
}
开发者ID:slodge,项目名称:JabbRIsMobile,代码行数:32,代码来源:JabbrService.cs
示例6: LiveCardPresenter
public LiveCardPresenter()
{
_messenger = Mvx.Resolve<IMvxMessenger>();
_messenger.Subscribe<ServiceStartedMessage>(onServiceStart);
_messenger.Subscribe<ServiceDestroyedMessage>(onServiceDestroyed);
_messenger.Subscribe<GlassShowViewModelMessage>(onShowViewModel);
}
开发者ID:42Spikes,项目名称:F2S,代码行数:7,代码来源:LiveCardPresenter.cs
示例7: SelectCategoryListViewModel
/// <summary>
/// Creates an CategoryListViewModel for the usage of providing a CategoryViewModel selection.
/// </summary>
/// <param name="categoryRepository">An instance of <see cref="IRepository{T}" />.</param>
/// <param name="modifyDialogService">An instance of <see cref="IModifyDialogService" /></param>
/// <param name="dialogService">An instance of <see cref="IDialogService" /></param>
/// <param name="messenger">An instance of <see cref="IMvxMessenger" /></param>
public SelectCategoryListViewModel(ICategoryRepository categoryRepository,
IModifyDialogService modifyDialogService,
IDialogService dialogService, IMvxMessenger messenger)
: base(categoryRepository, modifyDialogService, dialogService)
{
this.messenger = messenger;
}
开发者ID:NPadrutt,项目名称:MoneyFox.Windows,代码行数:14,代码来源:SelectCategoryListViewModel.cs
示例8: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
_messageHub = Mvx.Resolve<IMvxMessenger>();
var url = Intent.GetStringExtra("cheesebaron.mvxplugins.azureaccesscontrol.droid.Url");
Window.RequestFeature(WindowFeatures.Progress);
_webView = new WebView(this)
{
VerticalScrollBarEnabled = true,
HorizontalScrollBarEnabled = true,
ScrollBarStyle = ScrollbarStyles.OutsideOverlay,
ScrollbarFadingEnabled = true
};
_webView.Settings.JavaScriptEnabled = true;
_webView.Settings.SetSupportZoom(true);
_webView.Settings.BuiltInZoomControls = true;
_webView.Settings.LoadWithOverviewMode = true; //Load 100% zoomed out
var notify = new AccessControlJavascriptNotify();
notify.GotSecurityTokenResponse += GotSecurityTokenResponse;
_webView.AddJavascriptInterface(notify, "external");
_webView.SetWebViewClient(new AuthWebViewClient());
_webView.SetWebChromeClient(new AuthWebChromeClient(this));
_webView.LoadUrl(url);
AddContentView(_webView, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent));
}
开发者ID:kstreet,项目名称:Cheesebaron.MvxPlugins,代码行数:34,代码来源:AccessControlWebAuthActivity.cs
示例9: SettingsViewModel
public SettingsViewModel(
IApplicationSettingServiceSingleton applicationSettingService,
IMvxMessenger messenger,IUserInteraction userInteraction)
{
if (applicationSettingService == null)
{
throw new ArgumentNullException("applicationSettingService");
}
if (messenger == null)
{
throw new ArgumentNullException("messenger");
}
if (userInteraction == null)
{
throw new ArgumentNullException("userInteraction");
}
_applicationSettingService = applicationSettingService;
_messenger = messenger;
_userInteraction = userInteraction;
this.InitializeCommands();
this.InitializeActions();
}
开发者ID:EmiiFont,项目名称:MyShuttle_RC,代码行数:27,代码来源:SettingsViewModel.cs
示例10: LocationService
public LocationService(IMvxGeoLocationWatcher watcher, IMvxMessenger messenger)
{
_messenger = messenger;
_watcher = watcher;
_watcher.Start(new MvxGeoLocationOptions(), OnSuccess, OnError);
}
开发者ID:KiranKumarAlugonda,项目名称:NPlus1DaysOfMvvmCross,代码行数:7,代码来源:LocationService.cs
示例11: GoalEditViewModel
public GoalEditViewModel()
{
//this.DefaultViewModel["Lebensmittel"] = ds.CurrentLebensmittel;
//this.DefaultViewModel["Items"] = ds.LebensmittelConsumed;
//this.DefaultViewModel["SelectedConsumed"] = ds.SelectedConsumed;
//this.DefaultViewModel["Search"] = ds.LebensmittelResult;
//this.DefaultViewModel["CurrentLebensmittel"] = ds.CurrentLebensmittel;
//this.DefaultViewModel["SummaryConsumedDay"] = ds.SummaryConsumedDay;
//this.DefaultViewModel["SummaryConsumedDaytime"] = ds.SummaryConsumedDaytime;
//SelectedConsumed = null;
_messenger = Mvx.Resolve<IMvxMessenger>();
//_logintoken = _messenger.Subscribe<LoggedInEvent>(a => LoginChanged(a.LoggedIn));
_synctoken = _messenger.Subscribe<SyncEvent>(a => RaisePropertyChanged("Sync"));
SaveDailyCommand = new MvxCommand(SaveDaily, canSaveDaily);
NewRecord = false;
WorkoutMinutes = new ObservableCollection<int>() { 20, 40, 60 };
WorkoutDays = new ObservableCollection<int>() { 1, 3, 5 };
_goal_Endurance = CurrentGoal.Goal_Endurance;
_goal_FatLoss = CurrentGoal.Goal_FatLoss;
_goal_Muscle = CurrentGoal.Goal_Muscle;
OnPropertyChanged("Goal_Muscle");
OnPropertyChanged("Goal_Endurance");
OnPropertyChanged("Goal_FatLoss"); ;
}
开发者ID:obiwan007,项目名称:bettrdiet,代码行数:28,代码来源:GoalEditViewModel.cs
示例12: ScanViewModel
public ScanViewModel(IMvxMessenger mvxMessenger)
{
_mvxMessenger = mvxMessenger;
_scanSubscriptionTokenToken =
_mvxMessenger.Subscribe<ScanMessage>(OnScan);
}
开发者ID:hellxcz,项目名称:SocialShopper,代码行数:7,代码来源:ScanViewModel.cs
示例13: TimerService
public TimerService(IMvxMessenger messenger)
{
this.messenger = messenger;
timerId = 0;
StartTimer();
}
开发者ID:ladimolnar,项目名称:Samples,代码行数:7,代码来源:TimerService.cs
示例14: BaseViewModel
public BaseViewModel(IMvxMessenger messenger) : base()
{
_messenger = messenger;
_token = _messenger.Subscribe<ReloadDataMessage>(async _ =>
await ReloadDataAsync());
}
开发者ID:Ranireddy,项目名称:CodeLabs-MobileDevOps,代码行数:7,代码来源:BaseViewModel.cs
示例15: CompanyRidesViewModel
public CompanyRidesViewModel(IMyShuttleClient myShuttleClient,
IApplicationSettingServiceSingleton applicationSettingService,
IMvxMessenger messenger)
: base(myShuttleClient, applicationSettingService,messenger)
{
InitializeCommands();
}
开发者ID:EmiiFont,项目名称:MyShuttle_RC,代码行数:7,代码来源:CompanyRidesViewModel.cs
示例16: DataViewModel
public DataViewModel(IMvxMessenger hub, IDataStorage<DataSample> data)
{
this.hub = hub;
this.data = data;
this.mvxSubscriptionToken = hub.Subscribe<NewDataMessage>(a => this.RaisePropertyChanged(() => this.DataList));
}
开发者ID:descorp,项目名称:PluginTask,代码行数:7,代码来源:DataViewModel.cs
示例17: AddIncidentDetailViewModel
public AddIncidentDetailViewModel(INetworkService networkService, IUserDialogs userDialogs, IAzureService azureService, IMvxMessenger messenger)
: base(networkService, userDialogs)
{
_azureService = azureService;
_messenger = messenger;
}
开发者ID:Magenic,项目名称:WhitepaperPerformance,代码行数:7,代码来源:AddIncidentDetailViewModel.cs
示例18: MyRidesViewModel
public MyRidesViewModel(
IMyShuttleClient myShuttleClient,
IApplicationSettingServiceSingleton applicationSettingService,
IMvxMessenger messenger)
{
if (myShuttleClient == null)
{
throw new ArgumentNullException("myShuttleClient");
}
if (applicationSettingService == null)
{
throw new ArgumentNullException("applicationSettingService");
}
if (messenger == null)
{
throw new ArgumentNullException("messenger");
}
_myShuttleClient = myShuttleClient;
_applicationSettingService = applicationSettingService;
_messenger = messenger;
_token = _messenger.Subscribe<ReloadDataMessage>(_ => InitializeActions());
InitializeActions();
InitializeCommands();
}
开发者ID:EmiiFont,项目名称:MyShuttle_RC,代码行数:30,代码来源:MyRidesViewModel.cs
示例19: AddViewModel
public AddViewModel(ICollectionService collectionService, ILocationService locationService, IMvxMessenger messenger)
{
_collectionService = collectionService;
_locationService = locationService;
_token = messenger.SubscribeOnMainThread<LocationMessage>(OnLocation);
GetInitialLocation();
}
开发者ID:KiranKumarAlugonda,项目名称:NPlus1DaysOfMvvmCross,代码行数:7,代码来源:AddViewModel.cs
示例20: TestViewModel
public TestViewModel(IMvxMessenger messenger)
{
_messenger = messenger;
_receivedTokenDisposable = _messenger.Subscribe<TokenChangedMessage>(msg =>
{
if(msg == null) return;
var token = msg.NewToken;
if(token == null) return;
Issuer = token.Issuer;
Audience = token.Audience;
IdentityProvider = token.IdentityProvider;
ExpiresOn = token.ExpiresOn;
RawToken = token.RawToken;
});
_loggedInTokenDisposable =
_messenger.Subscribe<LoggedInMessage>(async msg =>
{
//Validate token here, i.e. call your Web Service
await Task.Delay(2000);
//Calling this immediately, can result in nothing happening
//MvxAndroidTask might still be "showing".
_messenger.Publish(new CloseSelfMessage(this) {Close = true});
});
}
开发者ID:remcok,项目名称:Cheesebaron.MvxPlugins,代码行数:27,代码来源:TestViewModel.cs
注:本文中的IMvxMessenger类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论