Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avalonia #82

Open
wants to merge 71 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
b792b6c
Add initail build using new solution
mkromis Oct 26, 2020
23cd605
Try add new simple application with launch/build settings
mkromis Oct 26, 2020
b120d19
use mvx application bridge
mkromis Oct 26, 2020
60d9fe1
Fix application
mkromis Oct 26, 2020
0b5aeb8
Remove extra launch task
mkromis Oct 26, 2020
306bb09
Skeleton Copy
mkromis Jan 24, 2021
a5d9a59
nuget updates
mkromis Feb 20, 2021
030456c
removed sonar, using lint instead
mkromis Feb 20, 2021
b0ab0b2
SonarLint Connections
mkromis Feb 20, 2021
c53c665
namespace changes
mkromis Feb 20, 2021
ea9c60e
Barrowed from patforms.wpf
mkromis Feb 21, 2021
b715455
fix class name
mkromis Feb 21, 2021
287f966
update sonar
mkromis Feb 21, 2021
13ff213
more fixes
mkromis Feb 21, 2021
928306f
Reset simple demo project,
mkromis Feb 22, 2021
de2d88f
add app setup
mkromis Feb 23, 2021
278416f
nuget update
mkromis Feb 23, 2021
8779941
sample setup of mainview
mkromis Feb 23, 2021
28252b6
sonar lint update
mkromis Mar 13, 2021
ee90bad
more attempt at displaying content
mkromis Mar 13, 2021
fb3d44e
nuget updates
mkromis Mar 14, 2021
06ea301
upgrade assistant
mkromis Mar 14, 2021
681d911
update ribbon target
mkromis Mar 14, 2021
f2ac7af
removed *core projects for net5
mkromis Mar 14, 2021
90cab96
sonar link
mkromis Mar 14, 2021
b1bd1d3
working on main view
mkromis Jul 31, 2021
933d60e
merge from master
mkromis Jul 31, 2021
0850e8f
nuget update
mkromis Jul 31, 2021
d7568f4
try new action
mkromis Jul 31, 2021
51878aa
update build
mkromis Aug 1, 2021
c54851c
fix restore
mkromis Aug 1, 2021
c189d58
specify build file
mkromis Aug 1, 2021
6339c25
split tasks
mkromis Aug 1, 2021
1fb05c6
fix errors
mkromis Aug 1, 2021
2891656
Fix logging
mkromis Aug 1, 2021
4d48b0f
Restore mainwindow
mkromis Aug 1, 2021
6ca7aa1
remove sonar
mkromis Aug 1, 2021
d43a352
add sonar lint
mkromis Aug 1, 2021
6b92c8b
Add sonar
mkromis Aug 1, 2021
0ddf94b
merge from develop
mkromis Aug 15, 2021
8bbb06d
fix sonarlint
mkromis Aug 15, 2021
19f2a9c
update nuget
mkromis Aug 15, 2021
03ed690
Fix setup class init
mkromis Aug 16, 2021
c535256
add tip view
mkromis Aug 16, 2021
f672aae
remove extra ruleset
mkromis Aug 16, 2021
2565471
Merge from develop
mkromis Aug 21, 2021
36a3d24
add comments to view model
mkromis Aug 21, 2021
858eb89
nuget updates
mkromis Aug 21, 2021
f34fb57
add skipped files, adpat first pass for avalonaia
mkromis Aug 22, 2021
a442268
Initial mainview works
mkromis Aug 22, 2021
7035748
update demo copy
mkromis Aug 22, 2021
b7bc711
fix path
mkromis Aug 22, 2021
dff7fd3
fix statusbar for simple demo
mkromis Aug 22, 2021
544d704
remove code warnings
mkromis Aug 22, 2021
b496678
remove un-used classes
mkromis Aug 22, 2021
68e9560
MinoriDemo.WPF -> MinoriDemo.RibbonWpf
mkromis Aug 22, 2021
5e53453
remove un-used file
mkromis Aug 22, 2021
760b99e
clean up some converters
mkromis Aug 23, 2021
cfe7668
work on initial layout
mkromis Aug 23, 2021
6994494
More conversion for avalonia (skel)
mkromis Aug 23, 2021
302a67c
remove un-used classes
mkromis Aug 24, 2021
4443b81
update statusbar some
mkromis Aug 24, 2021
9f9bb7a
working on dockable window
mkromis Sep 5, 2021
9976d33
combine factory into vm
mkromis Sep 7, 2021
3877135
remove messages
mkromis Sep 7, 2021
5d0ea02
Try to add wrapper
mkromis Sep 7, 2021
20f1499
nuget update
mkromis Oct 28, 2021
62e7f35
dock update
mkromis Oct 28, 2021
5433d01
sonarlint update
mkromis Oct 31, 2021
5508c5b
change perms
mkromis Jul 3, 2022
21f0ad7
nuget updates
mkromis Jul 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ csharp_style_conditional_delegate_call = true:suggestion
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async

# Code-block preferences
csharp_prefer_braces = true:suggestion
csharp_prefer_braces = true:none

# Expression-level preferences
csharp_prefer_simple_default_expression = true:suggestion
Expand Down Expand Up @@ -144,3 +144,6 @@ csharp_space_between_square_brackets = false
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true


# IDE0011: Add braces
dotnet_diagnostic.IDE0011.severity = none
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ jobs:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} # Needed to get PR information, if any
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
shell: powershell
run: >
.\.sonar\scanner\dotnet-sonarscanner
begin /k:"TorisanKitsune_MinoriEditorShell" /o:"torisankitsune"
run: >
.\.sonar\scanner\dotnet-sonarscanner
begin /k:"TorisanKitsune_MinoriEditorShell" /o:"torisankitsune"
/d:sonar.login="${{secrets.SONAR_TOKEN}}" /d:sonar.host.url="https://sonarcloud.io"
/d:sonar.cs.opencover.reportsPaths=**/coverage.opencover.xml
/v:${{steps.gitversion.outputs.semVer}}
Expand Down
2 changes: 1 addition & 1 deletion .sonarlint/MinoriEditorShell.slconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"Profiles": {
"CSharp": {
"ProfileKey": "AXHDDFLUVHc24qBALL5K",
"ProfileTimestamp": "2021-05-05T07:40:20Z"
"ProfileTimestamp": "2021-10-27T09:08:11Z"
}
}
}
89 changes: 89 additions & 0 deletions .sonarlint/torisankitsune_minorieditorshell2/CSharp/SonarLint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<AnalysisInput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Settings>
<Setting>
<Key>sonar.cs.analyzeGeneratedCode</Key>
<Value>false</Value>
</Setting>
<Setting>
<Key>sonar.cs.file.suffixes</Key>
<Value>.cs</Value>
</Setting>
<Setting>
<Key>sonar.cs.ignoreHeaderComments</Key>
<Value>true</Value>
</Setting>
<Setting>
<Key>sonar.cs.roslyn.ignoreIssues</Key>
<Value>false</Value>
</Setting>
</Settings>
<Rules>
<Rule>
<Key>S107</Key>
<Parameters>
<Parameter>
<Key>max</Key>
<Value>7</Value>
</Parameter>
</Parameters>
</Rule>
<Rule>
<Key>S110</Key>
<Parameters>
<Parameter>
<Key>max</Key>
<Value>5</Value>
</Parameter>
</Parameters>
</Rule>
<Rule>
<Key>S1479</Key>
<Parameters>
<Parameter>
<Key>maximum</Key>
<Value>30</Value>
</Parameter>
</Parameters>
</Rule>
<Rule>
<Key>S2342</Key>
<Parameters>
<Parameter>
<Key>flagsAttributeFormat</Key>
<Value>^([A-Z]{1,3}[a-z0-9]+)*([A-Z]{2})?s$</Value>
</Parameter>
<Parameter>
<Key>format</Key>
<Value>^([A-Z]{1,3}[a-z0-9]+)*([A-Z]{2})?$</Value>
</Parameter>
</Parameters>
</Rule>
<Rule>
<Key>S2436</Key>
<Parameters>
<Parameter>
<Key>max</Key>
<Value>2</Value>
</Parameter>
<Parameter>
<Key>maxMethod</Key>
<Value>3</Value>
</Parameter>
</Parameters>
</Rule>
<Rule>
<Key>S3776</Key>
<Parameters>
<Parameter>
<Key>propertyThreshold</Key>
<Value>3</Value>
</Parameter>
<Parameter>
<Key>threshold</Key>
<Value>15</Value>
</Parameter>
</Parameters>
</Rule>
</Rules>
</AnalysisInput>
3 changes: 3 additions & 0 deletions .sonarlint/torisankitsune_minorieditorshellcsharp.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
<Rule Id="S3010" Action="Warning" />
<Rule Id="S3011" Action="Warning" />
<Rule Id="S3052" Action="None" />
<Rule Id="S3059" Action="None" />
<Rule Id="S3060" Action="Warning" />
<Rule Id="S3168" Action="Warning" />
<Rule Id="S3169" Action="Warning" />
Expand All @@ -194,11 +195,13 @@
<Rule Id="S3254" Action="None" />
<Rule Id="S3256" Action="Info" />
<Rule Id="S3257" Action="None" />
<Rule Id="S3260" Action="Info" />
<Rule Id="S3261" Action="Info" />
<Rule Id="S3262" Action="Warning" />
<Rule Id="S3263" Action="Warning" />
<Rule Id="S3264" Action="Warning" />
<Rule Id="S3265" Action="Warning" />
<Rule Id="S3267" Action="Warning" />
<Rule Id="S3329" Action="Warning" />
<Rule Id="S3343" Action="Warning" />
<Rule Id="S3346" Action="Warning" />
Expand Down
2 changes: 1 addition & 1 deletion CreateArtifacts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ foreach ($nupkg in $nupkgs) {
#mkdir Artifacts\$basedir\Demos
cp Demos\SimpleDemo\SimpleDemo.WPF\bin\Release\net5.0-windows Artifacts\$basedir\Demos\SimpleDemo.WPF -Recurse
cp Demos\SimpleDemo\SimpleDemo.RibbonWPF\bin\Release\net5.0-windows Artifacts\$basedir\Demos\SimpleDemo.RibbonWPF -Recurse
cp Demos\MinoriDemo\MinoriDemo.WPF\bin\Release\net5.0-windows Artifacts\$basedir\Demos\MinoriDemo.WPF -Recurse
cp Demos\SimpleDemo\SimpleDemo.Avalonia\bin\Release\net5.0 Artifacts\$basedir\Demos\SimpleDemo.Avalonia -Recurse
cp Demos\MinoriDemo\MinoriDemo.RibbonWPF\bin\Release\net5.0-windows Artifacts\$basedir\Demos\MinoriDemo.RibbonWPF -Recurse

# Compress folder into 7z file
Expand Down
2 changes: 0 additions & 2 deletions Demos/MinoriDemo/MinoriDemo.Core/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using Microsoft.Extensions.Logging;
using MinoriEditorShell.Services;
using MvvmCross;
using MvvmCross.Commands;
using MvvmCross.Logging;
using MvvmCross.Navigation;
using MvvmCross.ViewModels;
using System;
Expand Down
63 changes: 63 additions & 0 deletions Demos/MinoriDemo/MinoriDemo.RibbonWPF/DataClasses/ThemeItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
using MinoriDemo.RibbonWPF.Modules.Themes;
using MvvmCross;
using MvvmCross.Base;
using MvvmCross.ViewModels;
using System;
using System.Collections.Generic;
using System.Windows.Media;

namespace MinoriDemo.RibbonWPF.DataClasses
{
internal class ThemeItem : MvxNotifyPropertyChanged
{
private Color _color;
private String _key;
private Boolean _canEdit = false;
private String _modeText = "Edit";

public ThemeHelper ThemeHelper { get; set; }

public String ModeText
{
get => _modeText;
set => SetProperty(ref _modeText, value);
}

public Boolean CanEdit
{
get => _canEdit;
set
{
if (SetProperty(ref _canEdit, value))
{
ModeText = value ? "Done" : "Edit";
}
}
}

public String Key
{
get => _key;
set => SetProperty(ref _key, value);
}

public Color Color
{
get => _color;
set
{
_color = value;

Mvx.IoCProvider.Resolve<IMvxMainThreadAsyncDispatcher>()
.ExecuteOnMainThreadAsync(() =>
{
IDictionary<String, SolidColorBrush> brushes = ThemeHelper.GetBrushes();
brushes[Key] = new SolidColorBrush(value);
ThemeHelper.SetBrushes(brushes);
});
}
}

public String OriginalKey { get; internal set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ribbon:MesRibbonWindow
<ribbon:MesRibbonWindow
x:Class="MinoriDemo.RibbonWPF.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Expand All @@ -9,4 +9,4 @@
Title="Minori Demo App" Height="450" Width="800">
<Grid>
</Grid>
</ribbon:MesRibbonWindow>
</ribbon:MesRibbonWindow>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.Extensions.Logging;
using MinoriEditorShell.Platforms.Wpf;

namespace MinoriDemo.WpfCore
namespace MinoriDemo.RibbonWPF
{
internal class Setup : MesWpfSetup<Core.App>
{
Expand Down
68 changes: 68 additions & 0 deletions Demos/MinoriDemo/MinoriDemo.RibbonWPF/Views/ThemeEditorView.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<views:MvxWpfView
x:Class="MinoriDemo.RibbonWPF.Views.ThemeEditorView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:MinoriDemo.RibbonWPF.Views"
xmlns:views="clr-namespace:MvvmCross.Platforms.Wpf.Views;assembly=MvvmCross.Platforms.Wpf"
xmlns:picker="clr-namespace:ColorPickerLib.Controls;assembly=ColorPickerLib"
mc:Ignorable="d" x:Name="root"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="35" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>

<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="44" />
<ColumnDefinition Width="82" />
<ColumnDefinition />
<ColumnDefinition Width="244" />
<ColumnDefinition Width="56" />
</Grid.ColumnDefinitions>
<ComboBox
IsReadOnly="True"
VerticalAlignment="Center"
x:Name="ThemeSelection" SelectionChanged="ThemeChanged" Height="25">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Source}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<Button
Grid.Column="1" Content="Export"
VerticalAlignment="Center" HorizontalAlignment="Center"
Height="25" Margin="3,5"
Click="Export_Click" Width="38" />
<Button
Grid.Column="2" Content="Add Color" Margin="3,5"
Click="Add_Click" />
<TextBox x:Name="search" Grid.Column="4" Margin="3" KeyDown="search_KeyDown" />
<Button Grid.Column="5" Margin="3" Content="Search" Click="Search_Click" />
</Grid>
<ListView x:Name="MainResourceList" Grid.Row="1">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Height="25">
<picker:ColorPicker Width="50" Height="25" SelectedColor="{Binding Color}" />
<TextBox Text="{Binding Key}" IsEnabled="{Binding CanEdit}" Height="25" />
<Button
Click="RenameClick"
Content="{Binding ModeText}"
CommandParameter="{Binding}"
Height="25" Width="50" />
<Button
Content="X"
Click="RemoveClick"
Height="25" Width="25" />
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</views:MvxWpfView>
Loading