|
Digital Twin - GUI
|
This is the main window, where the locations, machines and products are shown. More...
Public Member Functions | |
| MainWindow () | |
| Constructor. More... | |
| void | clear () |
| Deletes every object on the interface. More... | |
| void | setup () |
| Reads in data from a user defined folder (or the standard one) and sets the interface up with all its components. If used without clear() beforehand, Content is added to the current interface. More... | |
Protected Member Functions | |
| override void | Dispose (bool disposing) |
| Verwendete Ressourcen bereinigen. More... | |
Private Member Functions | |
| void | button1_Click (object sender, EventArgs e) |
| Eventhandler that is called when the "Durchsuchen..." button is clicked. More... | |
| void | button2_Click (object sender, EventArgs e) |
| Function that is called when the "Compute" Button is clicked. Reads in the rest of the model data and calls Mosel Xpress. More... | |
| void | dateTimePicker1_ValueChanged (object sender, EventArgs e) |
| Called whenever the user change the date for the startTime. More... | |
| void | dateTimePicker2_ValueChanged (object sender, EventArgs e) |
| Called whenever the user change the date for the endTime. More... | |
| void | InitializeComponent () |
| Erforderliche Methode für die Designerunterstützung. Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. More... | |
| void | LocationCheckBoxChanged (object sender, EventArgs e) |
| Eventhandler that is called when the Checkstate of a location has changed. More... | |
| void | LocationCheckBoxClicked (object sender, EventArgs e) |
| Eventhandler that is called when the location checkbox has been clicked. More... | |
| void | MachineCheckBoxChanged (object sender, EventArgs e) |
| Eventhandler that is called when the Checkstate of a machine has changed. More... | |
| void | MachineCheckBoxClicked (object sender, EventArgs e) |
| Eventhandler that is called when the machine checkbox has been clicked. More... | |
| void | numericUpDown1_ValueChanged (object sender, EventArgs e) |
| Called whenever the user change the hour for the startTime. More... | |
| void | numericUpDown2_ValueChanged (object sender, EventArgs e) |
| Called whenever the user change the hour for the endTime. More... | |
| void | ProductCheckBoxChanged (object sender, EventArgs e) |
| Eventhandler that is called when the Checkstate of a product has changed. More... | |
| void | UpdateEndtime () |
| Function which updates the endTime, provided that the end time is at least the startTime + 1 hour. Otherwise, the endTime is set to the startTime + 1 hour. More... | |
| void | UpdateNumberOfTimeslots () |
| Update number of timeslots for each machine and Location every time endTime or startTime change. More... | |
| void | UpdateStartTime () |
| Function which updates the startTime, and updates the endTime if necessary. More... | |
Private Attributes | |
| System.Windows.Forms.Button | button1 |
| System.ComponentModel.IContainer | components = null |
| Erforderliche Designervariable. More... | |
| System.Windows.Forms.Button | ComputeButton |
| System.Windows.Forms.DateTimePicker | dateTimePicker1 |
| System.Windows.Forms.DateTimePicker | dateTimePicker2 |
| System.DirectoryServices.DirectorySearcher | directorySearcher1 |
| DateTime | endTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Hour, 0, 0).AddHours(1) |
| Endtime of planning horizon. More... | |
| string | excelFilePath = Directory.GetParent(Directory.GetParent(Directory.GetParent(Directory.GetCurrentDirectory()).ToString()).ToString()) + "\\Resources\\Dataset.xlsx" |
| Folder directory where the Excel input file is located. More... | |
| bool | ExcelFileReadIn = false |
| Check if Excel file has been read in before. More... | |
| System.Windows.Forms.FlowLayoutPanel | flowLayoutPanelLocations |
| System.Windows.Forms.FlowLayoutPanel | flowLayoutPanelMachines |
| System.Windows.Forms.FlowLayoutPanel | flowLayoutPanelProducts |
| System.Windows.Forms.FolderBrowserDialog | folderBrowserDialog1 |
| System.Windows.Forms.GroupBox | groupBox1 |
| System.Windows.Forms.GroupBox | groupBox2 |
| System.Windows.Forms.GroupBox | groupBox3 |
| System.Windows.Forms.GroupBox | groupBox4 |
| System.Windows.Forms.GroupBox | groupBox5 |
| System.Windows.Forms.Label | label1 |
| System.Windows.Forms.Label | label2 |
| System.Windows.Forms.Label | label3 |
| System.Windows.Forms.Label | label4 |
| Dictionary< String, int > | locationDictionary = new Dictionary<String, int>() |
| Dictionary that maps a location's name to its position in the locations array. More... | |
| FlowLayoutPanel[] | LocationFlowLayouts |
| Each Location is wrapped by a Location FlowLayout. More... | |
| String[] | locationNames |
| Array that contains all of the locations' names. More... | |
| LocationCB[] | locations |
| Array that stores all locations. More... | |
| FlowLayoutPanel[] | MachineFlowLayouts |
| Each block of machines is wrapped by a Location FlowLayout. More... | |
| List< MachineCB >[] | machinesAtLocation |
| All machines at a specific location. Indexed by location's indexed, so that they can be aligned vertically. More... | |
| ModelData | md |
| Object that contains additional model data. More... | |
| System.Windows.Forms.NumericUpDown | numericUpDown1 |
| System.Windows.Forms.NumericUpDown | numericUpDown2 |
| FlowLayoutPanel[] | ProductFlowLayouts |
| Each block of products is wrapped by a Location FlowLayout. More... | |
| List< ProductCB >[] | productsAtMachine |
| All products at a specific location. Indexed by location's indexed, so that they can be aligned vertically. More... | |
| string | resourcesFolder = Directory.GetParent(Directory.GetParent(Directory.GetParent(Directory.GetCurrentDirectory()).ToString()).ToString()) + "\\Resources" |
| Folder directory where the model related files are located. More... | |
| DateTime | startTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Hour, 0, 0) |
| Starttime of planning horizon. More... | |
| System.Windows.Forms.TextBox | textBox1 |
| int | width = 145 |
| Number to easily adjust width of all elements. More... | |
This is the main window, where the locations, machines and products are shown.
| GUI.MainWindow.MainWindow | ( | ) |
Constructor.
|
private |
Eventhandler that is called when the "Durchsuchen..." button is clicked.
| sender | Determines which object called the eventhandler. |
| e | Event data. |
Opens a folderBrowserDialog that lets the user browse for a folder that contains "Dataset.xlsx"
|
private |
Function that is called when the "Compute" Button is clicked. Reads in the rest of the model data and calls Mosel Xpress.
| sender | Determines which object called the eventhandler. |
| e | Event data. |
| void GUI.MainWindow.clear | ( | ) |
Deletes every object on the interface.
|
private |
Called whenever the user change the date for the startTime.
| sender | Determines which object called the eventhandler. |
| e | Event data. |
|
private |
Called whenever the user change the date for the endTime.
| sender | Determines which object called the eventhandler. |
| e | Event data. |
|
protected |
Verwendete Ressourcen bereinigen.
| disposing | True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. |
|
private |
Erforderliche Methode für die Designerunterstützung. Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
private |
Eventhandler that is called when the Checkstate of a location has changed.
| sender | Determines which object called the eventhandler. |
| e | Event data. |
Should be called everytime a Checkstate of a location has changed. Takes care, that a user cannot assign Indeterminate as a CheckState, marks all the machines (and their products) if a location is checked and unmarks them if unchecked.
|
private |
Eventhandler that is called when the location checkbox has been clicked.
| sender | Determines which object called the eventhandler. |
| e | Event data. |
Should be called everytime a location checkbox has been clicked. Opens the TimeSlotDialog to make adjustments when the location is available in our model.
|
private |
Eventhandler that is called when the Checkstate of a machine has changed.
| sender | Determines which object called the eventhandler. |
| e | Event data. |
Should be called everytime a Checkstate of a machine has changed. Takes care, that a user cannot assign Indeterminate as a CheckState, marks all the products if a location is checked and unmarks them if unchecked. If all machines are checked, also check the location, etc.
|
private |
Eventhandler that is called when the machine checkbox has been clicked.
| sender | Determines which object called the eventhandler. |
| e | Event data. |
Should be called everytime a machine checkbox has been clicked. Opens the TimeSlotDialog to make adjustments when the machine is available in our model.
|
private |
Called whenever the user change the hour for the startTime.
| sender | Determines which object called the eventhandler. |
| e | Event data. |
|
private |
Called whenever the user change the hour for the endTime.
| sender | Determines which object called the eventhandler. |
| e | Event data. |
|
private |
Eventhandler that is called when the Checkstate of a product has changed.
| sender | Determines which object called the eventhandler. |
| e | Event data. |
Should be called everytime a Checkstate of a product has changed. If all products are checked, also check the machine, etc.
| void GUI.MainWindow.setup | ( | ) |
Reads in data from a user defined folder (or the standard one) and sets the interface up with all its components. If used without clear() beforehand, Content is added to the current interface.
|
private |
Function which updates the endTime, provided that the end time is at least the startTime + 1 hour. Otherwise, the endTime is set to the startTime + 1 hour.
|
private |
Update number of timeslots for each machine and Location every time endTime or startTime change.
|
private |
Function which updates the startTime, and updates the endTime if necessary.
|
private |
Erforderliche Designervariable.
|
private |
Endtime of planning horizon.
|
private |
Folder directory where the Excel input file is located.
|
private |
Check if Excel file has been read in before.
|
private |
Dictionary that maps a location's name to its position in the locations array.
|
private |
Each Location is wrapped by a Location FlowLayout.
|
private |
Array that contains all of the locations' names.
|
private |
Array that stores all locations.
|
private |
Each block of machines is wrapped by a Location FlowLayout.
|
private |
All machines at a specific location. Indexed by location's indexed, so that they can be aligned vertically.
|
private |
Object that contains additional model data.
|
private |
Each block of products is wrapped by a Location FlowLayout.
|
private |
All products at a specific location. Indexed by location's indexed, so that they can be aligned vertically.
|
private |
Folder directory where the model related files are located.
|
private |
Starttime of planning horizon.
|
private |
Number to easily adjust width of all elements.
1.8.11