void Initialize(Device device)
		{
			_device = device;
			Clauses = new ObservableCollection<ClauseViewModel>();
			if (device.ZoneLogic != null)
			{
				foreach (var clause in device.ZoneLogic.Clauses)
				{
					var clauseViewModel = new ClauseViewModel(this, _device, clause);
					Clauses.Add(clauseViewModel);
				}
			}
			else
			{
				device.ZoneLogic = new ZoneLogic();
			}

			if (device.ZoneLogic.Clauses.Count == 0)
			{
				var clauseViewModel = new ClauseViewModel(this, _device, new Clause());
				Clauses.Add(clauseViewModel);
			}

			JoinOperator = device.ZoneLogic.JoinOperator;
			UpdateJoinOperatorVisibility();
		}
		void OnRemove(ClauseViewModel clauseViewModel)
		{
			Clauses.Remove(clauseViewModel);
			UpdateJoinOperatorVisibility();
		}
		void OnAdd()
		{
			var clause = new Clause()
			{
				Operation = ZoneLogicOperation.All,
				State = ZoneLogicState.Fire
			};
			var clauseViewModel = new ClauseViewModel(this, _device, clause);
			Clauses.Add(clauseViewModel);
			UpdateJoinOperatorVisibility();
		}