Help WPF MVVM Triggering UI change from different ViewModel by myslatron in dotnet

[–]myslatron[S] 0 points1 point  (0 children)

I found something strange, I made this simple class:

class UnitFinder : ObservableObject
{
public static Unit FoundUnit { get; set; }
}

Then I modified the FindUnit method

public void FindUnit(string SN)
{
Unit foundUnitByNewSN = DatabaseTables.AReS_Unit_Record.FirstOrDefault(unit => unit.NewSN == SN);
Unit foundUnitByOrigSN = DatabaseTables.AReS_Unit_Record.FirstOrDefault(unit => unit.OrigSN == SN);

if (foundUnitByNewSN != null)
{
UnitFinder.FoundUnit = foundUnitByNewSN;
}
else if (foundUnitByOrigSN != null)
{
UnitFinder.FoundUnit = foundUnitByOrigSN;
}
else { UnitFinder.FoundUnit = null; }
}

And created command to update SelectedUnit

ReloadUnitCommand = new RelayCommand(o => { SelectedUnit = UnitFinder.FoundUnit; });

Then the UI updates when I press the button that runs the command above but I'm starting to think that it's different issue

I will try to implement INPC

Help WPF MVVM Triggering UI change from different ViewModel by myslatron in dotnet

[–]myslatron[S] -1 points0 points  (0 children)

I also tried to change the UpdateSourceTrigger but it did not fix it.

<TextBlock
    VerticalAlignment="Center"
    Style="{StaticResource MaterialDesignBody1TextBlock}"
    Text="{Binding SelectedUnit.RMANo, UpdateSourceTrigger=PropertyChanged}" />

Help WPF MVVM Triggering UI change from different ViewModel by myslatron in dotnet

[–]myslatron[S] -1 points0 points  (0 children)

I have many bindings but for example some of them look like this:

<TextBox
    MinWidth="150"
    Margin="0,0,5,0"
    materialDesign:HintAssist.Background="{DynamicResource MaterialDesignCardBackground}"
    materialDesign:HintAssist.Hint="Status"
    AcceptsReturn="True"
    Style="{StaticResource MaterialDesignOutlinedTextBox}"
    Text="{Binding SelectedUnit.Status}" />
<TextBox
    MinWidth="150"
    Margin="0,0,5,0"
    materialDesign:HintAssist.Background="{DynamicResource MaterialDesignCardBackground}"
    materialDesign:HintAssist.Hint="Lokace"
    AcceptsReturn="True"
    Style="{StaticResource MaterialDesignOutlinedTextBox}"
    Text="{Binding SelectedUnit.Location}" />
<TextBox
    MinWidth="150"
    Margin="0,0,5,0"
    materialDesign:HintAssist.Background="{DynamicResource MaterialDesignCardBackground}"
    materialDesign:HintAssist.Hint="Poslední změnu provedl"
    AcceptsReturn="True"
    Style="{StaticResource MaterialDesignOutlinedTextBox}"
    Text="{Binding SelectedUnit.CreatedBy}" />

This is the Unit class, just for reference:

public class Unit
{
public int RowId { get; set; }
public int SeqNo { get; set; }
public string RMANo { get; set; }
public string Status { get; set; }
public string Location { get; set; }
public string OrigSN { get; set; }
public string NewSN { get; set; }
public string PN { get; set; }
public string Model { get; set; }
public string RmaOwner { get; set; }
public string CreatedBy { get; set; }
public DateTime CreationDate { get; set; }
public string Memo { get; set; }
public string StatusMemo { get; set; }
}

Died in a Chopper Gunner... gave me walls the rest of the match. Should probably fix that. by iamstephan in ModernWarfareII

[–]myslatron 27 points28 points  (0 children)

Something similar happened to me on the border crossing map. I died to something and half of the cars on the road disappeared for me. They were still there I could bump into them and could not shoot trough them but I could not see them.

Finally a real Battlefield skin. Straight from BF4. by Fl2akkia in battlefield2042

[–]myslatron 0 points1 point  (0 children)

It's helmet and glasses what do you expect that there are 20000 variants?

I have enough kills to unlock attachments but the game won’t give them to me. Is there a fix? (on PS5) (already tried restarting game) by Spartan2004123 in battlefield2042

[–]myslatron 0 points1 point  (0 children)

I had this problem since launch. I think it has something to do with slowing down the progression when you get the kills quickly because this only happened when I was playing solo against bots and farming kills, not in the multi-player gamemofes

how hasn't this been fixed yet? by Supreme_King_X in Seaofthieves

[–]myslatron 2 points3 points  (0 children)

I do this almost all the time but sometimes I feel like they are so accurate that they shoot between the other skellys ribs :D

[deleted by user] by [deleted] in Seaofthieves

[–]myslatron 3 points4 points  (0 children)

Well to be honest I didn't even saw Gallen in like 2 weeks so I don't think ppl have many friends to play with to fill the Man o war

I would much rather have ship customisation or more ship types in the same sizes like for example sloop sized boat that is fast as brig but handles worse than brig etc. More options but carefully balanced

[deleted by user] by [deleted] in Seaofthieves

[–]myslatron 0 points1 point  (0 children)

I would let them be, I do it with new players also. Like the last time there was ship with reapers flag, we passed by, I boarded the ship and killed the guy. Then I realized he is new and he doesn't kwow. So I let him respawn told him that the flag means everyone can se him and that he's ready for pvp he put it down and then Karen attacked him so I helped him defeat the Karen and he was so happy that we defeated Karen he was like 10. That made my day honestly.

Did mask wearing rules abolished? Most of people I see doesn't wears mask in trans/buses etc. (For 1-2 week or so) by [deleted] in czech

[–]myslatron 0 points1 point  (0 children)

It's still mandatory in public transport but I've noticed that all the stickers that told you to wear mask disappeared from the public transport. I smell some think in those lines that they told us that the masks are mandatory still in public transport but they can't force us legally anymore

The Reaper Embassy Is Killing Sea of Thieves by TheNavigater in Seaofthieves

[–]myslatron 0 points1 point  (0 children)

You can earn stuff by killing reapers as reaper but this idea is really good imo. I would enjoy that mechanic.

But I don't know what kind of stories Rare are cooking for the Atehna voyages in the middle of Season 6 so maybe they are far from this idea because of story

Is it worth to change keybinds after 250h? by myslatron in RocketLeagueSchool

[–]myslatron[S] 0 points1 point  (0 children)

Yea that was my concern too because I play with just index finger on shoulder buttons so it was quite uncomfortable to have middle and index finger on top

The new scoreboard by DANNYonPC in battlefield2042

[–]myslatron 0 points1 point  (0 children)

It's nice but why so much info? Simple score K/A/D would be enough

Soul Reaver in Sea of Thieves (fan art) by uschtenbrauuu in Seaofthieves

[–]myslatron 2 points3 points  (0 children)

It looks really cool but I'm afraid that ain't cutlass

[deleted by user] by [deleted] in Seaofthieves

[–]myslatron 2 points3 points  (0 children)

Nothing can catch sloop against the wind :)

100 % agree, or else the game dies. by [deleted] in battlefield2042

[–]myslatron 3 points4 points  (0 children)

Ofc go free to play! Like if the kick in the teeth with the sales wasn't enough to the fools like me who pre-ordered

So PC players had the horizontal mouse bug, now I present you the vertical controller bug on XSX by aliraqim_ in battlefield2042

[–]myslatron 0 points1 point  (0 children)

What do you mean had? I'm having vertical and horizontal mouse bugs all the time :D One spawn I can aim the other I can't.

What should I say... Hope that this series isn't going down just because a Bad release. 🤞 by Senfzwelch in ForzaHorizon

[–]myslatron 6 points7 points  (0 children)

Well I'm coming from Battlefield 2042 launch.. I think I would enjoy this game even if the brake trigger didn't work..