本文整理汇总了C#中MediaPortal.Common.Messaging.SystemMessage类的典型用法代码示例。如果您正苦于以下问题:C# SystemMessage类的具体用法?C# SystemMessage怎么用?C# SystemMessage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SystemMessage类属于MediaPortal.Common.Messaging命名空间,在下文中一共展示了SystemMessage类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnMessageReceived
protected void OnMessageReceived(AsynchronousMessageQueue queue, SystemMessage message)
{
if (message.ChannelName == ServerConnectionMessaging.CHANNEL)
{
ServerConnectionMessaging.MessageType messageType =
(ServerConnectionMessaging.MessageType) message.MessageType;
switch (messageType)
{
case ServerConnectionMessaging.MessageType.HomeServerAttached:
case ServerConnectionMessaging.MessageType.HomeServerDetached:
FireStateChanged();
break;
}
}
else if (message.ChannelName == SharesMessaging.CHANNEL)
{
SharesMessaging.MessageType messageType =
(SharesMessaging.MessageType) message.MessageType;
switch (messageType)
{
case SharesMessaging.MessageType.ShareAdded:
case SharesMessaging.MessageType.ShareRemoved:
FireStateChanged();
break;
}
}
}
开发者ID:HAF-Blade,项目名称:MediaPortal-2,代码行数:27,代码来源:SetupDefaultSharesAction.cs
示例2: SendShareChangedMessage
/// <summary>
/// Sends a message that a share was changed (<see cref="MessageType.ShareChanged"/>).
/// </summary>
/// <param name="share">Share which was changed.</param>
/// <param name="relocationMode">Controls how the data of the changed share should be adapted at the server.</param>
public static void SendShareChangedMessage(Share share, RelocationMode relocationMode)
{
SystemMessage msg = new SystemMessage(MessageType.ShareChanged);
msg.MessageData[SHARE] = share;
msg.MessageData[RELOCATION_MODE] = relocationMode;
ServiceRegistration.Get<IMessageBroker>().Send(CHANNEL, msg);
}
开发者ID:davinx,项目名称:MediaPortal-2,代码行数:12,代码来源:SharesMessaging.cs
示例3: SendDialogManagerMessage
public const string DIALOG_RESULT = "DialogResult"; // Type: DialogResult
public static void SendDialogManagerMessage(Guid dialogHandle, DialogResult result)
{
SystemMessage msg = new SystemMessage(MessageType.DialogClosed);
msg.MessageData[DIALOG_HANDLE] = dialogHandle;
msg.MessageData[DIALOG_RESULT] = result;
ServiceRegistration.Get<IMessageBroker>().Send(CHANNEL, msg);
}
开发者ID:chekiI,项目名称:MediaPortal-2,代码行数:9,代码来源:DialogManagerMessaging.cs
示例4: SendPathChoosenMessage
public const string CHOOSEN_PATH = "ChoosenPath"; // Type: ResourcePath
public static void SendPathChoosenMessage(Guid dialogHandle, ResourcePath choosenPath)
{
SystemMessage msg = new SystemMessage(MessageType.PathChoosen);
msg.MessageData[DIALOG_HANDLE] = dialogHandle;
msg.MessageData[CHOOSEN_PATH] = choosenPath;
ServiceRegistration.Get<IMessageBroker>().Send(CHANNEL, msg);
}
开发者ID:BigGranu,项目名称:MediaPortal-2,代码行数:9,代码来源:PathBrowserMessaging.cs
示例5: Receive
public void Receive(SystemMessage message)
{
if (message.ChannelName == LocalizationMessaging.CHANNEL)
if (((LocalizationMessaging.MessageType) message.MessageType) ==
LocalizationMessaging.MessageType.LanguageChanged)
OnLanguageChanged();
}
开发者ID:chekiI,项目名称:MediaPortal-2,代码行数:7,代码来源:LocalizationData.cs
示例6: OnMessageReceived
void OnMessageReceived(AsynchronousMessageQueue queue, SystemMessage message)
{
if (message.ChannelName == PlayerManagerMessaging.CHANNEL)
{
PlayerManagerMessaging.MessageType messageType = (PlayerManagerMessaging.MessageType) message.MessageType;
switch (messageType)
{
case PlayerManagerMessaging.MessageType.PlayerStarted:
case PlayerManagerMessaging.MessageType.PlayerStopped:
case PlayerManagerMessaging.MessageType.PlayerEnded:
Update();
break;
}
}
else if (message.ChannelName == PlayerContextManagerMessaging.CHANNEL)
{
PlayerContextManagerMessaging.MessageType messageType = (PlayerContextManagerMessaging.MessageType) message.MessageType;
switch (messageType)
{
case PlayerContextManagerMessaging.MessageType.CurrentPlayerChanged:
Update();
break;
}
}
else if (message.ChannelName == WorkflowManagerMessaging.CHANNEL)
{
WorkflowManagerMessaging.MessageType messageType = (WorkflowManagerMessaging.MessageType) message.MessageType;
switch (messageType)
{
case WorkflowManagerMessaging.MessageType.NavigationComplete:
Update();
break;
}
}
}
开发者ID:joconno4,项目名称:MediaPortal-2,代码行数:35,代码来源:FullscreenContentAction.cs
示例7: OnMessageReceived
private void OnMessageReceived(AsynchronousMessageQueue queue, SystemMessage message)
{
if (message.ChannelName == PlayerManagerMessaging.CHANNEL)
{
PlayerManagerMessaging.MessageType messageType = (PlayerManagerMessaging.MessageType) message.MessageType;
switch (messageType)
{
case PlayerManagerMessaging.MessageType.PlayerStarted:
case PlayerManagerMessaging.MessageType.PlayerStopped:
case PlayerManagerMessaging.MessageType.PlayerEnded:
HandlePlayerChange();
break;
case PlayerManagerMessaging.MessageType.PlaybackStateChanged:
HandlePlaybackStateChanged();
break;
}
}
else if (message.ChannelName == PlayerContextManagerMessaging.CHANNEL)
{
PlayerContextManagerMessaging.MessageType messageType = (PlayerContextManagerMessaging.MessageType) message.MessageType;
switch (messageType)
{
case PlayerContextManagerMessaging.MessageType.PlayerSlotsChanged:
HandlePlayerChange();
break;
}
}
}
开发者ID:chekiI,项目名称:MediaPortal-2,代码行数:28,代码来源:BaseVideoPlayerSynchronizationStrategy.cs
示例8: SendUpdatePlayerRolesMessage
public static void SendUpdatePlayerRolesMessage(int currentPlayerIndex, int audioPlayerIndex)
{
SystemMessage msg = new SystemMessage(MessageType.UpdatePlayerRolesInternal);
msg.MessageData[CURRENT_PLAYER_INDEX] = currentPlayerIndex;
msg.MessageData[AUDIO_PLAYER_INDEX] = audioPlayerIndex;
ServiceRegistration.Get<IMessageBroker>().Send(CHANNEL, msg);
}
开发者ID:joconno4,项目名称:MediaPortal-2,代码行数:7,代码来源:PlayerContextManagerMessaging.cs
示例9: SendImportMessage
internal static void SendImportMessage(MessageType messageType, ResourcePath path, ImportJobType importJobType)
{
SystemMessage msg = new SystemMessage(messageType);
msg.MessageData[RESOURCE_PATH] = path;
msg.MessageData[IMPORT_JOB_TYPE] = importJobType;
ServiceRegistration.Get<IMessageBroker>().Send(CHANNEL, msg);
}
开发者ID:HAF-Blade,项目名称:MediaPortal-2,代码行数:7,代码来源:ImporterWorkerMessaging.cs
示例10: OnMessageReceived
private void OnMessageReceived(AsynchronousMessageQueue queue, SystemMessage message)
{
if (message.ChannelName == NotificationServiceMessaging.CHANNEL)
Update();
else if (message.ChannelName == WorkflowManagerMessaging.CHANNEL)
Update();
}
开发者ID:chekiI,项目名称:MediaPortal-2,代码行数:7,代码来源:NotificationsModel.cs
示例11: SendTvWishListMessage
public static void SendTvWishListMessage(TvWishListMessaging.MessageType type, string mymessage)
{
// Send Startup Finished Message.
SystemMessage msg = new SystemMessage(type);
msg.MessageData[MESSAGE] = mymessage;
ServiceRegistration.Get<IMessageBroker>().Send(CHANNEL, msg);
}
开发者ID:huha001,项目名称:TvWishList,代码行数:7,代码来源:TvWishListMessaging.cs
示例12: SendSystemStateChangeMessage
public const string NEW_STATE = "NewState"; // Type: SystemState
/// <summary>
/// Sends a <see cref="MessageType.SystemStateChanged"/> message.
/// </summary>
/// <param name="newState">The state the system will switch to.</param>
public static void SendSystemStateChangeMessage(SystemState newState)
{
SystemMessage msg = new SystemMessage(MessageType.SystemStateChanged);
msg.MessageData[NEW_STATE] = newState;
IMessageBroker messageBroker = ServiceRegistration.Get<IMessageBroker>();
if (messageBroker != null)
messageBroker.Send(CHANNEL, msg);
}
开发者ID:HAF-Blade,项目名称:MediaPortal-2,代码行数:14,代码来源:SystemMessaging.cs
示例13: SendSettingsChangeMessage
public const string SETTINGSTYPE = "SettingsType"; // Type: C# Type
/// <summary>
/// Sends a <see cref="MessageType.SettingsChanged"/> message.
/// </summary>
/// <param name="settingsType">The Type of setting that was changed.</param>
public static void SendSettingsChangeMessage(Type settingsType)
{
SystemMessage msg = new SystemMessage(MessageType.SettingsChanged);
msg.MessageData[SETTINGSTYPE] = settingsType;
IMessageBroker messageBroker = ServiceRegistration.Get<IMessageBroker>(false);
if (messageBroker != null)
messageBroker.Send(CHANNEL, msg);
}
开发者ID:davinx,项目名称:MediaPortal-2,代码行数:14,代码来源:SettingsManagerMessaging.cs
示例14: BroadcastWindowsMessage
public const string MESSAGE = "Message"; // Windows message stored as System.Windows.Forms.Message - Take care to copy the message back to the message data after modifying it, else the auto unboxing will prevent applying the new values
public static void BroadcastWindowsMessage(ref Message message)
{
SystemMessage msg = new SystemMessage(MessageType.WindowsBroadcast);
msg.MessageData[MESSAGE] = message;
ServiceRegistration.Get<IMessageBroker>().Send(CHANNEL, msg);
// Copy message back to the ref message
message = (Message) msg.MessageData[MESSAGE];
}
开发者ID:chekiI,项目名称:MediaPortal-2,代码行数:10,代码来源:WindowsMessaging.cs
示例15: messageQueue_MessageReceived
void messageQueue_MessageReceived(AsynchronousMessageQueue queue, SystemMessage message)
{
if (message.ChannelName == ImporterMessaging.Channel)
{
ImporterMessaging.MessageType messageType = (ImporterMessaging.MessageType)message.MessageType;
if (messageType == ImporterMessaging.MessageType.Init)
initImporter();
}
}
开发者ID:ministerkrister,项目名称:Emulators,代码行数:9,代码来源:ImporterModel.cs
示例16: OnMessageReceived
void OnMessageReceived(AsynchronousMessageQueue queue, SystemMessage message)
{
if (message.ChannelName == SkinMessaging.CHANNEL)
{
if (((SkinMessaging.MessageType) message.MessageType) ==
SkinMessaging.MessageType.DateTimeFormatChanged)
// The DateFormat and TimeFormat configuration classes will send this message when they
// changed the formats, so we have to update our format here
ReadSettings();
}
}
开发者ID:aspik,项目名称:MediaPortal-2,代码行数:11,代码来源:TimeModel.cs
示例17: Receive
public void Receive(SystemMessage message)
{
if (message.MessageType as SystemMessaging.MessageType? == SystemMessaging.MessageType.SystemStateChanged)
{
SystemState newState = (SystemState)message.MessageData[SystemMessaging.NEW_STATE];
if (newState == SystemState.Running)
{
RegisterWithServices();
}
}
}
开发者ID:aspik,项目名称:MediaPortal-2,代码行数:11,代码来源:UPnPRendererPlugin.cs
示例18: HandleMessageAvailable
protected override void HandleMessageAvailable(SystemMessage message)
{
MessagesAvailableHandler handler = MessagesAvailable;
if (handler == null)
{
ServiceRegistration.Get<ILogger>().Warn(
"SynchronousMessageQueue: Synchronous message queue '{0}' has no message handler and there are already {1} messages to be delivered",
_queueName, NumMessages);
return;
}
handler(this);
}
开发者ID:joconno4,项目名称:MediaPortal-2,代码行数:12,代码来源:SynchronousMessageQueue.cs
示例19: OnMessageReceived
void OnMessageReceived(AsynchronousMessageQueue queue, SystemMessage message)
{
switch (message.ChannelName)
{
case PlayerManagerMessaging.CHANNEL:
UpdatePlayerContributor(true);
break;
case PlayerContextManagerMessaging.CHANNEL:
UpdatePlayerContributor(true);
break;
}
}
开发者ID:HAF-Blade,项目名称:MediaPortal-2,代码行数:12,代码来源:BasePlayerModel.cs
示例20: OnMessageReceived
void OnMessageReceived(AsynchronousMessageQueue queue, SystemMessage message)
{
if (message.ChannelName == WorkflowManagerMessaging.CHANNEL)
{
WorkflowManagerMessaging.MessageType messageType = (WorkflowManagerMessaging.MessageType) message.MessageType;
switch (messageType)
{
case WorkflowManagerMessaging.MessageType.NavigationComplete:
Update();
break;
}
}
}
开发者ID:davinx,项目名称:MediaPortal-2,代码行数:13,代码来源:ManagePlaylistsAction.cs
注:本文中的MediaPortal.Common.Messaging.SystemMessage类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论