Esempio n. 1
0
        /// <summary>
        /// Determines if this process is the same as another process.
        /// </summary>
        /// <param name="other">The other process.</param>
        /// <returns>A value indicating if the processes are the same.</returns>
        public Boolean Equals(ProcessDecorator other)
        {
            if (other != null && this.ProcessId == other.ProcessId)
            {
                return(true);
            }

            return(false);
        }
Esempio n. 2
0
        /// <summary>
        /// Prevents a default instance of the <see cref="ProcessSelectorViewModel" /> class from being created.
        /// </summary>
        private ProcessSelectorViewModel() : base("Process Selector")
        {
            this.IconSource = Images.SelectProcess;
            this.RefreshProcessListCommand = new RelayCommand(() => Task.Run(() => this.RefreshProcessList()), () => true);
            this.SelectProcessCommand      = new RelayCommand <ProcessDecorator>((process) => Task.Run(() => this.SelectProcess(process)), (process) => true);
            this.detachProcess             = new ProcessDecorator("-- Detach from Process --");

            this.StartAutomaticProcessListRefresh();

            DockingViewModel.GetInstance().RegisterViewModel(this);

            // Subscribe to process events
            Processes.Default.Subscribe(this);
        }
Esempio n. 3
0
 /// <summary>
 /// Makes the target process selection.
 /// </summary>
 /// <param name="process">The process being selected.</param>
 private void SelectProcess(ProcessDecorator process)
 {
     this.SelectedProcess = process;
     this.IsVisible       = false;
 }