Skip to content

Commit

Permalink
Making keep alive refresh interval a configurable setting
Browse files Browse the repository at this point in the history
  • Loading branch information
tylergibson committed Aug 20, 2015
1 parent e1b6358 commit dbfc39a
Show file tree
Hide file tree
Showing 4 changed files with 282 additions and 225 deletions.
108 changes: 74 additions & 34 deletions Sshfs/Sshfs/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions Sshfs/Sshfs/MainForm.cs
Expand Up @@ -308,7 +308,8 @@ private void addButton_Click(object sender, EventArgs e)
Port = 22,
Root = ".",
Letter = letter,
MountPoint = ""
MountPoint = "",
KeepAliveInterval = 30
};


Expand Down Expand Up @@ -418,6 +419,11 @@ private void listView_ItemSelectionChanged(object sender, ListViewItemSelectionC
default: authCombo.SelectedIndex=0; break;
}

if(drive.KeepAliveInterval <= 0)
{
drive.KeepAliveInterval = 1;
}

updateLetterBoxCombo(drive);

passwordBox.Text = drive.Password;
Expand All @@ -430,6 +436,7 @@ private void listView_ItemSelectionChanged(object sender, ListViewItemSelectionC
proxyHostBox.Text = drive.ProxyHost;
proxyLoginBox.Text = drive.ProxyUser;
proxyPassBox.Text = drive.ProxyPass;
keepAliveIntervalBox.Value = drive.KeepAliveInterval;
muButton.Text = drive.Status == DriveStatus.Mounted ? "Unmount" : "Mount";
muButton.Image = drive.Status == DriveStatus.Mounted ? Resources.unmount : Resources.mount;
muButton.Enabled = (drive.Status == DriveStatus.Unmounted || drive.Status == DriveStatus.Mounted);
Expand Down Expand Up @@ -492,6 +499,7 @@ private void saveButton_Click(object sender, EventArgs e)
drive.ProxyHost = proxyHostBox.Text;
drive.ProxyUser = proxyLoginBox.Text;
drive.ProxyPass = proxyPassBox.Text;
drive.KeepAliveInterval = (int) keepAliveIntervalBox.Value;
_dirty = true;
}

Expand Down Expand Up @@ -811,6 +819,5 @@ private void drive_VFSStatusChanged(object sender, EventArgs e)
buttonVFSupdate();
}


}
}

0 comments on commit dbfc39a

Please sign in to comment.