public MainViewModel()
 {
     Status = "Initializing";
     name = NameGenerator.Generate();
     UITaskFactory = new TaskFactory(TaskScheduler.FromCurrentSynchronizationContext());
     client = new Client(this, name);
     client.Start();
 }
        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    client.Close();
                    client = null;
                }

                disposedValue = true;
            }
        }