Skip to content

Conversation

@tollhoff
Copy link

@tollhoff tollhoff commented Sep 5, 2018

Changed the BlockIdentifier of 'Set' function to temporary
Added a second button for 'Save Permanent' functionality
Added a new button for 'Locate Device' (See Profinet specs for exact specifications) that let's the device blink until it's told to stop

Tobias Ollhoff added 3 commits September 5, 2018 16:20
Changed the BlockIdentifier of 'Set' function to temporary
Added a second button for 'Save Permanent' functionality
Added a new button for 'Locate Device' (See Profinet specs for exact specifications) that let's the device blink until it's told to stop
Changed the BlockIdentifier of 'Set' function to temporary
Added a second button for 'Save Permanent' functionality
Added a new button for 'Locate Device' (See Profinet specs for exact specifications) that let's the device blink until it's told to stop
# Conflicts:
#	ProfinetTools.Gui/ViewModels/SettingsViewModel.cs
Copy link
Owner

@fbarresi fbarresi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for starting this software improvement!
Please make this changes so that I can merge your pull request.

public ReactiveUI.ReactiveCommand SaveCommand { get; set; }
public ReactiveUI.ReactiveCommand ResetCommand { get; set; }

public ReactiveUI.ReactiveCommand SavePermanentCommand { get; set; }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we really make two commands for saving settings?
An enum for "Permanent" and "Temporary" would be enough and would avoid code duplication.

else
{
_signalActive = true;
var newThread = new Thread(new ThreadStart(LocationService));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Observable.Interval from System.Reactive here instead.

return Unit.Default;
}

private async Task<Unit> SavePermanentDeviceSettings()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid code duplication here

raisePropertyChanged();
}
}
IsDeviceSelected = _selectedDevice != null;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Reactive Ui for that

<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="24.277"/>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid fix height definition

}

public IAsyncResult BeginSetNameRequest(PhysicalAddress destination, string name)
public IAsyncResult BeginSetNameRequest(PhysicalAddress destination, string name, bool permanent)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method could expect an enumerable in argument

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants