当前位置: 首页>>代码示例>>C#>>正文


C# OpenTween.FormInfo类代码示例

本文整理汇总了C#中OpenTween.FormInfo的典型用法代码示例。如果您正苦于以下问题:C# FormInfo类的具体用法?C# FormInfo怎么用?C# FormInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FormInfo类属于OpenTween命名空间,在下文中一共展示了FormInfo类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: doShowUserStatus

 private void doShowUserStatus(string id, bool ShowInputDialog)
 {
     TwitterDataModel.User user = null;
     GetUserInfoArgs args = new GetUserInfoArgs();
     if (ShowInputDialog)
     {
         using (InputTabName inputName = new InputTabName())
         {
             inputName.FormTitle = "Show UserStatus";
             inputName.FormDescription = Properties.Resources.FRMessage1;
             inputName.TabName = id;
             if (inputName.ShowDialog() == DialogResult.OK &&
                 !string.IsNullOrEmpty(inputName.TabName.Trim()))
             {
                 id = inputName.TabName.Trim();
                 args.tw = tw;
                 args.id = id;
                 args.user = user;
                 using (FormInfo _info = new FormInfo(this, Properties.Resources.doShowUserStatusText1,
                                                      GetUserInfo_DoWork,
                                                      null,
                                                      args))
                 {
                     _info.ShowDialog();
                     string ret = (string)_info.Result;
                     if (string.IsNullOrEmpty(ret))
                         doShowUserStatus(args.user);
                     else
                         MessageBox.Show(ret);
                 }
             }
         }
     }
     else
     {
         args.tw = tw;
         args.id = id;
         args.user = user;
         using (FormInfo _info = new FormInfo(this, Properties.Resources.doShowUserStatusText1,
                                              GetUserInfo_DoWork,
                                              null,
                                              args))
         {
             _info.ShowDialog();
             string ret = (string)_info.Result;
             if (string.IsNullOrEmpty(ret))
             {
                 doShowUserStatus(args.user);
             }
             else
             {
                 MessageBox.Show(ret);
             }
         }
     }
 }
开发者ID:lupeeloveee,项目名称:OpenTween,代码行数:56,代码来源:Tween.cs

示例2: RemoveCommand

        private void RemoveCommand(string id, bool skipInput)
        {
            FollowRemoveCommandArgs arg = new FollowRemoveCommandArgs();
            arg.tw = tw;
            arg.id = id;
            if (!skipInput)
            {
                using (InputTabName inputName = new InputTabName())
                {
                    inputName.FormTitle = "Unfollow";
                    inputName.FormDescription = Properties.Resources.FRMessage1;
                    inputName.TabName = id;
                    if (inputName.ShowDialog() == DialogResult.OK &&
                        !string.IsNullOrEmpty(inputName.TabName.Trim()))
                    {
                        arg.tw = tw;
                        arg.id = inputName.TabName.Trim();
                    }
                    else
                    {
                        return;
                    }
                }
            }

            using (FormInfo _info = new FormInfo(this, Properties.Resources.RemoveCommandText1,
                                                 RemoveCommand_DoWork,
                                                 null,
                                                 arg))
            {
                _info.ShowDialog();
                string ret = (string)_info.Result;
                if (!string.IsNullOrEmpty(ret))
                    MessageBox.Show(Properties.Resources.FRMessage2 + ret);
                else
                    MessageBox.Show(Properties.Resources.FRMessage3);
            }
        }
开发者ID:lupeeloveee,项目名称:OpenTween,代码行数:38,代码来源:Tween.cs

示例3: ShowFriendship

        private void ShowFriendship(string[] ids)
        {
            foreach (string id in ids)
            {
                string ret = "";
                ShowFriendshipArgs args = new ShowFriendshipArgs();
                args.tw = tw;
                args.ids.Add(new ShowFriendshipArgs.FriendshipInfo(id.Trim()));
                using (FormInfo _info = new FormInfo(this, Properties.Resources.ShowFriendshipText1,
                                                     ShowFriendship_DoWork,
                                                     null,
                                                     args))
                {
                    _info.ShowDialog();
                    ret = (string)_info.Result;
                }
                string result = "";
                ShowFriendshipArgs.FriendshipInfo fInfo = args.ids[0];
                string ff = "";
                if (string.IsNullOrEmpty(ret))
                {
                    ff = "  ";
                    if (fInfo.isFollowing)
                    {
                        ff += Properties.Resources.GetFriendshipInfo1;
                    }
                    else
                    {
                        ff += Properties.Resources.GetFriendshipInfo2;
                    }

                    ff += System.Environment.NewLine + "  ";
                    if (fInfo.isFollowed)
                    {
                        ff += Properties.Resources.GetFriendshipInfo3;
                    }
                    else
                    {
                        ff += Properties.Resources.GetFriendshipInfo4;
                    }
                    result += fInfo.id + Properties.Resources.GetFriendshipInfo5 + System.Environment.NewLine + ff;
                    if (fInfo.isFollowing)
                    {
                        if (MessageBox.Show(
                            Properties.Resources.GetFriendshipInfo7 + System.Environment.NewLine + result, Properties.Resources.GetFriendshipInfo8,
                            MessageBoxButtons.YesNo,
                            MessageBoxIcon.Question,
                            MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                        {
                            RemoveCommand(fInfo.id, true);
                        }
                    }
                    else
                    {
                        MessageBox.Show(result);
                    }
                }
                else
                {
                    MessageBox.Show(ret);
                }
            }
        }
开发者ID:lupeeloveee,项目名称:OpenTween,代码行数:63,代码来源:Tween.cs

示例4: ApiInfoMenuItem_Click

        private void ApiInfoMenuItem_Click(object sender, EventArgs e)
        {
            ApiInfo info = new ApiInfo();
            StringBuilder tmp = new StringBuilder();
            GetApiInfoArgs args = new GetApiInfoArgs() {tw = tw, info = info};

            using (FormInfo dlg = new FormInfo(this, Properties.Resources.ApiInfo6, GetApiInfo_Dowork, null, args))
            {
                dlg.ShowDialog();
                if ((bool)dlg.Result)
                {
                    tmp.AppendLine(Properties.Resources.ApiInfo1 + args.info.MaxCount.ToString());
                    tmp.AppendLine(Properties.Resources.ApiInfo2 + args.info.RemainCount.ToString());
                    tmp.AppendLine(Properties.Resources.ApiInfo3 + args.info.ResetTime.ToString());
                    tmp.AppendLine(Properties.Resources.ApiInfo7 + (tw.UserStreamEnabled ? Properties.Resources.Enable : Properties.Resources.Disable).ToString());

                    tmp.AppendLine();
                    tmp.AppendLine(Properties.Resources.ApiInfo8 + args.info.AccessLevel.ToString());
                    SetStatusLabelUrl();

                    tmp.AppendLine();
                    tmp.AppendLine(Properties.Resources.ApiInfo9 + (args.info.MediaMaxCount < 0 ? Properties.Resources.ApiInfo91 : args.info.MediaMaxCount.ToString()));
                    tmp.AppendLine(Properties.Resources.ApiInfo10 + (args.info.MediaRemainCount < 0 ? Properties.Resources.ApiInfo91 : args.info.MediaRemainCount.ToString()));
                    tmp.AppendLine(Properties.Resources.ApiInfo11 + (args.info.MediaResetTime == new DateTime() ? Properties.Resources.ApiInfo91 : args.info.MediaResetTime.ToString()));
                }
                else
                {
                    tmp.Append(Properties.Resources.ApiInfo5);
                }
            }

            MessageBox.Show(tmp.ToString(), Properties.Resources.ApiInfo4, MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
开发者ID:lupeeloveee,项目名称:OpenTween,代码行数:33,代码来源:Tween.cs

示例5: RtCountMenuItem_Click

        private void RtCountMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ExistCurrentPost)
            {
                using (FormInfo _info = new FormInfo(this, Properties.Resources.RtCountMenuItem_ClickText1,
                                                     GetRetweet_DoWork))
                {
                    int retweet_count = 0;

                    // ダイアログ表示
                    _info.ShowDialog();
                    retweet_count = (int)_info.Result;
                    if (retweet_count < 0)
                    {
                        MessageBox.Show(Properties.Resources.RtCountText2);
                    }
                    else
                    {
                        MessageBox.Show(retweet_count.ToString() + Properties.Resources.RtCountText1);
                    }
                }
            }
        }
开发者ID:lupeeloveee,项目名称:OpenTween,代码行数:23,代码来源:Tween.cs

示例6: doChangeIcon

        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 );
                }
            }
        }
开发者ID:noqisofon,项目名称:OpenTween,代码行数:19,代码来源:ShowUserInfo.cs

示例7: ButtonEdit_Click

        private void ButtonEdit_Click(object sender, EventArgs e)
        {
            // 自分以外のプロフィールは変更できない
            if ( MyOwner.TwitterInstance.Username != _info.ScreenName )
                return;

            if ( !IsEditing ) {
                ButtonEditText = ButtonEdit.Text;
                ButtonEdit.Text = Properties.Resources.UserInfoButtonEdit_ClickText1;

                //座標初期化,プロパティ設定
                TextBoxName.Location = LabelName.Location;
                TextBoxName.Height = LabelName.Height;
                TextBoxName.Width = LabelName.Width;
                TextBoxName.BackColor = MyOwner.InputBackColor;
                TextBoxName.MaxLength = 20;
                TextBoxName.Text = LabelName.Text;
                TextBoxName.TabStop = true;
                TextBoxName.Visible = true;
                LabelName.Visible = false;

                TextBoxLocation.Location = LabelLocation.Location;
                TextBoxLocation.Height = LabelLocation.Height;
                TextBoxLocation.Width = LabelLocation.Width;
                TextBoxLocation.BackColor = MyOwner.InputBackColor;
                TextBoxLocation.MaxLength = 30;
                TextBoxLocation.Text = LabelLocation.Text;
                TextBoxLocation.TabStop = true;
                TextBoxLocation.Visible = true;
                LabelLocation.Visible = false;

                TextBoxWeb.Location = LinkLabelWeb.Location;
                TextBoxWeb.Height = LinkLabelWeb.Height;
                TextBoxWeb.Width = LinkLabelWeb.Width;
                TextBoxWeb.BackColor = MyOwner.InputBackColor;
                TextBoxWeb.MaxLength = 100;
                TextBoxWeb.Text = _info.Url;
                TextBoxWeb.TabStop = true;
                TextBoxWeb.Visible = true;
                LinkLabelWeb.Visible = false;

                TextBoxDescription.Location = DescriptionBrowser.Location;
                TextBoxDescription.Height = DescriptionBrowser.Height;
                TextBoxDescription.Width = DescriptionBrowser.Width;
                TextBoxDescription.BackColor = MyOwner.InputBackColor;
                TextBoxDescription.MaxLength = 160;
                TextBoxDescription.Text = _info.Description;
                TextBoxDescription.Multiline = true;
                TextBoxDescription.ScrollBars = ScrollBars.Vertical;
                TextBoxDescription.TabStop = true;
                TextBoxDescription.Visible = true;
                DescriptionBrowser.Visible = false;

                TextBoxName.Focus();
                TextBoxName.Select( TextBoxName.Text.Length, 0 );

                IsEditing = true;
            } else {
                UpdateProfileArgs arg = new UpdateProfileArgs ();

                if ( TextBoxName.Modified ||
                    TextBoxLocation.Modified ||
                    TextBoxWeb.Modified ||
                    TextBoxDescription.Modified ) {
                    arg.tw = MyOwner.TwitterInstance;
                    arg.name = TextBoxName.Text.Trim();
                    arg.url = TextBoxWeb.Text.Trim();
                    arg.location = TextBoxLocation.Text.Trim();
                    arg.description = TextBoxDescription.Text.Trim();

                    using (FormInfo dlg = new FormInfo(this, Properties.Resources.UserInfoButtonEdit_ClickText2,
                                                       UpdateProfile_Dowork,
                                                       UpddateProfile_RunWorkerCompleted,
                                                       arg)) {
                        dlg.ShowDialog();
                        if ( !string.IsNullOrEmpty( dlg.Result.ToString() ) ) {
                            return;
                        }
                    }
                }

                LabelName.Text = TextBoxName.Text;
                _info.Name = LabelName.Text;
                TextBoxName.TabStop = false;
                TextBoxName.Visible = false;
                LabelName.Visible = true;

                LabelLocation.Text = TextBoxLocation.Text;
                _info.Location = LabelLocation.Text;
                TextBoxLocation.TabStop = false;
                TextBoxLocation.Visible = false;
                LabelLocation.Visible = true;

                SetLinklabelWeb( TextBoxWeb.Text );
                _info.Url = TextBoxWeb.Text;
                TextBoxWeb.TabStop = false;
                TextBoxWeb.Visible = false;
                LinkLabelWeb.Visible = true;

                DescriptionBrowser.DocumentText = MakeDescriptionBrowserText( TextBoxDescription.Text );
//.........这里部分代码省略.........
开发者ID:noqisofon,项目名称:OpenTween,代码行数:101,代码来源:ShowUserInfo.cs

示例8: ApiUsageInfoMenuItem_Click

        private void ApiUsageInfoMenuItem_Click(object sender, EventArgs e)
        {
            StringBuilder tmp = new StringBuilder();

            using (FormInfo dlg = new FormInfo(this, Properties.Resources.ApiInfo6, GetApiInfo_Dowork))
            {
                dlg.ShowDialog();

                var result = (TwitterApiStatus)dlg.Result;

                if (result == null)
                {
                    var accessLevel = result.AccessLevel;
                    var timelineLimit = result.AccessLimit["/statuses/home_timeline"];
                    var mediaLimit = result.MediaUploadLimit;

                    tmp.AppendLine(Properties.Resources.ApiInfo1 + timelineLimit.AccessLimitCount);
                    tmp.AppendLine(Properties.Resources.ApiInfo2 + timelineLimit.AccessLimitRemain);
                    tmp.AppendLine(Properties.Resources.ApiInfo3 + timelineLimit.AccessLimitResetDate);
                    tmp.AppendLine(Properties.Resources.ApiInfo7 + (tw.UserStreamEnabled ? Properties.Resources.Enable : Properties.Resources.Disable));

                    tmp.AppendLine();
                    tmp.AppendLine(Properties.Resources.ApiInfo8 + accessLevel);
                    SetStatusLabelUrl();

                    tmp.AppendLine();
                    tmp.AppendLine(Properties.Resources.ApiInfo9 + (mediaLimit == null ? Properties.Resources.ApiInfo91 : mediaLimit.AccessLimitCount.ToString()));
                    tmp.AppendLine(Properties.Resources.ApiInfo10 + (mediaLimit == null ? Properties.Resources.ApiInfo91 : mediaLimit.AccessLimitRemain.ToString()));
                    tmp.AppendLine(Properties.Resources.ApiInfo11 + (mediaLimit == null ? Properties.Resources.ApiInfo91 : mediaLimit.AccessLimitResetDate.ToString()));
                }
                else
                {
                    tmp.Append(Properties.Resources.ApiInfo5);
                }
            }

            MessageBox.Show(tmp.ToString(), Properties.Resources.ApiInfo4, MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
开发者ID:nanayaT,项目名称:OpenTween,代码行数:38,代码来源:Tween.cs

示例9: RefreshLists

 private void RefreshLists()
 {
     using (FormInfo dlg = new FormInfo(this, Properties.Resources.ListsGetting, RefreshLists_Dowork))
     {
         dlg.ShowDialog();
         if (!String.IsNullOrEmpty((string)dlg.Result))
         {
             MessageBox.Show(String.Format(Properties.Resources.ListsDeleteFailed, (string)dlg.Result));
             return;
         }
     }
 }
开发者ID:rhenium,项目名称:OpenTween,代码行数:12,代码来源:ListManage.cs

示例10: RefreshLists

 private void RefreshLists()
 {
     using (FormInfo dlg = new FormInfo(this, "Getting Lists...", RefreshLists_DoWork))
     {
         dlg.ShowDialog();
         if (!String.IsNullOrEmpty(dlg.Result as String))
         {
             MessageBox.Show("Failed to get lists. (" + (String)dlg.Result + ")");
             return;
         }
     }
 }
开发者ID:egcube,项目名称:OpenTween,代码行数:12,代码来源:ListAvailable.cs


注:本文中的OpenTween.FormInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。