nature_net.user_controls.window_content.initialize_contents C# (CSharp) Метод

initialize_contents() публичный Метод

public initialize_contents ( System.Windows.Controls.UserControl uc, Type obj_type, int obj_id, System.Windows.Controls.UserControl parent_frame, double width ) : void
uc System.Windows.Controls.UserControl
obj_type System.Type
obj_id int
parent_frame System.Windows.Controls.UserControl
width double
Результат 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;
        }

Same methods

window_content::initialize_contents ( System.Windows.Controls.UserControl uc, Type obj_type, int obj_id, System.Windows.Controls.UserControl parent_frame, string listbox_name ) : void
window_content::initialize_contents ( System.Windows.Controls.UserControl uc, bool is_design, System.Windows.Controls.UserControl parent_frame ) : void

Usage Example

Пример #1
0
        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);
        }
All Usage Examples Of nature_net.user_controls.window_content::initialize_contents