Exemplo n.º 1
0
        public ProjectDescriptionWindow(TaskPoco task)
        {
            InitializeComponent();
            thisTask = new ProjectDescription(task.BoardId, task.Content, task.TaskId);

            fillContent();
        }
Exemplo n.º 2
0
 public ElectricalProject(TaskPoco task)
 {
     this.BoardId  = task.BoardId;
     this.TaskId   = task.TaskId;
     this.Content  = task.Content;
     this.TaskType = TaskTypeEnum.ElectricalProject;
 }
Exemplo n.º 3
0
 public DriversProject(TaskPoco task)
 {
     this.BoardId  = task.BoardId;
     this.TaskId   = task.TaskId;
     this.Content  = task.Content;
     this.TaskType = TaskTypeEnum.DriversProject;
 }
 public MaintainenceWnd(TaskPoco task)
 {
     InitializeComponent();
     mainTask         = task;
     maintainenceTask = new ChildTasks.Maintainence(mainTask.Content);
     fillContent();
 }
        public AlgorithmDescription(TaskPoco task)
        {
            InitializeComponent();
            thisTask = new AlgorithmDescriptionTask(task.BoardId, task.Content, task.TaskId);

            fillContent();
        }
Exemplo n.º 6
0
        /// <summary>
        /// Creates new in-memory istance of <see cref="ITaskPoco"/> class.
        /// </summary>
        /// <returns>New in-memory istance of <see cref="ITaskPoco"/> class.</returns>
        public virtual ITaskPoco Create()
        {
            var model = new TaskPoco()
            {
                Id          = Guid.NewGuid(),
                DateCreated = DateTime.UtcNow,
                DateUpdated = DateTime.UtcNow
            };

            return(model);
        }
Exemplo n.º 7
0
        private void saveTaskBtn_Click(object sender, RoutedEventArgs e)
        {
            if (selectTypeCmbox.SelectedItem != null)
            {
                TaskPoco newTask = new TaskPoco();
                newTask.BoardId  = BoardId;
                newTask.Content  = string.Empty;
                newTask.TaskId   = 0;
                newTask.TaskType = (TaskTypeEnum)selectTypeCmbox.SelectedItem;
                newTask.UpdateContent();
                newTask.SaveTaskPOST();

                this.Close();
            }
            else
            {
                MessageBox.Show("Proszę wybrać typ zadania :)");
            }
        }
Exemplo n.º 8
0
 public Workshop(TaskPoco task)
 {
     InitializeComponent();
     workshopTask = new ChildTasks.Workshop(task.BoardId, task.Content, task.TaskId);
     fillContent();
 }
Exemplo n.º 9
0
 public OrderList(TaskPoco task)
 {
     InitializeComponent();
     orderListTask = new ChildTasks.OrderList(task.BoardId, task.Content, task.TaskId);
     fillContent();
 }
Exemplo n.º 10
0
 public Mounting(TaskPoco task)
 {
     InitializeComponent();
     mountingTask = new ChildTasks.Mounting(task.BoardId, task.Content, task.TaskId);
     fillContent();
 }
Exemplo n.º 11
0
 public TaskWindowMaker(TaskPoco task)
 {
     Task = task;
 }
Exemplo n.º 12
0
        public TaskButton(TaskPoco task)
        {
            this.taskContent = task.Content;
            this.Task        = task;
            string taskLabel = Translate(task.TaskType);

            this.taskId = task.TaskId;
            this.Name   = task.TaskType.ToString();



            Style style = this.FindResource("MaterialDesignRaisedDarkButton") as Style;

            this.Style = style;

            this.BorderBrush = this.FindResource("GlobalBordersBrush") as Brush;

            StackPanel panelInButton = new StackPanel();

            panelInButton.Background = Brushes.Transparent;

            SvgViewbox viewbox = new SvgViewbox();

            viewbox.Source = new System.Uri("Resources/create-24px.svg", UriKind.Relative); //create-24px.svg dla algorytmu

            viewbox.Margin    = new Thickness(5, 5, 5, 5);
            viewbox.MinHeight = 30;
            viewbox.MinWidth  = 30;

            //svgc: SvgViewbox

            TextBlock txtBox = new TextBlock()
            {
                FontSize      = 14,
                FontStyle     = FontStyles.Normal,
                TextAlignment = TextAlignment.Center,
                TextWrapping  = TextWrapping.Wrap,
                Text          = taskLabel,
                // Foreground = this.FindResource("GlobalForeColor") as Brush,
                //Background = Brushes.Transparent,
                Margin  = new Thickness(5, 5, 5, 5),
                Padding = new Thickness(5, 5, 5, 5)
            };

            Rectangle rectangle = new Rectangle();

            rectangle.Fill   = this.FindResource("PrimaryHueMidBrush") as Brush;
            rectangle.Height = 20;
            rectangle.Margin = new Thickness(0, 0, 0, 0);

            this.Background = this.FindResource("TextAreasBacground") as Brush;

            Snap = "Jakś zajawka";
            if (task.Content.Length < 40)
            {
                Snap = task.Content;
            }
            else
            {
                Snap  = task.Content.Substring(0, 39);
                Snap += "...";
            }


            TextBlock txtBox2 = new TextBlock()
            {
                FontSize = 12,

                TextAlignment = TextAlignment.Center,
                TextWrapping  = TextWrapping.Wrap,
                Text          = "__________________",
                Foreground    = this.FindResource("GlobalBordersBrush") as Brush,
                Background    = Brushes.Transparent,
                Margin        = new Thickness(5, 5, 5, 5),
            };

            // panelInButton.Children.Add(rectangle);
            panelInButton.Children.Add(viewbox);
            panelInButton.Children.Add(txtBox);
            panelInButton.Children.Add(txtBox2);
            this.Content = panelInButton;

            panelInButton.Margin = new Thickness(0, 0, 0, 0);
            this.Margin          = new Thickness(10, 10, 10, 10);
            this.MinHeight       = 120;
            this.MaxHeight       = 300;

            this.Padding = new Thickness(0, 0, 0, 0);



            switch (task.TaskType)
            {
            case TaskTypeEnum.AlgorithmDescription:
            {
                txtBox.Foreground = (SolidColorBrush)(new BrushConverter().ConvertFrom("#424242"));

                txtBox.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom("#4caf50"));         //Ustawienie kolorów konkretnych typów tasków
                txtBox2.Text      = Snap;
            }
            break;


            case TaskTypeEnum.DriversProject:
            {
                txtBox.Foreground = (SolidColorBrush)(new BrushConverter().ConvertFrom("#424242"));
                txtBox.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom("#ff9800"));

                // viewbox.Source = new System.Uri("Resources/developer_mode-24px.svg", UriKind.Relative);
            }
            break;


            case TaskTypeEnum.ElectricalProject:
            {
                txtBox.Foreground = (SolidColorBrush)(new BrushConverter().ConvertFrom("#424242"));
                txtBox.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom("#ffc107"));
            }
            break;

            case TaskTypeEnum.Maintainence:
            {
                txtBox.Foreground = (SolidColorBrush)(new BrushConverter().ConvertFrom("#fafafa"));
                txtBox.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom("#2980b9"));
            }
            break;

            case TaskTypeEnum.Mounting:
            {
                txtBox.Foreground = (SolidColorBrush)(new BrushConverter().ConvertFrom("#424242"));
                txtBox.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom("#8bc34a"));
            }
            break;

            case TaskTypeEnum.OrderList:
            {
                txtBox.Foreground = (SolidColorBrush)(new BrushConverter().ConvertFrom("#fafafa"));
                txtBox.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom("#16a085"));
            }
            break;

            case TaskTypeEnum.ProjectDescription:
            {
                txtBox.Foreground = (SolidColorBrush)(new BrushConverter().ConvertFrom("#424242"));
                txtBox.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom("#8bc34a"));
            }
            break;

            case TaskTypeEnum.VarDefTool:
            {
                txtBox.Foreground = (SolidColorBrush)(new BrushConverter().ConvertFrom("#424242"));
                txtBox.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom("#4caf50"));
            }
            break;

            case TaskTypeEnum.Workshop:
            {
                txtBox.Foreground = (SolidColorBrush)(new BrushConverter().ConvertFrom("#fafafa"));
                txtBox.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom("#c79100"));
            }
            break;

            default:
            {
                txtBox.Foreground = (SolidColorBrush)(new BrushConverter().ConvertFrom("#424242"));
                txtBox.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom("#7f8c8d"));
            }
            break;
            }
        }
Exemplo n.º 13
0
 public DriversProject(TaskPoco task)
 {
     InitializeComponent();
     driversTask = new ChildTasks.DriversProject(task);
     fillContent();
 }
Exemplo n.º 14
0
 public ElectricalProject(TaskPoco task)
 {
     InitializeComponent();
     electrickProjTask = new ChildTasks.ElectricalProject(task);
     fillContent();
 }
Exemplo n.º 15
0
 public VarDefTool(TaskPoco task)
 {
     InitializeComponent();
     mainTask = task;
     PrzgotujWiazanie();
 }