public Form_RulesCreator2(Bridge bridge) { InitializeComponent(); _br = bridge; rcv = new RuleCreatorView(HueObjectHelper.GetBridgeDataStore(bridge)); DataContext = rcv; }
public Form_RulesCreator2(Bridge bridge, HueObject rule) { InitializeComponent(); _br = bridge; rcv = new RuleCreatorView(HueObjectHelper.GetBridgeDataStore(bridge), rule); DataContext = rcv; editedRule = (Rule)rule; Title = $"Editing rule {((Rule)rule).name}..."; btnCreateRule.Content = "Update"; }
public Form_RulesCreator2(Bridge bridge) { InitializeComponent(); _br = bridge; HelperResult hr = HueObjectHelper.GetBridgeDataStore(bridge); List <HueObject> listobj; if (hr.Success) { listobj = (List <HueObject>)hr.Hrobject; } else { listobj = new List <HueObject>(); } rcv = new RuleCreatorView(listobj); DataContext = rcv; }
public Form_RulesCreator2(Bridge bridge, HueObject rule) { InitializeComponent(); _br = bridge; HelperResult hr = HueObjectHelper.GetBridgeDataStore(bridge); List <HueObject> listobj; if (hr.Success) { listobj = (List <HueObject>)hr.Hrobject; } else { listobj = new List <HueObject>(); } rcv = new RuleCreatorView(listobj, rule); DataContext = rcv; editedRule = (Rule)rule; id = editedRule.Id; Title = $"Editing rule {((Rule)rule).name}..."; btnCreateRule.Content = "Update"; }