public Display Execute(string displayHint = null) { Debug.WriteLine($"beginning execution of {request.action} Request"); response = new MessageResponse(request); // absent actions are added messageRequest sometimes switch (request.action) { case (RequestAction.doNothing): Debug.WriteLine($"Doing nothing..."); break; case (RequestAction.scanFolderFast): Debug.WriteLine($"Scanning ABF folder (filenames only)..."); response.AbfFolder = new AbfFolder(request.path); break; case (RequestAction.scanFolderFull): Debug.WriteLine($"Scanning ABF folder (and text files)..."); break; case (RequestAction.modifyCell): Debug.WriteLine($"Modifying a cell..."); break; case (RequestAction.modifyExperiment): Debug.WriteLine($"Modifying an experiment..."); break; case (RequestAction.analyzeAbf): Debug.WriteLine($"Analyzing ABF(s)..."); break; case (RequestAction.analyzeTif): Debug.WriteLine($"analyzing TIF(s)..."); break; case (RequestAction.labtalk): Debug.WriteLine($"executing labtalk..."); break; default: throw new Exception($"Unimplimented action: {request.action}"); } Debug.WriteLine($"Display hint: {displayHint}"); switch (displayHint) { case "home": displayer = new DisplayHome(response); break; case "frames": displayer = new DisplayFrames(response); break; case "menu": displayer = new DisplayMenu(response); break; case "cell": displayer = new DisplayCell(response); break; case "labtalk": displayer = new DisplayLabtalk(response); break; default: displayer = new DisplayError(response); break; } Debug.WriteLine($"using displayer: {displayer}"); response.StopwatchStop(); Debug.WriteLine($"execution completed in {response.elapsedMillisecString} ms"); return(displayer); }
public DisplayError(MessageResponse response) : base(response) { Debug.WriteLine($"Creating error display from {response}"); }
public DisplayLabtalk(MessageResponse response) : base(response) { Debug.WriteLine($"Creating labtalk display from {response}"); }
public DisplayCell(MessageResponse response) : base(response) { Debug.WriteLine($"Creating cell display from {response}"); }
public DisplayFrames(MessageResponse response) : base(response) { Debug.WriteLine($"Creating frames display from {response}"); }
public DisplayHome(MessageResponse response) : base(response) { Debug.WriteLine($"Creating home display from {response}"); }
public Display(MessageResponse response) { this.response = response; }
public DisplayMenu(MessageResponse response) : base(response) { Debug.WriteLine($"Creating menu display from {response}"); }