private void CloseStartWindow(Start start, bool fromDatacontext = false) { var dataContext = Internal.ChildWindow.GetDatacontext <ChildWindows.Giveaway.Start>(start.DataContext); if (dataContext?.IsCompleted() == true && fromDatacontext) { var properties = new Aiva.Models.Giveaway.Properties { BeFollower = dataContext.Properties.BeFollower, BlockReEntry = dataContext.Properties.BlockReEntry, Command = dataContext.Properties.Command, SubLuck = dataContext.Properties.IsSubLuckActive ? dataContext.Properties.SubLuck : 1, // when subluck active use subluck, otherwise 1 (for later calc with subluck) IsSubLuckActive = dataContext.Properties.IsSubLuckActive, Price = dataContext.Properties.Price, JoinPermission = dataContext.Properties.JoinPermission }; IsStarted = true; _handler = new Extensions.Giveaway.Handler(properties); start.Close(); StartGiveaway(); } else { IsStarted = false; } }
public Start() { Properties = new Aiva.Models.Giveaway.Properties(); SetCommands(); }