chore: convert Dalamud to file-scoped namespaces

This commit is contained in:
goat 2022-10-29 15:23:22 +02:00
parent b093323acc
commit 987ff8dc8f
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
368 changed files with 55081 additions and 55450 deletions

View file

@ -6,72 +6,71 @@ using System.Numerics;
using Dalamud.Utility;
namespace Dalamud.Interface.ImGuiFileDialog
namespace Dalamud.Interface.ImGuiFileDialog;
/// <summary>
/// A file or folder picker.
/// </summary>
public partial class FileDialog
{
/// <summary>
/// A file or folder picker.
/// </summary>
public partial class FileDialog
private struct FileStruct
{
private struct FileStruct
public FileStructType Type;
public string FilePath;
public string FileName;
public string Ext;
public long FileSize;
public string FormattedFileSize;
public string FileModifiedDate;
}
private readonly struct SideBarItem
{
public SideBarItem(string text, string location, FontAwesomeIcon icon)
{
public FileStructType Type;
public string FilePath;
public string FileName;
public string Ext;
public long FileSize;
public string FormattedFileSize;
public string FileModifiedDate;
this.Text = text;
this.Location = location;
this.Icon = icon;
this.Exists = !this.Location.IsNullOrEmpty() && Directory.Exists(this.Location);
}
private readonly struct SideBarItem
public string Text { get; init; }
public string Location { get; init; }
public FontAwesomeIcon Icon { get; init; }
public bool Exists { get; init; }
public bool CheckExistence()
=> !this.Location.IsNullOrEmpty() && Directory.Exists(this.Location);
}
private struct FilterStruct
{
public string Filter;
public HashSet<string> CollectionFilters;
public void Clear()
{
public SideBarItem(string text, string location, FontAwesomeIcon icon)
{
this.Text = text;
this.Location = location;
this.Icon = icon;
this.Exists = !this.Location.IsNullOrEmpty() && Directory.Exists(this.Location);
}
public string Text { get; init; }
public string Location { get; init; }
public FontAwesomeIcon Icon { get; init; }
public bool Exists { get; init; }
public bool CheckExistence()
=> !this.Location.IsNullOrEmpty() && Directory.Exists(this.Location);
this.Filter = string.Empty;
this.CollectionFilters.Clear();
}
private struct FilterStruct
public bool Empty()
{
public string Filter;
public HashSet<string> CollectionFilters;
public void Clear()
{
this.Filter = string.Empty;
this.CollectionFilters.Clear();
}
public bool Empty()
{
return string.IsNullOrEmpty(this.Filter) && (this.CollectionFilters == null || (this.CollectionFilters.Count == 0));
}
public bool FilterExists(string filter)
{
return this.Filter.Equals(filter, StringComparison.InvariantCultureIgnoreCase) || (this.CollectionFilters != null && this.CollectionFilters.Any(colFilter => colFilter.Equals(filter, StringComparison.InvariantCultureIgnoreCase)));
}
return string.IsNullOrEmpty(this.Filter) && (this.CollectionFilters == null || (this.CollectionFilters.Count == 0));
}
private struct IconColorItem
public bool FilterExists(string filter)
{
public FontAwesomeIcon Icon;
public Vector4 Color;
return this.Filter.Equals(filter, StringComparison.InvariantCultureIgnoreCase) || (this.CollectionFilters != null && this.CollectionFilters.Any(colFilter => colFilter.Equals(filter, StringComparison.InvariantCultureIgnoreCase)));
}
}
private struct IconColorItem
{
public FontAwesomeIcon Icon;
public Vector4 Color;
}
}