當前位置: 首頁>>代碼示例>>C#>>正文


C# TabClass.AddSubmit方法代碼示例

本文整理匯總了C#中OpenTween.TabClass.AddSubmit方法的典型用法代碼示例。如果您正苦於以下問題:C# TabClass.AddSubmit方法的具體用法?C# TabClass.AddSubmit怎麽用?C# TabClass.AddSubmit使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OpenTween.TabClass的用法示例。


在下文中一共展示了TabClass.AddSubmit方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: OldestUnreadId_Test

        public void OldestUnreadId_Test()
        {
            var tab = new TabClass { TabType = MyCommon.TabUsageType.UserTimeline };

            tab.UnreadManage = true;

            // 未読なし
            Assert.Equal(-1L, tab.OldestUnreadId);

            tab.AddPostToInnerStorage(new PostClass
            {
                StatusId = 100L,
                IsRead = false, // 未読
            });
            tab.AddSubmit();

            Assert.Equal(100L, tab.OldestUnreadId);

            tab.AddPostToInnerStorage(new PostClass
            {
                StatusId = 50L,
                IsRead = true, // 既読
            });
            tab.AddSubmit();

            Assert.Equal(100L, tab.OldestUnreadId);
        }
開發者ID:urusupa,項目名稱:OpenTween,代碼行數:27,代碼來源:TabClassTest.cs

示例2: NextUnreadId_DisabledTest

        public void NextUnreadId_DisabledTest()
        {
            var tab = new TabClass { TabType = MyCommon.TabUsageType.UserTimeline };

            // 未読表示無効
            tab.UnreadManage = false;

            tab.AddPostToInnerStorage(new PostClass
            {
                StatusId = 100L,
                IsRead = false, // 未読
            });
            tab.AddSubmit();

            Assert.Equal(-1L, tab.NextUnreadId);
        }
開發者ID:nezuku,項目名稱:OpenTween,代碼行數:16,代碼來源:TabClassTest.cs

示例3: SetReadState_MarkAsUnreadTest

        public void SetReadState_MarkAsUnreadTest()
        {
            var tab = new TabClass { TabType = MyCommon.TabUsageType.UserTimeline };

            tab.UnreadManage = true;

            tab.AddPostToInnerStorage(new PostClass
            {
                StatusId = 100L,
                IsRead = true, // 既読
            });
            tab.AddSubmit();

            Assert.Equal(0, tab.UnreadCount);

            tab.SetReadState(100L, false); // 未読にする

            Assert.Equal(1, tab.UnreadCount);
        }
開發者ID:urusupa,項目名稱:OpenTween,代碼行數:19,代碼來源:TabClassTest.cs

示例4: OldestUnreadIndex_DisabledTest

        public void OldestUnreadIndex_DisabledTest()
        {
            var tab = new TabClass { TabType = MyCommon.TabUsageType.UserTimeline };

            // 未読表示無効
            tab.UnreadManage = false;

            tab.AddPostToInnerStorage(new PostClass
            {
                StatusId = 100L,
                IsRead = false, // 未読
            });
            tab.AddSubmit();

            tab.SortMode = ComparerMode.Id;
            tab.SortOrder = SortOrder.Ascending;
            tab.Sort();

            Assert.Equal(-1, tab.OldestUnreadIndex);
        }
開發者ID:urusupa,項目名稱:OpenTween,代碼行數:20,代碼來源:TabClassTest.cs

示例5: NextUnreadId_SortByIdAscTest

        public void NextUnreadId_SortByIdAscTest()
        {
            var tab = new TabClass { TabType = MyCommon.TabUsageType.UserTimeline };

            tab.UnreadManage = true;

            // ID の昇順でソート
            tab.SetSortMode(ComparerMode.Id, SortOrder.Ascending);

            // 畫麵には上から 100 → 200 → 300 の順に並ぶ
            tab.AddPostToInnerStorage(new PostClass { StatusId = 100L, IsRead = false });
            tab.AddPostToInnerStorage(new PostClass { StatusId = 200L, IsRead = false });
            tab.AddPostToInnerStorage(new PostClass { StatusId = 300L, IsRead = false });
            tab.AddSubmit();

            // 昇順/降順に関わらず、ID の小さい順に未読の ID を返す
            Assert.Equal(100L, tab.NextUnreadId);
        }
開發者ID:nezuku,項目名稱:OpenTween,代碼行數:18,代碼來源:TabClassTest.cs

示例6: GetUnreadIds_Test

        public void GetUnreadIds_Test()
        {
            var tab = new TabClass { TabType = MyCommon.TabUsageType.UserTimeline };
            tab.UnreadManage = true;

            Assert.Empty(tab.GetUnreadIds());

            tab.AddPostToInnerStorage(new PostClass { StatusId = 100L, IsRead = false });
            tab.AddPostToInnerStorage(new PostClass { StatusId = 200L, IsRead = true });
            tab.AddSubmit();

            Assert.Equal(new[] { 100L }, tab.GetUnreadIds());

            tab.SetReadState(100L, true); // 既読にする

            Assert.Empty(tab.GetUnreadIds());
        }
開發者ID:nezuku,項目名稱:OpenTween,代碼行數:17,代碼來源:TabClassTest.cs

示例7: NextUnreadIndex_Test

        public void NextUnreadIndex_Test()
        {
            var tab = new TabClass { TabType = MyCommon.TabUsageType.UserTimeline };
            tab.SetSortMode(ComparerMode.Id, SortOrder.Ascending);

            tab.UnreadManage = true;

            // 未読なし
            Assert.Equal(-1, tab.NextUnreadIndex);

            tab.AddPostToInnerStorage(new PostClass
            {
                StatusId = 50L,
                IsRead = true, // 既読
            });
            tab.AddPostToInnerStorage(new PostClass
            {
                StatusId = 100L,
                IsRead = false, // 未読
            });
            tab.AddPostToInnerStorage(new PostClass
            {
                StatusId = 150L,
                IsRead = false, // 未読
            });
            tab.AddSubmit();

            Assert.Equal(1, tab.NextUnreadIndex);
        }
開發者ID:nezuku,項目名稱:OpenTween,代碼行數:29,代碼來源:TabClassTest.cs

示例8: NextUnreadId_SortByScreenNameDescTest

        public void NextUnreadId_SortByScreenNameDescTest()
        {
            var tab = new TabClass { TabType = MyCommon.TabUsageType.UserTimeline };

            tab.UnreadManage = true;

            // ScreenName の降順でソート
            tab.SetSortMode(ComparerMode.Name, SortOrder.Descending);

            // 畫麵には上から 300 → 100 → 200 の順に並ぶ
            tab.AddPostToInnerStorage(new PostClass { StatusId = 100L, ScreenName = "bbb", IsRead = false });
            tab.AddPostToInnerStorage(new PostClass { StatusId = 200L, ScreenName = "aaa", IsRead = false });
            tab.AddPostToInnerStorage(new PostClass { StatusId = 300L, ScreenName = "ccc", IsRead = false });
            tab.AddSubmit();

            // 昇順/降順に関わらず、ScreenName の辭書順で小さい順に未読の ID を返す
            Assert.Equal(200L, tab.NextUnreadId);
        }
開發者ID:nezuku,項目名稱:OpenTween,代碼行數:18,代碼來源:TabClassTest.cs


注:本文中的OpenTween.TabClass.AddSubmit方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。