Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/ProgressView.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/ProgressView.cs	(revision 8165)
+++ 	(revision )
@@ -1,208 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab 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
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.ComponentModel;
-using System.Windows.Forms;
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  [View("ProgressView")]
-  [Content(typeof(IProgress), true)]
-  public partial class ProgressView : AsynchronousContentView {
-    private const int DefaultCancelTimeoutMs = 3000;
-    private ContentView parentView;
-
-    [Category("Custom"), Description("The time that the process is allowed to exit.")]
-    [DefaultValue(DefaultCancelTimeoutMs)]
-    public int CancelTimeoutMs { get; set; }
-    private bool ShouldSerializeCancelTimeoutMs() { return CancelTimeoutMs != DefaultCancelTimeoutMs; }
-
-    public new IProgress Content {
-      get { return (IProgress)base.Content; }
-      set { base.Content = value; }
-    }
-
-    public ProgressView() {
-      InitializeComponent();
-    }
-    public ProgressView(IProgress progress)
-      : this() {
-      Content = progress;
-    }
-    public ProgressView(ContentView parentView)
-      : this() {
-      if (parentView == null) throw new ArgumentNullException("parentView", "The parent view is null.");
-      this.parentView = parentView;
-    }
-    public ProgressView(ContentView parentView, IProgress progress)
-      : this(parentView) {
-      Content = progress;
-    }
-
-    protected override void RegisterContentEvents() {
-      Content.StatusChanged += new EventHandler(progress_StatusChanged);
-      Content.ProgressValueChanged += new EventHandler(progress_ProgressValueChanged);
-      Content.ProgressStateChanged += new EventHandler(Content_ProgressStateChanged);
-      Content.CanBeCanceledChanged += new EventHandler(Content_CanBeCanceledChanged);
-      base.RegisterContentEvents();
-    }
-
-    protected override void DeregisterContentEvents() {
-      base.DeregisterContentEvents();
-      Content.StatusChanged -= new EventHandler(progress_StatusChanged);
-      Content.ProgressValueChanged -= new EventHandler(progress_ProgressValueChanged);
-      Content.ProgressStateChanged -= new EventHandler(Content_ProgressStateChanged);
-      Content.CanBeCanceledChanged -= new EventHandler(Content_CanBeCanceledChanged);
-    }
-
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-      if (Content == null) {
-        HideProgress();
-      } else {
-        if (Content.ProgressState == ProgressState.Started)
-          ShowProgress();
-      }
-    }
-
-    protected override void SetEnabledStateOfControls() {
-      base.SetEnabledStateOfControls();
-      cancelButton.Visible = Content != null && Content.CanBeCanceled;
-      cancelButton.Enabled = Content != null && Content.CanBeCanceled && !ReadOnly;
-    }
-
-    private void ShowProgress() {
-      if (InvokeRequired) Invoke((Action)ShowProgress);
-      else {
-        if (parentView != null) {
-          this.Left = (parentView.ClientRectangle.Width / 2) - (this.Width / 2);
-          this.Top = (parentView.ClientRectangle.Height / 2) - (this.Height / 2);
-          this.Anchor = AnchorStyles.None;
-
-          LockBackground();
-
-          if (!parentView.Controls.Contains(this))
-            parentView.Controls.Add(this);
-
-          BringToFront();
-        }
-        UpdateProgressValue();
-        UpdateProgressStatus();
-        Visible = true;
-      }
-    }
-
-    private void HideProgress() {
-      if (InvokeRequired) Invoke((Action)HideProgress);
-      else {
-        if (parentView != null) {
-          if (parentView.Controls.Contains(this))
-            parentView.Controls.Remove(this);
-
-          UnlockBackground();
-        }
-        Visible = false;
-      }
-    }
-
-    private void progress_StatusChanged(object sender, EventArgs e) {
-      UpdateProgressStatus();
-    }
-
-    private void progress_ProgressValueChanged(object sender, EventArgs e) {
-      UpdateProgressValue();
-    }
-
-    private void Content_ProgressStateChanged(object sender, EventArgs e) {
-      if (Content.ProgressState == ProgressState.Finished
-        || Content.ProgressState == ProgressState.Canceled)
-        HideProgress();
-      if (Content.ProgressState == ProgressState.Started)
-        ShowProgress();
-    }
-
-    private void Content_CanBeCanceledChanged(object sender, EventArgs e) {
-      SetEnabledStateOfControls();
-    }
-
-    private void LockBackground() {
-      if (InvokeRequired) {
-        Invoke((Action)LockBackground);
-      } else {
-        parentView.Locked = true;
-        parentView.ReadOnly = true;
-        Locked = false;
-        ReadOnly = false;
-      }
-    }
-
-    private void UnlockBackground() {
-      if (InvokeRequired) Invoke((Action)UnlockBackground);
-      else {
-        parentView.Locked = false;
-        parentView.ReadOnly = false;
-        Locked = true;
-        ReadOnly = true;
-      }
-    }
-
-    private void UpdateProgressValue() {
-      if (InvokeRequired) Invoke((Action)UpdateProgressValue);
-      else {
-        if (Content != null) {
-          double progressValue = Content.ProgressValue;
-          if (progressValue <= 0.0 || progressValue > 1.0) {
-            if (progressBar.Style != ProgressBarStyle.Marquee)
-              progressBar.Style = ProgressBarStyle.Marquee;
-          } else {
-            if (progressBar.Style != ProgressBarStyle.Blocks)
-              progressBar.Style = ProgressBarStyle.Blocks;
-            progressBar.Value = (int)Math.Round(progressBar.Minimum + progressValue * (progressBar.Maximum - progressBar.Minimum));
-          }
-        }
-      }
-    }
-
-    private void UpdateProgressStatus() {
-      if (InvokeRequired) Invoke((Action)UpdateProgressStatus);
-      else if (Content != null)
-        statusLabel.Text = Content.Status;
-    }
-
-    private void cancelButton_Click(object sender, EventArgs e) {
-      if (Content != null) {
-        try {
-          Content.Cancel(CancelTimeoutMs);
-          ReadOnly = true;
-          cancelButtonTimer.Interval = CancelTimeoutMs;
-          cancelButtonTimer.Start();
-        } catch (NotSupportedException nse) {
-          PluginInfrastructure.ErrorHandling.ShowErrorDialog(nse);
-        }
-      }
-    }
-
-    private void cancelButtonTimer_Tick(object sender, EventArgs e) {
-      cancelButtonTimer.Stop();
-      if (Visible) ReadOnly = false;
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/ProgressView.designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/ProgressView.designer.cs	(revision 8165)
+++ 	(revision )
@@ -1,102 +1,0 @@
-﻿
-namespace HeuristicLab.MainForm.WindowsForms {
-  partial class ProgressView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.components = new System.ComponentModel.Container();
-      this.progressBar = new System.Windows.Forms.ProgressBar();
-      this.statusLabel = new System.Windows.Forms.Label();
-      this.cancelButton = new System.Windows.Forms.Button();
-      this.panel = new System.Windows.Forms.Panel();
-      this.cancelButtonTimer = new System.Windows.Forms.Timer(this.components);
-      this.panel.SuspendLayout();
-      this.SuspendLayout();
-      // 
-      // progressBar
-      // 
-      this.progressBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.progressBar.Location = new System.Drawing.Point(3, 3);
-      this.progressBar.Name = "progressBar";
-      this.progressBar.Size = new System.Drawing.Size(352, 23);
-      this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
-      this.progressBar.TabIndex = 0;
-      // 
-      // statusLabel
-      // 
-      this.statusLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.statusLabel.Location = new System.Drawing.Point(3, 33);
-      this.statusLabel.Name = "statusLabel";
-      this.statusLabel.Size = new System.Drawing.Size(352, 17);
-      this.statusLabel.TabIndex = 1;
-      // 
-      // cancelButton
-      // 
-      this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-      this.cancelButton.Location = new System.Drawing.Point(280, 53);
-      this.cancelButton.Name = "cancelButton";
-      this.cancelButton.Size = new System.Drawing.Size(75, 23);
-      this.cancelButton.TabIndex = 2;
-      this.cancelButton.Text = "Cancel";
-      this.cancelButton.UseVisualStyleBackColor = true;
-      this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
-      // 
-      // panel
-      // 
-      this.panel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.panel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-      this.panel.Controls.Add(this.progressBar);
-      this.panel.Controls.Add(this.cancelButton);
-      this.panel.Controls.Add(this.statusLabel);
-      this.panel.Location = new System.Drawing.Point(0, 0);
-      this.panel.Name = "panel";
-      this.panel.Size = new System.Drawing.Size(360, 88);
-      this.panel.TabIndex = 3;
-      // 
-      // cancelButtonTimer
-      // 
-      this.cancelButtonTimer.Tick += new System.EventHandler(this.cancelButtonTimer_Tick);
-      // 
-      // ProgressView
-      // 
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
-      this.Controls.Add(this.panel);
-      this.Name = "ProgressView";
-      this.Size = new System.Drawing.Size(360, 88);
-      this.panel.ResumeLayout(false);
-      this.ResumeLayout(false);
-
-    }
-
-    #endregion
-
-    private System.Windows.Forms.ProgressBar progressBar;
-    private System.Windows.Forms.Label statusLabel;
-    private System.Windows.Forms.Button cancelButton;
-    private System.Windows.Forms.Panel panel;
-    private System.Windows.Forms.Timer cancelButtonTimer;
-  }
-}
