Skip to content

Commit

Permalink
ResinPrinters
Browse files Browse the repository at this point in the history
Added option to  manually define jobs for scheduling resin printers.
  • Loading branch information
schereralf committed Jul 6, 2024
1 parent 9df801c commit e84d659
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 0 additions & 2 deletions DispoAdmin/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,6 @@ public void AddOrder()

public void RemoveOrder()
{
foreach (PrintJob p in SelectedOrder.PrintJobs) { SelectedOrder.PrintJobs.Remove(p); }

ListOrders.Remove(SelectedOrder);
}

Expand Down
5 changes: 4 additions & 1 deletion DispoAdmin/ViewModels/OrderWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,11 @@ orderby printJob.JobName
PrinterID = printJob.PrinterType
};

Printer printJobPrinter = new();
Material printJobMaterial = Materials.FirstOrDefault(m => m.MaterialName.Trim() == printJob.Material.Trim());
Printer printJobPrinter = Printers.FirstOrDefault(p => p.PrinterID == printJob.PrinterType);

if (printJob.Material=="UV Resin") printJobPrinter= Printers.FirstOrDefault(p => p.PrinterType == "Resin Printer");
else printJobPrinter = Printers.FirstOrDefault(p => p.PrinterID == printJob.PrinterType);

//The economic calculations are very rudimentary. We assume:
// - the amortization period for all printers is provided by the operator, as is the IRR
Expand Down
6 changes: 3 additions & 3 deletions DispoAdmin/Views/DispoWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
Expand All @@ -12,8 +13,7 @@

namespace DispoAdmin.Views
{
// Interaction logic für DispoWindow.xaml

// Interaction logic für DispoWindow.xaml. Sorry, but this bit cannot go in a Viewmodel :)
public partial class DispoWindow : Window
{
public int ScheduleWeek;
Expand Down

0 comments on commit e84d659

Please sign in to comment.