Skip to content
ConsoleMonster
Class

CommanderState

ConsoleMonster.Apps.Commander

Namespace
ConsoleMonster.Apps.Commander
Assembly
ConsoleMonster
Modifiers
sealed

The Commander's remembered state, stored per machine (under local application data, never roaming) as a small key=value file. It records folders and sort settings only: no file contents, names of marked files or command lines, which can hold secrets.

Inheritance

  • object
  • CommanderState

Usage

Explore 3 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 2

Accepted by parameters 1

Constructors

public CommanderState() #

Methods

public static CommanderState Load(string? path = null) #

Reads state, returning defaults when the file is missing or unreadable; unknown lines are ignored.

Parameters

path string? = null optional
The file; CommanderState.DefaultPath when null.

Returns

CommanderState The state.
public void Save(string? path = null) #

Writes state, replacing the file in one step so a crash never leaves half of it.

Parameters

path string? = null optional
The file; CommanderState.DefaultPath when null.

Properties

public PanelState Left { get; set; } #

The left panel.

public PanelState Right { get; set; } #

The right panel.

public CommanderSide ActivePanel { get; set; } #

The panel that had focus.

public static string DefaultPath { get; } #

The per-machine state file: ConsoleMonster/Commander/state.txt under local application data.