Example #1
0
        private async void EditProfileDialog_Load(object sender, EventArgs e)
        {
            var profile = await mApi.EditUserProfileAsync();

            if (profile == null)
            {
                return;
            }

            textBox1.Text = profile.UserName;
            if (profile.Text != null)
            {
                textBox2.Text = profile.Text.Replace("\\n", Environment.NewLine);
            }
        }
Example #2
0
        private async void EditProfileDialog_Load(object sender, EventArgs e)
        {
            var profile = await mApi.EditUserProfileAsync();

            if (profile == null)
            {
                MessageBox.Show("情報の取得に失敗しました", "エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            textBox1.Text = profile.UserName;
            if (profile.Text != null)
            {
                textBox2.Text = profile.Text.Replace("\\n", Environment.NewLine);
            }
        }
Example #3
0
        private async void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
        {
            var profile = await mApi.EditUserProfileAsync();

            if (profile == null)
            {
                return;
            }

            var response     = new Response();
            var responseList = new ResponseList();

            response.Id            = mTopic.Count + 1;
            response.UserId        = mApi.UserId;
            response.UserName      = profile.UserName;
            response.UserDan       = profile.UserDan;
            response.UserTitle     = profile.UserTitle;
            response.Created       = Common.DateTimeToUnixTimeStamp(DateTime.Now);
            response.UserTimes     = "1/1";
            response.Receive       = "0";
            response.ReceivedCount = 0;
            response.Level         = 0;
            response.Text          = textBox1.Text;
            responseList.Topic     = mTopic;
            responseList.Responses.Add(response);

            webBrowser1.DocumentText = await mParent.BuildWebBrowserDocument(responseList);
        }