示例#1
0
        //Creates a hand, fills it with the information about players and finally passes it on to the hud
        private static void getInformationAndPassItToHUD(object source, FileSystemEventArgs e)
        {
            PokerStarsHand hand = new PokerStarsHand(e.FullPath);

            if (checkIfHandIsValidForHUD(hand.tableSize, hand.handInformation))
            {
                combineDataSets(hand.players);
                createNewOverlayOrStoreInformation(hand);
            }
        }
示例#2
0
 //Creates a new overlay or stores the information in a list to be fetched by the overlay timer
 private static void createNewOverlayOrStoreInformation(PokerStarsHand hand)
 {
     if (overlays.ContainsKey(hand.tableName))
     {
         newHandsToBeFetched.TryAdd(hand.tableName, hand);
     }
     else
     {
         newHandsToBeFetched.TryAdd(hand.tableName, hand);
         overlays.TryAdd(hand.tableName, hand.tableName);
         new Thread(() => Application.Run(new PokerStarsOverlay(hand))).Start();
     }
 }
示例#3
0
        public PokerStarsOverlay(PokerStarsHand hand)
        {
            InitializeComponent();

            //Prepare the overlay
            prepareOverlay(hand.tableName, hand.tableSize, hand.playerName);

            //Add an event to the timers
            statsFetcherTimer.Tick      += new EventHandler(updatePlayerStatsIfNewHandExists);
            controlSizeUpdateTimer.Tick += new EventHandler(updateControlSizeOrCloseOverlay);

            //Set the size for all controls
            setPositionOfStatsWindowsWindowsAccordingToTableSize();
        }