1
に呼び出されていないCTOR
このPC上でうまく実行ポーカー
のVisual Studio 2015のデバッグヌル例外 - XAMLでWPF
が
xmlns:local="clr-namespace:Poker"
上のエラーはエラーがXMLParseExceptionあり、その後、System.Core.DLL
でSystemArgumentNullException ますPoker.MainWindow
のctorは決して呼ばれません
App.xaml.csは呼び出されますが、何もしません
次のステップはxmlns:localのエラーです これは私が数週間と問題なく
クリーンのための仕事をしているアプリです、ショーを再構築
実行コード分析がエラーなし
見つけたエラーが、私はそれを破壊され、実行時の解析についての何かがあると思いません。
私はのxmlnsを削除する場合:ローカル私は他のアプリケーションは、PCが
誰かがコード
<Window x:Class="Poker.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Poker"
mc:Ignorable="d"
ResizeMode="NoResize"
DataContext="{Binding RelativeSource={RelativeSource self}}"
Title="No Limit Holdem Poker 6 Player Sit And Go (SNG) - Beat the Bots" Height="600" Width="650">
<Window.Resources>
<BooleanToVisibilityConverter x:Key="bvc" />
<local:BackGroundConverter x:Key="backGroundConverter"/>
<local:BackGroundConverterCard x:Key="backGroundConverterCard"/>
<local:BackGroundConverterSuit x:Key="backGroundConverterSuite"/>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="20"/>
</Style>
<Style TargetType="TextBlock" x:Key="StdMargin">
<Setter Property="FontSize" Value="18"/>
<Setter Property="Margin" Value="16,0,0,0"/>
</Style>
<Style TargetType="TextBlock" x:Key="StdMarginPlus">
<Setter Property="FontSize" Value="20"/>
<Setter Property="Margin" Value="24,0,0,0"/>
</Style>
<Style TargetType="ComboBox">
<Setter Property="FontSize" Value="18"/>
</Style>
<Color x:Key="ColorMyLighLightGray">#EDEDED</Color>
<SolidColorBrush x:Key="BrushMyLightLightGrey" Color="{StaticResource ColorMyLighLightGray}"/>
</Window.Resources>
<Grid Margin="10,0,2,0">
</Grid>
</Window>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.ComponentModel;
using System.Diagnostics;
//using System.Threading;
namespace Poker
{
public enum enumSuite : byte { spade = 0, club = 1, heart = 3, diamond = 4, none = 5 };
public enum enumRank : byte { one = 1, two = 2, three = 3, four = 4, five = 5, six = 6, seven = 7, eight = 8, nine = 9, ten = 10, jack = 11, queen = 12, king = 13, ace = 14 };
public enum enumHand : byte { high = 0, onePair = 1, twoPair = 2, trip = 3, straight = 4, flush = 5, boat = 6, quad = 7, strtFlush = 8 };
public enum enumHandDraw : byte { onePair = 1, twoPairTrips = 2, straight = 4, flush = 5, boat = 6, quad = 7, strtFlush = 8 };
public enum enumPlayerType : byte { callSn = 0, rock = 1, GTO = 2 };
// 0 nothing
// 1 pair
// 2 pair
// 3 trips
// 4 straight
// 5 flush
// 6 boat
// 7 four of a kind
// 8 straight flush
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window, INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged(String info)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(info));
}
}
public MainWindow()
{
Debug.WriteLine("ctor"); // does not get called
//LoopCount();
ProcessShuffle();
EveryOneBet(0, true);
before = false;
InitializeComponent();
}
を求めてクラッシュしませんでした
このPC上でうまく実行ポーカー
にブラウズして戻ってそれを追加することができます
@Clemensメインウィンドウが持っていないコンパイルエラーとひどく物事を破りましたctorと呼ばれていない – Paparazzi
私は何を求めているのか不明ですか?何も与えることはありません。これはエラーのある行で、エラーメッセージです。他に何か要りますか? – Paparazzi
問題が再現される作業例(MainWindow.xaml、MainWindow.cs)は、問題の根本原因を理解するのに役立ちます。 –