Giter Club home page Giter Club logo

Comments (23)

Hyrules avatar Hyrules commented on June 16, 2024 1

I've been programming WinHue for the last 4 years if I remember well. Started with WinHue and now it's Winhue 3. I have been working on WinHue 3 for the most of the last 2 years in my spare time. My C# has improved alot since. I`ve learned many things in C# because of WinHue. If you have questions don't hesitate. I'll answer as best as I can.

from winhue.

Hyrules avatar Hyrules commented on June 16, 2024

Did you fork the master or the dev branch ?

from winhue.

Hyrules avatar Hyrules commented on June 16, 2024

By yeah it's odd that I has not been synced. I will post the file here when I get home tonight.

from winhue.

MrHamaga avatar MrHamaga commented on June 16, 2024

I'm currently looking at the dev branch. I'm not sure if I solved the issue, but I added a nuget reference to Prism.Validation, which allows me to compile and run the application.

Now I just need to find the form for showing Rules :)

from winhue.

Hyrules avatar Hyrules commented on June 16, 2024

in the View folder. Form_RulesCreator2. In the dev branch.

from winhue.

MrHamaga avatar MrHamaga commented on June 16, 2024

I found that one, but that's for creating rules.

I'm trying to figure out how you populate the lvMainObjects list with the different elements, among these the rules. I haven't worked with xaml before, so have to read up on it :)

from winhue.

Hyrules avatar Hyrules commented on June 16, 2024

Populating is done by binding. You only have to fill a variable with the objects you want and define the template. The template of the mainform lvMainObjects is defined in the XAML of line 106 in MainWindow.xaml. OldViews / MainFormView.cs contains the logic for the main form. Populating is done one line 1077.

from winhue.

Hyrules avatar Hyrules commented on June 16, 2024

If you want you can just wait instead of creating the function to clone. another user just requested the same function. I will implement it in the next version.

from winhue.

MrHamaga avatar MrHamaga commented on June 16, 2024

Cool, thanks.

I'm a software developer who likes to tinker with small projects in my spare time. Some weeks ago I wrote my own small app for accessing my light bulbs, but yours is so much more elaborate than anything I'll ever get time to write. Now I'm looking for ways to tweak yours to my liking.

I'll probably try to work in a translation in the rule actions for the dimmer buttons based on the
definition from https://developers.meethue.com/documentation/hue-dimmer-switch-programming.

First I need to be able to copy my dimmer rules :)

But don't sweat it, I'll just use what you make and be happy that my dimmers can be customized :)

from winhue.

MrHamaga avatar MrHamaga commented on June 16, 2024

I'm trying to understand the public ICommand DeleteObjectCommand => new RelayCommand(param => DeleteObject()); - and how that is mapped to the context menu.

from winhue.

MrHamaga avatar MrHamaga commented on June 16, 2024

Oh,I guess it's defined in

<MenuItem Header="{x:Static resx:GUI.MainForm_ListView_Context_Delete}" x:Name="mnuDeleteObject" IsEnabled="{Binding CanDeleteObject}" Command="{Binding DeleteObjectCommand}"/>
along with the methods to see if it's enabled.

from winhue.

Hyrules avatar Hyrules commented on June 16, 2024

That a part that I related to the binding of command. What it does is it's bound to the context menu button and when you click on it, it relays (thus the RelayCommand) the command by executing the private function called DeleteObjects.

from winhue.

MrHamaga avatar MrHamaga commented on June 16, 2024

Yeah, it's starting to make sense :) do you have a roadmap or a product backlog for the issues you are working on?

from winhue.

Hyrules avatar Hyrules commented on June 16, 2024

No it's all here in the issue section or in my head. Right now (not at the moment) i'm recoding the mainform using a MVVM architectural pattern. It gives less code thus less possibility of bugs.

from winhue.

MrHamaga avatar MrHamaga commented on June 16, 2024

Yay, I managed to copy a rule :) Let me know if you want to see the code.

from winhue.

MrHamaga avatar MrHamaga commented on June 16, 2024

I have a weird experience regarding rules updating a sensor. When I first create the rule the sensor is updated correctly and the rule works. But if I update it, the sensor is no longer updating, thus making the rule not working. If I remove and add the action updating the sensor it works again.

Do you have any idea why this could be?

The only difference I can see between the two webrequests, is as follows (in the actions section):
Working:
"address": "/sensors/21/state", "method": "PUT", "body": { "status": 3 }
Not working:
"address": "/sensors/21/state", "method": "PUT", "body": { "status": "3" }

Should I open another issue, or is it ok I just keep asking questions in this one? :) Or do you have other sources for communicating?

from winhue.

Hyrules avatar Hyrules commented on June 16, 2024

No this is a known issue #52 it will be fixed in the next version.

from winhue.

MrHamaga avatar MrHamaga commented on June 16, 2024

Sorry, I didn't see that one.

Again, let me know if you want me to make a pull request for the rule copying.

from winhue.

Hyrules avatar Hyrules commented on June 16, 2024

I suggest you wait until the next version because most of the mainform code has changed. Chances are what you implemented won't work with next version. I haven't finished coding it yet either.

from winhue.

MrHamaga avatar MrHamaga commented on June 16, 2024

I'll do that. Thank you for taking the time to respond to my questions.

from winhue.

Hyrules avatar Hyrules commented on June 16, 2024

For what it's worth I have added the missing file to the repo.

from winhue.

MrHamaga avatar MrHamaga commented on June 16, 2024

Thanks, I see you corrected other references as well :) However you still refer the HueLib project by its binary and not as a project reference, this causes some problems when building the solution the first time.

from winhue.

Hyrules avatar Hyrules commented on June 16, 2024

Noted I will also correct that.

from winhue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.