private void TransferStartedHandler(TransferStatusArgs args) { if (targets.ContainsKey(args.TargetServiceInfo.ID)) { TargetService ts = targets[args.TargetServiceInfo.ID]; ts.SetupTransferEventHandlers(); } }
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); }); }
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); } }
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; } }
///<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; }
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); } ); }
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; } }
///<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; }