Beispiel #1
0
		//
		// This method is invoked when the application has loaded and is ready to run. In this 
		// method you should instantiate the window, load the UI into it and then make the window
		// visible.
		//
		// You have 17 seconds to return from this method, or iOS will terminate your application.
		//
		public override bool FinishedLaunching(UIApplication app, NSDictionary options)
		{
			window = new UIWindow(UIScreen.MainScreen.Bounds);

			var controller = new UIViewController();
			var view = new UIView (UIScreen.MainScreen.Bounds);
			view.BackgroundColor = UIColor.White;
			controller.View = view;

			controller.NavigationItem.Title = "SignalR Client";

			var textView = new UITextView(new RectangleF(0, 0, 320, view.Frame.Height - 0));
			view.AddSubview (textView);


			navController = new UINavigationController (controller);

			window.RootViewController = navController;
			window.MakeKeyAndVisible();

			var traceWriter = new TextViewWriter(SynchronizationContext.Current, textView);

			var client = new CommonClient(traceWriter);
			client.RunAsync("http://signalr-test1.cloudapp.net:82/");

			return true;
		}
Beispiel #2
0
		public override bool FinishedLaunching(UIApplication app, NSDictionary options)
		{
			window = new UIWindow(UIScreen.MainScreen.Bounds);

			var controller = new UIViewController();
			var view = new UIView (UIScreen.MainScreen.Bounds);
			view.BackgroundColor = UIColor.White;
			controller.View = view;

			controller.NavigationItem.Title = "SignalR Client";

			var textView = new UITextView(new CGRect(0, 0, 320, view.Frame.Height - 0));
			view.AddSubview (textView);


			navController = new UINavigationController (controller);

			window.RootViewController = navController;
			window.MakeKeyAndVisible();

			if (SIGNALR_DEMO_SERVER == "http://YOUR-SERVER-INSTANCE-HERE") {
				textView.Text = "You need to configure the app to point to your own SignalR Demo service.  Please see the Getting Started Guide for more information!";
				return true;
			}
			
			var traceWriter = new TextViewWriter(SynchronizationContext.Current, textView);

			var client = new CommonClient(traceWriter);
			client.RunAsync(SIGNALR_DEMO_SERVER);

			return true;
		}
        public MainPage()
        {
            InitializeComponent();

            var writer = new TextBlockWriter(SynchronizationContext.Current, this.Messages);
            var client = new CommonClient(writer);
            client.RunAsync();
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            var writer = Console.Out;
            var client = new CommonClient(writer);
            client.RunAsync("http://localhost:40476/").Wait();

            Console.ReadKey();
        }
Beispiel #5
0
        static void Main(string[] args)
        {
            var writer = Console.Out;
            var client = new CommonClient(writer);
            client.RunAsync();

            Console.ReadLine();
        }
Beispiel #6
0
        static void Main(string[] args)
        {
            var writer = Console.Out;
            var client = new CommonClient(writer);

            client.RunAsync();

            Console.ReadLine();
        }
Beispiel #7
0
        static void Main(string[] args)
        {
            var writer = Console.Out;
            var client = new CommonClient(writer);

            client.RunAsync("http://signalr-test1.cloudapp.net:81/");

            Console.ReadLine();
        }
Beispiel #8
0
        static void Main(string[] args)
        {
            var writer = Console.Out;
            var client = new CommonClient(writer);

            client.Run("http://localhost:40476/");

            Console.ReadKey();
        }
Beispiel #9
0
        static void Main(string[] args)
        {
            var writer = Console.Out;
            var client = new CommonClient(writer);

            //client.RunAsync("http://localhost:40476/").Wait();
            client.RunRawConnection("http://localhost:8080/");

            Console.ReadKey();
        }
Beispiel #10
0
		protected override void OnCreate(Bundle bundle)
		{
			base.OnCreate(bundle);
			SetContentView(Resource.Layout.Main);
			var textView = FindViewById<TextView>(Resource.Id.textView);
			var traceWriter = new TextViewWriter(SynchronizationContext.Current, textView);

			var client = new CommonClient(traceWriter);
			client.RunAsync("http://signalr-test1.cloudapp.net:82/");
		}
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            var writer = new TextBlockWriter(SynchronizationContext.Current, this.Messages);
            var client = new CommonClient(writer);
            client.RunAsync();

            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
        }
Beispiel #12
0
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            var writer = new TextBlockWriter(SynchronizationContext.Current, this.Messages);
            var client = new CommonClient(writer);
            
            // Windows Phone emulator runs in a separate virtual machine therefore you can't use a url containing localhost
            var task = client.RunAsync("http://signalr01.cloudapp.net:81/");

            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
        }
Beispiel #13
0
        public MainPage()
        {
            InitializeComponent();

            // http://msdn.microsoft.com/en-us/library/dd920295(v=vs.95).aspx
            // With Silverlight, you can specify whether the browser or the client provides HTTP handling for your Silverlight-based applications. 
            // By default, HTTP handling is performed by the browser and you must opt-in to client HTTP handling. 
            WebRequest.RegisterPrefix("http://", WebRequestCreator.ClientHttp);
            WebRequest.RegisterPrefix("https://", WebRequestCreator.ClientHttp);

            var writer = new TextBoxWriter(SynchronizationContext.Current, this.Messages);
            var client = new CommonClient(writer);
            var task = client.RunAsync("http://localhost:40476/");
        }
Beispiel #14
0
		protected override void OnCreate(Bundle bundle)
		{
			base.OnCreate(bundle);
			SetContentView(Resource.Layout.Main);
			var textView = FindViewById<TextView>(Resource.Id.textView);
			
			if (SIGNALR_DEMO_SERVER == "http://YOUR-SERVER-INSTANCE-HERE") {
				textView.Text = "You need to configure the app to point to your own SignalR Demo service.  Please see the Getting Started Guide for more information!";
				return;
			}
			
			var traceWriter = new TextViewWriter(SynchronizationContext.Current, textView);

			var client = new CommonClient(traceWriter);
			client.RunAsync(SIGNALR_DEMO_SERVER);
		}
Beispiel #15
0
        private static void Main(string[] args)
        {
#if DEBUG
            if (args.Any(a => a == "--debug"))
            {
                args = args.Where(a => a != "--debug").ToArray();
                Console.WriteLine($"Ready for debugger to attach. Process ID: {Process.GetCurrentProcess().Id}.");
                Console.WriteLine("Press ENTER to continue.");
                Console.ReadLine();
            }
#endif

            var writer = Console.Out;
            var client = new CommonClient(writer);
            client.Run("http://localhost:40476/");

            Console.ReadKey();
        }
Beispiel #16
0
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            if (SIGNALR_DEMO_SERVER == "http://YOUR-SERVER-INSTANCE-HERE") {
                Messages2.Text = "You need to configure the app to point to your own SignalR Demo service.  Please see the Getting Started Guide for more information!";
                return;
            }
            

            var writer = new TextBlockWriter(SynchronizationContext.Current, this.Messages);
            var client = new CommonClient(writer);
            
            // Windows Phone emulator runs in a separate virtual machine therefore you can't use a url containing localhost
			var task = client.RunAsync(SIGNALR_DEMO_SERVER);

            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
        }
Beispiel #17
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            var controller = new UIViewController();

            var label = new UILabel(new RectangleF(0, 0, 320, 30));
            label.Text = "SignalR Client";

            var textView = new UITextView(new RectangleF(0, 35, 320, 500));

            controller.Add(label);
            controller.Add(textView);

            window.RootViewController = controller;
            window.MakeKeyAndVisible();

            var traceWriter = new TextViewWriter(SynchronizationContext.Current, textView);

            var client = new CommonClient(traceWriter);
            client.RunAsync();

            return true;
        }
 /// <summary>
 /// Invoked when this page is about to be displayed in a Frame.
 /// </summary>
 /// <param name="e">Event data that describes how this page was reached.  The Parameter
 /// property is typically used to configure the page.</param>
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     var writer = new TextBoxWriter(SynchronizationContext.Current, this.Messages);
     var client = new CommonClient(writer);
     client.RunAsync();
 }
Beispiel #19
0
 /// <summary>
 /// Invoked when this page is about to be displayed in a Frame.
 /// </summary>
 /// <param name="e">Event data that describes how this page was reached.  The Parameter
 /// property is typically used to configure the page.</param>
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     var writer = new TextBoxWriter(SynchronizationContext.Current, this.Messages);
     var client = new CommonClient(writer);
     var task = client.RunAsync("http://localhost:40476/");
 }