コード例 #1
0
ファイル: Interactor.cs プロジェクト: swharden/ABF-browser
        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);
        }
コード例 #2
0
 public DisplayError(MessageResponse response) : base(response)
 {
     Debug.WriteLine($"Creating error display from {response}");
 }
コード例 #3
0
 public DisplayLabtalk(MessageResponse response) : base(response)
 {
     Debug.WriteLine($"Creating labtalk display from {response}");
 }
コード例 #4
0
 public DisplayCell(MessageResponse response) : base(response)
 {
     Debug.WriteLine($"Creating cell display from {response}");
 }
コード例 #5
0
 public DisplayFrames(MessageResponse response) : base(response)
 {
     Debug.WriteLine($"Creating frames display from {response}");
 }
コード例 #6
0
ファイル: DisplayHome.cs プロジェクト: swharden/ABF-browser
 public DisplayHome(MessageResponse response) : base(response)
 {
     Debug.WriteLine($"Creating home display from {response}");
 }
コード例 #7
0
ファイル: Display.cs プロジェクト: swharden/ABF-browser
 public Display(MessageResponse response)
 {
     this.response = response;
 }
コード例 #8
0
 public DisplayMenu(MessageResponse response) : base(response)
 {
     Debug.WriteLine($"Creating menu display from {response}");
 }