private void RankDemandingButton_Click(object sender, RoutedEventArgs e) { DemandTheRankWindow rankDemandingWindow = new DemandTheRankWindow(topCard.Suit) { Owner = this, }; rankDemandingWindow.RankDemandingWindowClosing += RankDemandingWindow_RankDemandingWindowClosing; rankDemandingWindow.ShowDialog(); MemoryManagement.FlushMemory(); }
//method for handling with rank demanding window private void RankDemandingWindowHandle(CardSuits suit) { jackOrAceInCardsToPutOnTheTable = true; Windows.DemandTheRankWindow DemandingWindow = new DemandTheRankWindow(suit) { Owner = this, }; DemandingWindow.RankDemandingWindowClosing += DemandingWindow_RankDemandingWindowClosing; DemandingWindow.ShowDialog(); MemoryManagement.FlushMemory(); }