Skip to content

Instantly share code, notes, and snippets.

View clausjoergensen's full-sized avatar

Claus Jørgensen clausjoergensen

View GitHub Profile
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.
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);
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)
<!--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>
// remove
//private void RecipeListBox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
//{
// ViewModel.SelectedRecipe = (Recipe)RecipeListBox.SelectedItem;
//}
// replace with:
private void HubTile_Tap(object sender, System.Windows.Input.GestureEventArgs e)
<ListBox ItemsSource="{Binding Tiles}" SelectionChanged="ListBox_SelectionChanged">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<toolkit:WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<toolkit:HubTile Title="{Binding Author}"
Margin="3"
CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(
DateTime.Now,
CultureInfo.CurrentCulture.DateTimeFormat.CalendarWeekRule,
CultureInfo.CurrentCulture.DateTimeFormat.FirstDayOfWeek
);
public ImageSource ImageUri
{
get
{
BitmapImage image = new BitmapImage();
try
{
image.BeginInit();
image.CacheOption = BitmapCacheOption.OnLoad;
var document = XDocument.Load(File.OpenRead(@"myfile.xml"));
var entities = document.Element("ImportExportXml").Element("Entities").Elements("Entity");
var result =
entities.Elements("Entity")
.SelectMany(
e => e.Element("EntityInfo").Element("attributes").Elements("attribute"))
.Distinct();
result.Dump();
public WatchItem CurrentWatchItem
{
get;
set;
}
private void OnCurrentWatchItemChanged()
{
eventAggregator.GetEvent<TickerSymbolSelectedEvent>()
.Publish(CurrentWatchItem.TickerSymbol);