示例#1
0
文件: Hud.cs 项目: smtheard/PokerMuck
 public Hud(Table table)
 {
     this.table = table;
     this.settings = new HudUserSettings();
     this.windowsList = new HudWindowsList();
     this.visible = true;
 }
示例#2
0
 public static TableDisplayWindow CreateForTable(Table t)
 {
     switch(t.Game){
         case PokerGame.Holdem:
             return new HoldemTableDisplayWindow(t);
         default:
             return new InvisibleTableDisplayWindow(t);
     }
 }
示例#3
0
        public static HudWindow CreateHudWindow(Table t)
        {
            if (t.Game == PokerGame.Holdem)
            {
                return new HoldemHudWindow();
            }

            Trace.Assert(false, "I couldn't create a hud for this table: " + t.GameID);
            return null; 
        }
示例#4
0
        private Table table; //Reference to the table that owns this display

        #endregion Fields

        #region Constructors

        public TableDisplayWindow(Table table)
        {
            InitializeComponent();
            this.lastPlayerHand = null;
            this.table = table;
            this.oddsCalculator = OddsCalculator.CreateFor(table.Game);
            this.DoubleBuffered = true;
            this.SetStyle(ControlStyles.ResizeRedraw, true);
            this.Size = LoadWindowSize();
            this.Location = LoadAbsoluteWindowPosition();
        }
        public VisualRecognitionManager(Table table, IVisualRecognitionManagerHandler handler)
        {
            Trace.Assert(table.Game != PokerGame.Unknown, "Cannot create a visual recognition manager without knowing the game of the table");
            Trace.Assert(table.WindowRect != Rectangle.Empty, "Cannot create a visual recognition manager without knowing the window rect");

            this.table = table;
            this.handler = handler;
            this.colorMap = ColorMap.Create(table.Game);
            this.recognitionMap = new VisualRecognitionMap(table.VisualRecognitionMapLocation, colorMap);
            this.matcher = new VisualMatcher(Globals.UserSettings.CurrentPokerClient);
            this.tableWindow = new Window(table.WindowTitle);

            this.timedScreenshotTaker = new TimedScreenshotTaker(REFRESH_TIME, tableWindow);
            this.timedScreenshotTaker.ScreenshotTaken += new TimedScreenshotTaker.ScreenshotTakenHandler(timedScreenshotTaker_ScreenshotTaken);
            this.timedScreenshotTaker.Start();
        }
 public HoldemTableDisplayWindow(Table table)
     : base(table)
 {
 }
示例#7
0
        public override void RegisterHandlers(Hud hud, Table t, Player p)
        {
            base.RegisterHandlers(hud, t, p);

            this.OnPlayerPreflopPushingRangeNeedToBeDisplayed += new OnPlayerPreflopPushingRangeNeedToBeDisplayedHandler(hud.holdemWindow_OnPlayerPreflopPushingRangeNeedToBeDisplayed);
        }
 public HoldemTableStatistics(Table table)
     : base(table)
 {
     PrepareStatisticsForNewRound();
 }
示例#9
0
 public virtual void RegisterHandlers(Hud hud, Table t, Player p)
 {
     this.OnResetStatisticsButtonPressed += new HudWindow.OnResetStatisticsButtonPressedHandler(p.window_OnResetStatisticsButtonPressed);
     this.OnResetAllStatisticsButtonPressed += new HudWindow.OnResetAllStatisticsButtonPressedHandler(t.window_OnResetAllStatisticsButtonPressed);
     this.OnPlayerStatisticsNeedToBeDisplayed += new HudWindow.OnPlayerStatisticsNeedToBeDisplayedHandler(hud.window_OnPlayerStatisticsNeedToBeDisplayed);
     this.LocationChanged += new EventHandler(hud.window_LocationChanged);
 }
 public InvisibleTableDisplayWindow(Table table)
     : base(table)
 {
     this.Visible = false;
 }
示例#11
0
 public TableStatistics(Table table)
 {
     this.table = table;
 }