You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.1 KiB
C#

using System.Collections.ObjectModel;
namespace CommanderApp.Services;
public interface IPanelManager
{
event EventHandler<PanelStateChangedEventArgs> StateChanged;
bool IsLeftPanelActive { get; }
FileSystemItem SelectedItem { get; }
string ActivePanelPath { get; }
string LeftPanelPath { get; }
string RightPanelPath { get; }
int LeftSelectedIndex { get; }
int RightSelectedIndex { get; }
void SwitchToLeftPanel();
void SwitchToRightPanel();
void MoveSelection(int direction);
void SetSelection(int index, bool isLeftPanel);
void UpdatePanelPaths(string leftPath, string rightPath);
void ClearSelection();
// Для привязки данных
ObservableCollection<FileSystemItem> LeftItems { get; }
ObservableCollection<FileSystemItem> RightItems { get; }
}
public class PanelStateChangedEventArgs : EventArgs
{
public bool IsLeftPanelActive { get; set; }
public int LeftSelectedIndex { get; set; }
public int RightSelectedIndex { get; set; }
public FileSystemItem SelectedItem { get; set; }
}