Tech Off Post

Single Post Permalink

View Thread: Class Design
  • User profile image
    VBJB

    Alright can someone explain this to me? I am trying to create an assembly that is made up of many classes, but I am having trouble making it all work as a single object. This is what I want in my assembly.

    I want to be able to say Public FMA3 As New Mill.FMA3 in my forms application (the assembly name is Mill). The main purpose of the FMA3 class is to set all its properties in the Sub New(). I have all this figured out so far.

    Here is where I am struggling. I want to have properties such as FMA3.Alarm.AlarmNum, FMA3.Alarm.AlarmMsg, or FMA3.Alarm.hasAlarm (other properties FMA3.Current.Tool, FMA3.Current.MCode..). I am guessing FMA3.Alarm needs to be a namespace?! How do I physically set this up?

    This is what I have so far, but I have not been able to get it to work. I have an assembly named Mill, inside that assembly I have a class named FMA3 and another class named Alarm (seperate files; FMA3.vb and Alarm.vb) and I am guessing the Namespace in class alarm would be Namespace FMA3. The local variables in Public Class Alarm would be labeled as Private Shared so the FMA3 class can set the ReadOnly properties inside the Alarm class, but none of this is working right. Can someone help me?

    I also tried nested classes, but it was to hard to manage. I would like to break out each namespace in its own class.