Example #1
0
        public photoBtn(MainWindow mw, post_poto pt)
        {
            InitializeComponent();
            MW     = mw;
            mypost = pt;

            if (mypost.Photo != null)
            {
                ImageBrush IB = new ImageBrush(mypost.Photo.Source);
                mypicture.Background = IB;
            }
        }
Example #2
0
        //등록 버튼
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            /*
             * 회원번호
             * Post_Imgae
             * posttext
             * 등록날짜
             */
            string            date = DateTime.Now.ToString();
            insertPost_packet ip   = new insertPost_packet(Post_Imgae, posttext.Text, MW.Nowaccount.Acc_num, date);

            DataBaseCtrClient dbctr = new DataBaseCtrClient();

            dbctr.AddPost("대충여기어딘가", posttext.Text, MW.Nowaccount.Acc_num);

            //서버에 전송 -> 성공시
            post_poto post = new post_poto(1, Post_Imgae, "와하하", 1, 0, 0, date);

            MW.Gallery.Items.Add(new photoBtn(MW, post));
            this.Close();
        }