public void Init(Model model) { inputsList = new List <InputReceiverPair>(); OnCompleted += () => { disposables.Dispose(); }; this.model = model; InitializeComponent(); int count = 0; if (model.inputs != null) { count = model.inputs.Count(); } for (int i = 0; i < count; i++) { Receiver rec = null; AnalyticsEngineInput inp = null; if (model.receivers != null && model.receivers.Count() > i) { rec = model.receivers[i]; } if (model.inputs != null && model.inputs.Count() > i) { inp = model.inputs[i]; } inputsList.Add(new InputReceiverPair(rec, inp)); } inputsList.ForEach(inp => { CreateInputUI(inp); }); FinishCommand = new DelegateCommand( () => Success(new Result.Finish(model)), () => true ); btnFinish.Command = FinishCommand; AbortCommand = new DelegateCommand( () => Success(new Result.Abort()), () => true ); btnAbort.Command = AbortCommand; Localization(); }
public static Model Create( bool isEnable, AnalyticsEngineInput input, Receiver receiver, Receiver[] receivers ) { var _this = new Model(); _this.receivers = receivers; _this.origin.isEnable = isEnable; _this.origin.input = input; _this.origin.receiver = receiver; _this.RevertChanges(); return(_this); }
public Modify(AnalyticsEngineInput input) { this.input = input; }
public OnvifSetAnalyticsEngineInput(string uri, string userName, string password, AnalyticsEngineInput configuration, bool forcePersitent) : base(uri, userName, password) { Configuration = configuration; ForcePersitent = forcePersitent; }
public InputReceiverPair(Receiver rec, AnalyticsEngineInput inp) { this.rec = rec; this.inp = inp; }