public ShutdownDialogViewModel(IWindowManager windowManager, Shutdown mode, FtpContentViewModel ftp = null) { _windowManager = windowManager; _ftp = ftp; Mode = mode; Title = Resx.Shutdown; switch (mode) { case Shutdown.Both: _innerText = Resx.ShutdownDialogModeComputerAndXbox; break; case Shutdown.PC: _innerText = Resx.ShutdownDialogModeComputer; break; case Shutdown.Xbox: _innerText = Resx.ShutdownDialogModeXbox; break; default: throw new NotSupportedException("Invalid Shutdown mode: " + mode); } Caption = string.Format(Resx.ShutdownDialogCaption, _innerText); _counter = new TimeSpan(0, 0, 30); //TODO: config _timer = new Timer(TimerCallback, null, 0, 1000); }
private void OpenTelnetSession(LocalFileSystemContentViewModel local, FtpContentViewModel ftp) { var connection = ftp.Connection; Telnet.OpenSession(local.Drive.Path, local.Drive.FullPath, connection.Address, connection.Port ?? 21, connection.Username, connection.Password); }
public FreestyleDatabaseCheckerViewModel(FtpContentViewModel parent) { _parent = parent; CloseCommand = new DelegateCommand(ExecuteCloseCommand); CleanUpCommand = new DelegateCommand(ExecuteCleanUpCommand); }