Exemple #1
0
        public firstMain()
        {
            InitializeComponent();

            this.flowLayoutPanel1.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.flowLayoutPanel1_MouseWheel);
            for (int i = 0; i < LT.Length; i++)
            {
                LT[i]           = new listItem();
                LT[i].Name      = "Seo Jisu" + i.ToString();
                LT[i].Imagebox  = Resources.jisu2;
                LT[i].MainImage = Resources.jisu2;
                if (flowLayoutPanel1.Controls.Count < 0)
                {
                    flowLayoutPanel1.Controls.Clear();
                }
            }
            flowLayoutPanel1.Controls.Add(LT[0]);
        }
Exemple #2
0
        public firstMain(MainDisplay maindisplay)
        {
            InitializeComponent();
            this.maindisplay = maindisplay;
            string User_ID = setuser.getUser_id();

            Func <Task> runAsync = async() =>
            {
                try
                {
                    postList = await client.GetFriendsPost(User_ID).ConfigureAwait(false);

                    Console.WriteLine(User_ID);
                    Console.WriteLine(postList.Count);
                    listCount = postList.Count();
                    U_ID      = new string[listCount];
                    int j = 0;
                    if (listCount > 0)
                    {
                        outsider = false;
                        foreach (var postItem in postList)
                        {
                            Console.WriteLine(postItem.userNumber);

                            U_ID[j] = (await client.GetUserID(postItem.userNumber).ConfigureAwait(false));
                            j++;
                        }
                    }
                }
                catch (Exception q)
                {
                    Console.WriteLine(q.Message);
                }
            };

            runAsync().GetAwaiter().GetResult();
            int i = 0;

            if (outsider)
            {
                Console.WriteLine("OutSider!");
            }

            else
            {
                LT = new listItem[listCount];
                this.flowLayoutPanel1.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.flowLayoutPanel1_MouseWheel);

                foreach (var postItem in postList)
                {
                    LT[i]            = new listItem(maindisplay);
                    LT[i].Name       = U_ID[i];
                    LT[i].Imagebox   = Resources.jisu;
                    LT[i].MainImage  = LT[i].LP[0].Image_main;
                    LT[i].Music_name = "러블리즈_Sweet Dream.mp3";
                    LT[i].time       = postItem.time;
                    LT[i].Message    = postItem.content;
                    i++;
                    if (flowLayoutPanel1.Controls.Count < 0)
                    {
                        flowLayoutPanel1.Controls.Clear();
                    }
                    Console.WriteLine("lovelz");
                }
                flowLayoutPanel1.Controls.Add(LT[0]);
            }
        }