void OnClickOpenSaveButton (object sender, EventArgs e)
{
- if (fileDialogType == FileDialogType.OpenFileDialog && mwfFileView.SelectedItems [0] != null) {
- string path = Path.Combine (currentDirectoryName, mwfFileView.SelectedItems [0].Text);
- if (Directory.Exists (path)) {
- ChangeDirectory (null, path);
- openSaveButton.Select ();
- return;
+ if (fileDialogType == FileDialogType.OpenFileDialog){
+ ListView.SelectedListViewItemCollection sl = mwfFileView.SelectedItems;
+ if (sl.Count > 0 && sl [0] != null){
+ string path = Path.Combine (currentDirectoryName, mwfFileView.SelectedItems [0].Text);
+ if (Directory.Exists (path)) {
+ ChangeDirectory (null, path);
+ openSaveButton.Select ();
+ return;
+ }
}
}
public Rectangle GetItemRect (int index, ItemBoundsPortion portion)
{
if (index < 0 || index >= items.Count)
- throw new IndexOutOfRangeException ("Invalid Index");
+ throw new IndexOutOfRangeException ("index");
return items [index].GetBounds (portion);
}
public int this [int index] {
get {
if (index < 0 || index >= list.Count)
- throw new ArgumentOutOfRangeException ("Index out of range.");
+ throw new ArgumentOutOfRangeException ("index");
return (int) list [index];
}
}
public ListViewItem this [int index] {
get {
if (index < 0 || index >= list.Count)
- throw new ArgumentOutOfRangeException ("Index out of range.");
+ throw new ArgumentOutOfRangeException ("index");
return (ListViewItem) list [index];
}
}
public virtual ColumnHeader this [int index] {
get {
if (index < 0 || index >= list.Count)
- throw new ArgumentOutOfRangeException ("Index out of range.");
+ throw new ArgumentOutOfRangeException ("index");
return (ColumnHeader) list [index];
}
}
// LAMESPEC: MSDOCS say greater than or equal to the value of the Count property
// but it's really only greater.
if (index < 0 || index > list.Count)
- throw new ArgumentOutOfRangeException ("Index out of range.");
+ throw new ArgumentOutOfRangeException ("index");
value.owner = this.owner;
list.Insert (index, value);
public virtual void RemoveAt (int index)
{
if (index < 0 || index >= list.Count)
- throw new ArgumentOutOfRangeException ("Index out of range.");
+ throw new ArgumentOutOfRangeException ("index");
// TODO: Update Column internal index ?
list.RemoveAt (index);
public virtual ListViewItem this [int displayIndex] {
get {
if (displayIndex < 0 || displayIndex >= list.Count)
- throw new ArgumentOutOfRangeException ("Index out of range.");
+ throw new ArgumentOutOfRangeException ("displayIndex");
return (ListViewItem) list [displayIndex];
}
set {
if (displayIndex < 0 || displayIndex >= list.Count)
- throw new ArgumentOutOfRangeException ("Index out of range.");
+ throw new ArgumentOutOfRangeException ("displayIndex");
if (list.Contains (value))
throw new ArgumentException ("An item cannot be added more than once. To add an item again, you need to clone it.", "value");
// LAMESPEC: MSDOCS say greater than or equal to the value of the Count property
// but it's really only greater.
if (index < 0 || index > list.Count)
- throw new ArgumentOutOfRangeException ("Index out of range.");
+ throw new ArgumentOutOfRangeException ("index");
if (list.Contains (item))
throw new ArgumentException ("An item cannot be added more than once. To add an item again, you need to clone it.", "item");
public virtual void RemoveAt (int index)
{
if (index < 0 || index >= list.Count)
- throw new ArgumentOutOfRangeException ("Index out of range.");
+ throw new ArgumentOutOfRangeException ("index");
list.RemoveAt (index);
owner.SelectedItems.list.RemoveAt (index);
public int this [int index] {
get {
if (index < 0 || index >= list.Count)
- throw new ArgumentOutOfRangeException ("Index out of range.");
+ throw new ArgumentOutOfRangeException ("index");
return (int) list [index];
}
}
public ListViewItem this [int index] {
get {
if (index < 0 || index >= list.Count)
- throw new ArgumentOutOfRangeException ("Index out of range.");
+ throw new ArgumentOutOfRangeException ("index");
return (ListViewItem) list [index];
}
}