Exemplo n.º 1
0
        private void ReOrderTasks()
        {
            _vBox.Clear();

            _taskViews =
                _taskViews.Select(v => new KeyValuePair <int, TaskView>(_taskManager.IndexOf(v.Task), v))
                .Where(kv => kv.Key >= 0)
                .Select(kv => kv.Value)
                .ToList();

            foreach (var v in _taskViews)
            {
                _vBox.PackStart(v);
            }

            if (!_taskViews.Any())
            {
                _vBox.PackStart(_nothingLabel, true, true);
            }
        }