/// <summary>
 /// Refreshes tasks view
 /// </summary>
 /// <param name="task"></param>
 public void Refresh(TaskModel task)
 {
     this.Task        = task;
     this.DataContext = Task;
     PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Task"));
     PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("DataContext"));
 }
Example #2
0
 private void UpdateImageStatusIndicatorToolTip()
 {
     if (this.DataContext is TaskModel)
     {
         TaskModel task = (TaskModel)this.DataContext;
         this.ImageStatusIndicator.ToolTip = GetTooltipBasedOnStatus(task.Status);
     }
 }
        /// <summary>
        /// Creates an instance of a taskt content view window
        /// </summary>
        /// <param name="taskModel"></param>
        public TaskContentViewWindow(TaskModel taskModel)
        {
            Task = taskModel;

            this.DataContext = Task;

            InitializeComponent();
        }
Example #4
0
        private void UpdateImageStatusIndicatorIcon()
        {
            if (this.DataContext is TaskModel)
            {
                TaskModel task = (TaskModel)this.DataContext;

                BitmapImage bi = new BitmapImage();
                bi.BeginInit();
                bi.UriSource = new Uri(GetIconBasedOnStatus(task.Status), UriKind.Relative);
                bi.EndInit();

                this.ImageStatusIndicator.Source = bi;
            }
        }