예제 #1
0
        private void panel_Drop(object sender, DragEventArgs e)
        {
            if (e.Handled == false)
            {
                StackPanel _panel   = (StackPanel)sender;
                UIElement  _element = (UIElement)e.Data.GetData("Object");

                if (_panel != null && _element != null)
                {
                    Panel _parent = (Panel)VisualTreeHelper.GetParent(_element);
                    if (_parent != null)
                    {
                        e.AllowedEffects.HasFlag(DragDropEffects.Move);
                        UserControl_Card1 _card = (UserControl_Card1)_element;
                        var q = DBContext.Tasks.Where(x => _card.TaskID == x.TaskID);
                        ((UserControl_Board)selectBoard.B_spContent.Children[0]).C_spContent.Children.Remove(_element);
                        ((UserControl_Board)selectBoard.B_spContent.Children[1]).C_spContent.Children.Remove(_element);
                        ((UserControl_Board)selectBoard.B_spContent.Children[2]).C_spContent.Children.Remove(_element);
                        _panel.Children.Insert(0, _element);
                        e.Effects = DragDropEffects.Move;
                        q.First().TaskStatusID = int.Parse(_panel.Tag.ToString());
                        DBContext.SaveChanges();
                        TaskCount();
                    }
                }
            }
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.unsercontrol_cardName = ((Trello.UserControl.UserControl_Card1)(target));

            #line 8 "..\..\..\_UserControl\UserControl_Card1.xaml"
                this.unsercontrol_cardName.MouseEnter += new System.Windows.Input.MouseEventHandler(this.UserControl_MouseEnter);

            #line default
            #line hidden
                return;

            case 2:
                this.card_workName = ((System.Windows.Controls.Label)(target));
                return;

            case 3:
                this.card_dueDate = ((System.Windows.Controls.Label)(target));
                return;

            case 4:
                this.card_assignedName = ((System.Windows.Controls.Label)(target));
                return;

            case 5:
                this.three_dots = ((System.Windows.Shapes.Rectangle)(target));

            #line 43 "..\..\..\_UserControl\UserControl_Card1.xaml"
                this.three_dots.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.three_dots_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 6:
                this.card_checkBox = ((System.Windows.Controls.CheckBox)(target));

            #line 51 "..\..\..\_UserControl\UserControl_Card1.xaml"
                this.card_checkBox.Checked += new System.Windows.RoutedEventHandler(this.card_checkBox_Checked_1);

            #line default
            #line hidden

            #line 51 "..\..\..\_UserControl\UserControl_Card1.xaml"
                this.card_checkBox.Unchecked += new System.Windows.RoutedEventHandler(this.card_checkBox_Unchecked_1);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
예제 #3
0
 public UserControl_Card1(UserControl_Card1 c)
 {
     InitializeComponent();
     this.unsercontrol_cardName.Height = c.unsercontrol_cardName.Height;
     this.unsercontrol_cardName.Width  = c.unsercontrol_cardName.Width;
 }
예제 #4
0
 private void UserControl_MouseEnter(object sender, MouseEventArgs e)
 {
     card = sender as UserControl_Card1;
 }