Beispiel #1
0
        public ActionResult Index2()
        {
            MLMessageHubConect connectHub = null;

            connectHub = BuilderMLMessageHubConnect.CreateMLMessageHub("http://localhost:11111");
            var message = new NotificationMessage {
                Subject = "MVC Client", Body = "Message Send From MVC Client", User = "******", MessageDate = DateTime.Now, Server = "localhost", UriImage = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxAQEBUQEBAWFg8WFRUOFRUYERcVFxUWFRIWFhUVFhUYHSghGBolGxUVITEhJSkrLi4uGB8zODMsNygtLisBCgoKDg0OGhAQGi8lHiYvLSstLi8tLSstLi0rLS0tKy8rLS0tLSstLSstLS0tLS0tLS0tKy0tLS0tLTYtLS0tLf/AABEIAMIBAwMBIgACEQEDEQH/xAAcAAEAAQUBAQAAAAAAAAAAAAAAAQIDBAYHBQj/xABFEAACAQIEAwQFCQUECwAAAAAAAQIDEQQSITEFBkETUWFxByKBkaEUMlJzk7HB0fA0QlSy8SNTcqIVFyQ1YoKSo7PS4f/EABoBAQEBAQEBAQAAAAAAAAAAAAABBAMCBQb/xAAmEQEAAgIBBAIBBQEAAAAAAAAAAQIDESESEzFBBFEiFCNSYcGB/9oADAMBAAIRAxEAPwDXwD2Z8Zpww/YYehGDnBRrVZetUn9JRf7kb9x+htMx4h8uIh4wAPSAAAGRLBTVJVpWUJPLG7V52vdxju0ravboY4/oSdgAALk4RUYtTvN3vFJ+qul292+5f0thIrrUpQk4yVpLRru8H4+AgKuW/qXy9L2v8NiJNaWXTXXd9/gFazvfNpbRW8bsJ6NWWtteq8gJvdu0d9EtXb82F32S2+GhF3bfRaL236EpLp32u9F4eT3Aqa/V/wAEWmXX+uhbkUQAAAAAAAAAAAAAAAAAAAAAAAAAV0o5pKLkoptLM9ld7vwQFAMziKw6ajQc5JXzVJLLnffGH7sV4u78DDJE7jayAAqL1B00pZ1JytaCTsru95Se+mmi371bWyC7RoZlKWaKUVd3drt3tGK3bdvzsTwLRVCm3eybSWZ+C733FJN3tfT8ihG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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAmUbeYbuA28SAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIrqZdo9Ovf7OiAiCV9XZfHyRSwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB//9k="
            };

            //message.MessageType = (MessageType)cmbType.SelectedIndex;
            connectHub.SendMessage2(message);
            connectHub.Dispose();

            return(View());
        }
Beispiel #2
0
        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                if (connectHub != null)
                {
                    connectHub.Dispose();
                }

                connectHub = BuilderMLMessageHubConnect.CreateMLMessageHub(txtUrl.Text);

                //connectHub.ProcessMessage += (sender2, e2) => lstMensajes.Dispatcher.Invoke(() =>
                //{
                //    lstMensajes.Items.Add(e2.NotificationMessage.Body);
                //}, System.Windows.Threading.DispatcherPriority.Background);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Beispiel #3
0
        internal void Start()
        {
            var userInfo = new UserInfo {
                User = "******", Server = "localhost"
            };

            //System.Threading.Thread.Sleep(5000);

            connectHub = BuilderMLMessageHubConnect.CreateMLMessageHub("https://localhost:5001", userInfo);


            string messageInitial  = "#######################################################################";
            string messageInitial2 = "###                                                                 ###";
            string messageInitial3 = "###                      TRANSACTIONS APP CMD                       ###";

            WriteLine(messageInitial);
            WriteLine(messageInitial);
            WriteLine(messageInitial2);
            WriteLine(messageInitial3);
            WriteLine(messageInitial2);
            WriteLine(messageInitial);
            WriteLine(messageInitial);

            WriteLine(Environment.NewLine + Environment.NewLine);

            string tn1 = "548524552_77.3362";
            string tn2 = "999999999_99.9999";

            Transfer(tn1);
            Transfer(tn2);

            WriteLine("Finalizeddd !!!!");
            WriteLine("Tuch any key to close");

            Read();

            connectHub.Dispose();
        }
Beispiel #4
0
        public void Start2()
        {
            Read();

            connectHub = BuilderMLMessageHubConnect.CreateMLMessageHub("http://localhost:11111");

            //Sleep(3000);

            NotificationMessage message = null;

            message = new NotificationMessage
            {
                Subject     = "Example Information",
                Body        = "Example Information",
                Server      = "localhost",
                User        = "******",
                MessageType = MessageType.Information,
                UriImage    = "http://www.pearltrees.com/s/pic/or/example-70680304"
            };

            Task.WaitAll(connectHub.SendMessage(message));

            Sleep(1000);

            message = new NotificationMessage
            {
                Subject     = "Example Warning",
                Body        = "Example Warining",
                Server      = "localhost",
                User        = "******",
                MessageType = MessageType.Warnnig,
                UriImage    = "http://www.pearltrees.com/s/pic/or/example-70680304"
            };

            Task.WaitAll(connectHub.SendMessage(message));

            Sleep(1000);

            message = new NotificationMessage
            {
                Subject     = "Example Error",
                Body        = "Example Error",
                Server      = "localhost",
                User        = "******",
                MessageType = MessageType.Error,
                UriImage    = "http://www.pearltrees.com/s/pic/or/example-70680304"
            };

            Task.WaitAll(connectHub.SendMessage(message));

            Sleep(1000);

            message = new NotificationMessage
            {
                Subject     = "Example Very Important",
                Body        = "Example Very Important",
                Server      = "localhost",
                User        = "******",
                MessageType = MessageType.VeryImportant,
                UriImage    = "http://www.pearltrees.com/s/pic/or/example-70680304"
            };

            Task.WaitAll(connectHub.SendMessage(message));

            Sleep(2000);

            message = new NotificationMessage
            {
                Subject     = "Example Urgent Information",
                Body        = "Example Urgent Information",
                Server      = "localhost",
                User        = "******",
                MessageType = MessageType.Information_urgent,
                UriImage    = "http://www.pearltrees.com/s/pic/or/example-70680304"
            };

            Task.WaitAll(connectHub.SendMessage(message));

            Sleep(1000);

            message = new NotificationMessage
            {
                Subject     = "Example Urgent Warning",
                Body        = "Example Urgent Warining",
                Server      = "localhost",
                User        = "******",
                MessageType = MessageType.Warnnig_urgent,
                UriImage    = "http://www.pearltrees.com/s/pic/or/example-70680304"
            };

            Task.WaitAll(connectHub.SendMessage(message));

            Sleep(1000);

            message = new NotificationMessage
            {
                Subject     = "Example Urgent Error",
                Body        = "Example Urgent Error",
                Server      = "localhost",
                User        = "******",
                MessageType = MessageType.Error_urgent,
                UriImage    = "http://www.pearltrees.com/s/pic/or/example-70680304"
            };

            Task.WaitAll(connectHub.SendMessage(message));

            Sleep(1000);

            message = new NotificationMessage
            {
                Subject     = "Example Urgent Very Important",
                Body        = "Example Urgent Very Important",
                Server      = "localhost",
                User        = "******",
                MessageType = MessageType.VeryImportant_urgent,
                UriImage    = "http://www.pearltrees.com/s/pic/or/example-70680304"
            };

            Task.WaitAll(connectHub.SendMessage(message));


            Read();

            //connectHub.Dispose();
        }