private void SetupForm() { // Fill genre //GenreDropDown.ItemsSource = FillGenreDropDown(); //FillGenreDropDown(); // Fill length - math!!!! LengthDropDown.ItemsSource = FillLengthDropDown(); // Fill director - ajax too? DirectorsBox.ItemsSource = Directors; DirectorsBox.PopulateComplete(); WritersBox.ItemsSource = Writers; WritersBox.PopulateComplete(); // Actors ActorBox.ItemsSource = Actors; ActorBox.PopulateComplete(); // Titles TitleBox.ItemsSource = Titles; TitleBox.PopulateComplete(); RatingsDropDown.SelectionChanged += (cbSender, cbe) => { ComboBox cb = cbSender as ComboBox; if (cb.SelectedItem is CheckedListItem && ((CheckedListItem)cb.SelectedItem).Selectable == false) { cb.SelectedIndex = -1; } }; RatingsDropDown.ItemsSource = Ratings; cmb.SelectionChanged += (cbSender, cbe) => { ComboBox cb = cbSender as ComboBox; if (cb.SelectedItem is CheckedListItem && ((CheckedListItem)cb.SelectedItem).Selectable == false) { cb.SelectedIndex = -1; } }; cmb.ItemsSource = AvailableGenres; }
public unsafe static ActorBox GetAbsAllocationBox(Actor actor) { Vertex[] verts = new Vertex [4]; int cnt_verts = verts == null ? 0 : verts.Length; IntPtr[] native_verts = new IntPtr [cnt_verts]; //for (int i = 0; i < cnt_verts; i++) // native_verts [i] = verts[i] == null ? IntPtr.Zero : verts[i].Handle; ActorBox box = ActorBox.Zero; clutter_actor_get_abs_allocation_vertices(actor.Handle, native_verts); clutter_actor_box_from_vertices(ref box, native_verts); return(box); }
protected override void OnAllocate(ActorBox box, AllocationFlags flags) { base.OnAllocate(box, flags); artwork_display.Allocate(new ActorBox() { X1 = 0, Y1 = 0, X2 = Width, Y2 = Height }, flags); float video_width, video_height; VideoTexture.GetSize(out video_width, out video_height); if (video_width > 0 && video_height > 0) { AllocateVideoTexture((int)video_width, (int)video_height); } }
protected override void OnAllocate(ActorBox box, AllocationFlags flags) { base.OnAllocate(box, flags); float width = Width; float height = Height; if (width <= 0 || height <= 0 || width == last_alloc_width || height == last_alloc_height || Model == null) { return; } // Calculate the number of actors that will fit in our window visible_actor_count = ActorCache.GetActorCountForArea(ActorSize, (int)Width, (int)Height); if (visible_actor_count <= 0) { return; } BuildCloneGrid(); last_alloc_width = width; last_alloc_height = height; var rand = new Random(allocation_seed); float size = (float)ActorSize; visible_grid_width = (int)(Math.Ceiling(width / size)); visible_grid_height = (int)(Math.Ceiling(height / size)); for (int i = 0; i < visible_actor_count; i++) { var actor = GetRandomActor(rand); // Assign the artwork actor to a clone slot in the screen grid grid[i % visible_grid_width, i / visible_grid_width].Source = actor; } Resume(); }
protected override void OnAllocate(ActorBox box, AllocationFlags flags) { base.OnAllocate (box, flags); artwork_display.Allocate (new ActorBox (0, 0, Width, Height), flags); float video_width, video_height; VideoTexture.GetSize (out video_width, out video_height); if (video_width > 0 && video_height > 0) { AllocateVideoTexture ((int)video_width, (int)video_height); } }
private void ActorBoxPopulating(object sender, PopulatingEventArgs e) { ActorBox.ItemsSource = Actors; ActorBox.PopulateComplete(); }
private static extern void clutter_actor_box_from_vertices(ref ActorBox box, IntPtr[] vtx);