Пример #1
0
 //From IDisplay
 public override void CleanUp()
 {
     LogDebug("SoundGraphDisplay.CleanUp(): called");
     iDisplay = null; //hopefully that should destroy it
     DoUninit();
     Log.Debug("SoundGraphDisplay.CleanUp(): completed");
 }
Пример #2
0
 //From IDisplay
 public override void Configure()
 {
     //We need to have an initialized display to be able to configure it
     Initialize();
     if (iDisplay != null)
     {
         //Display something for fun
         SetLine(0, "Adv. Settings", ContentAlignment.MiddleCenter);
         SetLine(1, Name, ContentAlignment.MiddleCenter);
         Update();
     }
     else
     {
         //No display currently connected/initialized
         //Ask the user which display she wants to configure.
         Form         form = new SoundGraphImonChooseDisplayTypeForm();
         DialogResult res  = form.ShowDialog();
         form.Dispose();
         if (res == DialogResult.Yes)
         {
             //LCD
             iDisplay = new SoundGraphImonLcd();
         }
         else if (res == DialogResult.No)
         {
             //VFD
             iDisplay = new SoundGraphImonVfd();
         }
     }
     //Launch advanced settings dialog for our display
     iDisplay.Configure();
     CleanUp();
 }
Пример #3
0
 //From IDisplay
 public override void Initialize()
 {
     LogDebug("SoundGraphDisplay.Initialize(): called");
     //Init if not already initialized
     if (IDW_IsInitialized() != DSPResult.DSP_SUCCEEDED)
     {
         bool success = DoInit();
         if (!success)
         {
             LogDebug("SoundGraphDisplay.Initialize(): failed");
             return;
         }
         //Instantiate LCD or VFD accordingly
         if (DisplayType == DSPType.DSPN_DSP_LCD)
         {
             LogDebug("SoundGraphDisplay.Initialize(): LCD");
             iDisplay = new SoundGraphImonLcd();
         }
         else if (DisplayType == DSPType.DSPN_DSP_VFD)
         {
             LogDebug("SoundGraphDisplay.Initialize(): VFD");
             iDisplay = new SoundGraphImonVfd();
         }
     }
     Log.Debug("SoundGraphDisplay.Initialize(): completed");
 }
Пример #4
0
 public SoundGraphDisplay()
 {
     iDisplay         = null;
     ImonErrorMessage = string.Empty;
     Initialized      = false;
 }
Пример #5
0
 public SoundGraphDisplay()
 {
     iDisplay = null;
     ImonErrorMessage = string.Empty;
     Initialized = false;
 }
Пример #6
0
        //From IDisplay
        public override void Configure()
        {   
            //We need to have an initialized display to be able to configure it
            Initialize();
            if (iDisplay != null)
            {
                //Display something for fun
                SetLine(0,"Adv. Settings",ContentAlignment.MiddleCenter);
                SetLine(1, Name, ContentAlignment.MiddleCenter);
                Update();
            }
            else
            {
                //No display currently connected/initialized
                //Ask the user which display she wants to configure.
                Form form = new SoundGraphImonChooseDisplayTypeForm();
                DialogResult res=form.ShowDialog();
                form.Dispose();
                if (res == DialogResult.Yes)
                {
                    //LCD
                    iDisplay = new SoundGraphImonLcd();

                }
                else if (res == DialogResult.No)
                {
                    //VFD
                    iDisplay = new SoundGraphImonVfd();
                }
            }
            //Launch advanced settings dialog for our display
            iDisplay.Configure();
            CleanUp();
        }
Пример #7
0
 //From IDisplay
 public override void CleanUp()
 {
     LogDebug("SoundGraphDisplay.CleanUp(): called");
     iDisplay = null; //hopefully that should destroy it
     DoUninit();
     Log.Debug("SoundGraphDisplay.CleanUp(): completed");
 }
Пример #8
0
 //From IDisplay
 public override void Initialize()
 {
     LogDebug("SoundGraphDisplay.Initialize(): called");
     //Init if not already initialized
     if (IDW_IsInitialized() != DSPResult.DSP_SUCCEEDED)
     {
         bool success=DoInit();
         if (!success)
         {
             LogDebug("SoundGraphDisplay.Initialize(): failed");
             return;
         }
         //Instantiate LCD or VFD accordingly
         if (DisplayType == DSPType.DSPN_DSP_LCD)
         {
             LogDebug("SoundGraphDisplay.Initialize(): LCD");
             iDisplay = new SoundGraphImonLcd();
         }
         else if (DisplayType == DSPType.DSPN_DSP_VFD)
         {
             LogDebug("SoundGraphDisplay.Initialize(): VFD");
             iDisplay = new SoundGraphImonVfd();
         }
     }
     Log.Debug("SoundGraphDisplay.Initialize(): completed");
 }