//From IDisplay
 public override void CleanUp()
 {
     LogDebug("SoundGraphDisplay.CleanUp(): called");
     iDisplay = null; //hopefully that should destroy it
     DoUninit();
     Log.Debug("SoundGraphDisplay.CleanUp(): completed");
 }
 //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();
 }
 //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");
 }
 public SoundGraphDisplay()
 {
     iDisplay         = null;
     ImonErrorMessage = string.Empty;
     Initialized      = false;
 }
 public SoundGraphDisplay()
 {
     iDisplay = null;
     ImonErrorMessage = string.Empty;
     Initialized = false;
 }
        //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();
        }
 //From IDisplay
 public override void CleanUp()
 {
     LogDebug("SoundGraphDisplay.CleanUp(): called");
     iDisplay = null; //hopefully that should destroy it
     DoUninit();
     Log.Debug("SoundGraphDisplay.CleanUp(): completed");
 }
 //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");
 }