コード例 #1
0
ファイル: RamWatch.cs プロジェクト: lenalia/BizHawk
        private void InsertSeparatorMenuItem_Click(object sender, EventArgs e)
        {
            var indexes = SelectedIndices.ToList();

            if (indexes.Any())
            {
                _watches.Insert(indexes[0], SeparatorWatch.Instance);
            }
            else
            {
                _watches.Add(SeparatorWatch.Instance);
            }

            WatchListView.ItemCount = _watches.Count;
            Changes();
            UpdateWatchCount();
        }
コード例 #2
0
        private void MoveItemUp(object obj)
        {
            ProductMasterItem item = obj as ProductMasterItem;

            if (item == null)
            {
                return;
            }

            int curIndex = WatchList.IndexOf(item);

            if (curIndex > 0) // if not first and found
            {
                WatchList.RemoveAt(curIndex);
                WatchList.Insert(curIndex - 1, item);
                ExtendedSchedule.Instance.Update();
            }
        }
コード例 #3
0
        private void MoveItemDown(object obj)
        {
            ProductMasterItem item = obj as ProductMasterItem;

            if (item == null)
            {
                return;
            }

            int curIndex = WatchList.IndexOf(item);

            if (curIndex >= 0 && curIndex != WatchList.Count - 1) // if not last and found
            {
                WatchList.RemoveAt(curIndex);
                WatchList.Insert(curIndex + 1, item);
                ExtendedSchedule.Instance.Update();
            }
        }