Exemplo n.º 1
0
        private void doChangeIcon(string filename)
        {
            string res = "";
            UpdateProfileImageArgs arg = new UpdateProfileImageArgs()
            {
                tw = MyOwner.TwitterInstance, FileName = filename
            };

            using (FormInfo dlg = new FormInfo(this, Properties.Resources.ChangeIconToolStripMenuItem_ClickText3,
                                               UpdateProfileImage_Dowork,
                                               UpdateProfileImage_RunWorkerCompleted,
                                               arg))
            {
                dlg.ShowDialog();
                res = dlg.Result as string;
                if (!string.IsNullOrEmpty(res))
                {
                    // "Err:"が付いたエラーメッセージが返ってくる
                    MessageBox.Show(res + "\r\n" + Properties.Resources.ChangeIconToolStripMenuItem_ClickText4);
                }
                else
                {
                    MessageBox.Show(Properties.Resources.ChangeIconToolStripMenuItem_ClickText5);
                }
            }
        }
Exemplo n.º 2
0
        private void ChangeIcon(string filename)
        {
            var arg = new UpdateProfileImageArgs
            {
                Tw       = _owner.TwitterInstance,
                FileName = filename
            };

            using (var dlg = new FormInfo(this, R.ChangeIconToolStripMenuItem_ClickText3, UpdateProfileImage_Dowork, UpdateProfileImage_RunWorkerCompleted, arg))
            {
                dlg.ShowDialog();
                var res = dlg.Result as string;
                if (!string.IsNullOrEmpty(res))
                {
                    // "Err:"が付いたエラーメッセージが返ってくる
                    MessageBox.Show(res + Environment.NewLine + R.ChangeIconToolStripMenuItem_ClickText4);
                }
                else
                {
                    MessageBox.Show(R.ChangeIconToolStripMenuItem_ClickText5);
                }
            }
        }
Exemplo n.º 3
0
        private void doChangeIcon(string filename)
        {
            string res = "";
            UpdateProfileImageArgs arg = new UpdateProfileImageArgs () { tw = MyOwner.TwitterInstance, FileName = filename };

            using (FormInfo dlg = new FormInfo(this, Properties.Resources.ChangeIconToolStripMenuItem_ClickText3,
                                               UpdateProfileImage_Dowork,
                                               UpdateProfileImage_RunWorkerCompleted,
                                               arg)) {
                dlg.ShowDialog();
                res = dlg.Result as string;
                if ( !string.IsNullOrEmpty( res ) ) {
                    // "Err:"が付いたエラーメッセージが返ってくる
                    MessageBox.Show( res + "\r\n" + Properties.Resources.ChangeIconToolStripMenuItem_ClickText4 );
                } else {
                    MessageBox.Show( Properties.Resources.ChangeIconToolStripMenuItem_ClickText5 );
                }
            }
        }
Exemplo n.º 4
0
        private void UpdateProfileImage_Dowork(object sender, DoWorkEventArgs e)
        {
            UpdateProfileImageArgs arg = (UpdateProfileImageArgs)e.Argument;

            e.Result = arg.tw.PostUpdateProfileImage(arg.FileName);
        }
Exemplo n.º 5
0
        private void ChangeIcon(string filename)
        {
            var arg = new UpdateProfileImageArgs
            {
                Tw = _owner.TwitterInstance,
                FileName = filename
            };

            using (var dlg = new FormInfo(this, R.ChangeIconToolStripMenuItem_ClickText3, UpdateProfileImage_Dowork, UpdateProfileImage_RunWorkerCompleted, arg))
            {
                dlg.ShowDialog();
                var res = dlg.Result as string;
                if (!string.IsNullOrEmpty(res))
                {
                    // "Err:"が付いたエラーメッセージが返ってくる
                    MessageBox.Show(res + Environment.NewLine + R.ChangeIconToolStripMenuItem_ClickText4);
                }
                else
                {
                    MessageBox.Show(R.ChangeIconToolStripMenuItem_ClickText5);
                }
            }
        }