Skip to content

Commit

Permalink
Automated dotnet-format update (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] authored Sep 3, 2024
1 parent 75ffc13 commit 825b32a
Show file tree
Hide file tree
Showing 36 changed files with 3,338 additions and 3,333 deletions.
48 changes: 24 additions & 24 deletions samples/ReDocking.Sample/App.axaml.cs
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;

using ReDocking.Views;

namespace ReDocking;

public partial class App : Application
{
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
}

public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
desktop.MainWindow = new MainWindow();
}

base.OnFrameworkInitializationCompleted();
}
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;

using ReDocking.Views;

namespace ReDocking;

public partial class App : Application
{
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
}

public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
desktop.MainWindow = new MainWindow();
}

base.OnFrameworkInitializationCompleted();
}
}
41 changes: 21 additions & 20 deletions samples/ReDocking.Sample/Program.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
using Avalonia;
using System;

namespace ReDocking;

class Program
{
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
// yet and stuff might break.
[STAThread]
public static void Main(string[] args) => BuildAvaloniaApp()
.StartWithClassicDesktopLifetime(args);

// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
.WithInterFont()
.LogToTrace();
using System;

using Avalonia;

namespace ReDocking;

class Program
{
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
// yet and stuff might break.
[STAThread]
public static void Main(string[] args) => BuildAvaloniaApp()
.StartWithClassicDesktopLifetime(args);

// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
.WithInterFont()
.LogToTrace();
}
8 changes: 4 additions & 4 deletions samples/ReDocking.Sample/ViewModels/DebugViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
namespace ReDocking.ViewModels;

public class DebugViewModel
{
namespace ReDocking.ViewModels;

public class DebugViewModel
{
}
8 changes: 4 additions & 4 deletions samples/ReDocking.Sample/ViewModels/ExplorerViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
namespace ReDocking.ViewModels;

public class ExplorerViewModel
{
namespace ReDocking.ViewModels;

public class ExplorerViewModel
{
}
210 changes: 105 additions & 105 deletions samples/ReDocking.Sample/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,106 +1,106 @@
using System;
using System.Linq;
using System.Reactive.Linq;

using Reactive.Bindings;
using Reactive.Bindings.Extensions;

namespace ReDocking.ViewModels;

public class MainWindowViewModel : IDisposable
{
public MainWindowViewModel()
{
void ConfigureToolsList(ReactiveCollection<ToolWindowViewModel> list,
ReactiveProperty<ToolWindowViewModel?> selected)
{
selected.Subscribe(x =>
list.ToObservable()
.Where(y => y != x && y.DisplayMode.Value == DockableDisplayMode.Docked)
.Subscribe(y => y.IsSelected.Value = false));

list.ObserveAddChanged()
.Select(x => x.IsSelected.Select(y => (x, y)))
.Subscribe(z =>
{
z.Subscribe(w =>
{
if (w is { y: true, x.DisplayMode.Value: DockableDisplayMode.Docked })
{
selected.Value = w.x;
}
else
{
selected.Value = list.FirstOrDefault(xx =>
xx.IsSelected.Value && xx.DisplayMode.Value == DockableDisplayMode.Docked);
}
});
});

list.ObserveRemoveChanged()
.Subscribe(x => x.Dispose());
}

ConfigureToolsList(LeftUpperTopTools, SelectedLeftUpperTopTool);
ConfigureToolsList(LeftUpperBottomTools, SelectedLeftUpperBottomTool);
ConfigureToolsList(LeftLowerTopTools, SelectedLeftLowerTopTool);
ConfigureToolsList(LeftLowerBottomTools, SelectedLeftLowerBottomTool);
ConfigureToolsList(RightUpperTopTools, SelectedRightUpperTopTool);
ConfigureToolsList(RightUpperBottomTools, SelectedRightUpperBottomTool);
ConfigureToolsList(RightLowerTopTools, SelectedRightLowerTopTool);
ConfigureToolsList(RightLowerBottomTools, SelectedRightLowerBottomTool);

LeftUpperTopTools.Add(new ToolWindowViewModel("Search", "\ue721", new SearchViewModel()));
LeftUpperBottomTools.Add(new ToolWindowViewModel("Explorer", "\uec50", new ExplorerViewModel()));
LeftLowerBottomTools.Add(new ToolWindowViewModel("Debug", "\uebe8", new DebugViewModel()));
RightUpperTopTools.Add(new ToolWindowViewModel("Notifications", "\uea8f", new NotificationsViewModel()));
RightUpperBottomTools.Add(new ToolWindowViewModel("Properties", "\ue15e", new PropertiesViewModel()));
RightLowerBottomTools.Add(new ToolWindowViewModel("Problem", "\ue946", new ProblemViewModel()));
}

public ReactiveCollection<ToolWindowViewModel> LeftUpperTopTools { get; } = [];

public ReactiveProperty<ToolWindowViewModel?> SelectedLeftUpperTopTool { get; } = new();

public ReactiveCollection<ToolWindowViewModel> LeftUpperBottomTools { get; } = [];

public ReactiveProperty<ToolWindowViewModel?> SelectedLeftUpperBottomTool { get; } = new();

public ReactiveCollection<ToolWindowViewModel> LeftLowerTopTools { get; } = [];

public ReactiveProperty<ToolWindowViewModel?> SelectedLeftLowerTopTool { get; } = new();

public ReactiveCollection<ToolWindowViewModel> LeftLowerBottomTools { get; } = [];

public ReactiveProperty<ToolWindowViewModel?> SelectedLeftLowerBottomTool { get; } = new();

public ReactiveCollection<ToolWindowViewModel> RightUpperTopTools { get; } = [];

public ReactiveProperty<ToolWindowViewModel?> SelectedRightUpperTopTool { get; } = new();

public ReactiveCollection<ToolWindowViewModel> RightUpperBottomTools { get; } = [];

public ReactiveProperty<ToolWindowViewModel?> SelectedRightUpperBottomTool { get; } = new();

public ReactiveCollection<ToolWindowViewModel> RightLowerTopTools { get; } = [];

public ReactiveProperty<ToolWindowViewModel?> SelectedRightLowerTopTool { get; } = new();

public ReactiveCollection<ToolWindowViewModel> RightLowerBottomTools { get; } = [];

public ReactiveProperty<ToolWindowViewModel?> SelectedRightLowerBottomTool { get; } = new();

public ReactiveCollection<ToolWindowViewModel> FloatingWindows { get; } = [];

public void Dispose()
{
SelectedLeftUpperTopTool.Dispose();
SelectedLeftUpperBottomTool.Dispose();
SelectedLeftLowerTopTool.Dispose();
SelectedLeftLowerBottomTool.Dispose();
SelectedRightUpperTopTool.Dispose();
SelectedRightUpperBottomTool.Dispose();
SelectedRightLowerTopTool.Dispose();
SelectedRightLowerBottomTool.Dispose();
}
using System;
using System.Linq;
using System.Reactive.Linq;

using Reactive.Bindings;
using Reactive.Bindings.Extensions;

namespace ReDocking.ViewModels;

public class MainWindowViewModel : IDisposable
{
public MainWindowViewModel()
{
void ConfigureToolsList(ReactiveCollection<ToolWindowViewModel> list,
ReactiveProperty<ToolWindowViewModel?> selected)
{
selected.Subscribe(x =>
list.ToObservable()
.Where(y => y != x && y.DisplayMode.Value == DockableDisplayMode.Docked)
.Subscribe(y => y.IsSelected.Value = false));

list.ObserveAddChanged()
.Select(x => x.IsSelected.Select(y => (x, y)))
.Subscribe(z =>
{
z.Subscribe(w =>
{
if (w is { y: true, x.DisplayMode.Value: DockableDisplayMode.Docked })
{
selected.Value = w.x;
}
else
{
selected.Value = list.FirstOrDefault(xx =>
xx.IsSelected.Value && xx.DisplayMode.Value == DockableDisplayMode.Docked);
}
});
});

list.ObserveRemoveChanged()
.Subscribe(x => x.Dispose());
}

ConfigureToolsList(LeftUpperTopTools, SelectedLeftUpperTopTool);
ConfigureToolsList(LeftUpperBottomTools, SelectedLeftUpperBottomTool);
ConfigureToolsList(LeftLowerTopTools, SelectedLeftLowerTopTool);
ConfigureToolsList(LeftLowerBottomTools, SelectedLeftLowerBottomTool);
ConfigureToolsList(RightUpperTopTools, SelectedRightUpperTopTool);
ConfigureToolsList(RightUpperBottomTools, SelectedRightUpperBottomTool);
ConfigureToolsList(RightLowerTopTools, SelectedRightLowerTopTool);
ConfigureToolsList(RightLowerBottomTools, SelectedRightLowerBottomTool);

LeftUpperTopTools.Add(new ToolWindowViewModel("Search", "\ue721", new SearchViewModel()));
LeftUpperBottomTools.Add(new ToolWindowViewModel("Explorer", "\uec50", new ExplorerViewModel()));
LeftLowerBottomTools.Add(new ToolWindowViewModel("Debug", "\uebe8", new DebugViewModel()));
RightUpperTopTools.Add(new ToolWindowViewModel("Notifications", "\uea8f", new NotificationsViewModel()));
RightUpperBottomTools.Add(new ToolWindowViewModel("Properties", "\ue15e", new PropertiesViewModel()));
RightLowerBottomTools.Add(new ToolWindowViewModel("Problem", "\ue946", new ProblemViewModel()));
}

public ReactiveCollection<ToolWindowViewModel> LeftUpperTopTools { get; } = [];

public ReactiveProperty<ToolWindowViewModel?> SelectedLeftUpperTopTool { get; } = new();

public ReactiveCollection<ToolWindowViewModel> LeftUpperBottomTools { get; } = [];

public ReactiveProperty<ToolWindowViewModel?> SelectedLeftUpperBottomTool { get; } = new();

public ReactiveCollection<ToolWindowViewModel> LeftLowerTopTools { get; } = [];

public ReactiveProperty<ToolWindowViewModel?> SelectedLeftLowerTopTool { get; } = new();

public ReactiveCollection<ToolWindowViewModel> LeftLowerBottomTools { get; } = [];

public ReactiveProperty<ToolWindowViewModel?> SelectedLeftLowerBottomTool { get; } = new();

public ReactiveCollection<ToolWindowViewModel> RightUpperTopTools { get; } = [];

public ReactiveProperty<ToolWindowViewModel?> SelectedRightUpperTopTool { get; } = new();

public ReactiveCollection<ToolWindowViewModel> RightUpperBottomTools { get; } = [];

public ReactiveProperty<ToolWindowViewModel?> SelectedRightUpperBottomTool { get; } = new();

public ReactiveCollection<ToolWindowViewModel> RightLowerTopTools { get; } = [];

public ReactiveProperty<ToolWindowViewModel?> SelectedRightLowerTopTool { get; } = new();

public ReactiveCollection<ToolWindowViewModel> RightLowerBottomTools { get; } = [];

public ReactiveProperty<ToolWindowViewModel?> SelectedRightLowerBottomTool { get; } = new();

public ReactiveCollection<ToolWindowViewModel> FloatingWindows { get; } = [];

public void Dispose()
{
SelectedLeftUpperTopTool.Dispose();
SelectedLeftUpperBottomTool.Dispose();
SelectedLeftLowerTopTool.Dispose();
SelectedLeftLowerBottomTool.Dispose();
SelectedRightUpperTopTool.Dispose();
SelectedRightUpperBottomTool.Dispose();
SelectedRightLowerTopTool.Dispose();
SelectedRightLowerBottomTool.Dispose();
}
}
8 changes: 4 additions & 4 deletions samples/ReDocking.Sample/ViewModels/NotificationsViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
namespace ReDocking.ViewModels;

public class NotificationsViewModel
{
namespace ReDocking.ViewModels;

public class NotificationsViewModel
{
}
10 changes: 5 additions & 5 deletions samples/ReDocking.Sample/ViewModels/ProblemViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace ReDocking.ViewModels;

public class ProblemViewModel
{
namespace ReDocking.ViewModels;

public class ProblemViewModel
{

}
8 changes: 4 additions & 4 deletions samples/ReDocking.Sample/ViewModels/PropertiesViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
namespace ReDocking.ViewModels;

public class PropertiesViewModel
{
namespace ReDocking.ViewModels;

public class PropertiesViewModel
{
}
10 changes: 5 additions & 5 deletions samples/ReDocking.Sample/ViewModels/SearchViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace ReDocking.ViewModels;

public class SearchViewModel
{
namespace ReDocking.ViewModels;

public class SearchViewModel
{

}
Loading

0 comments on commit 825b32a

Please sign in to comment.