This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override void Execute(object parameter) | |
{ | |
var oldViewItem = meterTestViewModel.SelectedTestPointSequence; | |
if (oldViewItem == null) | |
{ | |
return; | |
} | |
var testPointSequenceCopy = oldViewItem.Save(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Code: | |
internal static byte CalculateByteStuffingLength(byte[] dataLinkLayerFrame) | |
{ | |
byte resultat = 0; | |
foreach (byte b in dataLinkLayerFrame) | |
{ | |
if ((b == WriteStartByte) || (b == ReadStartByte) || (b == Stop) || (b == Acknowledgement) || (b == Stuff)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override byte[] Create() | |
{ | |
var stream = new MemoryStream(); | |
using (var writer = new BinaryWriter(stream)) | |
{ | |
writer.Write(CommunicationAddress); | |
writer.Write(CommandId); | |
unchecked | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VSIXInstaller.SignatureMismatchException: The signature on the update version of 'NuGet Package Manager' does not match the signature on the installed version. Therefore, Extension Manager cannot install the update. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void IsAlive() | |
{ | |
int counter = 0; | |
int threadId = Thread.CurrentThread.ManagedThreadId; | |
while (keepCheckingConnection) | |
{ | |
Thread.Sleep(1000); | |
if (counter != 60) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var assembly = typeof(MeterCommunicator).Assembly; | |
var commands = assembly.GetTypes().Where(t => t.IsSubclassOf(typeof(CommandBase))); | |
var output = new StringBuilder(); | |
foreach (var command in commands) | |
{ | |
string test = | |
@"[TestMethod] | |
public void {0}Test() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int TestTimeWithSampling | |
{ | |
get | |
{ | |
return CalculateTestTimeWithSampling(); | |
} | |
} | |
private int CalculateTestTimeWithSampling() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=HorizontalContentAlignment; DataItem=null; target element is 'ChangePasswordMenuItem' (Name=''); target property is 'HorizontalContentAlignment' (type 'HorizontalAlignment') | |
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=VerticalContentAlignment; DataItem=null; target element is 'ChangePasswordMenuItem' (Name=''); target property is 'VerticalContentAlignment' (type 'VerticalAlignment') | |
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.DataGrid', AncestorLevel='1''. BindingExpression:Path=AreRowDetailsFrozen; DataItem=null; target element is 'DataGridDetailsPrese |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestMethod] | |
public void ExecuteTest() | |
{ | |
var acceptanceTestRepository = new Mock<IAcceptanceTestRepository>(); | |
var testPointRepository = new Mock<ITestPointRepository>(); | |
var dialogService = new Mock<IDialogService>(); | |
var eventAggregator = new Mock<IEventAggregator>(); | |
eventAggregator.Setup(x => x.GetEvent<TestPointUpdatedEvent>()).Returns(new TestPointUpdatedEvent()); | |
eventAggregator.Setup(x => x.GetEvent<AcceptanceTestUpdatedEvent>()).Returns(new AcceptanceTestUpdatedEvent()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using CRUFL_MT; | |
using MTool.Framework; | |
namespace MTool.Report | |
{ | |
public partial class MeterReportForm : MToolFormBase | |
{ | |
public MeterReportForm() | |
{ |