/// <summary>
        /// 修改任务构造函数
        /// </summary>
        /// <param name="Item"></param>
        public TaskSettingWindow(Cls_WorkListItem Item, WorkList TaskList)
        {
            InitializeComponent();

            this.TaskList = TaskList;

            this.Item = Item;

            SetBinding();
        }
        /// <summary>
        /// 新建任务构造函数
        /// </summary>
        public TaskSettingWindow(WorkList TaskList)
        {
            InitializeComponent();

            this.TaskList = TaskList;

            Item  = new Cls_WorkListItem();
            IsNew = true;

            SetBinding();
        }
Example #3
0
        public WorkListItem(Cls_WorkListItem Item, WorkList Parent)
        {
            InitializeComponent();

            this.Item   = Item;
            this.Parent = Parent;

            Binding bindTitle = new Binding
            {
                Source = Item,
                Mode   = BindingMode.OneWay,
                Path   = new System.Windows.PropertyPath("RoomTitle")
            };

            BindingOperations.SetBinding(lbl_RoomTitle, ContentProperty, bindTitle);

            Binding bindInfo = new Binding
            {
                Source = Item,
                Mode   = BindingMode.OneWay,
                Path   = new System.Windows.PropertyPath("RoomInfo")
            };

            BindingOperations.SetBinding(lbl_RoomInfo, ContentProperty, bindInfo);

            Binding bindStatus = new Binding
            {
                Source = Item,
                Mode   = BindingMode.OneWay,
                Path   = new System.Windows.PropertyPath("StatusString")
            };

            BindingOperations.SetBinding(lbl_TaskStatus, ContentProperty, bindStatus);

            //Binding bindStatuscolor = new Binding
            //{
            //    Source = Item,
            //    Mode = BindingMode.OneWay,
            //    Path = new System.Windows.PropertyPath("StatusColor")
            //};
            //BindingOperations.SetBinding(lbl_TaskStatus, ForegroundProperty, bindStatuscolor);
        }
Example #4
0
 /// <summary>
 /// 全部开始按钮弹起
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Btn_AllTaskStart_MouseUp(object sender, MouseButtonEventArgs e)
 {
     WorkList.AllStart();
 }
Example #5
0
 /// <summary>
 /// 删除任务按钮鼠标弹起
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Btn_RemoveTask_MouseUp(object sender, MouseButtonEventArgs e)
 {
     WorkList.RemoveTask();
 }