コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FormProcessDisplay" /> class.
        /// </summary>
        /// <param name="windowTitle">The description / form title</param>
        /// <param name="owner">
        /// The owner form, in case the owner is minimized or closed this progress will do the same
        /// </param>
        /// <param name="cancellationTokenSource">A <see cref="CancellationTokenSource" /></param>
        public FormProcessDisplay(string windowTitle, System.Threading.CancellationToken cancellationToken)
        {
            InitializeComponent();
            CancellationToken  = cancellationToken;
            m_TimeToCompletion = new TimeToCompletion();

            Text = windowTitle;
            Icon = CsvToolLib.Resources.SubFormIcon;
        }
コード例 #2
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="FormProcessDisplay" /> class.
        /// </summary>
        /// <param name="windowTitle">The description / form title</param>
        /// <param name="cancellationToken">The cancellation token.</param>
        public FormProcessDisplay(string windowTitle, CancellationToken cancellationToken)
        {
            InitializeComponent();
            m_Title = windowTitle;
            Text    = windowTitle;
            CancellationTokenSource = cancellationToken == CancellationToken.None
        ? new CancellationTokenSource()
        : CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);

            //m_TimeToCompletion = new TimeToCompletion(displayFunction: TimeToCompletion.DefaultDisplayPercentAndSpanSolo);

            TimeToCompletion = new TimeToCompletion();
            //m_TimeToCompletion.PropertyChanged += TimeToCompletionUpdate;

            Icon = Resources.SubFormIcon;
        }
コード例 #3
0
 /// <summary>
 ///   Initializes a new instance of the <see cref="DummyProcessDisplay" /> class.
 /// </summary>
 /// <param name="cancellationToken">The cancellation token.</param>
 public ProcessDisplayTime(CancellationToken cancellationToken) : base(cancellationToken)
 {
     TimeToCompletion = new TimeToCompletion();
 }