Esempio n. 1
0
        public void Change(ITaskbarProgress progress)
        {
            if (this.current != null)
            {
                this.current.Updated -= this.CurrentOnUpdated;
            }

            if (progress == null)
            {
                this.current = null;
                this.State   = TaskbarItemProgressState.None;
                this.Value   = .0;
            }
            else
            {
                this.current          = progress;
                this.current.Updated += this.CurrentOnUpdated;

                this.State = progress.State;
                this.Value = progress.Value;
            }

            this.Updated?.Invoke(this, EventArgs.Empty);
            this.RaisePropertyChanged(nameof(this.Updated));
        }
Esempio n. 2
0
		public void Change(ITaskbarProgress progress)
		{
			if (this.current != null)
			{
				this.current.Updated -= this.CurrentOnUpdated;
			}

			if (progress == null)
			{
				this.current = null;
				this.State = TaskbarItemProgressState.None;
				this.Value = .0;
			}
			else
			{
				this.current = progress;
				this.current.Updated += this.CurrentOnUpdated;

				this.State = progress.State;
				this.Value = progress.Value;
			}

			this.Updated?.Invoke(this, EventArgs.Empty);
			this.RaisePropertyChanged(nameof(this.Updated));
		}