Ejemplo n.º 1
0
 public TextEditor()
 {
     state = new DefaultText();
 }
Ejemplo n.º 2
0
 public void SetState(IWritingState writingState)
 {
     state = writingState;
 }
Ejemplo n.º 3
0
 public void SetState(IWritingState state)
 {
     mState = state;                // Sets the writing state to whichever state you like e.g: SetState(Upper case)
 }
Ejemplo n.º 4
0
 // Constructor - A method that is called whenever an instance of the class is created.
 public TextEditor()             // Constructs a Text Editor
 {
     mState = new DefaultText(); // Sets writing state to default
 }
 public void SetState(IWritingState state)
 {
     mState = state;
 }
Ejemplo n.º 6
0
 public TextEditor(IWritingState state)
 {
     this.state = state;
 }
Ejemplo n.º 7
0
 public void SetState(IWritingState state)
 {
     this.state = state;
 }
Ejemplo n.º 8
0
 public void SetState(IWritingState state) => _state = state;
Ejemplo n.º 9
0
 public Editor()
 {
     _writingState = new DefaultWrite();
 }