Ejemplo n.º 1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.ActivityNewsfeed);

            _newsfeedRepo                       = TinyIoC.TinyIoCContainer.Current.Resolve <INewsfeedRepository> ();
            _newsfeedMessageProcessor           = TinyIoC.TinyIoCContainer.Current.Resolve <INewsfeedMessageProcessor> ();
            _newsfeedMessageProcessor.OnUpdate += OnNewsFeedUpdate;
            Initialize();
        }
Ejemplo n.º 2
0
 void Init()
 {
     _newsfeedMessageProcessor = TinyIoC.TinyIoCContainer.Current.Resolve <INewsfeedMessageProcessor> ();
     _newsfeedRepository       = TinyIoC.TinyIoCContainer.Current.Resolve <INewsfeedRepository> ();
     btnCancel        = FindViewById <Button> (Resource.Id.nfa_cancel);
     btnCancel.Click += (object sender, EventArgs e) => Finish();
     btnSend          = FindViewById <Button> (Resource.Id.nfa_btn_send);
     btnSend.Click   += OnSendClicked;
     inpText          = FindViewById <EditText> (Resource.Id.nfa_inp_text);
     imgViewImage     = FindViewById <ImageView> (Resource.Id.nfa_imgView_img);
     if (App.bitmap != null)
     {
         imgViewImage.SetImageBitmap(App.bitmap);
     }
 }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.ActivityCommunicationTest);
            _newsfeedMessageProcessor           = TinyIoC.TinyIoCContainer.Current.Resolve <INewsfeedMessageProcessor> ();
            _newsfeedMessageProcessor.OnUpdate += OnWallPostsUpdate;
            _newsfeedRepository = TinyIoC.TinyIoCContainer.Current.Resolve <INewsfeedRepository> ();

            new Thread(() => {
                using (Stream inputSteam = this.Assets.Open("Indien_Goa_Strand-marked_kleen.jpg"))
                {
                    var _originalBitmap = BitmapFactory.DecodeStream(inputSteam);
                    MemoryStream stream = new MemoryStream();
                    _originalBitmap.Compress(Bitmap.CompressFormat.Png, 0, stream);
                    imageBytes = stream.ToArray();
                }
            }).Start();
            Initialze();
        }
Ejemplo n.º 4
0
 public TcpService()
 {
     _loginMessageProcessor    = TinyIoC.TinyIoCContainer.Current.Resolve <ILogInMessageProcessor> ();
     _newsfeedMessageProcessor = TinyIoC.TinyIoCContainer.Current.Resolve <INewsfeedMessageProcessor> ();
 }