Commits

HexRx  committed 8d16c7b

Changed state control

  • Participants
  • Parent commits 4e68fe2

Comments (0)

Files changed (1)

File KPDataSave/Forms/StateControl.cs

 {
     public class StateControl
     {
-        private readonly Form _signInState;
-        private readonly Form _acceptState;
-        private readonly Form _selectFolder;
-
         // Хранит текущее состояние
         private Form _currentState;
 
         {
             _host = host;
             _dropboxClient = new DropboxClient("hhekhlyshoqxt5s", "h0oh21e8y2seixx");
-            _signInState = new SignIn(this);
-            _acceptState = new Accept(this);
-            _selectFolder = new SelectFolder(this);
 
             AccountState accountState = AccountState.Deserialize(host);
             // Начальное состояние
 
         public Form AcceptState
         {
-            get { return _acceptState; }
+            get { return new Accept(this); }
         }
 
         public Form SignInState
         {
-            get { return _signInState; }
+            get { return new SignIn(this); }
         }
 
         public Form SelectFolderState
         {
-            get { return _selectFolder; }
+            get { return new SelectFolder(this); }
         }
 
         public DropboxClient DropboxClient