Exemple #1
0
 private void TransferStartedHandler(TransferStatusArgs args)
 {
     if (targets.ContainsKey(args.TargetServiceInfo.ID))
     {
         TargetService ts = targets[args.TargetServiceInfo.ID];
         ts.SetupTransferEventHandlers();
     }
 }
Exemple #2
0
 public void OnServiceAdded(object o, ServiceArgs args)
 {
     Gtk.Application.Invoke(delegate {
         Logger.Debug("Adding the service {0}", args.ServiceInfo.ID);
         TargetService target = new TargetService(args.ServiceInfo);
         target.ShowAll();
         targetVBox.PackStart(target, false, false, 0);
         targets.Add(args.ServiceInfo.ID, target);
     });
 }
Exemple #3
0
 public void OnAvatarUpdated(ServiceInfo serviceInfo)
 {
     Logger.Debug("TargetWindow::OnAvatarUpdated - called");
     try {
         TargetService target = targets[serviceInfo.ID];
         target.UpdateImage(serviceInfo.Photo);
     } catch (Exception opu) {
         Logger.Debug(opu.Message);
     }
 }
Exemple #4
0
        private void PopulateInitialTargets()
        {
            foreach (Giver.ServiceInfo serviceInfo in serviceLocator.Services)
            {
                TargetService target = new TargetService(serviceInfo);
                targetVBox.PackStart(target, false, false, 0);
                targets.Add(serviceInfo.ID, target);
//	            item.Activated += OnSelectedService;
            }
        }
Exemple #5
0
        ///<summary>
        ///	InitWindow
        /// Sets up the widgets and events in the chat window
        ///</summary>
        void InitWindow()
        {
            this.Icon = Utilities.GetIcon("giver-48", 48);
            // Update the window title
            Title = string.Format("Giver Recipients");

            this.DefaultSize = new Gdk.Size(300, 500);

            // Start with an event box to paint the background white
            EventBox eb = new EventBox();

            eb.BorderWidth = 0;
            eb.ModifyBg(StateType.Normal, new Gdk.Color(255, 255, 255));
            eb.ModifyBase(StateType.Normal, new Gdk.Color(255, 255, 255));

            VBox mainVBox = new VBox();

            mainVBox.BorderWidth = 0;
            mainVBox.Show();
            eb.Add(mainVBox);
            this.Add(eb);

            scrolledWindow = new ScrolledWindow();
            scrolledWindow.VscrollbarPolicy = PolicyType.Automatic;
            scrolledWindow.HscrollbarPolicy = PolicyType.Never;
            //scrolledWindow.ShadowType = ShadowType.None;
            scrolledWindow.BorderWidth = 0;
            scrolledWindow.CanFocus    = true;
            scrolledWindow.Show();
            mainVBox.PackStart(scrolledWindow, true, true, 0);

            // Add a second Event box in the scrolled window so it will also be white
            EventBox innerEb = new EventBox();

            innerEb.BorderWidth = 0;
            innerEb.ModifyBg(StateType.Normal, new Gdk.Color(255, 255, 255));
            innerEb.ModifyBase(StateType.Normal, new Gdk.Color(255, 255, 255));

            targetVBox             = new VBox();
            targetVBox.BorderWidth = 0;
            targetVBox.Show();
            innerEb.Add(targetVBox);

            scrolledWindow.AddWithViewport(innerEb);

            //mainVBox.PackStart (targetVBox, false, false, 0);
            manualTarget = new TargetService();
            manualTarget.Show();
            mainVBox.PackStart(manualTarget, false, false, 0);

            Shown       += OnWindowShown;
            DeleteEvent += WindowDeleted;

            Application.Instance.TransferStarted += TransferStartedHandler;
        }
Exemple #6
0
    	public void OnServiceAdded (object o, ServiceArgs args)
		{
			Gtk.Application.Invoke( delegate {
				Logger.Debug("Adding the service {0}", args.ServiceInfo.ID);
				TargetService target = new TargetService(args.ServiceInfo);
				target.ShowAll();
				targetVBox.PackStart (target, false, false, 0);
				targets.Add(args.ServiceInfo.ID, target);
			} );
		}
Exemple #7
0
		private void PopulateInitialTargets()
		{
			foreach(Giver.ServiceInfo serviceInfo in serviceLocator.Services) {
				TargetService target = new TargetService(serviceInfo);
				targetVBox.PackStart (target, false, false, 0);
				targets.Add(serviceInfo.ID, target);
//	 			item.Activated += OnSelectedService;
			}
		}
Exemple #8
0
		///<summary>
		///	InitWindow
		/// Sets up the widgets and events in the chat window
		///</summary>	
		void InitWindow()
		{
			this.Icon = Utilities.GetIcon ("giver-48", 48);
			// Update the window title
			Title = string.Format ("Giver Recipients");	
			
			this.DefaultSize = new Gdk.Size (300, 500); 			

			// Start with an event box to paint the background white
			EventBox eb = new EventBox();
			eb.BorderWidth = 0;
            eb.ModifyBg(StateType.Normal, new Gdk.Color(255,255,255));
            eb.ModifyBase(StateType.Normal, new Gdk.Color(255,255,255));

			VBox mainVBox = new VBox();
			mainVBox.BorderWidth = 0;
			mainVBox.Show ();
			eb.Add(mainVBox);
			this.Add (eb);

			scrolledWindow = new ScrolledWindow ();
			scrolledWindow.VscrollbarPolicy = PolicyType.Automatic;
			scrolledWindow.HscrollbarPolicy = PolicyType.Never;
			//scrolledWindow.ShadowType = ShadowType.None;
			scrolledWindow.BorderWidth = 0;
			scrolledWindow.CanFocus = true;
			scrolledWindow.Show ();
			mainVBox.PackStart (scrolledWindow, true, true, 0);

			// Add a second Event box in the scrolled window so it will also be white
			EventBox innerEb = new EventBox();
			innerEb.BorderWidth = 0;
            innerEb.ModifyBg(StateType.Normal, new Gdk.Color(255,255,255));
            innerEb.ModifyBase(StateType.Normal, new Gdk.Color(255,255,255));

			targetVBox = new VBox();
			targetVBox.BorderWidth = 0;
			targetVBox.Show ();
			innerEb.Add(targetVBox);

			scrolledWindow.AddWithViewport(innerEb);

			//mainVBox.PackStart (targetVBox, false, false, 0);
			manualTarget = new TargetService();
			manualTarget.Show ();
			mainVBox.PackStart(manualTarget, false, false, 0);

			Shown += OnWindowShown;
			DeleteEvent += WindowDeleted;

			Application.Instance.TransferStarted += TransferStartedHandler;
		}