deleted obsolete/old files
This commit is contained in:
		
							parent
							
								
									052897180b
								
							
						
					
					
						commit
						6759ee5b6c
					
				
					 8 changed files with 1 additions and 130 deletions
				
			
		|  | @ -2,7 +2,6 @@ import {NgModule} from "@angular/core"; | |||
| import {BrowserModule} from "@angular/platform-browser"; | ||||
| import {FormsModule} from "@angular/forms"; | ||||
| import {AppComponent} from "./app.component"; | ||||
| import {InputareaComponent} from "./inputarea.component"; | ||||
| 
 | ||||
| @NgModule({ | ||||
|     imports: [ | ||||
|  | @ -10,8 +9,7 @@ import {InputareaComponent} from "./inputarea.component"; | |||
|         FormsModule | ||||
|     ], | ||||
|     declarations: [ | ||||
|         AppComponent, | ||||
|         InputareaComponent | ||||
|         AppComponent | ||||
|     ], | ||||
|     bootstrap: [AppComponent] | ||||
| }) | ||||
|  |  | |||
|  | @ -1,6 +0,0 @@ | |||
| import {ConversionType} from "./conversiontype"; | ||||
| 
 | ||||
| export class ConversionInput { | ||||
|     public content:string; | ||||
|     public type:ConversionType; | ||||
| } | ||||
|  | @ -1,28 +0,0 @@ | |||
| export enum ConversionType { | ||||
|     ENCODE_BASE64, | ||||
|     DECODE_BASE64 | ||||
| } | ||||
| 
 | ||||
| export namespace ConversionType { | ||||
|     export function getName(type:ConversionType):string { | ||||
|         switch (type) { | ||||
|             case ConversionType.DECODE_BASE64: | ||||
|                 return "Decode BASE64"; | ||||
|             case ConversionType.ENCODE_BASE64: | ||||
|                 return "Encode BASE64"; | ||||
|             default: | ||||
|                 return "Unknown"; | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     export function of(id:number):ConversionType { | ||||
|         switch (id) { | ||||
|             case 0: | ||||
|                 return ConversionType.ENCODE_BASE64; | ||||
|             case 1: | ||||
|                 return ConversionType.DECODE_BASE64; | ||||
|             default: | ||||
|                 return undefined; | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | @ -1,15 +0,0 @@ | |||
| <!--<div id="wrapper-{{index}}" class="wrapper">--> | ||||
| <!--<textarea id="input-{{index}}" class="input" (change)="update()" placeholder="Please enter your input ..."--> | ||||
| <!--[(ngModel)]="conversion.content">{{conversion.content}}</textarea>--> | ||||
| <!--<select id="type-{{index}}" class="conversion" (change)="convert($event)">--> | ||||
| <!--<option id="-1">Select conversion ...</option>--> | ||||
| <!--<option *ngFor="let c of conversions" id="{{c}}">Type {{ConversionType[c]}}</option>--> | ||||
| <!--</select>--> | ||||
| <!--</div>--> | ||||
| 
 | ||||
| <textarea class="input" (change)="update()" placeholder="Please enter your input ..." | ||||
|           [(ngModel)]="content">{{content}}</textarea> | ||||
| <select class="conversion" (change)="convert($event)"> | ||||
|     <option id="-1">Select conversion ...</option> | ||||
|     <option *ngFor="let c of converters" id="{{c.getId()}}">{{c.getDisplayname()}}</option> | ||||
| </select> | ||||
|  | @ -1,47 +0,0 @@ | |||
| import {Component, OnInit} from "@angular/core"; | ||||
| import {ConverterRegistryService} from "./converterregistry.service"; | ||||
| import {Converter} from "./converter/converter"; | ||||
| import {InputComponentManagerService} from "./inputcomponentmanager.service"; | ||||
| 
 | ||||
| 
 | ||||
| @Component({ | ||||
|     moduleId: module.id, | ||||
|     selector: "den-inputarea", | ||||
|     templateUrl: "inputarea.component.html", | ||||
|     styleUrls: ["inputarea.component.css"] | ||||
| }) | ||||
| export class InputareaComponent extends OnInit { | ||||
|     public converters:Converter[] = []; | ||||
|     public content:string = ''; | ||||
|     private selectedConverter:Converter; | ||||
| 
 | ||||
|     constructor(private converterRegistryService:ConverterRegistryService, private inputComponentManagerService:InputComponentManagerService) { | ||||
|         super(); | ||||
|     } | ||||
| 
 | ||||
|     public convert(e):void { | ||||
|         this.selectedConverter = this.converterRegistryService.getConverter(e.target.selectedOptions[0].id); | ||||
|         this.update(); | ||||
|     } | ||||
| 
 | ||||
|     public update():void { | ||||
|         if (this.selectedConverter !== undefined) { | ||||
|             let result:string = this.selectedConverter.convert(this.content); | ||||
|             let nextComponent:InputareaComponent = this.inputComponentManagerService.getNext(this); | ||||
|             if (nextComponent !== undefined) { | ||||
|                 nextComponent.setContent(result); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     public setContent(content:string):void { | ||||
|         this.content = content; | ||||
|         this.update(); | ||||
|     } | ||||
| 
 | ||||
|     ngOnInit():void { | ||||
|         this.converters = this.converterRegistryService.getAllConverters(); | ||||
|         this.selectedConverter = undefined; | ||||
|         this.inputComponentManagerService.register(this); | ||||
|     } | ||||
| } | ||||
|  | @ -1,12 +0,0 @@ | |||
| //import {Component} from "@angular/core"; | ||||
| // | ||||
| //@Component({ | ||||
| //    selector: "den-option", | ||||
| //    template: ` | ||||
| //    <option id="{{id}}">{{displayName}}</option> | ||||
| //    ` | ||||
| //}) | ||||
| //export class OptionComponent { | ||||
| //    public id:string; | ||||
| //    public displayName:string; | ||||
| //} | ||||
|  | @ -1,19 +0,0 @@ | |||
| //import {Component} from "@angular/core"; | ||||
| // | ||||
| //import {OptionComponent} from "./option.component"; | ||||
| // | ||||
| //@Component({ | ||||
| //    selector: "den-selector", | ||||
| //    template: ` | ||||
| //    <select> | ||||
| //    <span *ngFor="#option of options"> | ||||
| //        <option id="{{option.id}}">{{option.displayName}}</option> | ||||
| //    </span> | ||||
| //    </select> | ||||
| //    `, | ||||
| //    directives: [OptionComponent] | ||||
| //}) | ||||
| //export class SelectorComponent { | ||||
| //    private options:OptionComponent[]; | ||||
| // | ||||
| //} | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue