public static void Configure() { var manager = IoC.Resolve <IManipulatorsManager>(); var soundInformer = IoC.Resolve <SoundInformer>(); FileSystemManipulation.GetManipulations().AddTo(manager); KeyboardManipulation.GetManipulations().AddTo(manager); MouseManipulation.GetManipulations().AddTo(manager); manager.Add(new CustomManipulation <SoundInformer>(soundInformer.GetActionName(), () => soundInformer.CheckForChanges() ? null : soundInformer)); manager.Add(new CustomManipulation <bool>("Sound.Output.Volume", input => { if (!int.TryParse(input, out var volume)) { return(false); } return(soundInformer.ChangeOutputVolume(volume)); })); manager.Add(new CustomManipulation <bool>("Sound.Input.Volume", input => { if (!int.TryParse(input, out var volume)) { return(false); } return(soundInformer.ChangeInputVolume(volume)); })); }
public FileSystemProtocol(FileSystemManipulation manipulation, string path, DateTime timestamp, int maxTries, List <object> options, ProtocollApplicationEventHandler handler) { this.manipulation = manipulation; this.path = path; this.timestamp = timestamp; this.options = options; this.maxTries = maxTries; this.Tries = 0; this.OnProtocolApplication = handler; }
public MainForm() { InitializeComponent(); filesManipulation = new FileSystemManipulation(); database = new DatabaseHelper(); }