Ejemplo n.º 1
0
 public Roller(RollerControl owner, LaborPicker picker = null, int rolls = 15, TimeSpan lightTime = default(TimeSpan), Color lightColor = default(Color), Color pickedColor = default(Color))
 {
     this.owner       = owner;
     this.picker      = picker ?? new LaborPicker(owner.profile);
     this.rolls       = rolls;
     this.lightTime   = lightTime.Ticks == 0 ? new TimeSpan(0, 0, 0, 0, 200) : lightTime;
     this.lightColor  = lightColor.IsEmpty ? Color.Beige : lightColor;
     this.pickedColor = pickedColor.IsEmpty ? Color.GreenYellow : pickedColor;
 }
Ejemplo n.º 2
0
        private void ProfileSelectOnReturned(object sender, ReturnControlReturnedEventArgs <Profile> eventArgs)
        {
            var profile = eventArgs.data;

            Properties.Settings.Default.RecentProfile = profile.sourcePath;
            Properties.Settings.Default.Save();

            Controls.Remove(profileSelect1);

            var roller = new RollerControl {
                saveDialog = saveFileDialog1, profile = profile, Dock = DockStyle.Fill
            };

            Controls.Add(roller);
        }