PcmHammer, PcmLogger development

They go by many names, P01, P59, VPW, '0411 etc. Also covering E38 and newer here.
Post Reply
User avatar
Gampy
Posts: 2331
Joined: Sat Dec 15, 2018 7:38 am

PcmHammer, PcmLogger development

Post by Gampy »

Hi All,

Two things ... 3 questions.

1. With the split of MainForm into MainFormBase/MainForm, Form designer crashes with the following error:
Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified

Anyone else have this issue, Any ideas (I think the error is misleading and it actually cannot find MainFormBase) ?
and
(probably a NSFW specific question) Is PcmLoggers form a renamed (stripped/modified) copy of PcmHammers form ?

2. I'm no coding guru that is why I'm asking ... To learn!
With the addition of PcmLogger, shouldn't PcmLogger and PcmHammer have their own namespace nested inside the PcmHacking namespace ?
As in: (not that it needs explaining, but just to be clear)

Code: Select all

namespace PcmHacking
{
    namespace PcmHammer
    {
    }
    namespace PcmLogger
    {
    }
}
Thanks for doing what ya do!
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
User avatar
NSFW
Posts: 679
Joined: Fri Feb 02, 2018 3:13 pm

Re: PcmHammer, PcmLogger development

Post by NSFW »

I'm not hitting that form-designer crash. Do you get any error messages if you do a clean rebuild of everything?

When I started the logger I realized that I wanted to re-use some code that was in PcmHammer, especially the device-picker UI. But it wasn't in a place where I could re-use it easily, so I moved the stuff I wanted to re-use into PcmLibraryWindowsForms... So, now the main windows for both PcmHammer and PcmLogger are both derived from the same MainFormBase class, and they both use the same device-picker dialog box, and they use the same pattern for logging. I'm also working now on a third utility that re-uses that stuff as well (probably not something many users will want - I just want an easy way to test random stuff).

I'm not sure about namespaces, so I've just stuck with one for now. As more code accumulates I think it will be clearer how to split things up... For example, on the app side, I kinda want to do an Android version of the logger. And on the library side there's been some talk of supporting E38 PCMs, and I'm not sure how that will fit in with the existing library code - or if it fits at all. It might be different enough that it only reuses the device classes, or it might be similar enough that it just needs a new Protocol class. I'm not sure how any of this is going to affect the code organization, and I don't want to do the namespace changes twice, and the project isn't big enough / active enough that I see a need to tackle this sooner rather than later.

Let me know about that form-design crash, I'm really curious what's going on there.
Please don't PM me with technical questions - start a thread instead, and send me a link to it. That way I can answer in public, and help other people who have the same question. Thanks!
User avatar
Gampy
Posts: 2331
Joined: Sat Dec 15, 2018 7:38 am

Re: PcmHammer, PcmLogger development

Post by Gampy »

Totally got why you split it, liked it!

As for the Designer crash ... Yup, clean source as is from the hub, always do.
No errors, some warnings about capitalization but that's it.

I did notice some of the generated code is not getting updated and is out of sync., like: PcmHammer\Properties\Resources.Designer.cs.
I've brute forced them to be rebuilt, no change.

Trying to to create a simple example project of the concept, not only for resolution assistance but for the education as well.

-Enjoy
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
User avatar
NSFW
Posts: 679
Joined: Fri Feb 02, 2018 3:13 pm

Re: PcmHammer, PcmLogger development

Post by NSFW »

I'll try creating a new repo to see if I can get the same error to happen.

In the meantime, please pull the latest from the develop branch, I just fixed a bug that left the entire main form UI disabled when PCM Hammer starts up.
Please don't PM me with technical questions - start a thread instead, and send me a link to it. That way I can answer in public, and help other people who have the same question. Thanks!
User avatar
Gampy
Posts: 2331
Joined: Sat Dec 15, 2018 7:38 am

Re: PcmHammer, PcmLogger development

Post by Gampy »

NSFW wrote:I'll try creating a new repo to see if I can get the same error to happen.
Yea, I have not accomplished that yet ... Another day is here maybe I'll do better today.
NSFW wrote:In the meantime, please pull the latest from the develop branch, I just fixed a bug that left the entire main form UI disabled when PCM Hammer starts up.
Yea, I put up a pull request for it a couple days ago ...
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
User avatar
Gampy
Posts: 2331
Joined: Sat Dec 15, 2018 7:38 am

Re: PcmHammer, PcmLogger development

Post by Gampy »

An example of things out of sync.

The following is a line from: Apps\PcmHammer\Properties\Resources.Designer.cs

Code: Select all

                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Flash411.Properties.Resources", typeof(Resources).Assembly);
Note the "Flash411" namespace ... Yet, in the designer it is "PcmHacking"
Untitled.jpg
Untitled.jpg (62.71 KiB) Viewed 3197 times
The fix is to edit it in the designer (not by hand in the code editor) or run (right click) 'Run Custom Tool' on the resource. (Resources.resx in this case)

-Enjoy
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
User avatar
Gampy
Posts: 2331
Joined: Sat Dec 15, 2018 7:38 am

Re: PcmHammer, PcmLogger development

Post by Gampy »

I have created a solution with projects that mimic PcmHammer/Logger/Explorer sub classing Form and it works.

Unfortunately I have been unsuccessful getting designer to work in the PcmHammer suite except on MainFormBase
If I undo the sub classing, designer works again (of course it won't build), but at least I can open the forms.

Guess I'm the only one with the issue, no one else has chimed in.
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
User avatar
Gampy
Posts: 2331
Joined: Sat Dec 15, 2018 7:38 am

Re: PcmHammer, PcmLogger development

Post by Gampy »

Reconstructing PcmLibrary.csproj solves the issue ...

It seemed a bit non descriptive ... :wtf:
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
Post Reply