31 lines
1.3 KiB
C#
31 lines
1.3 KiB
C#
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<TileModel> Items { get; set; } = new List<TileModel>();
|
|
|
|
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));
|
|
|
|
}
|
|
}
|