File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -29,23 +29,21 @@ public ObjectModelHeaderViewModel(ObjectModelHeader header)
29
29
Checksum = header . Checksum ;
30
30
ObjectSource = header . ObjectSource ;
31
31
ObjectType = header . ObjectType ;
32
-
33
- _ = this . WhenAnyValue ( o => o . Checksum )
34
- . Subscribe ( _ => this . RaisePropertyChanged ( nameof ( ChecksumHex ) ) ) ;
35
32
}
36
33
37
- [ Reactive , MaxLength ( 8 ) ]
34
+ [ MaxLength ( 8 ) ]
38
35
public string Name { get ; set ; }
39
36
40
- public uint32_t Checksum { get ; set ; }
37
+ uint32_t Checksum { get ; set ; }
41
38
42
39
public string ChecksumHex
43
- => string . Format ( $ "{ Checksum : X} ") ;
40
+ {
41
+ get => string . Format ( $ "0x{ Checksum : X} ") ;
42
+ set => Checksum = Convert . ToUInt32 ( value [ 2 ..] , 16 ) ;
43
+ }
44
44
45
- [ Reactive ]
46
45
public ObjectSource ObjectSource { get ; set ; }
47
46
48
- [ Reactive ]
49
47
public ObjectType ObjectType { get ; set ; }
50
48
51
49
public ObjectModelHeader GetAsModel ( )
You can’t perform that action at this time.
0 commit comments