コード例 #1
0
 //Creates a new overlay or stores the information in a list to be fetched by the overlay timer
 private static void createNewOverlayOrStoreInformation(EightPokerHand 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 EightPokerOverlay(hand))).Start();
     }
 }
コード例 #2
0
        public EightPokerOverlay(EightPokerHand 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();
        }
コード例 #3
0
        //Creates a hand, fills it with the information about players and finally passes it on to the hud
        public static void getInformationAndPassItToHUD(object source, FileSystemEventArgs e)
        {
            //888 Poker stores summary txts, that should be ignored
            if (e.FullPath.Contains("Summary"))
            {
                return;
            }

            //Create a new hand and check if it is valid to be displayed
            EightPokerHand hand = new EightPokerHand(e.FullPath);

            if (checkIfHandIsValidForHUD(hand.tableSize, hand.tableInformation, hand.players, hand.playerName))
            {
                combineDataSets(hand.players);
                createNewOverlayOrStoreInformation(hand);
            }
        }