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
| <!--Pivot item two--> | |
| <controls:PivotItem Header="Chart"> | |
| <charts:Chart Theme="Theme3"> | |
| <charts:Chart.Series> | |
| <charts:DataSeries RenderAs="Pyramid" AxisYType="Primary" DataSource="{Binding Items}"> | |
| <charts:DataMapping MemberName="AxisXLabel" Path="Label"></Charts:DataMapping> | |
| <charts:DataMapping MemberName="YValue" Path="YValue"></Charts:DataMapping> | |
| </charts:DataSeries> | |
| </charts:Chart.Series> | |
| </charts:Chart> |
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 mapping = | |
| from periodControl in tariffAndLoadControlLocalType.PeriodControl | |
| let periodControlType = periodControl.PeriodControlType | |
| let exceptionDayKey = (int)GetExceptionDayKey(periodControlType) | |
| let exceptionDay = ExceptionDays(periodControl) | |
| let periods = | |
| from period in periodControl.Period | |
| let blockId = (int)GetBlockId(periodControlType, period.PeriodType) | |
| let dictionary = Get(period) | |
| let workingDays = dictionary.ContainsKey(WorkingDay) |
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 static void AchievementContext_AchievementsUnlocked(object sender, AchievementEventArgs args) | |
| { | |
| if (args.UnlockedAchievements.Any()) | |
| { | |
| Debug.WriteLine(string.Format("Achievements unlocked: {0}", | |
| string.Join(", ", args.UnlockedAchievements.Select(a => "[" + a.Name + "]")))); | |
| Dispatcher.CurrentDispatcher.BeginInvoke(new Action(() => | |
| { | |
| AchievementNotificationBox.ShowAchievements(args.UnlockedAchievements); |
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
| Top-level Exception | |
| Type: System.Exception | |
| Message: Could not check project 'C:\Users\clj\Documents\Visual Studio 2010\Projects\5098497 MeterTool\MeterToolSetup\MeterToolSetup.vdproj' for weaving task | |
| Source: NotifyPropertyWeaverVsPackage | |
| Stack Trace: at NotifyPropertyWeaverVsPackage.MenuConfigure.ContainsWeavingTask(Project project) | |
| at NotifyPropertyWeaverVsPackage.MenuConfigure.CommandStatusCheck() | |
| Inner Exception 1 | |
| Type: System.Xml.XmlException | |
| Message: Data at the root level is invalid. Line 1, position 1. |
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
| serialPort | |
| .RequestResponse(MeterCommunicator.CreateRegisterPackage(1001), TimeSpan.FromSeconds(10), 3) | |
| .ContinueWith(x => | |
| { | |
| var register = MeterCommunicator.DecodeReadMeterRegister(x.Result); | |
| if (register != null) | |
| Console.WriteLine(register); | |
| else | |
| MeterCommunicator.PrintArray(x.Result); |
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
| ...snip... | |
| [core] | |
| editor = 'C:/Program Files (x86)/ConTEXT/ConTEXT.exe' | |
| [merge] | |
| keepBackup = false; | |
| tool = p4merge | |
| [mergetool "p4merge"] |
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
| "Bob the Constructor" -----------------------+ | |
| | | |
| +----------------- "All your base are belong to us" | |
| | | |
| "Luke, I am your father!" -------+-----------+ | |
| | | |
| | +----------- "Locked!" | |
| | | | |
| +---+----------- "Extended!" | |
| | | |
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 static Task<byte[]> WaitData(this SerialPort serialPort, TimeSpan timeout, byte[] request) | |
| { | |
| var tcs = new TaskCompletionSource<byte[]>(); | |
| SerialDataReceivedEventHandler handler = null; | |
| Timer timer = null; | |
| handler = (sender, e) => | |
| { | |
| var package = serialPort.ReadPackage(); |
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
| namespace Test | |
| { | |
| public class PaulaBean | |
| { | |
| private string paula = "Brillant"; | |
| public string Paula | |
| { | |
| get | |
| { |
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
| communicator = new MeterCommunicator("COM4") | |
| { | |
| Timeout = TimeSpan.FromSeconds(5), | |
| MaxRetries = 5, | |
| }; | |
| communicator.RunSequence | |
| ( | |
| c => c.ReadRegister(1001).ContinueWith(t => Console.WriteLine(t.Result)), | |
| c => c.ReadRegister(1002).ContinueWith(t => Console.WriteLine(t.Result)), |