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:
parent
c71700f8e6
commit
435935691a
20
Source/AsyncProgressBar/AsyncProgressBar.Designer.cs
generated
20
Source/AsyncProgressBar/AsyncProgressBar.Designer.cs
generated
|
@ -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 {
|
namespace Nuclex.Windows.Forms {
|
||||||
|
|
||||||
partial class AsyncProgressBar {
|
partial class AsyncProgressBar {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#region CPL License
|
#region CPL License
|
||||||
/*
|
/*
|
||||||
Nuclex Framework
|
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
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the IBM Common Public License as
|
modify it under the terms of the IBM Common Public License as
|
||||||
|
|
|
@ -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;
|
||||||
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.Threading;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace Nuclex.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
|
// begin the next update - since we know that the value the UI thread has extracted
|
||||||
// is no longer the most recent one.
|
// is no longer the most recent one.
|
||||||
if(oldValue == -1.0f) {
|
if(oldValue == -1.0f) {
|
||||||
if(this.progressUpdateAsyncResult != null)
|
if(this.progressUpdateAsyncResult != null) {
|
||||||
EndInvoke(this.progressUpdateAsyncResult);
|
EndInvoke(this.progressUpdateAsyncResult);
|
||||||
|
}
|
||||||
|
|
||||||
this.progressUpdateAsyncResult = BeginInvoke(this.updateProgressDelegate);
|
this.progressUpdateAsyncResult = BeginInvoke(this.updateProgressDelegate);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#region CPL License
|
#region CPL License
|
||||||
/*
|
/*
|
||||||
Nuclex Framework
|
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
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the IBM Common Public License as
|
modify it under the terms of the IBM Common Public License as
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#region CPL License
|
#region CPL License
|
||||||
/*
|
/*
|
||||||
Nuclex Framework
|
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
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the IBM Common Public License as
|
modify it under the terms of the IBM Common Public License as
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#region CPL License
|
#region CPL License
|
||||||
/*
|
/*
|
||||||
Nuclex Framework
|
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
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the IBM Common Public License as
|
modify it under the terms of the IBM Common Public License as
|
||||||
|
@ -116,11 +116,13 @@ namespace Nuclex.Windows.Forms {
|
||||||
/// </exception>
|
/// </exception>
|
||||||
protected Rectangle GetSubItemBounds(ListViewItem item, int subItem) {
|
protected Rectangle GetSubItemBounds(ListViewItem item, int subItem) {
|
||||||
int[] order = GetColumnOrder();
|
int[] order = GetColumnOrder();
|
||||||
if(order == null) // No Columns
|
if(order == null) { // No Columns
|
||||||
return Rectangle.Empty;
|
return Rectangle.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
if(subItem >= order.Length)
|
if(subItem >= order.Length) {
|
||||||
throw new IndexOutOfRangeException("SubItem " + subItem + " out of range");
|
throw new IndexOutOfRangeException("SubItem " + subItem + " out of range");
|
||||||
|
}
|
||||||
|
|
||||||
// Determine the border of the entire ListViewItem, including all sub items
|
// Determine the border of the entire ListViewItem, including all sub items
|
||||||
Rectangle itemBounds = item.GetBounds(ItemBoundsPortion.Entire);
|
Rectangle itemBounds = item.GetBounds(ItemBoundsPortion.Entire);
|
||||||
|
@ -132,8 +134,9 @@ namespace Nuclex.Windows.Forms {
|
||||||
int i;
|
int i;
|
||||||
for(i = 0; i < order.Length; ++i) {
|
for(i = 0; i < order.Length; ++i) {
|
||||||
columnHeader = this.Columns[order[i]];
|
columnHeader = this.Columns[order[i]];
|
||||||
if(columnHeader.Index == subItem)
|
if(columnHeader.Index == subItem) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
subItemX += columnHeader.Width;
|
subItemX += columnHeader.Width;
|
||||||
}
|
}
|
||||||
|
@ -209,11 +212,12 @@ namespace Nuclex.Windows.Forms {
|
||||||
|
|
||||||
foreach(ListViewEmbeddedControl embeddedControl in this.embeddedControls) {
|
foreach(ListViewEmbeddedControl embeddedControl in this.embeddedControls) {
|
||||||
if(ReferenceEquals(embeddedControl.Control, sender)) {
|
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;
|
Items[embeddedControl.Row].Selected = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
this.EndUpdate();
|
this.EndUpdate();
|
||||||
}
|
}
|
||||||
|
@ -224,8 +228,9 @@ namespace Nuclex.Windows.Forms {
|
||||||
private int[] GetColumnOrder() {
|
private int[] GetColumnOrder() {
|
||||||
int[] order = new int[this.Columns.Count];
|
int[] order = new int[this.Columns.Count];
|
||||||
|
|
||||||
for(int i = 0; i < this.Columns.Count; ++i)
|
for(int index = 0; index < this.Columns.Count; ++index) {
|
||||||
order[this.Columns[i].DisplayIndex] = i;
|
order[this.Columns[index].DisplayIndex] = index;
|
||||||
|
}
|
||||||
|
|
||||||
return order;
|
return order;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#region CPL License
|
#region CPL License
|
||||||
/*
|
/*
|
||||||
Nuclex Framework
|
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
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the IBM Common Public License as
|
modify it under the terms of the IBM Common Public License as
|
||||||
|
|
|
@ -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 {
|
namespace Nuclex.Windows.Forms {
|
||||||
partial class ProgressReporterForm {
|
partial class ProgressReporterForm {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -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;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
using Nuclex.Support.Scheduling;
|
using Nuclex.Support.Scheduling;
|
||||||
using Nuclex.Support.Tracking;
|
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
|
// 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
|
// finishes right after this line, it doesn't change the outcome, it just
|
||||||
// causes the progress dialog to be constructed needlessly.
|
// causes the progress dialog to be constructed needlessly.
|
||||||
if(transaction.Ended)
|
if(transaction.Ended) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Open the form and let it monitor the transaction's state
|
// Open the form and let it monitor the transaction's state
|
||||||
using(ProgressReporterForm theForm = new ProgressReporterForm()) {
|
using(ProgressReporterForm theForm = new ProgressReporterForm()) {
|
||||||
|
@ -107,8 +124,9 @@ namespace Nuclex.Windows.Forms {
|
||||||
private void track(string windowTitle, Transaction transaction) {
|
private void track(string windowTitle, Transaction transaction) {
|
||||||
|
|
||||||
// Set the window title if the user wants to use a custom one
|
// Set the window title if the user wants to use a custom one
|
||||||
if(windowTitle != null)
|
if(windowTitle != null) {
|
||||||
Text = windowTitle;
|
Text = windowTitle;
|
||||||
|
}
|
||||||
|
|
||||||
// Only enable the cancel button if the transaction can be aborted
|
// Only enable the cancel button if the transaction can be aborted
|
||||||
this.abortReceiver = (transaction as IAbortable);
|
this.abortReceiver = (transaction as IAbortable);
|
||||||
|
@ -124,8 +142,9 @@ namespace Nuclex.Windows.Forms {
|
||||||
// callback to be called immediately and synchronously!
|
// callback to be called immediately and synchronously!
|
||||||
transaction.AsyncEnded += this.asyncEndedDelegate;
|
transaction.AsyncEnded += this.asyncEndedDelegate;
|
||||||
IProgressReporter progressReporter = transaction as IProgressReporter;
|
IProgressReporter progressReporter = transaction as IProgressReporter;
|
||||||
if(progressReporter != null)
|
if(progressReporter != null) {
|
||||||
progressReporter.AsyncProgressChanged += this.asyncProgressChangedDelegate;
|
progressReporter.AsyncProgressChanged += this.asyncProgressChangedDelegate;
|
||||||
|
}
|
||||||
|
|
||||||
// The transaction might have ended before this line was reached, if that's
|
// The transaction might have ended before this line was reached, if that's
|
||||||
// the case, we don't show the dialog at all.
|
// the case, we don't show the dialog at all.
|
||||||
|
|
|
@ -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;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
@ -53,8 +73,9 @@ namespace Nuclex.Windows.Forms {
|
||||||
/// <summary>Default margin to leave around the control in the tool strip</summary>
|
/// <summary>Default margin to leave around the control in the tool strip</summary>
|
||||||
protected override Padding DefaultMargin {
|
protected override Padding DefaultMargin {
|
||||||
get {
|
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, 3, 1, 3);
|
||||||
|
}
|
||||||
|
|
||||||
return new Padding(1, 2, 1, 1);
|
return new Padding(1, 2, 1, 1);
|
||||||
}
|
}
|
||||||
|
@ -73,9 +94,10 @@ namespace Nuclex.Windows.Forms {
|
||||||
TrackingBarControl.VisibleChanged += new EventHandler(trackingBarVisibleChanged);
|
TrackingBarControl.VisibleChanged += new EventHandler(trackingBarVisibleChanged);
|
||||||
|
|
||||||
LicenseUsageMode usageMode = System.ComponentModel.LicenseManager.UsageMode;
|
LicenseUsageMode usageMode = System.ComponentModel.LicenseManager.UsageMode;
|
||||||
if(usageMode == LicenseUsageMode.Runtime)
|
if(usageMode == LicenseUsageMode.Runtime) {
|
||||||
base.Visible = false;
|
base.Visible = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Toggles the visibility of the tool strip host when the tracking bar control's
|
/// Toggles the visibility of the tool strip host when the tracking bar control's
|
||||||
|
|
2
Source/TrackingBar/TrackingBar.Designer.cs
generated
2
Source/TrackingBar/TrackingBar.Designer.cs
generated
|
@ -1,7 +1,7 @@
|
||||||
#region CPL License
|
#region CPL License
|
||||||
/*
|
/*
|
||||||
Nuclex Framework
|
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
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the IBM Common Public License as
|
modify it under the terms of the IBM Common Public License as
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#region CPL License
|
#region CPL License
|
||||||
/*
|
/*
|
||||||
Nuclex Framework
|
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
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the IBM Common Public License as
|
modify it under the terms of the IBM Common Public License as
|
||||||
|
|
Loading…
Reference in New Issue
Block a user