internal SlotConfigWindow(SlotConfigHandler sch, Slot currentSlot) { InitializeComponent(); CurrentSlot = currentSlot; DataContext = CurrentSlot; profileNameTb.DataContext = sch.ActiveProfile; ActiveSlotConfigHandler = sch; sch.ProfileSetupCompleted += Sch_ProfileSetupCompleted; CurrentSlot.SlotIdChangedEventHandler += CurrentSlot_SlotIdChangedEventHandler; Logger.Log($"SlotConfigWindow {GetHashCode()}: " + $"created with slot {currentSlot.Id}."); }
private void RequestProfileSetup(Profile p, SlotConfigHandler.SetupTypes setupType) { bool cancel = false; // don't throw messagebox with lock on Slots, using bool instead lock (Config.Active.ActiveProfile.Slots) { // Prevent setup from running while setup is already running or during session cancel = Table.KnownTables.Count > 0; } if (cancel) { Logger.Log("You cannot create or modify a profile with poker tables open or while already modifying a profile.", Logger.Status.Warning, true); } else { var sch = new SlotConfigHandler(p, setupType); sch.ProfileSetupCompleted += Sch_ProfileSetupCompleted; sch.StartConfigHandler(); } }