Updated copyright statement and pasted it where it was missing; some cosmetic fixes

git-svn-id: file:///srv/devel/repo-conversion/nuwi@40 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
Markus Ewald 2019-02-01 20:06:36 +00:00
parent c71700f8e6
commit 435935691a
12 changed files with 132 additions and 30 deletions

View File

@ -1,3 +1,23 @@
#region CPL License
/*
Nuclex Framework
Copyright (C) 2002-2019 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as
published by the IBM Corporation; either version 1.0 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
IBM Common Public License for more details.
You should have received a copy of the IBM Common Public
License along with this library
*/
#endregion
namespace Nuclex.Windows.Forms {
partial class AsyncProgressBar {

View File

@ -1,7 +1,7 @@
#region CPL License
/*
Nuclex Framework
Copyright (C) 2002-2009 Nuclex Development Labs
Copyright (C) 2002-2019 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as

View File

@ -1,11 +1,26 @@
#region CPL License
/*
Nuclex Framework
Copyright (C) 2002-2019 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as
published by the IBM Corporation; either version 1.0 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
IBM Common Public License for more details.
You should have received a copy of the IBM Common Public
License along with this library
*/
#endregion
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.Windows.Forms;
namespace Nuclex.Windows.Forms {
@ -82,8 +97,9 @@ namespace Nuclex.Windows.Forms {
// begin the next update - since we know that the value the UI thread has extracted
// is no longer the most recent one.
if(oldValue == -1.0f) {
if(this.progressUpdateAsyncResult != null)
if(this.progressUpdateAsyncResult != null) {
EndInvoke(this.progressUpdateAsyncResult);
}
this.progressUpdateAsyncResult = BeginInvoke(this.updateProgressDelegate);
}

View File

@ -1,7 +1,7 @@
#region CPL License
/*
Nuclex Framework
Copyright (C) 2002-2007 Nuclex Development Labs
Copyright (C) 2002-2019 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as

View File

@ -1,7 +1,7 @@
#region CPL License
/*
Nuclex Framework
Copyright (C) 2002-2009 Nuclex Development Labs
Copyright (C) 2002-2019 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as

View File

@ -1,7 +1,7 @@
#region CPL License
/*
Nuclex Framework
Copyright (C) 2002-2007 Nuclex Development Labs
Copyright (C) 2002-2019 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as
@ -116,11 +116,13 @@ namespace Nuclex.Windows.Forms {
/// </exception>
protected Rectangle GetSubItemBounds(ListViewItem item, int subItem) {
int[] order = GetColumnOrder();
if(order == null) // No Columns
if(order == null) { // No Columns
return Rectangle.Empty;
}
if(subItem >= order.Length)
if(subItem >= order.Length) {
throw new IndexOutOfRangeException("SubItem " + subItem + " out of range");
}
// Determine the border of the entire ListViewItem, including all sub items
Rectangle itemBounds = item.GetBounds(ItemBoundsPortion.Entire);
@ -132,8 +134,9 @@ namespace Nuclex.Windows.Forms {
int i;
for(i = 0; i < order.Length; ++i) {
columnHeader = this.Columns[order[i]];
if(columnHeader.Index == subItem)
if(columnHeader.Index == subItem) {
break;
}
subItemX += columnHeader.Width;
}
@ -209,11 +212,12 @@ namespace Nuclex.Windows.Forms {
foreach(ListViewEmbeddedControl embeddedControl in this.embeddedControls) {
if(ReferenceEquals(embeddedControl.Control, sender)) {
if((embeddedControl.Row > 0) && (embeddedControl.Row < Items.Count))
if((embeddedControl.Row > 0) && (embeddedControl.Row < Items.Count)) {
Items[embeddedControl.Row].Selected = true;
}
}
}
}
finally {
this.EndUpdate();
}
@ -224,8 +228,9 @@ namespace Nuclex.Windows.Forms {
private int[] GetColumnOrder() {
int[] order = new int[this.Columns.Count];
for(int i = 0; i < this.Columns.Count; ++i)
order[this.Columns[i].DisplayIndex] = i;
for(int index = 0; index < this.Columns.Count; ++index) {
order[this.Columns[index].DisplayIndex] = index;
}
return order;
}

View File

@ -1,7 +1,7 @@
#region CPL License
/*
Nuclex Framework
Copyright (C) 2002-2007 Nuclex Development Labs
Copyright (C) 2002-2019 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as

View File

@ -1,3 +1,23 @@
#region CPL License
/*
Nuclex Framework
Copyright (C) 2002-2019 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as
published by the IBM Corporation; either version 1.0 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
IBM Common Public License for more details.
You should have received a copy of the IBM Common Public
License along with this library
*/
#endregion
namespace Nuclex.Windows.Forms {
partial class ProgressReporterForm {
/// <summary>

View File

@ -1,11 +1,27 @@
#region CPL License
/*
Nuclex Framework
Copyright (C) 2002-2019 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as
published by the IBM Corporation; either version 1.0 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
IBM Common Public License for more details.
You should have received a copy of the IBM Common Public
License along with this library
*/
#endregion
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.Windows.Forms;
using Nuclex.Support.Scheduling;
using Nuclex.Support.Tracking;
@ -73,8 +89,9 @@ namespace Nuclex.Windows.Forms {
// process has already ended. This is an accepted race condition: If the process
// finishes right after this line, it doesn't change the outcome, it just
// causes the progress dialog to be constructed needlessly.
if(transaction.Ended)
if(transaction.Ended) {
return;
}
// Open the form and let it monitor the transaction's state
using(ProgressReporterForm theForm = new ProgressReporterForm()) {
@ -107,8 +124,9 @@ namespace Nuclex.Windows.Forms {
private void track(string windowTitle, Transaction transaction) {
// Set the window title if the user wants to use a custom one
if(windowTitle != null)
if(windowTitle != null) {
Text = windowTitle;
}
// Only enable the cancel button if the transaction can be aborted
this.abortReceiver = (transaction as IAbortable);
@ -124,8 +142,9 @@ namespace Nuclex.Windows.Forms {
// callback to be called immediately and synchronously!
transaction.AsyncEnded += this.asyncEndedDelegate;
IProgressReporter progressReporter = transaction as IProgressReporter;
if(progressReporter != null)
if(progressReporter != null) {
progressReporter.AsyncProgressChanged += this.asyncProgressChangedDelegate;
}
// The transaction might have ended before this line was reached, if that's
// the case, we don't show the dialog at all.

View File

@ -1,3 +1,23 @@
#region CPL License
/*
Nuclex Framework
Copyright (C) 2002-2019 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as
published by the IBM Corporation; either version 1.0 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
IBM Common Public License for more details.
You should have received a copy of the IBM Common Public
License along with this library
*/
#endregion
using System;
using System.ComponentModel;
using System.Drawing;
@ -53,8 +73,9 @@ namespace Nuclex.Windows.Forms {
/// <summary>Default margin to leave around the control in the tool strip</summary>
protected override Padding DefaultMargin {
get {
if((base.Owner != null) && (base.Owner is StatusStrip))
if((base.Owner != null) && (base.Owner is StatusStrip)) {
return new Padding(1, 3, 1, 3);
}
return new Padding(1, 2, 1, 1);
}
@ -73,9 +94,10 @@ namespace Nuclex.Windows.Forms {
TrackingBarControl.VisibleChanged += new EventHandler(trackingBarVisibleChanged);
LicenseUsageMode usageMode = System.ComponentModel.LicenseManager.UsageMode;
if(usageMode == LicenseUsageMode.Runtime)
if(usageMode == LicenseUsageMode.Runtime) {
base.Visible = false;
}
}
/// <summary>
/// Toggles the visibility of the tool strip host when the tracking bar control's

View File

@ -1,7 +1,7 @@
#region CPL License
/*
Nuclex Framework
Copyright (C) 2002-2007 Nuclex Development Labs
Copyright (C) 2002-2019 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as

View File

@ -1,7 +1,7 @@
#region CPL License
/*
Nuclex Framework
Copyright (C) 2002-2007 Nuclex Development Labs
Copyright (C) 2002-2019 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as