public static void open_collection_window(string username, int userid, double pos_x, double pos_y) { if (window_manager.collection_frames.Count + 1 > configurations.max_collection_frame) return; window_frame frame = new window_frame(); window_content content = new window_content(); collection_listbox c_listbox = new collection_listbox(); c_listbox.parent = frame; c_listbox.list_all_contributions(username); content.initialize_contents(c_listbox, Type.GetType("nature_net.User"), userid, frame, username + "'s " + configurations.frame_title); frame.window_content.Content = content; content.list_all_comments(); window_manager.collection_frames.Add(frame); open_window(frame, pos_x, pos_y); frame.set_title(username + "'s " + configurations.frame_title); }
public static void open_location_collection_window(string location, int location_id, double pos_x, double pos_y) { if (window_manager.collection_frames.Count + 1 > configurations.max_collection_frame) return; window_frame frame = new window_frame(); window_content content = new window_content(); collection_listbox c_listbox = new collection_listbox(); c_listbox.parent = frame; c_listbox.list_contributions_in_location(location_id); //content.initialize_contents(c_listbox); content.initialize_contents(c_listbox, Type.GetType("nature_net.Location"), location_id, frame, configurations.frame_title + " in " + location_id.ToString() + ": " + location); frame.window_content.Content = content; content.list_all_comments(); window_manager.collection_frames.Add(frame); open_window(frame, pos_x - (frame.Width / 2), pos_y - (c_listbox.Height)); frame.set_title(configurations.frame_title + " in " + location_id.ToString() + ": " + location); }
public static void open_activity_window(string activity_name, int activity_id, double pos_x, double pos_y) { if (window_manager.activity_frames.Count + 1 > configurations.max_activity_frame) return; window_frame frame = new window_frame(); window_content content = new window_content(); collection_listbox c_listbox = new collection_listbox(); c_listbox.parent = frame; c_listbox.list_contributions_in_activity(activity_id); content.initialize_contents(c_listbox, Type.GetType("nature_net.Activity"), activity_id, frame, activity_name + "'s " + configurations.frame_title); frame.window_content.Content = content; content.list_all_comments(); window_manager.activity_frames.Add(frame); open_window(frame, pos_x, pos_y); string title = activity_name; //if (activity_name.Length > configurations.max_activity_frame_title_chars) // title = activity_name.Substring(0, 10) + "..."; frame.set_title(title + "'s " + configurations.frame_title); }