{
cidx = _curList.SelectedIndices[0];
}
- toIdx = _curList.VirtualListSize - 1;
+ toIdx = _curList.VirtualListSize;
switch (SType)
{
{
cidx = toIdx;
}
- toIdx = 0;
+ toIdx = -1;
stp = -1;
break;
}
try
{
_search = new Regex(_word, regOpt);
- for (int idx = cidx; idx <= toIdx; idx += stp)
+ for (int idx = cidx; idx != toIdx; idx += stp)
{
PostClass post;
try
else
{
// 通常検索
- for (int idx = cidx; idx <= toIdx; idx += stp)
+ for (int idx = cidx; idx != toIdx; idx += stp)
{
PostClass post;
try
fIdx = _curList.SelectedIndices[0] + 1;
if (fIdx > _curList.VirtualListSize - 1) return;
}
- toIdx = _curList.VirtualListSize - 1;
+ toIdx = _curList.VirtualListSize;
stp = 1;
}
else
fIdx = _curList.SelectedIndices[0] - 1;
if (fIdx < 0) return;
}
- toIdx = 0;
+ toIdx = -1;
stp = -1;
}
- for (int idx = fIdx; idx == toIdx; idx += stp)
+ for (int idx = fIdx; idx != toIdx; idx += stp)
{
if (_statuses[_curTab.Text, idx].IsFav)
{
{
fIdx = ListTab.SelectedIndex - 1;
}
- toIdx = 0;
+ toIdx = -1;
stp = -1;
}
else
{
fIdx = ListTab.SelectedIndex + 1;
}
- toIdx = ListTab.TabCount - 1;
+ toIdx = ListTab.TabCount;
stp = 1;
}
bool found = false;
- for (int tabidx = fIdx; tabidx == toIdx; tabidx += stp)
+ for (int tabidx = fIdx; tabidx != toIdx; tabidx += stp)
{
if (_statuses.Tabs[ListTab.TabPages[tabidx].Text].TabType == MyCommon.TabUsageType.DirectMessage) continue; // Directタブは対象外
for (int idx = 0; idx < ((DetailsListView)ListTab.TabPages[tabidx].Tag).VirtualListSize; idx++)
{
fIdx = _curList.SelectedIndices[0] + 1;
if (fIdx > _curList.VirtualListSize - 1) return;
- toIdx = _curList.VirtualListSize - 1;
+ toIdx = _curList.VirtualListSize;
stp = 1;
}
else
{
fIdx = _curList.SelectedIndices[0] - 1;
if (fIdx < 0) return;
- toIdx = 0;
+ toIdx = -1;
stp = -1;
}
{
fIdx = _curList.SelectedIndices[0] + 1;
if (fIdx > _curList.VirtualListSize - 1) return;
- toIdx = _curList.VirtualListSize - 1;
+ toIdx = _curList.VirtualListSize;
stp = 1;
}
else
{
fIdx = _curList.SelectedIndices[0] - 1;
if (fIdx < 0) return;
- toIdx = 0;
+ toIdx = -1;
stp = -1;
}
if (_anchorPost == null) return;
}
- for (int idx = fIdx; ; idx += stp)
+ for (int idx = fIdx; idx != toIdx; idx += stp)
{
PostClass post = _statuses[_curTab.Text, idx];
if (post.ScreenName == _anchorPost.ScreenName ||
_curList.EnsureVisible(idx);
break;
}
-
- if (idx == toIdx) break;
}
}