Skip to content

Commit

Permalink
Some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandKoenig committed Nov 25, 2023
1 parent 206e539 commit 9a99caa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Avalonia.Markup.Xaml;
using Avalonia.Media;
using System.Text;
using Avalonia.Data;
using Avalonia.Input;
using FirLib.Core.Patterns.Mvvm;

Expand All @@ -16,11 +17,12 @@ namespace MessageCommunicator.TestGui
{
public class PropertyGrid : OwnUserControl<PropertyGridViewModel>
{
public static readonly StyledProperty<object?> SelectedObjectProperty =
AvaloniaProperty.Register<PropertyGrid, object?>(
nameof(SelectedObject), typeof(object),
notifying: OnSelectedObjectChanged);

public static readonly DirectProperty<PropertyGrid, object?> SelectedObjectProperty =
AvaloniaProperty.RegisterDirect<PropertyGrid, object?>(
nameof(SelectedObject),
propGrid => propGrid.SelectedObject,
(propGrid, val) => propGrid.SelectedObject = val);

public static readonly StyledProperty<PropertyGridEditControlFactory?> EditControlFactoryProperty =
AvaloniaProperty.Register<PropertyGrid, PropertyGridEditControlFactory?>(
nameof(EditControlFactory),
Expand All @@ -29,15 +31,22 @@ public class PropertyGrid : OwnUserControl<PropertyGridViewModel>
public static readonly StyledProperty<IPropertyContractResolver?> PropertyContractResolverProperty =
AvaloniaProperty.Register<PropertyGrid, IPropertyContractResolver?>(
nameof(PropertyContractResolver));

private PropertyGridViewModel _propertyGridVM;
private Grid _gridMain;
private Control? _firstValueRowEditor;
private object? _selectedObject;

public object? SelectedObject
{
get => this.GetValue(SelectedObjectProperty);
set => this.SetValue(SelectedObjectProperty, value);
get => _selectedObject;
set
{
_selectedObject = value;

_propertyGridVM.SelectedObject = _selectedObject;
UpdatePropertiesView();
}
}

public PropertyGridEditControlFactory? EditControlFactory
Expand Down
3 changes: 2 additions & 1 deletion src/MessageCommunicator.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@
<s:String x:Key="/Default/Environment/PerformanceGuide/SwitchConflictResolutionMode/=VCS/@EntryIndexedValue"></s:String>
<s:Boolean x:Key="/Default/Environment/PerformanceGuide/SwitchConflictResolutionMode/=VCS/@EntryIndexRemoved">True</s:Boolean>
<s:Int64 x:Key="/Default/Environment/SearchAndNavigation/DefaultOccurrencesGroupingIndices/=JetBrains_002EPsiFeatures_002EUIInteractive_002ERefactorings_002ECommonUI_002ECommonControls_002EUsagesDescriptor/@EntryIndexedValue">12</s:Int64>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EApplication_002EExceptionReport_002EUserLoginInformationMigrateSettings/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EdotCover_002EInteractive_002ECore_002EFilterManagement_002EMigration_002EGlobalFilterSettingsManagerMigrateSettings/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
Expand All @@ -360,7 +361,7 @@
<s:Boolean x:Key="/Default/Housekeeping/FeatureSuggestion/FeatureSuggestionManager/DisabledSuggesters/=EditorConfigFeatureSuggester/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Housekeeping/FeatureSuggestion/FeatureSuggestionManager/DisabledSuggesters/=NullabilityAnnotationAssistSuggester/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Housekeeping/FeatureSuggestion/FeatureSuggestionManager/DisabledSuggesters/=ReSharperCppFeatureSuggester/@EntryIndexedValue">True</s:Boolean>
<s:String x:Key="/Default/Housekeeping/FeedbackReport/SelectedUserIdentificator/@EntryValue">anonymous</s:String>

<s:Boolean x:Key="/Default/Housekeeping/GlobalSettingsUpgraded/IsUpgraded/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Housekeeping/IntellisenseHousekeeping/HintUsed/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/Housekeeping/Layout/DialogWindows/OptionsDialogView/Position/@EntryValue">[120,-22](1604,883)</s:String>
Expand Down

0 comments on commit 9a99caa

Please sign in to comment.