using System; using System.Collections.Generic; using System.Diagnostics; using System.Drawing; namespace AppLauncher.Models { public class TileModel { public string Title { get; set; } public string ProcessFilename { get; set; } public string ProcessArgument { get; set; } public string ProcessWorkingDirectory { get; set; } public ProcessWindowStyle ProcessWindowStyle { get; set; } = ProcessWindowStyle.Normal; public bool ProcessAsAdmin { get; set; } = false; public Point Position { get; set; } public bool IsGroup { get; set; } = false; public List Items { get; set; } = new List(); public override string ToString() => this.Title ?? string.Empty; public string CleanProcessFilename => (string.IsNullOrWhiteSpace(this.ProcessFilename) ? string.Empty : Environment.ExpandEnvironmentVariables(this.ProcessFilename)); public string CleanProcessArgument => (string.IsNullOrWhiteSpace(this.ProcessArgument) ? string.Empty : Environment.ExpandEnvironmentVariables(this.ProcessArgument)); public string CleanProcessWorkingDirectory => (string.IsNullOrWhiteSpace(this.ProcessWorkingDirectory) ? string.Empty : Environment.ExpandEnvironmentVariables(this.ProcessWorkingDirectory)); } }