public initialize_contents ( System.Windows.Controls.UserControl uc, |
||
uc | System.Windows.Controls.UserControl | |
obj_type | ||
obj_id | int | |
parent_frame | System.Windows.Controls.UserControl | |
width | double | |
return | void |
public void initialize_contents(UserControl uc, Type obj_type, int obj_id, UserControl parent_frame, double width)
{
this.comments_listbox.content_name = "object id = " + obj_id;
this.the_item.Content = uc;
this._object_id = obj_id;
this._object_type = obj_type;
this.comments_listbox._list.Width = width;
this.list_all_comments();
//this.add_comment_img.Source = configurations.img_drop_avatar_pic;
//var brush = new ImageBrush();
//brush.ImageSource = configurations.img_drop_avatar_pic;
//brush.Stretch = Stretch.None;
//this.leave_comment_canvas.Background = brush;
this.comment_textbox_default.Text = configurations.comment_init_text;
this.comment_textbox_reply.Text = configurations.comment_init_text;
this.parent = parent_frame;
this.pin.parent = parent_frame;
}
window_content::initialize_contents ( System.Windows.Controls.UserControl uc, |
|
window_content::initialize_contents ( System.Windows.Controls.UserControl uc, bool is_design, System.Windows.Controls.UserControl parent_frame ) : void |
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); }