//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 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(); }