using System.Collections.Generic;
using System.Linq;
namespace BantFlags.Data
{
///
/// Singleton class comprised of objects used in/Upload.
/// It's a fucking mess and I hate it so much.
///
public class Staging
{
public List RenamedFlags { get; set; }
public List DeletedFlags { get; set; }
public List AddedFlags { get; set; }
///
/// The current list of resolved flags including changes currently in Staging.
/// Exists here since it's a singleton.
///
public List Flags { get; set; }
///
/// Used for commiting and unstaging staged flags.
///
public string Password { get; }
public Staging(string password)
{
RenamedFlags = new List();
DeletedFlags = new List();
AddedFlags = new List();
Password = password;
}
public void Clear()
{
RenamedFlags = new List();
DeletedFlags = new List();
AddedFlags = new List();
}
}
public class FormFlag
{
public string Name { get; set; }
public bool IsChecked { get; set; }
public Method FormMethod { get; set; }
}
public class RenameFlag : FormFlag
{
public string NewName { get; set; }
}
public enum Method
{
Delete,
Rename,
Add
}
}