コード例 #1
0
ファイル: MessageInfoReceiver.cs プロジェクト: 5509850/baumax
 public void ReceiveMessage(object sender, MessageInfoEventArgs e)
 {
     if (_Message != null)
     {
         lock (_Message)
         {
             if (_Message != null)
             {
                 _Message(sender, e);
             }
         }
     }
 }
コード例 #2
0
ファイル: MessageInfoReceiver.cs プロジェクト: 5509850/baumax
 public void ReceiveMessage(object sender, MessageInfoEventArgs e)
 {
     if (_Message != null)
     {
         lock (_Message)
         {
             if (_Message != null)
             {
                 _Message(sender, e);
             }
         }
     }
 }
コード例 #3
0
        /*
        private void storeService_OnImportBusinessVolumeMessageInfo(object sender, MessageInfoEventArgs e)
        {
            string[] files = (string[]) e.Param;
            if (files != null && files.Length > 0)
            {
                for (int i = 0; i < files.Length; i++)
                {
                    message(files[i]);
                }
            }
        }
        */
        private void storeService_OnImportBusinessVolumeMessageInfo(object sender, MessageInfoEventArgs e)
        {
            MessageStringInfo messageStringInfo = (MessageStringInfo)e.Param;
            if (messageStringInfo != null && messageStringInfo.BusinessVolumeType == _ImportType)
            {
                if (!messageStringInfo.LocalizeKey)
                {
                    if (messageStringInfo.MessageParams != null)
                        message(string.Format(messageStringInfo.Message, messageStringInfo.MessageParams), messageStringInfo.NewLine);
                    else
                        message(messageStringInfo.Message, messageStringInfo.NewLine);
                }
                else
                {
                    if (messageStringInfo.MessageParams != null)
                        message(string.Format(GetLocalized(messageStringInfo.Message), messageStringInfo.MessageParams), messageStringInfo.NewLine);
                    else
                        message(GetLocalized(messageStringInfo.Message), messageStringInfo.NewLine);

                }
            }
        }