diff --git a/Client.Utils/Constants.cs b/Client.Utils/Constants.cs index d32a31d7..debddba9 100644 --- a/Client.Utils/Constants.cs +++ b/Client.Utils/Constants.cs @@ -20,15 +20,18 @@ namespace Client.Utils public static String CEF_LOCALES_PATH = BASE_PATH + "CEF\\Resources\\locales"; public static String CEF_EXCEPTIONLOG_PATH = BASE_PATH + "ExceptionLog"; public static String errorPageFile = BASE_PATH + "error.pg"; - - - //Config Names + public static String JOB_OPENING_PATH = BASE_PATH + "TempJob\\"; + + + //Config Names public const string CONFIG_KEY = "Config"; public const string CLIENT_CONFIG_KEY = "Client"; public const string CONNECTION_CONFIG_KEY = "Connection"; public const string VENDORHMI_CONFIG_KEY = "VendorHmi"; public const string EXTSFT_CONFIG_KEY = "ExtSoftwares"; public const string SFT_CONFIG_KEY = "Software"; + public const string JOB_MAIN_FILENAME = "main.cnc"; + public const string JOB_METADATA_FILENAME = "metadata.json"; public enum Rendering {GPU = 0, CPU = 1 }; diff --git a/Client/Browser_Tools/BrowserJSObject.cs b/Client/Browser_Tools/BrowserJSObject.cs index 2b6113b2..dcaeba59 100644 --- a/Client/Browser_Tools/BrowserJSObject.cs +++ b/Client/Browser_Tools/BrowserJSObject.cs @@ -1,24 +1,22 @@ using Chromium; -using Chromium.Remote; using Chromium.Remote.Event; using Chromium.WebBrowser; using Client.Config; using Client.Config.SubModels; using Client.Utils; using CMS_Client.Browser_Tools.Models; +using CMS_Client.Browser_Tools.Models.Errors; +using CMS_Client.Browser_Tools.Models.Metadata; using CMS_Client.View; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Diagnostics; -using System.Drawing; -using System.Drawing.Imaging; using System.IO; +using System.IO.Compression; using System.Linq; using System.Net.Http; -using System.Text; using System.Threading; -using System.Threading.Tasks; using System.Windows.Forms; using static Client.Utils.Constants; @@ -26,15 +24,17 @@ namespace CMS_Client.Browser_Tools { public class BrowserJSObject : JSObject { - //The first letter of All PUBLIC Variables and Methods must be Lower-Case (CEF Settings) + // The first letter of All PUBLIC Variables and Methods must be Lower-Case (CEF Settings) private MainForm mainForm; - private static readonly string[] _validExtensions = { "",".txt", ".cnc", ".ini", ".mpf", ".spf" }; + private static readonly string[] _validExtensions = { "", ".txt", ".cnc", ".ini", ".mpf", ".spf" }; private static readonly string[] _validImages = { ".jpg", ".jpeg", ".png" }; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + #region CONSTRUCTOR_METHOD - //Constructor Method + + // Constructor Method public BrowserJSObject(MainForm f) { mainForm = f; @@ -51,27 +51,31 @@ namespace CMS_Client.Browser_Tools AddFunction("getChromiumVersion").Execute += getChromiumVersion; AddFunction("getClientID").Execute += getClientID; AddFunction("getConfiguredProcesses").Execute += getConfiguredProcesses; - AddFunction("getConfiguredProcessesInMainMenu").Execute += getConfiguredProcessesInMainMenu; + AddFunction("getConfiguredProcessesInMainMenu").Execute += getConfiguredProcessesInMainMenu; AddFunction("startNewProcess").Execute += startNewProcess; AddFunction("openOrStartProcess").Execute += openOrStartProcess; AddFunction("isVirtualKeybConfigured").Execute += isVirtualKeybConfigured; - AddFunction("sendHMICommand").Execute += sendHMICommand; - AddFunction("getHMICommandCount").Execute += getHMICommandCount; AddFunction("getOSdriveList").Execute += getOSdriveList; AddFunction("getFileList").Execute += getFileList; AddFunction("getProgramInfo").Execute += getProgramInfo; AddFunction("uploadAndActivateProgram").Execute += uploadAndActivateProgram; AddFunction("uploadAndAddToQueue").Execute += uploadAndAddToQueue; - + AddFunction("openJob").Execute += openJob; + AddFunction("saveJob").Execute += saveJob; + AddFunction("addImageToJob").Execute += addImageToJob; + AddFunction("delImageFromJob").Execute += delImageFromJob; + AddFunction("addPPToJob").Execute += addPPToJob; + AddFunction("delPPFromJob").Execute += delPPFromJob; } - #endregion + #endregion CONSTRUCTOR_METHOD /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + #region FORM_BEHAVIOUR_METHODS - //Minimize Main Window + // Minimize Main Window public void minimizeForm(object sender, CfrV8HandlerExecuteEventArgs e) { //Invoke method if is needed or call the method in STD mode @@ -80,16 +84,13 @@ namespace CMS_Client.Browser_Tools { mainForm.WindowState = FormWindowState.Minimized; }); - else { mainForm.WindowState = FormWindowState.Minimized; } } - - - //Maximize Main Window + // Maximize Main Window public void maximizeForm(object sender, CfrV8HandlerExecuteEventArgs e) { //Invoke method if is needed or call the method in STD mode @@ -98,16 +99,13 @@ namespace CMS_Client.Browser_Tools { mainForm.WindowState = FormWindowState.Maximized; }); - else { mainForm.WindowState = FormWindowState.Maximized; } } - - - //Close Main Window + // Close Main Window public void closeForm(object sender, CfrV8HandlerExecuteEventArgs e) { //If the mainform is disposed do nothing @@ -118,16 +116,17 @@ namespace CMS_Client.Browser_Tools mainForm.Close(); } - //Reload Broken Page + // Reload Broken Page private void reloadBrokenPage(object sender, CfrV8HandlerExecuteEventArgs e) { //Invoke method if is needed or call the method in STD mode mainForm.reloadBrokenPage(); } - #endregion + #endregion FORM_BEHAVIOUR_METHODS /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + #region NC_BEHAVIOUR_METHODS public void setNcWindowState(object sender, CfrV8HandlerExecuteEventArgs e) @@ -155,51 +154,25 @@ namespace CMS_Client.Browser_Tools e.SetReturnValue(NcWindow.NcCapture); } - //Send a command to HMI - public void sendHMICommand(object sender, CfrV8HandlerExecuteEventArgs e) - { - if (e.Arguments.Count() == 0) - return; - - int val = e.Arguments[0].IntValue - 1; - - if (val < 0 || val > (NcWindow.NcWindowCommand.Count - 1)) - return; - - NcWindow.SendCommandKey(NcWindow.NcWindowCommand[val]); - - if (NcWindow.State == NcState.SHOW) - { - Thread.Sleep(1000); - mainForm.HideNCWindow(); - mainForm.ShowNCWindow(); - NcWindow.ActivateNcWindow(); - } - } - - //Get command vounts to HMI - public void getHMICommandCount(object sender, CfrV8HandlerExecuteEventArgs e) - { - e.SetReturnValue(NcWindow.NcWindowCommand.Count); - } - - #endregion + #endregion NC_BEHAVIOUR_METHODS /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + #region CHROMIUM_METHODS - //Get the Version of Chromium + // Get the Version of Chromium public void getChromiumVersion(object sender, CfrV8HandlerExecuteEventArgs e) { e.SetReturnValue(CfxRuntime.GetChromeVersion()); } - #endregion + #endregion CHROMIUM_METHODS /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + #region STEP_METHODS - //Get the ID of STEP Client + // Get the ID of STEP Client public void getClientID(object sender, CfrV8HandlerExecuteEventArgs e) { e.SetReturnValue((int)Config.ConnectionConfig.Id); @@ -210,31 +183,31 @@ namespace CMS_Client.Browser_Tools NcWindow.ForceStepFocus(); } - //Get the option of virtual Keyb configured + // Get the option of virtual Keyb configured private void isVirtualKeybConfigured(object sender, CfrV8HandlerExecuteEventArgs e) { e.SetReturnValue((Boolean)Config.ClientConfig.ShowVirtualKeyboard); } - #endregion + + #endregion STEP_METHODS /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + #region PROCESSES_METHODS - //Read all configured processes + // Read all configured processes public void getConfiguredProcesses(object sender, CfrV8HandlerExecuteEventArgs e) { - e.SetReturnValue(JsonConvert.SerializeObject(Config.ExtSoftwaresConfig.Where(X => X.inMainMenuBar==false))); - } + e.SetReturnValue(JsonConvert.SerializeObject(Config.ExtSoftwaresConfig.Where(X => X.inMainMenuBar == false))); + } - //Read all configured processes in main menu + // Read all configured processes in main menu public void getConfiguredProcessesInMainMenu(object sender, CfrV8HandlerExecuteEventArgs e) { e.SetReturnValue(JsonConvert.SerializeObject(Config.ExtSoftwaresConfig.Where(X => X.inMainMenuBar == true))); } - - - //Start a new process + // Start a new process public void startNewProcess(object sender, CfrV8HandlerExecuteEventArgs e) { if (e.Arguments.Count() == 0) @@ -244,9 +217,7 @@ namespace CMS_Client.Browser_Tools t.Start(e.Arguments[0].StringValue); } - - - //Open the last window or Start a new process + // Open the last window or Start a new process public void openOrStartProcess(object sender, CfrV8HandlerExecuteEventArgs e) { if (e.Arguments.Count() == 0) @@ -256,8 +227,7 @@ namespace CMS_Client.Browser_Tools t.Start(e.Arguments[0].StringValue); } - - //Function used in Thread + // Function used in Thread private void OpenStartNew(object id) { Software sft = Config.ExtSoftwaresConfig.FirstOrDefault(X => X.id == (string)id); @@ -273,21 +243,21 @@ namespace CMS_Client.Browser_Tools } } - - //Function used in Thread + // Function used in Thread private void OpenNew(object id) { Software sft = Config.ExtSoftwaresConfig.FirstOrDefault(X => X.id == (string)id); if (sft != null) Process.Start(sft.path, sft.arguments); } - #endregion + #endregion PROCESSES_METHODS /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + #region FILESYSTEM_METHODS - //Read all drives in Operating System + // Read all drives in Operating System public void getOSdriveList(object sender, CfrV8HandlerExecuteEventArgs e) { List drivelist = new List(); @@ -312,8 +282,7 @@ namespace CMS_Client.Browser_Tools e.SetReturnValue(JsonConvert.SerializeObject(drivelist)); } - - //Read all files in directory + // Read all files in directory public void getFileList(object sender, CfrV8HandlerExecuteEventArgs e) { List filelist = new List(); @@ -334,7 +303,6 @@ namespace CMS_Client.Browser_Tools { foreach (String item in Directory.GetDirectories(p)) { - filelist.Add(new Models.File { Name = Path.GetFileName(item), @@ -342,7 +310,6 @@ namespace CMS_Client.Browser_Tools Path = Path.GetFullPath(item), IsDirectory = true }); - } } catch (Exception ex) @@ -353,14 +320,17 @@ namespace CMS_Client.Browser_Tools foreach (String item in Directory.GetFiles(p)) { if (_validExtensions.Contains(Path.GetExtension(item).ToLower())) + { + bool isJob = Path.GetExtension(item) == "job"; filelist.Add(new Models.File { Name = Path.GetFileName(item), AbsolutePath = Path.GetFullPath(item), Path = Path.GetFullPath(item), - IsDirectory = false + IsDirectory = false, + IsJob = isJob }); - + } } } catch (Exception ex) @@ -370,8 +340,7 @@ namespace CMS_Client.Browser_Tools e.SetReturnValue(JsonConvert.SerializeObject(filelist)); } - - //Upload and activate the program + // Upload and activate the program public async void uploadAndActivateProgram(object sender, CfrV8HandlerExecuteEventArgs e) { String fileToUpload = ""; @@ -384,7 +353,7 @@ namespace CMS_Client.Browser_Tools //Check the arguments numbers if (e.Arguments.Length < 1 || e.Arguments[0] == null) { - e.SetReturnValue(Constants.Uploadpage +"INVALID_ARGUMENTS"); + e.SetReturnValue(Constants.Uploadpage + "INVALID_ARGUMENTS"); return; } @@ -392,7 +361,7 @@ namespace CMS_Client.Browser_Tools fileToUpload = e.Arguments[0].StringValue; if (!System.IO.File.Exists(fileToUpload)) { - e.SetReturnValue(Constants.Uploadpage+";FILE_NOT_FOUND"); + e.SetReturnValue(Constants.Uploadpage + ";FILE_NOT_FOUND"); return; } @@ -421,7 +390,7 @@ namespace CMS_Client.Browser_Tools //Add the content to the form form.Add(new ByteArrayContent(filecontent), "file", fileName); - if(imagecontent != null) + if (imagecontent != null) form.Add(new ByteArrayContent(imagecontent), "image", imageName); //Send them @@ -429,17 +398,16 @@ namespace CMS_Client.Browser_Tools "http://" + Config.ConnectionConfig.ServerUrl + ":" + Config.ConnectionConfig.ServerPort + "/" + Constants.Uploadpage, form).Result; //Wait the answer - if(response.StatusCode == System.Net.HttpStatusCode.BadRequest) + if (response.StatusCode == System.Net.HttpStatusCode.BadRequest) e.SetReturnValue(Constants.Uploadpage + ";" + await response.Content.ReadAsStringAsync()); - else if(response.StatusCode != System.Net.HttpStatusCode.OK) + else if (response.StatusCode != System.Net.HttpStatusCode.OK) e.SetReturnValue(Constants.Uploadpage + ";" + response.ReasonPhrase); else e.SetReturnValue(""); } - } - //Upload and add to queue + // Upload and add to queue public async void uploadAndAddToQueue(object sender, CfrV8HandlerExecuteEventArgs e) { string fileToUpload = ""; @@ -510,11 +478,9 @@ namespace CMS_Client.Browser_Tools else e.SetReturnValue(""); } - } - - //Read info of a file + // Read info of a file public void getProgramInfo(object sender, CfrV8HandlerExecuteEventArgs e) { InfoFile file = new InfoFile(); @@ -545,7 +511,6 @@ namespace CMS_Client.Browser_Tools file.Content = new List(); try { - StreamReader fileRead = new StreamReader(p); while ((line = fileRead.ReadLine()) != null && counter < 10) { @@ -562,7 +527,6 @@ namespace CMS_Client.Browser_Tools break; } } - } catch (Exception ex) { @@ -571,8 +535,7 @@ namespace CMS_Client.Browser_Tools e.SetReturnValue(JsonConvert.SerializeObject(file)); } - - //Private functions... + // Private functions private String ElaborateName(String name, DriveType type) { if (!String.IsNullOrWhiteSpace(name)) @@ -587,7 +550,6 @@ namespace CMS_Client.Browser_Tools } return "Undefined Drive"; } - } private String ElaborateType(DriveType type) @@ -599,9 +561,289 @@ namespace CMS_Client.Browser_Tools case DriveType.Network: return "NTW"; } return "SPFO"; - } - #endregion + #endregion FILESYSTEM_METHODS + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + #region JOB_METHODS + + // Read job data + public void openJob(object sender, CfrV8HandlerExecuteEventArgs e) + { + JobToStep job = new JobToStep(); + OpenFileDialog jobOpenFileDialog = new OpenFileDialog + { + Filter = "CMS Job Files(*.JOB,*.ZIP)|*.job;*.zip", + Multiselect = false + }; + + if (jobOpenFileDialog.ShowDialog() == DialogResult.OK) + { + if (!Directory.Exists(JOB_OPENING_PATH)) + Directory.CreateDirectory(JOB_OPENING_PATH); + + ClearTempPath(); + + using (ZipArchive archive = ZipFile.OpenRead(jobOpenFileDialog.FileName)) + { + // Setup main Fields + job.Name = Path.GetFileName(jobOpenFileDialog.FileName); + job.LastEditTimestamp = new FileInfo(jobOpenFileDialog.FileName).LastAccessTime; + + foreach (ZipArchiveEntry entry in archive.Entries) + { + // Get main program content + if (entry.Name.Equals(JOB_MAIN_FILENAME, StringComparison.OrdinalIgnoreCase)) + { + using (var reader = new StreamReader(entry.Open())) + { + job.IsoMainProgram = (reader.ReadToEnd()); + } + } + // Add all images + else if (_validImages.Contains(Path.GetExtension(entry.Name).ToLower())) + { + var bytes = default(byte[]); + entry.ExtractToFile(JOB_OPENING_PATH + entry.Name, true); + using (var memstream = new MemoryStream()) + { + entry.Open().CopyTo(memstream); + bytes = memstream.ToArray(); + job.Metadata.Generics.Images.Add(new ImageParam() + { + Name = Path.GetFileNameWithoutExtension(entry.Name), + Base64 = "data:image/" + Path.GetExtension(entry.Name).ToLower().TrimStart('.') + ";base64," + Convert.ToBase64String(bytes) + }); + } + } + // Metadata + else if (entry.Name.Equals(JOB_METADATA_FILENAME, StringComparison.OrdinalIgnoreCase)) + { + MetadataToFile metasFromFile = new MetadataToFile(); + + using (var reader = new StreamReader(entry.Open())) + { + metasFromFile = JsonConvert.DeserializeObject(reader.ReadToEnd()); + if (metasFromFile == null) + { + e.SetReturnValue(null); + return; + } + else + { + job.Metadata.Generics.Description = metasFromFile.Description; + job.Metadata.Generics.ExecutionTime = metasFromFile.ExecutionTime; + job.Metadata.Tools = metasFromFile.Tools; + job.Metadata.Customs = metasFromFile.Customs; + } + } + } + // All other files + else + { + entry.ExtractToFile(JOB_OPENING_PATH + entry.Name, true); + } + } + } + e.SetReturnValue(JsonConvert.SerializeObject(job)); + return; + } + else + { + e.SetReturnValue(null); + return; + } + } + + // Save all job + public void saveJob(object sender, CfrV8HandlerExecuteEventArgs e) + { + MetadataToFile metafile = new MetadataToFile(); + + //check the arguments + if (e.Arguments.Count() == 0) + return; + + //Call Save Dialog + SaveFileDialog jobSaveFileDialog = new SaveFileDialog(); + jobSaveFileDialog.Filter = "CMS Job Files(*.JOB)|*.job|Zip Files(*.ZIP)|*.zip"; + if (jobSaveFileDialog.ShowDialog() == DialogResult.OK) + { + // Job deserialize + JobToStep job = JsonConvert.DeserializeObject(e.Arguments[0].StringValue); + if (job == null) + { + e.SetReturnValue(JsonConvert.SerializeObject(new ErrorContainer("corrupted_model"))); + return; + } + + //Metadata + metafile.Description = job.Metadata.Generics.Description; + metafile.ExecutionTime = job.Metadata.Generics.ExecutionTime; + metafile.Tools = job.Metadata.Tools; + metafile.Customs = job.Metadata.Customs; + using (StreamWriter file = System.IO.File.CreateText(JOB_OPENING_PATH + JOB_METADATA_FILENAME)) + { + JsonSerializer serializer = new JsonSerializer + { + Formatting = Formatting.Indented + }; + serializer.Serialize(file, metafile); + } + + //Main Program + System.IO.File.WriteAllText(JOB_OPENING_PATH + JOB_MAIN_FILENAME, job.IsoMainProgram); + + //delete Zip File if exists + if (System.IO.File.Exists(jobSaveFileDialog.FileName)) + System.IO.File.Delete(jobSaveFileDialog.FileName); + + //Create Zip File + ZipFile.CreateFromDirectory(JOB_OPENING_PATH, jobSaveFileDialog.FileName); + } + e.SetReturnValue(null); + return; + } + + // Add an image + public void addImageToJob(object sender, CfrV8HandlerExecuteEventArgs e) + { + OpenFileDialog imageOpenFileDialog = new OpenFileDialog(); + imageOpenFileDialog.Filter = "Images Files(*.JPG,*.JPEG,*.PNG)|*.jpg;*.jpeg;*.png"; + imageOpenFileDialog.Multiselect = false; + if (imageOpenFileDialog.ShowDialog() == DialogResult.OK) + { + String newImagePath = JOB_OPENING_PATH + Path.GetFileName(imageOpenFileDialog.FileName); + + //If exixts send error + if (System.IO.File.Exists(newImagePath)) + { + e.SetReturnValue(JsonConvert.SerializeObject(new ErrorContainer("file_esists"))); + return; + } + + //Copy the file + System.IO.File.Copy(imageOpenFileDialog.FileName, newImagePath); + + //Send to Step + e.SetReturnValue(JsonConvert.SerializeObject(new ImageParam() + { + Name = Path.GetFileNameWithoutExtension(imageOpenFileDialog.FileName), + Base64 = "data:image/" + Path.GetExtension(newImagePath).ToLower().TrimStart('.') + ";base64," + Convert.ToBase64String(System.IO.File.ReadAllBytes(newImagePath)) + })); + return; + } + e.SetReturnValue(null); + return; + } + + // Delete an image + public void delImageFromJob(object sender, CfrV8HandlerExecuteEventArgs e) + { + //check the arguments + if (e.Arguments.Count() == 0 && e.Arguments[0].IsString) + return; + + //Get the file Path + String imagePath = JOB_OPENING_PATH + e.Arguments[0].StringValue; + + //If not exixts Error! + if (!System.IO.File.Exists(imagePath)) + { + e.SetReturnValue(JsonConvert.SerializeObject(new ErrorContainer("file_not_esists"))); + return; + } + + //delete it + System.IO.File.Delete(imagePath); + + e.SetReturnValue(null); + return; + } + + // Add a Part-Program + public void addPPToJob(object sender, CfrV8HandlerExecuteEventArgs e) + { + OpenFileDialog PPOpenFileDialog = new OpenFileDialog(); + PPOpenFileDialog.Multiselect = false; + if (PPOpenFileDialog.ShowDialog() == DialogResult.OK) + { + //Check the extension + if (!_validExtensions.Contains(Path.GetExtension(PPOpenFileDialog.FileName).ToLower())) + { + e.SetReturnValue(JsonConvert.SerializeObject(new ErrorContainer("extension_not_available"))); + return; + } + + String newPPPath = JOB_OPENING_PATH + Path.GetFileName(PPOpenFileDialog.FileName); + + //If exixts delete old file and save the new one + if (System.IO.File.Exists(newPPPath)) + { + e.SetReturnValue(JsonConvert.SerializeObject(new ErrorContainer("file_esists"))); + return; + } + + //Copy the file + System.IO.File.Copy(PPOpenFileDialog.FileName, newPPPath); + + //Send to Step + e.SetReturnValue(null); + return; + } + e.SetReturnValue(null); + return; + } + + // Delete an image + public void delPPFromJob(object sender, CfrV8HandlerExecuteEventArgs e) + { + //check the arguments + if (e.Arguments.Count() == 0 && e.Arguments[0].IsString) + return; + + //Get the file Path + String ppPath = JOB_OPENING_PATH + e.Arguments[0].StringValue; + + //If not exixts Error! + if (!System.IO.File.Exists(ppPath)) + { + e.SetReturnValue(JsonConvert.SerializeObject(new ErrorContainer("file_not_esists"))); + return; + } + + //delete it + System.IO.File.Delete(ppPath); + + e.SetReturnValue(null); + return; + } + + // Clear the temp folder files + private void ClearTempPath() + { + DirectoryInfo di = new DirectoryInfo(JOB_OPENING_PATH); + foreach (FileInfo file in di.GetFiles()) + file.Delete(); + foreach (DirectoryInfo dir in di.GetDirectories()) + dir.Delete(true); + } + + // Clear the temp folder files + private string GetExtensionFromBase64(string base64img) + { + base64img = base64img.Remove(0, "data:image/".Length); + return base64img.Substring(0, base64img.IndexOf(";base64,")); + } + + //Clear the temp folder files + private string GetContentFromBase64(string base64img) + { + return base64img.Substring(base64img.IndexOf(";base64,") + ";base64,".Length); + } + + #endregion JOB_METHODS } -} +} \ No newline at end of file diff --git a/Client/Browser_Tools/Models/Errors/ErrorContainer.cs b/Client/Browser_Tools/Models/Errors/ErrorContainer.cs new file mode 100644 index 00000000..909b25f1 --- /dev/null +++ b/Client/Browser_Tools/Models/Errors/ErrorContainer.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CMS_Client.Browser_Tools.Models.Errors +{ + public class ErrorContainer + { + public String Error; + + public ErrorContainer(String Err) + { + this.Error = Err; + } + } +} diff --git a/Client/Browser_Tools/Models/File.cs b/Client/Browser_Tools/Models/File.cs index 2bb3236c..4710cdb0 100644 --- a/Client/Browser_Tools/Models/File.cs +++ b/Client/Browser_Tools/Models/File.cs @@ -8,9 +8,10 @@ namespace CMS_Client.Browser_Tools.Models { public class File { - public String Name; - public String AbsolutePath; - public String Path; - public Boolean IsDirectory; + public string Name; + public string AbsolutePath; + public string Path; + public bool IsDirectory; + public bool IsJob; } } diff --git a/Client/Browser_Tools/Models/JobToStep.cs b/Client/Browser_Tools/Models/JobToStep.cs new file mode 100644 index 00000000..502f0db7 --- /dev/null +++ b/Client/Browser_Tools/Models/JobToStep.cs @@ -0,0 +1,22 @@ +using CMS_Client.Browser_Tools.Models.Metadata; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CMS_Client.Browser_Tools.Models +{ + public class JobToStep + { + public string Name; + public DateTime LastEditTimestamp; + public string IsoMainProgram; + public Metas Metadata; + + public JobToStep() + { + Metadata = new Metas(); + } + } +} diff --git a/Client/Browser_Tools/Models/Metadata/CustomParam.cs b/Client/Browser_Tools/Models/Metadata/CustomParam.cs new file mode 100644 index 00000000..c1fa013d --- /dev/null +++ b/Client/Browser_Tools/Models/Metadata/CustomParam.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CMS_Client.Browser_Tools.Models.Metadata +{ + public class CustomParam + { + public string Name; + public string Type; + public List SelectionList; + public int Value; + + public CustomParam() + { + SelectionList = new List(); + } + } +} diff --git a/Client/Browser_Tools/Models/Metadata/GenericsParam.cs b/Client/Browser_Tools/Models/Metadata/GenericsParam.cs new file mode 100644 index 00000000..6484626c --- /dev/null +++ b/Client/Browser_Tools/Models/Metadata/GenericsParam.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CMS_Client.Browser_Tools.Models.Metadata +{ + public class GenericsParam + { + public List Images; + public string Description; + public TimeSpan ExecutionTime; + + public GenericsParam() + { + Images = new List(); + } + } +} diff --git a/Client/Browser_Tools/Models/Metadata/ImageParam.cs b/Client/Browser_Tools/Models/Metadata/ImageParam.cs new file mode 100644 index 00000000..a91005e8 --- /dev/null +++ b/Client/Browser_Tools/Models/Metadata/ImageParam.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CMS_Client.Browser_Tools.Models.Metadata +{ + public class ImageParam + { + public string Name; + public string Base64; + } +} diff --git a/Client/Browser_Tools/Models/Metadata/Metas.cs b/Client/Browser_Tools/Models/Metadata/Metas.cs new file mode 100644 index 00000000..3f07a344 --- /dev/null +++ b/Client/Browser_Tools/Models/Metadata/Metas.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CMS_Client.Browser_Tools.Models.Metadata +{ + public class Metas + { + public GenericsParam Generics; + public List Tools; + public List Customs; + + public Metas() + { + Generics = new GenericsParam(); + Tools = new List(); + Customs = new List(); + } + } +} diff --git a/Client/Browser_Tools/Models/MetadataToFile.cs b/Client/Browser_Tools/Models/MetadataToFile.cs new file mode 100644 index 00000000..d17d5706 --- /dev/null +++ b/Client/Browser_Tools/Models/MetadataToFile.cs @@ -0,0 +1,23 @@ +using CMS_Client.Browser_Tools.Models.Metadata; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CMS_Client.Browser_Tools.Models +{ + public class MetadataToFile + { + public string Description; + public TimeSpan ExecutionTime; + public List Tools; + public List Customs; + + public MetadataToFile() + { + Tools = new List(); + Customs = new List(); + } + } +} diff --git a/Client/Client.csproj b/Client/Client.csproj index 16ece863..e9b071e2 100644 --- a/Client/Client.csproj +++ b/Client/Client.csproj @@ -135,6 +135,8 @@ + + @@ -151,8 +153,15 @@ + + + + + + + Form @@ -257,7 +266,9 @@ - + + + diff --git a/Client/Properties/AssemblyInfo.cs b/Client/Properties/AssemblyInfo.cs index 7e506e7a..fea017d1 100644 --- a/Client/Properties/AssemblyInfo.cs +++ b/Client/Properties/AssemblyInfo.cs @@ -5,11 +5,11 @@ using System.Runtime.InteropServices; // Le informazioni generali relative a un assembly sono controllate dal seguente // set di attributi. Modificare i valori di questi attributi per modificare le informazioni // associate a un assembly. -[assembly: AssemblyTitle("CMS Step - Client")] -[assembly: AssemblyDescription("STEP Client For CMS Machines")] +[assembly: AssemblyTitle("CMS Active Client")] +[assembly: AssemblyDescription("CMS Active Client - Main HMI for CMS Machines")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("CMS Spa")] -[assembly: AssemblyProduct("CMS Step - Client")] +[assembly: AssemblyProduct("CMS Active Client")] [assembly: AssemblyCopyright("Copyright © 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/Client/Properties/Resources.Designer.cs b/Client/Properties/Resources.Designer.cs index de2f6225..b64201b2 100644 --- a/Client/Properties/Resources.Designer.cs +++ b/Client/Properties/Resources.Designer.cs @@ -1,103 +1,113 @@ -//------------------------------------------------------------------------------ -// -// Il codice è stato generato da uno strumento. -// Versione runtime:4.0.30319.42000 -// -// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se -// il codice viene rigenerato. -// -//------------------------------------------------------------------------------ - -namespace CMS_Client.Properties { - using System; - - - /// - /// Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via. - /// - // Questa classe è stata generata automaticamente dalla classe StronglyTypedResourceBuilder. - // tramite uno strumento quale ResGen o Visual Studio. - // Per aggiungere o rimuovere un membro, modificare il file con estensione ResX ed eseguire nuovamente ResGen - // con l'opzione /str oppure ricompilare il progetto VS. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Restituisce l'istanza di ResourceManager nella cache utilizzata da questa classe. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CMS_Client.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte le - /// ricerche di risorse eseguite utilizzando questa classe di risorse fortemente tipizzata. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Cerca una risorsa localizzata di tipo System.Drawing.Icon simile a (Icona). - /// - internal static System.Drawing.Icon Client_Icon { - get { - object obj = ResourceManager.GetObject("Client_Icon", resourceCulture); - return ((System.Drawing.Icon)(obj)); - } - } - - /// - /// Cerca una risorsa localizzata di tipo System.Drawing.Icon simile a (Icona). - /// - internal static System.Drawing.Icon CMS_Icon { - get { - object obj = ResourceManager.GetObject("CMS_Icon", resourceCulture); - return ((System.Drawing.Icon)(obj)); - } - } - - /// - /// Cerca una risorsa localizzata di tipo System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap CMS_LOGO { - get { - object obj = ResourceManager.GetObject("CMS_LOGO", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Cerca una risorsa localizzata di tipo System.Drawing.Icon simile a (Icona). - /// - internal static System.Drawing.Icon SinumerikHmi { - get { - object obj = ResourceManager.GetObject("SinumerikHmi", resourceCulture); - return ((System.Drawing.Icon)(obj)); - } - } - } -} +//------------------------------------------------------------------------------ +// +// Il codice è stato generato da uno strumento. +// Versione runtime:4.0.30319.42000 +// +// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace CMS_Client.Properties { + using System; + + + /// + /// Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via. + /// + // Questa classe è stata generata automaticamente dalla classe StronglyTypedResourceBuilder. + // tramite uno strumento quale ResGen o Visual Studio. + // Per aggiungere o rimuovere un membro, modificare il file con estensione ResX ed eseguire nuovamente ResGen + // con l'opzione /str oppure ricompilare il progetto VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Restituisce l'istanza di ResourceManager nella cache utilizzata da questa classe. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CMS_Client.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte le + /// ricerche di risorse eseguite utilizzando questa classe di risorse fortemente tipizzata. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Cerca una risorsa localizzata di tipo System.Drawing.Icon simile a (Icona). + /// + internal static System.Drawing.Icon Client_Icon { + get { + object obj = ResourceManager.GetObject("Client_Icon", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } + + /// + /// Cerca una risorsa localizzata di tipo System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap CM_ACTIVE_LOGO { + get { + object obj = ResourceManager.GetObject("CM_ACTIVE_LOGO", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Cerca una risorsa localizzata di tipo System.Drawing.Icon simile a (Icona). + /// + internal static System.Drawing.Icon CMS_Icon { + get { + object obj = ResourceManager.GetObject("CMS_Icon", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } + + /// + /// Cerca una risorsa localizzata di tipo System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap CMS_LOGO { + get { + object obj = ResourceManager.GetObject("CMS_LOGO", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Cerca una risorsa localizzata di tipo System.Drawing.Icon simile a (Icona). + /// + internal static System.Drawing.Icon SinumerikHmi { + get { + object obj = ResourceManager.GetObject("SinumerikHmi", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } + } +} diff --git a/Client/Properties/Resources.resx b/Client/Properties/Resources.resx index 299f7995..a1adb718 100644 --- a/Client/Properties/Resources.resx +++ b/Client/Properties/Resources.resx @@ -1,133 +1,136 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - ..\Resources\Client_Icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\CMS_Icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\CMS_LOGO.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\SinumerikHmi.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\Client_Icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\CMS_Icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\CMS_LOGO.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\SinumerikHmi.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\CM_ACTIVE_LOGO.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Client/Resources/CM_ACTIVE_LOGO.png b/Client/Resources/CM_ACTIVE_LOGO.png new file mode 100644 index 00000000..8050b87c Binary files /dev/null and b/Client/Resources/CM_ACTIVE_LOGO.png differ diff --git a/Client/View/LoadingForm.Designer.cs b/Client/View/LoadingForm.Designer.cs index 0ce7ca38..0a81858b 100644 --- a/Client/View/LoadingForm.Designer.cs +++ b/Client/View/LoadingForm.Designer.cs @@ -28,106 +28,79 @@ /// private void InitializeComponent() { - this.panel1 = new System.Windows.Forms.Panel(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.TitlePanel = new System.Windows.Forms.Panel(); - this.VersionLBL = new System.Windows.Forms.Label(); - this.StatusLBL = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); - this.TitlePanel.SuspendLayout(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151))))); - this.panel1.Location = new System.Drawing.Point(0, 64); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(592, 2); - this.panel1.TabIndex = 11; - // - // pictureBox1 - // - this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.pictureBox1.Image = global::CMS_Client.Properties.Resources.CMS_LOGO; - this.pictureBox1.Location = new System.Drawing.Point(457, 64); - this.pictureBox1.Margin = new System.Windows.Forms.Padding(0); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(135, 60); - this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pictureBox1.TabIndex = 10; - this.pictureBox1.TabStop = false; - // - // TitlePanel - // - this.TitlePanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.TitlePanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(38)))), ((int)(((byte)(128))))); - this.TitlePanel.Controls.Add(this.VersionLBL); - this.TitlePanel.Location = new System.Drawing.Point(0, 0); - this.TitlePanel.Margin = new System.Windows.Forms.Padding(0); - this.TitlePanel.Name = "TitlePanel"; - this.TitlePanel.Size = new System.Drawing.Size(592, 64); - this.TitlePanel.TabIndex = 9; - // - // VersionLBL - // - this.VersionLBL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.VersionLBL.Font = new System.Drawing.Font("Work Sans", 18F, System.Drawing.FontStyle.Bold); - this.VersionLBL.ForeColor = System.Drawing.Color.White; - this.VersionLBL.Location = new System.Drawing.Point(0, 0); - this.VersionLBL.Name = "VersionLBL"; - this.VersionLBL.Size = new System.Drawing.Size(592, 64); - this.VersionLBL.TabIndex = 0; - this.VersionLBL.Text = "..."; - this.VersionLBL.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // StatusLBL - // - this.StatusLBL.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.StatusLBL.Font = new System.Drawing.Font("Work Sans", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.StatusLBL.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151))))); - this.StatusLBL.Location = new System.Drawing.Point(0, 124); - this.StatusLBL.Name = "StatusLBL"; - this.StatusLBL.Size = new System.Drawing.Size(592, 349); - this.StatusLBL.TabIndex = 12; - this.StatusLBL.Text = "..."; - this.StatusLBL.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // LoadingForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(592, 568); - this.Controls.Add(this.StatusLBL); - this.Controls.Add(this.panel1); - this.Controls.Add(this.pictureBox1); - this.Controls.Add(this.TitlePanel); - this.Icon = global::CMS_Client.Properties.Resources.Client_Icon; - this.Movable = false; - this.Name = "LoadingForm"; - this.Resizable = false; - this.ShadowType = MetroFramework.Forms.MetroFormShadowType.AeroShadow; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; - this.Text = "Loading CMS Client"; - this.TopMost = true; - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); - this.TitlePanel.ResumeLayout(false); - this.ResumeLayout(false); - + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.VersionLBL = new System.Windows.Forms.Label(); + this.StatusLBL = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // pictureBox1 + // + this.pictureBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(43)))), ((int)(((byte)(91))))); + this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.pictureBox1.Image = global::CMS_Client.Properties.Resources.CM_ACTIVE_LOGO; + this.pictureBox1.Location = new System.Drawing.Point(-1, 0); + this.pictureBox1.Margin = new System.Windows.Forms.Padding(0); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(971, 203); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox1.TabIndex = 10; + this.pictureBox1.TabStop = false; + // + // VersionLBL + // + this.VersionLBL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.VersionLBL.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(43)))), ((int)(((byte)(91))))); + this.VersionLBL.Font = new System.Drawing.Font("Work Sans", 18F, System.Drawing.FontStyle.Bold); + this.VersionLBL.ForeColor = System.Drawing.Color.White; + this.VersionLBL.Location = new System.Drawing.Point(1, 0); + this.VersionLBL.Name = "VersionLBL"; + this.VersionLBL.Size = new System.Drawing.Size(592, 35); + this.VersionLBL.TabIndex = 0; + this.VersionLBL.Text = "..."; + this.VersionLBL.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // StatusLBL + // + this.StatusLBL.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.StatusLBL.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(43)))), ((int)(((byte)(91))))); + this.StatusLBL.Font = new System.Drawing.Font("Work Sans", 9.749999F, System.Drawing.FontStyle.Bold); + this.StatusLBL.ForeColor = System.Drawing.Color.White; + this.StatusLBL.Location = new System.Drawing.Point(1, 168); + this.StatusLBL.Name = "StatusLBL"; + this.StatusLBL.Size = new System.Drawing.Size(969, 35); + this.StatusLBL.TabIndex = 12; + this.StatusLBL.Text = "..."; + this.StatusLBL.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // LoadingForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(969, 203); + this.Controls.Add(this.VersionLBL); + this.Controls.Add(this.StatusLBL); + this.Controls.Add(this.pictureBox1); + this.Icon = global::CMS_Client.Properties.Resources.Client_Icon; + this.Movable = false; + this.Name = "LoadingForm"; + this.Resizable = false; + this.ShadowType = MetroFramework.Forms.MetroFormShadowType.AeroShadow; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; + this.Text = "Loading CMS Client"; + this.TopMost = true; + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + } #endregion - - private System.Windows.Forms.Panel panel1; private System.Windows.Forms.PictureBox pictureBox1; - private System.Windows.Forms.Panel TitlePanel; private System.Windows.Forms.Label VersionLBL; private System.Windows.Forms.Label StatusLBL; } diff --git a/Client/View/LoadingForm.cs b/Client/View/LoadingForm.cs index e5e78452..78155f8d 100644 --- a/Client/View/LoadingForm.cs +++ b/Client/View/LoadingForm.cs @@ -27,9 +27,12 @@ namespace CMS_Client.View //Set window Position this.Location = new Point((Screen.PrimaryScreen.Bounds.Width / 2) - (this.Width / 2), (Screen.PrimaryScreen.Bounds.Height / 2) - (this.Height / 2)); - - //Setup Product Name - VersionLBL.Text = Application.ProductName; + + //Setup product label + if (Environment.Is64BitProcess) + VersionLBL.Text = "V" + Application.ProductVersion + " - 64 Bit"; + else + VersionLBL.Text = "V" + Application.ProductVersion + " - 32 Bit"; } diff --git a/Client/View/LoadingForm.resx b/Client/View/LoadingForm.resx index 1af7de15..29dcb1b3 100644 --- a/Client/View/LoadingForm.resx +++ b/Client/View/LoadingForm.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/Client/View/MainForm.cs b/Client/View/MainForm.cs index c1bf2309..649948ed 100644 --- a/Client/View/MainForm.cs +++ b/Client/View/MainForm.cs @@ -134,8 +134,14 @@ namespace CMS_Client.View //Close Chromium Runtime - CfxRuntime.Shutdown(); - + try + { + CfxRuntime.Shutdown(); + } + catch(Exception ex) + { + + } } diff --git a/Client/View/NcWindow.cs b/Client/View/NcWindow.cs index e05c2e0e..c2a8d695 100644 --- a/Client/View/NcWindow.cs +++ b/Client/View/NcWindow.cs @@ -52,8 +52,6 @@ namespace CMS_Client.View private static Process ncprocess; public static String NcCapture { get { return ncCapture; } } private static String ncCapture; - public static List NcWindowCommand { get { return ncWindowCommand; } } - private static List ncWindowCommand; private static int LastX, LastY; private static int LastWidth = 1024, LastHeight = 768; @@ -526,20 +524,7 @@ namespace CMS_Client.View ncCapture = "data:image/png;base64,"; } - - //Send command to Nc window - public static void SendCommandKey(String CMD) - { - if(String.IsNullOrWhiteSpace(CMD)) - return; - - if (ncprocess != null && ncprocess.MainWindowHandle != IntPtr.Zero && state == NcState.SHOW) - { - SetForegroundWindow(ncprocess.MainWindowHandle); - SendKeys.SendWait(CMD); - } - } public static void ActivateNcWindow() { SetForegroundWindow(ncprocess.MainWindowHandle); @@ -957,16 +942,6 @@ namespace CMS_Client.View ncWindowHeight = HMI_WINDOW_HEIGHT_DEMO; ncWindowX = HMI_WINDOW_POS_X_DEMO; ncWindowY = HMI_WINDOW_POS_Y_DEMO; - ncWindowCommand = new List(); - ncWindowCommand.Add("^(1)"); - ncWindowCommand.Add("^(2)"); - ncWindowCommand.Add("^(3)"); - ncWindowCommand.Add("^(4)"); - ncWindowCommand.Add("^(5)"); - ncWindowCommand.Add("^(6)"); - ncWindowCommand.Add("^(7)"); - ncWindowCommand.Add("^(8)"); - ncWindowCommand.Add("^(9)"); }; break; // 1: Fanuc @@ -978,7 +953,6 @@ namespace CMS_Client.View ncWindowHeight = HMI_WINDOW_HEIGHT_FANUC; ncWindowX = HMI_WINDOW_POS_X_FANUC; ncWindowY = HMI_WINDOW_POS_Y_FANUC; - ncWindowCommand = new List(); }; break; // 2: Siemens @@ -990,13 +964,6 @@ namespace CMS_Client.View ncWindowHeight = HMI_WINDOW_HEIGHT_SIEMENS; ncWindowX = HMI_WINDOW_POS_X_SIEMENS; ncWindowY = HMI_WINDOW_POS_Y_SIEMENS; - ncWindowCommand = new List(); - ncWindowCommand.Add("{F10}{F1}"); - ncWindowCommand.Add("{F10}{F2}"); - ncWindowCommand.Add("{F10}{F3}"); - ncWindowCommand.Add("{F10}{F4}"); - ncWindowCommand.Add("{F10}{F5}"); - ncWindowCommand.Add("{F10}{F6}"); }; break; // 3: Osai @@ -1008,7 +975,6 @@ namespace CMS_Client.View ncWindowHeight = HMI_WINDOW_HEIGHT_OSAI; ncWindowX = HMI_WINDOW_POS_X_OSAI; ncWindowY = HMI_WINDOW_POS_Y_OSAI; - ncWindowCommand = new List(); }; break; } } diff --git a/Client/View/OpeningForm.Designer.cs b/Client/View/OpeningForm.Designer.cs index 701c07f9..30ddcd1c 100644 --- a/Client/View/OpeningForm.Designer.cs +++ b/Client/View/OpeningForm.Designer.cs @@ -28,144 +28,117 @@ /// private void InitializeComponent() { - this.CloseLabel = new System.Windows.Forms.Label(); - this.VersionLBL = new System.Windows.Forms.Label(); - this.TitlePanel = new System.Windows.Forms.Panel(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.StatusLBL = new System.Windows.Forms.Label(); - this.ErrorLBL = new System.Windows.Forms.Label(); - this.panel1 = new System.Windows.Forms.Panel(); - this.TitlePanel.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); - this.SuspendLayout(); - // - // CloseLabel - // - this.CloseLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.CloseLabel.Cursor = System.Windows.Forms.Cursors.Hand; - this.CloseLabel.Font = new System.Drawing.Font("Work Sans Medium", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.CloseLabel.ForeColor = System.Drawing.Color.White; - this.CloseLabel.Location = new System.Drawing.Point(545, 0); - this.CloseLabel.Margin = new System.Windows.Forms.Padding(3, 0, 2, 0); - this.CloseLabel.Name = "CloseLabel"; - this.CloseLabel.Padding = new System.Windows.Forms.Padding(0, 0, 5, 0); - this.CloseLabel.Size = new System.Drawing.Size(47, 64); - this.CloseLabel.TabIndex = 3; - this.CloseLabel.Text = "X"; - this.CloseLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.CloseLabel.Click += new System.EventHandler(this.CloseLabel_Click); - this.CloseLabel.MouseClick += new System.Windows.Forms.MouseEventHandler(this.CloseLabel_MouseClick); - // - // VersionLBL - // - this.VersionLBL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.VersionLBL.Font = new System.Drawing.Font("Work Sans", 18F, System.Drawing.FontStyle.Bold); - this.VersionLBL.ForeColor = System.Drawing.Color.White; - this.VersionLBL.Location = new System.Drawing.Point(0, 0); - this.VersionLBL.Name = "VersionLBL"; - this.VersionLBL.Size = new System.Drawing.Size(536, 64); - this.VersionLBL.TabIndex = 0; - this.VersionLBL.Text = "..."; - this.VersionLBL.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // TitlePanel - // - this.TitlePanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.TitlePanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(38)))), ((int)(((byte)(128))))); - this.TitlePanel.Controls.Add(this.VersionLBL); - this.TitlePanel.Controls.Add(this.CloseLabel); - this.TitlePanel.Location = new System.Drawing.Point(0, 0); - this.TitlePanel.Margin = new System.Windows.Forms.Padding(0); - this.TitlePanel.Name = "TitlePanel"; - this.TitlePanel.Size = new System.Drawing.Size(592, 64); - this.TitlePanel.TabIndex = 4; - // - // pictureBox1 - // - this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.pictureBox1.Image = global::CMS_Client.Properties.Resources.CMS_LOGO; - this.pictureBox1.Location = new System.Drawing.Point(457, 64); - this.pictureBox1.Margin = new System.Windows.Forms.Padding(0); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(135, 60); - this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pictureBox1.TabIndex = 6; - this.pictureBox1.TabStop = false; - // - // StatusLBL - // - this.StatusLBL.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.StatusLBL.Font = new System.Drawing.Font("Work Sans", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.StatusLBL.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151))))); - this.StatusLBL.Location = new System.Drawing.Point(0, 124); - this.StatusLBL.Name = "StatusLBL"; - this.StatusLBL.Size = new System.Drawing.Size(592, 349); - this.StatusLBL.TabIndex = 5; - this.StatusLBL.Text = "..."; - this.StatusLBL.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // ErrorLBL - // - this.ErrorLBL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ErrorLBL.Font = new System.Drawing.Font("Work Sans", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ErrorLBL.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.ErrorLBL.Location = new System.Drawing.Point(0, 473); - this.ErrorLBL.Name = "ErrorLBL"; - this.ErrorLBL.Size = new System.Drawing.Size(592, 93); - this.ErrorLBL.TabIndex = 7; - this.ErrorLBL.Text = "..."; - this.ErrorLBL.TextAlign = System.Drawing.ContentAlignment.BottomLeft; - // - // panel1 - // - this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(151)))), ((int)(((byte)(151)))), ((int)(((byte)(151))))); - this.panel1.Location = new System.Drawing.Point(0, 64); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(592, 2); - this.panel1.TabIndex = 8; - // - // OpeningForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle; - this.ClientSize = new System.Drawing.Size(592, 568); - this.ControlBox = false; - this.Controls.Add(this.panel1); - this.Controls.Add(this.ErrorLBL); - this.Controls.Add(this.pictureBox1); - this.Controls.Add(this.StatusLBL); - this.Controls.Add(this.TitlePanel); - this.Icon = global::CMS_Client.Properties.Resources.Client_Icon; - this.Movable = false; - this.Name = "OpeningForm"; - this.Resizable = false; - this.ShadowType = MetroFramework.Forms.MetroFormShadowType.AeroShadow; - this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; - this.Text = "Loading CMS Client"; - this.TopMost = true; - this.Load += new System.EventHandler(this.LoadingForm_Load); - this.TitlePanel.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); - this.ResumeLayout(false); - + this.VersionLBL = new System.Windows.Forms.Label(); + this.StatusLBL = new System.Windows.Forms.Label(); + this.ErrorLBL = new System.Windows.Forms.Label(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.CloseLabel = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // VersionLBL + // + this.VersionLBL.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(43)))), ((int)(((byte)(91))))); + this.VersionLBL.Font = new System.Drawing.Font("Work Sans", 18F, System.Drawing.FontStyle.Bold); + this.VersionLBL.ForeColor = System.Drawing.Color.White; + this.VersionLBL.Location = new System.Drawing.Point(0, 0); + this.VersionLBL.Name = "VersionLBL"; + this.VersionLBL.Size = new System.Drawing.Size(929, 31); + this.VersionLBL.TabIndex = 0; + this.VersionLBL.Text = "..."; + this.VersionLBL.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // StatusLBL + // + this.StatusLBL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.StatusLBL.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(43)))), ((int)(((byte)(91))))); + this.StatusLBL.Font = new System.Drawing.Font("Work Sans", 9.749999F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.StatusLBL.ForeColor = System.Drawing.Color.White; + this.StatusLBL.Location = new System.Drawing.Point(0, 169); + this.StatusLBL.Name = "StatusLBL"; + this.StatusLBL.Size = new System.Drawing.Size(502, 34); + this.StatusLBL.TabIndex = 5; + this.StatusLBL.Text = "..."; + this.StatusLBL.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // ErrorLBL + // + this.ErrorLBL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.ErrorLBL.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(43)))), ((int)(((byte)(91))))); + this.ErrorLBL.Font = new System.Drawing.Font("Work Sans", 9.749999F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.ErrorLBL.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.ErrorLBL.Location = new System.Drawing.Point(501, 169); + this.ErrorLBL.Name = "ErrorLBL"; + this.ErrorLBL.Size = new System.Drawing.Size(468, 34); + this.ErrorLBL.TabIndex = 7; + this.ErrorLBL.Text = "..."; + this.ErrorLBL.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // pictureBox1 + // + this.pictureBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(43)))), ((int)(((byte)(91))))); + this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.pictureBox1.Image = global::CMS_Client.Properties.Resources.CM_ACTIVE_LOGO; + this.pictureBox1.Location = new System.Drawing.Point(0, 0); + this.pictureBox1.Margin = new System.Windows.Forms.Padding(0); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(969, 203); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox1.TabIndex = 6; + this.pictureBox1.TabStop = false; + // + // CloseLabel + // + this.CloseLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.CloseLabel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(43)))), ((int)(((byte)(91))))); + this.CloseLabel.Cursor = System.Windows.Forms.Cursors.Hand; + this.CloseLabel.Font = new System.Drawing.Font("Work Sans Medium", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.CloseLabel.ForeColor = System.Drawing.Color.White; + this.CloseLabel.Location = new System.Drawing.Point(922, 0); + this.CloseLabel.Margin = new System.Windows.Forms.Padding(3, 0, 2, 0); + this.CloseLabel.Name = "CloseLabel"; + this.CloseLabel.Padding = new System.Windows.Forms.Padding(0, 0, 5, 0); + this.CloseLabel.Size = new System.Drawing.Size(47, 57); + this.CloseLabel.TabIndex = 3; + this.CloseLabel.Text = "X"; + this.CloseLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.CloseLabel.Click += new System.EventHandler(this.CloseLabel_Click); + this.CloseLabel.MouseClick += new System.Windows.Forms.MouseEventHandler(this.CloseLabel_MouseClick); + // + // OpeningForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle; + this.ClientSize = new System.Drawing.Size(969, 203); + this.ControlBox = false; + this.Controls.Add(this.StatusLBL); + this.Controls.Add(this.VersionLBL); + this.Controls.Add(this.CloseLabel); + this.Controls.Add(this.ErrorLBL); + this.Controls.Add(this.pictureBox1); + this.Icon = global::CMS_Client.Properties.Resources.Client_Icon; + this.Movable = false; + this.Name = "OpeningForm"; + this.Padding = new System.Windows.Forms.Padding(0, 60, 0, 0); + this.Resizable = false; + this.ShadowType = MetroFramework.Forms.MetroFormShadowType.AeroShadow; + this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; + this.Text = "Loading CMS Client"; + this.TopMost = true; + this.Load += new System.EventHandler(this.LoadingForm_Load); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + } #endregion - private System.Windows.Forms.Label CloseLabel; private System.Windows.Forms.Label VersionLBL; - private System.Windows.Forms.Panel TitlePanel; - private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Label StatusLBL; - private System.Windows.Forms.Label ErrorLBL; - private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label ErrorLBL; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Label CloseLabel; } } \ No newline at end of file diff --git a/Client/View/OpeningForm.cs b/Client/View/OpeningForm.cs index 66098b66..9160ba04 100644 --- a/Client/View/OpeningForm.cs +++ b/Client/View/OpeningForm.cs @@ -21,7 +21,7 @@ namespace CMS_Client.View { public partial class OpeningForm : MetroFramework.Forms.MetroForm { - public const int TimerTest = 2000; + public const int TimerTest = 500; private HttpWebRequest ConnTestRequest; private HttpWebResponse ConnTestResponse; private String ConnTestError; @@ -53,9 +53,9 @@ namespace CMS_Client.View //Setup product label if(Environment.Is64BitProcess) - VersionLBL.Text = Application.ProductName + " V" + Application.ProductVersion + " - 64 Bit"; + VersionLBL.Text = "V" + Application.ProductVersion + " - 64 Bit"; else - VersionLBL.Text = Application.ProductName + " V" + Application.ProductVersion + " - 32 Bit"; + VersionLBL.Text = "V" + Application.ProductVersion + " - 32 Bit"; } @@ -120,7 +120,7 @@ namespace CMS_Client.View //try to Request if(!Config.ConnectionConfig.BypassReadConfiguration) { - setStatus("Connecting to \n" + Config.ConnectionConfig.ServerUrl + ":" + Config.ConnectionConfig.ServerPort + "\n", ""); + setStatus("Connecting to " + Config.ConnectionConfig.ServerUrl + ":" + Config.ConnectionConfig.ServerPort, ""); Boolean error=false; do { @@ -267,7 +267,7 @@ namespace CMS_Client.View for (int i = 0; i < WaitDot; i++) dot += "."; //Set the status - setStatus("Retry connection to \n" + Config.ConnectionConfig.ServerUrl + ":" + Config.ConnectionConfig.ServerPort + "\n" + dot, "Server not found (Error: " + ConnTestError + ")"); + setStatus("Retry connection to " + Config.ConnectionConfig.ServerUrl + ":" + Config.ConnectionConfig.ServerPort + " " + dot, "Server not found (Error: " + ConnTestError + ")"); if (WaitDot < 3) WaitDot++; else @@ -339,6 +339,11 @@ namespace CMS_Client.View private void CloseLabel_MouseClick(object sender, EventArgs e) { Environment.Exit(0); - } + } + + private void CloseLabel_MouseClick(object sender, MouseEventArgs e) + { + + } } } diff --git a/Client/View/OpeningForm.resx b/Client/View/OpeningForm.resx index 1af7de15..29dcb1b3 100644 --- a/Client/View/OpeningForm.resx +++ b/Client/View/OpeningForm.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/Libs/CMS_CORE_Library.dll b/Libs/CMS_CORE_Library.dll index 53f853fc..87bda111 100644 Binary files a/Libs/CMS_CORE_Library.dll and b/Libs/CMS_CORE_Library.dll differ diff --git a/Step.Config/Config/toolManagerConfig.xml b/Step.Config/Config/toolManagerConfig.xml index cd5ac029..97c13789 100644 --- a/Step.Config/Config/toolManagerConfig.xml +++ b/Step.Config/Config/toolManagerConfig.xml @@ -4,7 +4,7 @@ false false true - true + false true true true diff --git a/Step.Core/ThreadsFunctions.cs b/Step.Core/ThreadsFunctions.cs index e9387132..5866733c 100644 --- a/Step.Core/ThreadsFunctions.cs +++ b/Step.Core/ThreadsFunctions.cs @@ -641,7 +641,11 @@ public static class ThreadsFunctions if (ncHandler.numericalControl.NC_IsConnected()) { // Read data - libraryError = ncHandler.UpdateAndGetPPQueue(out List queue); + libraryError = ncHandler.UpdateQueue(); + if (libraryError.IsError()) + ManageLibraryError(libraryError); + + libraryError = ncHandler.GetSelectedProcessQueue(out List queue); if (libraryError.IsError()) ManageLibraryError(libraryError); diff --git a/Step.Database/Controllers/MaintenancesController.cs b/Step.Database/Controllers/MaintenancesController.cs index 1ce1707d..6342fcd1 100644 --- a/Step.Database/Controllers/MaintenancesController.cs +++ b/Step.Database/Controllers/MaintenancesController.cs @@ -77,6 +77,7 @@ namespace Step.Database.Controllers { MaintenanceModel dbMaint = new MaintenanceModel() { + MaintenanceId = GetUserMaintenanceId(dbCtx.Maintenances), CreationDate = DateTime.Now, CounterId = 0, Interval = newMaint.Interval, @@ -97,6 +98,16 @@ namespace Step.Database.Controllers return dbMaint; } + private int GetUserMaintenanceId(IEnumerable maintenances) + { + int max = maintenances.Select(x => x.MaintenanceId).Max(); + // If there aren't user maintenance return 100 + if (max < 100) + return 100; + else + return max + 1; + } + public MaintenanceModel Update(int maintenanceId, DTOUpdateMaintenanceModel newMaint) { MaintenanceModel dbMaint = FindById(maintenanceId); diff --git a/Step.Database/Controllers/NcToolManagerController.cs b/Step.Database/Controllers/NcToolManagerController.cs index 6223a842..c8a796c4 100644 --- a/Step.Database/Controllers/NcToolManagerController.cs +++ b/Step.Database/Controllers/NcToolManagerController.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Data.Entity; using System.Linq; +using static Step.Utils.SupportFunctions; namespace Step.Database.Controllers { @@ -261,8 +262,8 @@ namespace Step.Database.Controllers .Where(x => x.ShankId == null || x.ShankId == 0) .ToList(); - return dtoTools; - } + return dtoTools; + } public DbNcToolModel AddTool(DTONewNcToolModel dtoTool) { diff --git a/Step.Database/Controllers/QueueController.cs b/Step.Database/Controllers/QueueController.cs new file mode 100644 index 00000000..dc0c9d9e --- /dev/null +++ b/Step.Database/Controllers/QueueController.cs @@ -0,0 +1,115 @@ +using Step.Model.DatabaseModels; +using Step.Model.DTOModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using static Step.Model.Constants; + +namespace Step.Database.Controllers +{ + public class QueueController : IDisposable + { + private DatabaseContext dbCtx; + public static Dictionary> PartProgramQueue = new Dictionary>(); + public static Dictionary QueueRunningIndexes = new Dictionary(); + + public QueueController() + { + // Initialize database context + dbCtx = new DatabaseContext(); + } + + public void Dispose() + { + // Clear database context + dbCtx.Dispose(); + } + + public void UpdateQueue() + { + dbCtx.Queue.RemoveRange(dbCtx.Queue); + + foreach(var item in PartProgramQueue) + { + // Create database model + var dbRows = item.Value.Select(x => new QueueItemsModel() + { + Id = x.Id, + AbsolutePath = x.AbsolutePath, + PartProgramName = x.PartProgramName, + Process = item.Key, // Process + Reps = x.Reps, + RemainingReps = x.RemainingReps, + Status = (int)x.Status + }).ToList(); + + // Add to db + dbCtx.Queue.AddRange(dbRows); + } + + dbCtx.SaveChanges(); + } + + public void UpdateReps(int processId, int id, int reps) + { + QueueItemsModel item = dbCtx.Queue.Where(x => x.Id == id && x.Process == processId).FirstOrDefault(); + // Update reps + item.Reps = reps; + item.RemainingReps = reps; + + dbCtx.SaveChanges(); + } + + public void DeleteItem(int processId, int id) + { + QueueItemsModel item = dbCtx.Queue.Where(x => x.Id == id && x.Process == processId).FirstOrDefault(); + + dbCtx.Queue.Remove(item); + + dbCtx.SaveChanges(); + } + + public void ReadAndPopulateQueue() + { + var dbQueue = dbCtx.Queue.ToList(); + bool foundData = false; + foreach(var entity in dbQueue) + { + // Check if process queue exists + if (!PartProgramQueue.ContainsKey(entity.Process)) + PartProgramQueue.Add(entity.Process, new List()); + + // Add db row to queue + PartProgramQueue[entity.Process].Add(new DTOQueueModel() + { + Id = entity.Id, + AbsolutePath = entity.AbsolutePath, + PartProgramName = entity.PartProgramName, + Reps = entity.Reps, + RemainingReps = entity.RemainingReps, + Status = (QUEUE_ITEM_STATUS)entity.Status + }); + + if ((QUEUE_ITEM_STATUS)entity.Status != QUEUE_ITEM_STATUS.FINISHED && !foundData) + { + QueueRunningIndexes[entity.Process] = entity.Id - 1; + foundData = true; + } + + if ((QUEUE_ITEM_STATUS)entity.Status == QUEUE_ITEM_STATUS.RUNNING) + QueueRunningIndexes[entity.Process] = entity.Id - 1; + } + } + + public void UpdateQueueIdsAndSave(int processId) + { + // Fix new ids + for (int i = 0; i < PartProgramQueue[processId].Count(); i++) + PartProgramQueue[processId][i].Id = i + 1; + + UpdateQueue(); + } + } +} diff --git a/Step.Database/DatabaseContext.cs b/Step.Database/DatabaseContext.cs index 1f45c133..1595aad1 100644 --- a/Step.Database/DatabaseContext.cs +++ b/Step.Database/DatabaseContext.cs @@ -34,6 +34,7 @@ namespace Step.Database public DbSet Shanks { get; set; } public DbSet Tools { get; set; } public DbSet MagazinePositions { get; set; } + public DbSet Queue { get; set; } // Create migration string public static string CONNECTION_STRING = "Server = " + "localhost" + "; Database=" + DATABASE_NAME + ";Uid=" + DATABASE_USER + ";Pwd=" + DATABASE_PWD + ";"; @@ -76,12 +77,16 @@ namespace Step.Database { maintenancesController.CheckDifferencesFromDbAndXml(); } + // Get functionality and PLC default false functionality using (FunctionsAccessController functionsAccess = new FunctionsAccessController()) { FunctionsAccessConfig = functionsAccess.FindAll(); AllFunctionalityDisabled = functionsAccess.FindAllFunctionsAndDisableAll(); } + + using (QueueController queueController = new QueueController()) + queueController.ReadAndPopulateQueue(); } catch (Exception ex) { @@ -133,6 +138,7 @@ namespace Step.Database } } } + // Set machine info into static server config using (MachinesController machinesController = new MachinesController()) { diff --git a/Step.Database/Migrations/201808031122175_InitMigration.resx b/Step.Database/Migrations/201808031122175_InitMigration.resx deleted file mode 100644 index 9e4daaa9..00000000 --- a/Step.Database/Migrations/201808031122175_InitMigration.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - H4sIAAAAAAAEAOVd227kupV9DzD/UKjHScfVbiPATMNO4GO7EyPtC1zuM5kngVaxqoWjkiqSyrEzmC/LQz4pvxBK1IX3i0hJVR000HBJ5Obm5uLmbYn7n3//x/nv37bx7BVmeZQmF/PTk4/zGUzCdBUlm4v5vlj/5r/mv//df/zq/Ga1fZv93KQ7K9OhnEl+Mf9eFLvPi0UefodbkJ9sozBL83RdnITpdgFW6eLTx4//vTg9XUAkYo5kzWbnT/ukiLaw+oF+XqVJCHfFHsR36QrGef0cvVlWUmf3YAvzHQjhxXxZwN3JNSjAC8jhfHYZRwApsYTxej4DSZIWoEAqfv6Ww2WRpclmuUMPQPz8voMo3RrEZa5K9c9dctNafPxU1mLRZWxEhfu8SLeWAk/ParMs2Oy9jDtvzYYMd4MMXLyXta6MdzG/frkPv4BtFL9XNp7P2DI/X8VZmb42cZWqNTRulxNGyIdZl/RDiw4EovLfh9nVPi72GbxI4L7IAErxuH+Jo/BP8P05/QUmF8k+jkmlkdroHfUAPXrM0h3MivcnuK6rgjW4Xc1nCzr3gs3eZuZy4preJsXZp/nsHikCXmLY4oOwyrJIM/gHmMAMFHD1CIoCZqh5b1ewsjCnA1Ni+X9T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EUkUBVZW1pZKHJhwxRHvROWUu/pa+arqaOphpL9440BgOVEysfW6RU/5xYCNBgalm5VsUyixeFAVTCTTVTtJ+dscOQ0U80ZODUVakS67JnlgYxJ6GsHpQL8WumqcgitIGLReyC8TBKzX89CoSZJkJBXGFOfnB1JOBSOFeMNO4KQR6VWGUNGgJDYxZk5x1VKOk5pgfDqT8cO9KC6lH6OxtBsteATsHD8VmAg5UlqJwBJmFBTRGoivB/1CYQrZiCyOVDSAQSoChIk1eKYEVRFukGdC5hy0EaqFrokR+BWxbFuQqIFU9YmNIDpaFhpBewbt0QjigV4cy8GrEcTnp2p7GJy5+quewWmXWBqRYBiDGSBHdSQ4BHqmMor4KEttG4Pjr+FRxE3x5REMBjKYAYpUpzNDoGhUo5idDggM1ONYYSA8aRdsmoAD7kaUbmML7Ga25e1vkFZsVRNS6BfGBuGug2/fnS/wSrR+gH5y176fL572Sfm9Hv51DfNo04k4RzITGFL7um2a22SdNvvMjEZNEubLrjtYgBUowGVWRGsQFuh1uUsWJZv5rIrWcDG/2b7A1W3ysC92+wJVGW5f6E3bcptaVf75gtP5/KH65jv3UQWkZlR+4viQ/LSP4lWr9xfB52QSEeX+d/3NXdmWRfnt3ea9lXSfstt5MkG1+dpt+2e43cVIWP6QLEF50629bgjBX+EGhO+P9eX9ciH6hqDNfn4dgU0Gtnkto8uPfiIMr7Zvv/sXhKgz4hoFAQA= - - - dbo - - \ No newline at end of file diff --git a/Step.Database/Migrations/201808031122175_InitMigration.Designer.cs b/Step.Database/Migrations/201809181022557_InitMigration.Designer.cs similarity index 92% rename from Step.Database/Migrations/201808031122175_InitMigration.Designer.cs rename to Step.Database/Migrations/201809181022557_InitMigration.Designer.cs index 49686ac5..8418d773 100644 --- a/Step.Database/Migrations/201808031122175_InitMigration.Designer.cs +++ b/Step.Database/Migrations/201809181022557_InitMigration.Designer.cs @@ -13,7 +13,7 @@ namespace Step.Database.Migrations string IMigrationMetadata.Id { - get { return "201808031122175_InitMigration"; } + get { return "201809181022557_InitMigration"; } } string IMigrationMetadata.Source diff --git a/Step.Database/Migrations/201808031122175_InitMigration.cs b/Step.Database/Migrations/201809181022557_InitMigration.cs similarity index 94% rename from Step.Database/Migrations/201808031122175_InitMigration.cs rename to Step.Database/Migrations/201809181022557_InitMigration.cs index 3de27b88..885ae5fc 100644 --- a/Step.Database/Migrations/201808031122175_InitMigration.cs +++ b/Step.Database/Migrations/201809181022557_InitMigration.cs @@ -172,7 +172,7 @@ namespace Step.Database.Migrations "dbo.maintenance", c => new { - id = c.Int(nullable: false, identity: true), + id = c.Int(nullable: false), intervall = c.Double(), deadline = c.DateTime(nullable: false, precision: 0), type = c.Int(nullable: false), @@ -217,6 +217,20 @@ namespace Step.Database.Migrations .ForeignKey("dbo.maintenance", t => t.maintenance, cascadeDelete: true) .Index(t => t.maintenance); + CreateTable( + "dbo.queue", + c => new + { + id = c.Int(nullable: false), + process = c.Int(nullable: false), + part_program_name = c.String(unicode: false), + reps = c.Int(nullable: false), + remaining_reps = c.Int(nullable: false), + absolute_path = c.String(unicode: false), + status = c.Int(nullable: false), + }) + .PrimaryKey(t => new { t.id, t.process }); + CreateTable( "dbo.session", c => new @@ -259,6 +273,7 @@ namespace Step.Database.Migrations DropIndex("dbo.tool", new[] { "shank_id" }); DropIndex("dbo.tool", new[] { "family_id" }); DropTable("dbo.session"); + DropTable("dbo.queue"); DropTable("dbo.performed_maintenance"); DropTable("dbo.maintenance_note"); DropTable("dbo.maintenance"); diff --git a/Step.Database/Migrations/201809181022557_InitMigration.resx b/Step.Database/Migrations/201809181022557_InitMigration.resx new file mode 100644 index 00000000..386025d7 --- /dev/null +++ b/Step.Database/Migrations/201809181022557_InitMigration.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + H4sIAAAAAAAEAOVdWW/kupV+HyD/oVCPmY6rFwTINOwEvrY7MdJexuW+k3kSaBVdLVwtdSWVY2cwv2we5ifNXxhK1MJ9ESmpqoMGGi6RPDw8/HgOl0Oe//uf/z3902sSL15gXkRZerb8cPJ+uYBpmG2idHu23JfPv/vD8k9//M2/nF5tktfFz22+T1U+VDItzpbfy3L3ebUqwu8wAcVJEoV5VmTP5UmYJSuwyVYf37//t9WHDyuISCwRrcXi9GGfllEC6x/o50WWhnBX7kF8k21gXDTfUcq6prq4BQksdiCEZ8t1CXcnl6AET6CAy8V5HAHExBrGz8sFSNOsBCVi8fO3Aq7LPEu36x36AOLHtx1E+Z5BXJWqWf/cZzdtxfuPVStWfcGWVLgvyiyxJPjhUyOWFVt8kHCXndiQ4K6QgMu3qtW18M6Wl0+34ReQRPFbLePlgq3z80WcV/kbEde5OkHjfjlhiLxb9FnfdehAIKr+vVtc7ONyn8OzFO7LHKAc9/unOAr/Ct8es19gepbu45hkGrGN0qgP6NN9nu1gXr49wOemKZiD681ysaJLr9jiXWGuJG7pdVp++rhc3CJGwFMMO3wQUlmXWQ7/DFOYgxJu7kFZwhx17/UG1hLmeGBqrP5va0OARMNqubgBr19hui2/ny3Rn8vFl+gVbtovDQff0giNQlSozPdQV8ljltUAbyv66a2EglapiTxE2+/lOvqHG5Wv8NmdyGO4e6yyOxH5M0gS4CaRBgPOor1A/YN6Hpd1oIPQst5BqIWvlsrXDGzcOInSisZ9WJ7vyyx2JodZ8kXu8i1FAz28yJIdTItGo7q31jtZ3GrfZL9Gz9AZsrdZEqUgrmi5oe0BvkQv8BLGJbAkdAteom0tDoG6K5aLBxjXqcX3aIdnALV9qlJrixRgbY/0a54lD1ncGEE2PXgE+RaWiLlMkWmd7fOQ4fF01VtZre3tKA63vB2JmexuVf8Qq9uWm8rm3j0/F7DEBtUVvEW02fsZBpgSHg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bK3FgwlVHpInqqXb1tfRVzdG0w4h/8caBQHKibGLp9Yue6taKDQcGtZvVbFMpsXhQVUxk0zU7zfi3dzkOFPNGjg1FXhEvuzZ7YCMS1qOUZ4PLIar81/oRXV1l9JyFq4lOFtoFnIOriLDTEovXOrMtiKwiyyd0eqNmZBKz3YUfpdK4yYjUgYOhQqSws0W6sYaCUPlcSWRi7KbFNUtplDVxWnUi4+cWopDFfoTG+vhowSNwBfLTgJmQI/VhEUjCzN9FtODi20EnKEQhM//iIHYjCKT2tjCRBu+WQTWEm1Ew0dQOWgj1qtpECPzyW7YHSbRAyvrMQhCdYwuFoD3w9igE8axCHObHqxDEh7VqeRgc8PprnsHRmpgakWEcgRkgR3X+OAZ65hKK+NxMLRuDs7bxUcStJ+TBbUYSmAGKVEdBY6BoUqGYHUUIBDTgDGMkPGlXh5pYNO5ClO6ZC+Rmtr/uz0gr9sUJKnSCsUC4+Add2ukKr0SbD+gnF+fgdPWwT6sbrPjXJSyibU/iFNFMYUhtInd5rtPnrN3UZjhqszDXyG5gCTagBOd5GT2DsAq9Um3JRel2uagD+Zwtr5InuLlO7/blbl+iJsPkid4hrvbEVfWfrjieT+/qVxAKH01AbEbVpd+79Kd9FG86vr8I7q5JSFSb7c0Fv6ovy+qi3/ato3SbsXuHMkKN+LozgkeY7GJErLhL16B62tmeN4Tgr3ALwrf7JlqFnIi+I2ixn15GoLrYWjQ0+vLoJ8LwJnn94/8Dm4tzFEYPAQA= + + + dbo + + \ No newline at end of file diff --git a/Step.Database/Step.Database.csproj b/Step.Database/Step.Database.csproj index 18d676e8..ea54380b 100644 --- a/Step.Database/Step.Database.csproj +++ b/Step.Database/Step.Database.csproj @@ -73,15 +73,16 @@ + - - - 201808031122175_InitMigration.cs + + + 201809181022557_InitMigration.cs @@ -117,8 +118,8 @@ - - 201808031122175_InitMigration.cs + + 201809181022557_InitMigration.cs diff --git a/Step.Model/Constants.cs b/Step.Model/Constants.cs index 578e4f7d..9eb665f6 100644 --- a/Step.Model/Constants.cs +++ b/Step.Model/Constants.cs @@ -7,7 +7,10 @@ namespace Step.Model public static class Constants { public static readonly string[] VALID_FILE_EXTENSIONS = { "", ".txt", ".cnc", ".ini", ".mpf", ".spf" }; - public const double EPSILON = 0.001; + public static readonly string[] VALID_IMAGE_EXTENSIONS = { ".jpg", ".jpeg", ".png" }; + public const double EPSILON = 0.001; + public static string QUEUE_FILE_NAME = "pp"; + public enum ROLE_IDS { @@ -202,7 +205,8 @@ namespace Step.Model // File paths public const string MAINTENANCE_ATTACHMENT_PATH = "C:\\CMS\\STEP\\attachment\\"; - public const string TEMP_FILE = @"C:/CMS/STEP/tmp/pp/"; - public const string PART_PRG_IMAGES = @"C:/CMS/STEP/pp_img/"; + public const string TEMP_FILE = @"C:\CMS\STEP\tmp\pp\"; + public const string QUEUE_TMP_FILE = @"C:\CMS\STEP\tmp\pp\queue\"; + public const string PART_PRG_IMAGES = @"C:\CMS\STEP\pp_img/"; } } diff --git a/Step.Model/DTOModels/DTOProcessDataModel.cs b/Step.Model/DTOModels/DTOProcessDataModel.cs index 69df1634..739fcffe 100644 --- a/Step.Model/DTOModels/DTOProcessDataModel.cs +++ b/Step.Model/DTOModels/DTOProcessDataModel.cs @@ -6,14 +6,16 @@ namespace Step.Model.DTOModels { public class DTOProcessesDataModel { - public bool isRunning; - public ushort selectedProcess; - public byte selectedAxis; + public bool IsRunning; + public ushort SelectedProcess; + public byte SelectedAxis; + public QUEUE_STATUS QueueStatus; + public bool StartStopQueueEnabled; public List processes; public DTOProcessesDataModel() { - isRunning = false; + IsRunning = false; processes = new List(); } @@ -24,12 +26,12 @@ namespace Step.Model.DTOModels if (item == null) return false; - if (isRunning != item.isRunning) + if (IsRunning != item.IsRunning) return false; - if (selectedProcess != item.selectedProcess) + if (SelectedProcess != item.SelectedProcess) return false; - if (selectedAxis != item.selectedAxis) + if (SelectedAxis != item.SelectedAxis) return false; // If the numbers of the list's elemets are different, lists are different if (item.processes.Count != processes.Count) @@ -39,6 +41,12 @@ namespace Step.Model.DTOModels if (!listAreEquals) return false; + if (QueueStatus != item.QueueStatus) + return false; + + if (StartStopQueueEnabled != item.StartStopQueueEnabled) + return false; + return true; } diff --git a/Step.Model/DatabaseModels/MaintenanceModel.cs b/Step.Model/DatabaseModels/MaintenanceModel.cs index a321a31d..7d068800 100644 --- a/Step.Model/DatabaseModels/MaintenanceModel.cs +++ b/Step.Model/DatabaseModels/MaintenanceModel.cs @@ -10,7 +10,7 @@ namespace Step.Model.DatabaseModels public class MaintenanceModel { [Key] - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [DatabaseGenerated(DatabaseGeneratedOption.None)] [Column("id")] public int MaintenanceId { get; set; } diff --git a/Step.Model/DatabaseModels/QueueItemsModel.cs b/Step.Model/DatabaseModels/QueueItemsModel.cs new file mode 100644 index 00000000..62b7a529 --- /dev/null +++ b/Step.Model/DatabaseModels/QueueItemsModel.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Step.Model.DatabaseModels +{ + [Table("queue")] + public class QueueItemsModel + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + [Column("id", Order = 0)] + public int Id { get; set; } + + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.None)] + [Column("process", Order = 1)] + public int Process { get; set; } + + [Column("part_program_name")] + public string PartProgramName { get; set; } + + [Column("reps")] + public int Reps { get; set; } + + [Column("remaining_reps")] + public int RemainingReps { get; set; } + + [Column("absolute_path")] + public string AbsolutePath { get; set; } + + [Column("status")] + public int Status { get; set; } + } +} diff --git a/Step.Model/Step.Model.csproj b/Step.Model/Step.Model.csproj index c222adf1..7f1db5d4 100644 --- a/Step.Model/Step.Model.csproj +++ b/Step.Model/Step.Model.csproj @@ -82,6 +82,7 @@ + DtsGenerator RoleModel.cs.d.ts diff --git a/Step.NC/NcHandler.cs b/Step.NC/NcHandler.cs index 51cb8fd0..04180c34 100644 --- a/Step.NC/NcHandler.cs +++ b/Step.NC/NcHandler.cs @@ -18,16 +18,14 @@ using System.Linq; using static CMS_CORE_Library.DataStructures; using static Step.Config.ServerConfig; using static Step.Model.Constants; +using static Step.Database.Controllers.QueueController; namespace Step.NC { public class NcHandler : IDisposable { public Nc numericalControl; - - public static Dictionary> PartProgramQueue = new Dictionary>(); - private static int QueueRunningIndex = 0; - + public NcHandler() { // Choose NC @@ -80,7 +78,47 @@ namespace Step.NC public CmsError GetFileInfo(string path, out InfoFile fileInfo) { fileInfo = new InfoFile(); - return numericalControl.FILES_RGetFileInfo(path, ref fileInfo); + + if (File.Exists(path)) + return GetQueueFileInfo(path, out fileInfo); + else + return numericalControl.FILES_RGetFileInfo(path, ref fileInfo); + } + + public CmsError GetQueueFileInfo(string path, out InfoFile fileInfo) + { + FileInfo fileData = new FileInfo(path); + StreamReader fileRead = new StreamReader(path); + int count = 0; + string line = ""; + + fileInfo = new InfoFile() + { + Name = fileData.Name, + CreationDate = fileData.CreationTime, + LastModDate = fileData.LastAccessTime, + AbsolutePath = path + }; + + fileInfo.Content = new List(); + while ((line = fileRead.ReadLine()) != null && count < 10) + { + fileInfo.Content.Add(line); + count++; + } + fileRead.Close(); + + foreach (string ext in VALID_IMAGE_EXTENSIONS) + { + string imagePath = IMAGES_PATH + "/" + fileInfo.Name + ext; + if (File.Exists(imagePath)) + { + fileInfo.PreviewBase64 = "data:image/" + ext + ";base64," + Convert.ToBase64String(File.ReadAllBytes(imagePath)); + break; + } + } + + return NO_ERROR; } public CmsError GetActiveProgramInfo(out DTOActiveProgramDataModel dtoData) @@ -182,15 +220,13 @@ namespace Step.NC return numericalControl.FILES_WSetActiveProgram(selectedProcess, newFilePath, ref programData); } - public CmsError UploadPartProgramAddToQueue(string localPath, string fileName, int reps, out DTOQueueModel queueItem) + public CmsError UploadPartProgramAndAddToQueue(string localPath, string fileName, int reps, out DTOQueueModel queueItem) { queueItem = new DTOQueueModel(); - // Upload to NC - CmsError cmsError = UploadPartProgram(localPath, fileName, out string newFilePath); - + // Get selectedProcess id ushort selectedProcess = 0; - cmsError = numericalControl.PROC_RSelectedProcess(ref selectedProcess); + CmsError cmsError = numericalControl.PROC_RSelectedProcess(ref selectedProcess); if (cmsError.IsError()) return cmsError; @@ -199,7 +235,7 @@ namespace Step.NC PartProgramName = fileName, Reps = reps, RemainingReps = reps, - AbsolutePath = newFilePath, + AbsolutePath = localPath + fileName, Status = QUEUE_ITEM_STATUS.NOT_ACTIVE }; @@ -212,111 +248,142 @@ namespace Step.NC // Add new process to PartProgramQueue[selectedProcess].Add(queueItem); + + using (QueueController queueController = new QueueController()) + { + queueController.UpdateQueue(); + } + return cmsError; } - public CmsError UpdateAndGetPPQueue(out List queueList) + public CmsError UpdateQueue() + { + // Get selectedProcess id + List queueData = new List(); + + CmsError cmsError = numericalControl.FILES_RQueueData(ref queueData); + + foreach(var item in queueData) + { + if (!QueueRunningIndexes.ContainsKey(item.ProcessId)) + QueueRunningIndexes.Add(item.ProcessId, 0); + + if (item.LoadNextProgram) + { + // Check if there is already a pp queue for the selected process + if (PartProgramQueue.ContainsKey(item.ProcessId)) + { + // Check if runnig exist + if (PartProgramQueue[item.ProcessId].ElementAtOrDefault(QueueRunningIndexes[item.ProcessId]) != null) + { + var actualItem = PartProgramQueue[item.ProcessId][QueueRunningIndexes[item.ProcessId]]; + // Check if there are remaining reps before change part program + if (actualItem.RemainingReps > 1) + actualItem.RemainingReps -= 1; + else + { + // Set as finished + actualItem.RemainingReps = 0; + actualItem.Status = QUEUE_ITEM_STATUS.FINISHED; + if (PartProgramQueue[item.ProcessId].ElementAtOrDefault(QueueRunningIndexes[item.ProcessId] + 1) != null) + // if next part program exists, set next pp as current pp + QueueRunningIndexes[item.ProcessId] += 1; + + // Change part program + cmsError = numericalControl + .FILES_WLoadNextPartProgram( + PartProgramQueue[item.ProcessId][QueueRunningIndexes[item.ProcessId]].AbsolutePath, + QUEUE_FILE_NAME + ); + + if (cmsError.IsError()) + return cmsError; + } + } + } + } + + // Check if queue exists for the process + if (PartProgramQueue.ContainsKey(item.ProcessId) && PartProgramQueue[item.ProcessId].ElementAtOrDefault(QueueRunningIndexes[item.ProcessId]) != null) + { + // Set status based on queue status + if (item.Status == QUEUE_STATUS.RUNNING || item.Status == QUEUE_STATUS.CLOSING) + PartProgramQueue[item.ProcessId][QueueRunningIndexes[item.ProcessId]].Status = QUEUE_ITEM_STATUS.RUNNING; + + if (item.Status == QUEUE_STATUS.NOT_ACTIVE) + PartProgramQueue[item.ProcessId][QueueRunningIndexes[item.ProcessId]].Status = QUEUE_ITEM_STATUS.NOT_ACTIVE; + + if (item.Status == QUEUE_STATUS.WAITING_OPERATOR) + PartProgramQueue[item.ProcessId][QueueRunningIndexes[item.ProcessId]].Status = QUEUE_ITEM_STATUS.WAITING_OPERATOR; + } + } + // Update data + using (QueueController queueController = new QueueController()) + { + queueController.UpdateQueue(); + } + + return NO_ERROR; + } + + public CmsError GetSelectedProcessQueue(out List queueList) { queueList = new List(); - // Get selectedProcess id + // Get selected process ushort selectedProcess = 0; CmsError cmsError = numericalControl.PROC_RSelectedProcess(ref selectedProcess); if (cmsError.IsError()) return cmsError; - QueueStatusModel queueData = new QueueStatusModel(); - - cmsError = numericalControl.FILES_RQueueData(ref queueData); - - if (queueData.LoadNextProgram) - { - // Check if there is already a pp queue for the selected process - if (PartProgramQueue.ContainsKey(selectedProcess)) - { - // Check if runnig exist - if (PartProgramQueue[selectedProcess].ElementAtOrDefault(QueueRunningIndex) != null) - { - var actualItem = PartProgramQueue[selectedProcess][QueueRunningIndex]; - // Check if there are remaining reps before change part program - if (actualItem.RemainingReps > 1) - actualItem.RemainingReps -= 1; - else - { - // Set as finished - actualItem.RemainingReps = 0; - actualItem.Status = QUEUE_ITEM_STATUS.FINISHED; - if (PartProgramQueue[selectedProcess].ElementAtOrDefault(QueueRunningIndex + 1) != null) - // if next part program exists, set next pp as current pp - QueueRunningIndex += 1; - - // Change part program - } - } - } - } - - // Set status - if (PartProgramQueue.ContainsKey(selectedProcess) && PartProgramQueue[selectedProcess].ElementAtOrDefault(QueueRunningIndex) != null) - { - if (queueData.Status == QUEUE_STATUS.RUNNING || queueData.Status == QUEUE_STATUS.CLOSING) - PartProgramQueue[selectedProcess][QueueRunningIndex].Status = QUEUE_ITEM_STATUS.RUNNING; - - if (queueData.Status == QUEUE_STATUS.NOT_ACTIVE) - PartProgramQueue[selectedProcess][QueueRunningIndex].Status = QUEUE_ITEM_STATUS.NOT_ACTIVE; - - if (queueData.Status == QUEUE_STATUS.WAITING_OPERATOR) - PartProgramQueue[selectedProcess][QueueRunningIndex].Status = QUEUE_ITEM_STATUS.WAITING_OPERATOR; - - } - - return GetProcessQueue(selectedProcess, out queueList); - } - - public CmsError GetProcessQueue(int processId, out List queueList) - { queueList = new List(); // Check if there is already a pp queue - if (!PartProgramQueue.ContainsKey(processId)) + if (!PartProgramQueue.ContainsKey(selectedProcess)) return INCORRECT_PARAMETERS_ERROR; // Add new process to - queueList = PartProgramQueue[processId]; + queueList = PartProgramQueue[selectedProcess]; return NO_ERROR; } - public CmsError SwapQueueItems(int processId, int item1Index, int item2Index) + //public CmsError SwapQueueItems(int processId, int item1Index, int item2Index) + //{ + // item1Index = item1Index - 1; + // item2Index = item2Index - 1; + + // // Check if there is a queue + // if (!PartProgramQueue.ContainsKey(processId)) + // return INCORRECT_PARAMETERS_ERROR; + // // Check if items exists + // if (PartProgramQueue[processId].ElementAtOrDefault(item1Index) == null || PartProgramQueue[processId].ElementAtOrDefault(item2Index) == null) + // return INCORRECT_PARAMETERS_ERROR; + + // // Create a item + // DTOQueueModel tmp = PartProgramQueue[processId][item1Index]; + + // // Swap item 1 with 2 + // PartProgramQueue[processId][item1Index] = PartProgramQueue[processId][item2Index]; + // // Swap 2 with tmp + // PartProgramQueue[processId][item2Index] = tmp; + + // // Swap ids + // PartProgramQueue[processId][item2Index].Id = item2Index + 1; + // // Swap 2 with tmp + // PartProgramQueue[processId][item1Index].Id = item1Index + 1; + + // return NO_ERROR; + //} + + public CmsError MoveQueueItems(int processId, int itemId, int newIndex, out List queue) { - item1Index = item1Index - 1; - item2Index = item2Index - 1; + itemId = itemId - 1; - // Check if there is a queue - if (!PartProgramQueue.ContainsKey(processId)) - return INCORRECT_PARAMETERS_ERROR; - // Check if items exists - if (PartProgramQueue[processId].ElementAtOrDefault(item1Index) == null || PartProgramQueue[processId].ElementAtOrDefault(item2Index) == null) - return INCORRECT_PARAMETERS_ERROR; - - // Create a item - DTOQueueModel tmp = PartProgramQueue[processId][item1Index]; - - // Swap item 1 with 2 - PartProgramQueue[processId][item1Index] = PartProgramQueue[processId][item2Index]; - // Swap 2 with tmp - PartProgramQueue[processId][item2Index] = tmp; - - // Swap ids - PartProgramQueue[processId][item2Index].Id = item2Index + 1; - // Swap 2 with tmp - PartProgramQueue[processId][item1Index].Id = item1Index + 1; - - return NO_ERROR; - } - - public CmsError MoveQueueItems(int processId, int oldIndex, int newIndex, out List queue) - { - oldIndex = oldIndex - 1; - newIndex = newIndex - 1; + // Update queue running index + if (itemId < QueueRunningIndexes[processId] && newIndex >= QueueRunningIndexes[processId]) + QueueRunningIndexes[processId] -= 1; + if (newIndex <= QueueRunningIndexes[processId] && itemId > QueueRunningIndexes[processId]) + QueueRunningIndexes[processId] += 1; queue = new List(); @@ -324,18 +391,21 @@ namespace Step.NC if (!PartProgramQueue.ContainsKey(processId)) return INCORRECT_PARAMETERS_ERROR; // Check if items exists - if (PartProgramQueue[processId].ElementAtOrDefault(oldIndex) == null) + if (PartProgramQueue[processId].ElementAtOrDefault(itemId) == null) return INCORRECT_PARAMETERS_ERROR; - var item = PartProgramQueue[processId][oldIndex]; + var item = PartProgramQueue[processId][itemId]; // Remove item in the old positions - PartProgramQueue[processId].RemoveAt(oldIndex); + PartProgramQueue[processId].RemoveAt(itemId); // Add in the new position PartProgramQueue[processId].Insert(newIndex, item); - // Insert new ids + // Fix new ids for (int i = 0; i < PartProgramQueue[processId].Count(); i++) PartProgramQueue[processId][i].Id = i + 1; + + using (QueueController queueController = new QueueController()) + queueController.UpdateQueueIdsAndSave(processId); queue = PartProgramQueue[processId]; @@ -361,10 +431,14 @@ namespace Step.NC model = PartProgramQueue[processId][itemIndex]; + // Update database + using (QueueController queueController = new QueueController()) + queueController.UpdateReps(processId, itemIndex, reps); + return NO_ERROR; } - public CmsError RemoveFromQueue(int id, int processId) + public CmsError RemoveFromQueue(int processId, int id) { // Check if there is a queue if (PartProgramQueue.ContainsKey(processId)) @@ -378,6 +452,11 @@ namespace Step.NC PartProgramQueue[processId].Remove(tmpQueueItem); } + // Update database data + using (QueueController queueController = new QueueController()) + queueController.UpdateQueueIdsAndSave(processId); + + return NO_ERROR; } @@ -385,22 +464,23 @@ namespace Step.NC { // Check if there is a queue if (PartProgramQueue.ContainsKey(processId)) - { PartProgramQueue[processId] = new List(); - } + + // Update db + using (QueueController queueController = new QueueController()) + queueController.UpdateQueue(); return NO_ERROR; } public CmsError StartWorkingQueue(int processId) { - - return NO_ERROR; + return numericalControl.FILES_WStartQueue(); } public CmsError StopWorkingQueue(int processId) { - return NO_ERROR; + return numericalControl.FILES_WStopQueue(); } #endregion File manager @@ -671,22 +751,34 @@ namespace Step.NC Visible = tmpProcPP.Visible }); - if (tmpProcPP.IsSelected && processesData.selectedProcess == 0) // TODO remove with multi-process - processesData.selectedProcess = (ushort)tmpProcPP.Id; + if (tmpProcPP.IsSelected && processesData.SelectedProcess == 0) // TODO remove with multi-process + processesData.SelectedProcess = (ushort)tmpProcPP.Id; // Check if there are running process - if (!processesData.isRunning) + if (!processesData.IsRunning) { // Get process status cmsError = numericalControl.PROC_RStatus(i, ref status); if (status == PROC_STATUS.RUN || status == PROC_STATUS.HOLD) - processesData.isRunning = true; + processesData.IsRunning = true; else status = PROC_STATUS.IDLE; } } // Read selected axes - cmsError = numericalControl.AXES_RSelectedAxis(ref processesData.selectedAxis); + cmsError = numericalControl.AXES_RSelectedAxis(ref processesData.SelectedAxis); + if (cmsError.IsError()) + return cmsError; + + QueueStatusModel queueStatus = new QueueStatusModel(); + // Get queue data + cmsError = numericalControl.FILES_RQueueDataByProcess(ref queueStatus, processesData.SelectedProcess); + if (cmsError.IsError()) + return cmsError; + + // Set data + processesData.QueueStatus = queueStatus.Status; + processesData.StartStopQueueEnabled = queueStatus.StartStopQueueEnabled; return cmsError; } @@ -1171,7 +1263,7 @@ namespace Step.NC config = new ToolTableConfiguration(); CmsError cmsError = numericalControl.TOOLS_RConfiguration(ref config); - if (NcConfig.NcVendor != NC_VENDOR.SIEMENS && NcConfig.NcVendor != NC_VENDOR.DEMO) + if (NcConfig.NcVendor != NC_VENDOR.SIEMENS) { config.FamilyOptionActive = true; config.MultitoolOptionActive = true; @@ -1181,6 +1273,7 @@ namespace Step.NC { config.MultitoolOptionActive = false; categories.Add("shankType"); + config.ToolsConfiguration = config.ToolsConfiguration.Where(x => !(x.Name == "shankId")).ToList(); } if (!ToolManagerConfig.FamilyOpt) @@ -1340,6 +1433,12 @@ namespace Step.NC return numericalControl.NC_WLanguage(language); } + public CmsError SetActiveScreen(short screen) + { + // Set to true power on data by id + return numericalControl.NC_SetScreenVisible((Nc.SCREEN_PAGE) screen); + } + #endregion Write data #region Siemens Tools @@ -1514,16 +1613,28 @@ namespace Step.NC return cmsError; } - public DTONcToolModel AddTool(DTONewNcToolModel tool) + public CmsError AddTool(DTONewNcToolModel tool, out DTONcToolModel dtoTool) { + dtoTool = new DTONcToolModel(); + using (NcToolManagerController toolsManager = new NcToolManagerController()) { DbNcToolModel ncTool = toolsManager.AddTool(tool); - DTONcToolModel dtoTool = new DTONcToolModel(); + + if (!ToolManagerConfig.OffsetOpt) + { + CmsError cmsError = UpdateToolOffsetId(ncTool.ToolId, 1, ncTool.ToolId, out DTONcToolModel toolWithOffset); + if (cmsError.IsError()) + return cmsError; + + ncTool.OffsetId1 = ncTool.ToolId; + } + GetToolData(ncTool, ref dtoTool); - return dtoTool; + + return NO_ERROR; } } @@ -1640,7 +1751,7 @@ namespace Step.NC return cmsError; } - // Update tool + // R tool cmsError = UpdateNcTools(toolsManager); } } diff --git a/Step.Utils/languages/IT.xml b/Step.Utils/languages/IT.xml index f5f5b01a..341e01cc 100644 --- a/Step.Utils/languages/IT.xml +++ b/Step.Utils/languages/IT.xml @@ -52,10 +52,10 @@ Numero di processi Cn: Time-Stamp Cn: Unità di misura Cn: - Versione Server Step: - Versione Core Step: - Versione Client Step: - Formato delle date Step: + Versione Server CMS-Active: + Versione Core CMS-Active: + Versione Client CMS-Active: + Formato delle date CMS-Active: Rpm @@ -340,6 +340,7 @@ Limite di Pre-Allarme Tipo Tagliente Lunghezza + Lunghezza Raggio Usura Lunghezza Usura Lunghezza diff --git a/Step.Utils/languages/en.xml b/Step.Utils/languages/en.xml index 0f894264..91e5105c 100644 --- a/Step.Utils/languages/en.xml +++ b/Step.Utils/languages/en.xml @@ -53,10 +53,10 @@ Nc Configured Processes: Nc Time-Stamp: Nc Unit measure: - Step Server Version: - Step Core Version: - Step Client Version: - Step Data Format: + CMS-Active Server Version: + CMS-Active Core Version: + CMS-Active Client Version: + CMS-Active Data Format: Rpm @@ -339,6 +339,7 @@ Pre-Alarm Limit Cutting-Edge Type Lenght + Lenght Radius Δ Lenght Δ Lenght diff --git a/Step.Utils/languages/zh.xml b/Step.Utils/languages/zh.xml index 678e9127..040e001b 100644 --- a/Step.Utils/languages/zh.xml +++ b/Step.Utils/languages/zh.xml @@ -53,9 +53,9 @@ 數控配置的過程: 數控時間戳: 數量單位測量: - Step 服務器版本: - Step 核心版本: - Step 客戶端版本: + CMS-Active 服務器版本: + CMS-Active 核心版本: + CMS-Active 客戶端版本: diff --git a/Step/Controllers/WebApi/NcApiController.cs b/Step/Controllers/WebApi/NcApiController.cs index 00c2783a..35d8f189 100644 --- a/Step/Controllers/WebApi/NcApiController.cs +++ b/Step/Controllers/WebApi/NcApiController.cs @@ -1,48 +1,63 @@ -using Step.Model.DTOModels; -using Step.NC; -using System; +using Step.Model.DTOModels; +using Step.NC; using System.Globalization; -using System.Web.Http; -using static CMS_CORE_Library.DataStructures; -using static Step.Model.Constants; - -namespace Step.Controllers.WebApi -{ - [RoutePrefix("api/nc")] - public class NcApiController : ApiController - { - [Route("generic_data"), HttpGet] - [WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.NC_DATA, Action = ACTIONS.READ)] - public IHttpActionResult GetNcGenericData() - { - using (NcHandler ncHandler = new NcHandler()) - { - ncHandler.Connect(); - CmsError libraryError = ncHandler.GetNcGenericData(out DTONcGenericDataModel genericData); - if (libraryError.IsError()) - if (libraryError.errorCode == CMS_ERROR_CODES.NOT_CONNECTED) - return Ok(genericData); - else - return BadRequest(libraryError.localizationKey); - - return Ok(genericData); - } - } - - [Route("active_language/{language}"), HttpPut] - [WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.USER_FUNCTIONS, Action = ACTIONS.WRITE)] - public IHttpActionResult SetActiveLanguage(string language) +using System.Web.Http; +using static CMS_CORE_Library.DataStructures; +using static Step.Model.Constants; + +namespace Step.Controllers.WebApi +{ + [RoutePrefix("api/nc")] + public class NcApiController : ApiController + { + [Route("generic_data"), HttpGet] + [WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.NC_DATA, Action = ACTIONS.READ)] + public IHttpActionResult GetNcGenericData() { - using (NcHandler ncHandler = new NcHandler()) - { - ncHandler.Connect(); + using (NcHandler ncHandler = new NcHandler()) + { + ncHandler.Connect(); + CmsError libraryError = ncHandler.GetNcGenericData(out DTONcGenericDataModel genericData); + if (libraryError.IsError()) + if (libraryError.errorCode == CMS_ERROR_CODES.NOT_CONNECTED) + return Ok(genericData); + else + return BadRequest(libraryError.localizationKey); + + return Ok(genericData); + } + } + + [Route("active_language/{language}"), HttpPut] + [WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.USER_FUNCTIONS, Action = ACTIONS.WRITE)] + public IHttpActionResult SetActiveLanguage(string language) + { + using (NcHandler ncHandler = new NcHandler()) + { + ncHandler.Connect(); CmsError libraryError = ncHandler.SetActiveLanguage(CultureInfo.CreateSpecificCulture(language)); if (libraryError.errorCode == CMS_ERROR_CODES.NOT_CONNECTED) - return BadRequest(); - else - return Ok(); + return BadRequest(); + else + return Ok(); } - } - } + } + + [Route("active_screen/{screen:int}"), HttpPut] + //[WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.USER_FUNCTIONS, Action = ACTIONS.WRITE)] + public IHttpActionResult SetActiveScreen(int screen) + { + using (NcHandler ncHandler = new NcHandler()) + { + ncHandler.Connect(); + CmsError libraryError = ncHandler.SetActiveScreen((short)screen); + + if (libraryError.errorCode == CMS_ERROR_CODES.NOT_CONNECTED) + return BadRequest(); + else + return Ok(); + } + } + } } \ No newline at end of file diff --git a/Step/Controllers/WebApi/NcFileController.cs b/Step/Controllers/WebApi/NcFileController.cs index b4243b74..e96cba39 100644 --- a/Step/Controllers/WebApi/NcFileController.cs +++ b/Step/Controllers/WebApi/NcFileController.cs @@ -181,7 +181,7 @@ namespace Step.Controllers.WebApi { ncHandler.Connect(); - File.WriteAllBytes(TEMP_FILE + item.FileName, item.Data); + File.WriteAllBytes(QUEUE_TMP_FILE + item.FileName, item.Data); // Get reps var repsParam = formItems.Where(x => x.ParameterName == "reps").FirstOrDefault(); @@ -189,7 +189,7 @@ namespace Step.Controllers.WebApi if (repsParam == null || !Int32.TryParse(repsParam.Value, out int reps)) return BadRequest(); - CmsError cmsError = ncHandler.UploadPartProgramAddToQueue(TEMP_FILE, item.FileName, reps, out queueItem); + CmsError cmsError = ncHandler.UploadPartProgramAndAddToQueue(QUEUE_TMP_FILE, item.FileName, reps, out queueItem); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); } @@ -224,21 +224,23 @@ namespace Step.Controllers.WebApi { using (NcHandler ncHandler = new NcHandler()) { - CmsError cmsError = ncHandler.MoveQueueItems(processId, itemsPositions.OldPosition, itemsPositions.NewPosition, out List queue); + CmsError cmsError = ncHandler.MoveQueueItems(processId, itemsPositions.ObjectId, itemsPositions.NewPosition, out List queue); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); - return Ok(queue); } } - [Route("queue/{processId:int}/edit/{positionId:int}"), HttpPut] - public IHttpActionResult EditQueueItem(int processId, int positionId, RepsModel reps) + [Route("queue/{processId:int}/edit/{itemId:int}"), HttpPut] + public IHttpActionResult EditQueueItem(int processId, int itemId, RepsModel reps) { using (NcHandler ncHandler = new NcHandler()) { - CmsError cmsError = ncHandler.EditQueueItemReps(processId, positionId, reps.Reps, out DTOQueueModel queueItem); + if (reps.Reps < 1) + return BadRequest(INCORRECT_PARAMETERS_ERROR.localizationKey); + + CmsError cmsError = ncHandler.EditQueueItemReps(processId, itemId, reps.Reps, out DTOQueueModel queueItem); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); @@ -246,7 +248,7 @@ namespace Step.Controllers.WebApi } } - [Route("queue/{processId:int}/empty"), HttpPut] + [Route("queue/{processId:int}/empty"), HttpDelete] public IHttpActionResult EmptyQueue(int processId) { using (NcHandler ncHandler = new NcHandler()) @@ -264,9 +266,11 @@ namespace Step.Controllers.WebApi { using (NcHandler ncHandler = new NcHandler()) { + ncHandler.Connect(); + CmsError cmsError = ncHandler.StartWorkingQueue(processId); if (cmsError.IsError()) - return BadRequest(cmsError.localizationKey); + return BadRequest(cmsError.localizationKey); return Ok(); } @@ -277,6 +281,8 @@ namespace Step.Controllers.WebApi { using (NcHandler ncHandler = new NcHandler()) { + ncHandler.Connect(); + CmsError cmsError = ncHandler.StopWorkingQueue(processId); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); @@ -287,7 +293,7 @@ namespace Step.Controllers.WebApi public class MoveItems { - public int OldPosition; + public int ObjectId; public int NewPosition; } diff --git a/Step/Controllers/WebApi/NcToolManagerController.cs b/Step/Controllers/WebApi/NcToolManagerController.cs index f24213a4..de913354 100644 --- a/Step/Controllers/WebApi/NcToolManagerController.cs +++ b/Step/Controllers/WebApi/NcToolManagerController.cs @@ -116,7 +116,9 @@ namespace Step.Controllers.WebApi ncHandler.Connect(); // Add tool - DTONcToolModel newTool = ncHandler.AddTool(dtoToolWithFamily); + CmsError cmsError = ncHandler.AddTool(dtoToolWithFamily, out DTONcToolModel newTool); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); return Ok(CreateToolAndFamilyObj(newTool, dtoToolWithFamily)); } diff --git a/Step/Properties/AssemblyInfo.cs b/Step/Properties/AssemblyInfo.cs index baf4d843..ef6ebaa6 100644 --- a/Step/Properties/AssemblyInfo.cs +++ b/Step/Properties/AssemblyInfo.cs @@ -5,11 +5,11 @@ using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("Step")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyTitle("CMS Active")] +[assembly: AssemblyDescription("CMS Active - Main HMI for CMS Machines")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Step")] +[assembly: AssemblyCompany("CMS S.P.A.")] +[assembly: AssemblyProduct("CMS Active")] [assembly: AssemblyCopyright("Copyright © 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/Step/Step.csproj b/Step/Step.csproj index 45a522c4..da17de68 100644 --- a/Step/Step.csproj +++ b/Step/Step.csproj @@ -1,404 +1,404 @@ - - - - - - - - Debug - AnyCPU - - - 2.0 - {AFED34E1-77DB-4D81-830A-A8D0A190573D} - WinExe - Properties - Step - Step - v4.6.2 - - - Latest - true - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - false - true - - - true - pdbonly - true - bin\ - TRACE - prompt - 4 - - - - ..\Libs\CMS_CORE_Library.dll - - - ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll - - - ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll - - - ..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.dll - - - ..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.Design.dll - - - ..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.Fonts.dll - - - ..\packages\Microsoft.AspNet.SignalR.Core.2.2.2\lib\net45\Microsoft.AspNet.SignalR.Core.dll - - - ..\packages\Microsoft.AspNet.SignalR.SystemWeb.2.2.2\lib\net45\Microsoft.AspNet.SignalR.SystemWeb.dll - - - ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll - - - - ..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll - - - ..\packages\Microsoft.Owin.Cors.3.1.0\lib\net45\Microsoft.Owin.Cors.dll - - - ..\packages\Microsoft.Owin.FileSystems.3.1.0\lib\net45\Microsoft.Owin.FileSystems.dll - - - ..\packages\Microsoft.Owin.Host.HttpListener.3.1.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll - - - ..\packages\Microsoft.Owin.Host.SystemWeb.3.1.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll - - - ..\packages\Microsoft.Owin.Hosting.3.1.0\lib\net45\Microsoft.Owin.Hosting.dll - - - ..\packages\Microsoft.Owin.Security.3.1.0\lib\net45\Microsoft.Owin.Security.dll - - - ..\packages\Microsoft.Owin.Security.OAuth.3.1.0\lib\net45\Microsoft.Owin.Security.OAuth.dll - - - ..\packages\Microsoft.Owin.StaticFiles.3.1.0\lib\net45\Microsoft.Owin.StaticFiles.dll - - - ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - - - ..\packages\Owin.1.0\lib\net40\Owin.dll - - - ..\packages\Swashbuckle.Core.5.6.0\lib\net40\Swashbuckle.Core.dll - - - - - - ..\packages\Microsoft.AspNet.Cors.5.2.3\lib\net45\System.Web.Cors.dll - - - - - - - - ..\packages\Microsoft.AspNet.WebApi.Cors.5.2.3\lib\net45\System.Web.Http.Cors.dll - - - ..\packages\Microsoft.AspNet.WebApi.Owin.5.2.3\lib\net45\System.Web.Http.Owin.dll - - - - - - - - - - - - True - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - - - - ..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll - - - - - ..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll - - - ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll - - - False - ..\Libs\TeamDev.SDK.6.dll - - - False - ..\Libs\TeamDev.SDK.WPF.dll - - - ..\packages\WebActivatorEx.2.2.0\lib\net40\WebActivatorEx.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - App.config - - - App.config - - - - bower.json - - - - - - - style.css - - - compilerconfig.json - - - - - - - - - - - - - - compilerconfig.json - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {3f5c2483-fc87-43ef-92a8-66ff7d0e440f} - Step.Config - - - {de54ff4c-8390-4489-882a-1bc7d99ef185} - Step.Core - - - {357d5ee1-ffc8-489b-9232-22cf474d9a6f} - Step.Database - - - {631375dd-06d3-49bb-8130-d9ddb34c429d} - Step.Model - - - {b2366b08-96bd-4f6b-b748-b45089b87a14} - Step.NC - - - {20fc0937-e7ca-4693-95f9-7a948efd173b} - Step.UI - - - {cbeb631b-abfa-4042-9779-c0060b0dfefe} - Step.Utils - - - - - - - - - - - - - - - - - - - - - - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - Step.Application - - - Step_Icon.ico - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - + + + + + + + + Debug + AnyCPU + + + 2.0 + {AFED34E1-77DB-4D81-830A-A8D0A190573D} + WinExe + Properties + Step + CMS Active + v4.6.2 + + + Latest + true + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + false + true + + + true + pdbonly + true + bin\ + TRACE + prompt + 4 + + + + ..\Libs\CMS_CORE_Library.dll + + + ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll + + + ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll + + + ..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.dll + + + ..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.Design.dll + + + ..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.Fonts.dll + + + ..\packages\Microsoft.AspNet.SignalR.Core.2.2.2\lib\net45\Microsoft.AspNet.SignalR.Core.dll + + + ..\packages\Microsoft.AspNet.SignalR.SystemWeb.2.2.2\lib\net45\Microsoft.AspNet.SignalR.SystemWeb.dll + + + ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll + + + + ..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll + + + ..\packages\Microsoft.Owin.Cors.3.1.0\lib\net45\Microsoft.Owin.Cors.dll + + + ..\packages\Microsoft.Owin.FileSystems.3.1.0\lib\net45\Microsoft.Owin.FileSystems.dll + + + ..\packages\Microsoft.Owin.Host.HttpListener.3.1.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll + + + ..\packages\Microsoft.Owin.Host.SystemWeb.3.1.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll + + + ..\packages\Microsoft.Owin.Hosting.3.1.0\lib\net45\Microsoft.Owin.Hosting.dll + + + ..\packages\Microsoft.Owin.Security.3.1.0\lib\net45\Microsoft.Owin.Security.dll + + + ..\packages\Microsoft.Owin.Security.OAuth.3.1.0\lib\net45\Microsoft.Owin.Security.OAuth.dll + + + ..\packages\Microsoft.Owin.StaticFiles.3.1.0\lib\net45\Microsoft.Owin.StaticFiles.dll + + + ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll + + + ..\packages\Owin.1.0\lib\net40\Owin.dll + + + ..\packages\Swashbuckle.Core.5.6.0\lib\net40\Swashbuckle.Core.dll + + + + + + ..\packages\Microsoft.AspNet.Cors.5.2.3\lib\net45\System.Web.Cors.dll + + + + + + + + ..\packages\Microsoft.AspNet.WebApi.Cors.5.2.3\lib\net45\System.Web.Http.Cors.dll + + + ..\packages\Microsoft.AspNet.WebApi.Owin.5.2.3\lib\net45\System.Web.Http.Owin.dll + + + + + + + + + + + + True + ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + + + + + ..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll + + + + + ..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll + + + ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll + + + False + ..\Libs\TeamDev.SDK.6.dll + + + False + ..\Libs\TeamDev.SDK.WPF.dll + + + ..\packages\WebActivatorEx.2.2.0\lib\net40\WebActivatorEx.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + App.config + + + App.config + + + + bower.json + + + + + + + style.css + + + compilerconfig.json + + + + + + + + + + + + + + compilerconfig.json + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {3f5c2483-fc87-43ef-92a8-66ff7d0e440f} + Step.Config + + + {de54ff4c-8390-4489-882a-1bc7d99ef185} + Step.Core + + + {357d5ee1-ffc8-489b-9232-22cf474d9a6f} + Step.Database + + + {631375dd-06d3-49bb-8130-d9ddb34c429d} + Step.Model + + + {b2366b08-96bd-4f6b-b748-b45089b87a14} + Step.NC + + + {20fc0937-e7ca-4693-95f9-7a948efd173b} + Step.UI + + + {cbeb631b-abfa-4042-9779-c0060b0dfefe} + Step.Utils + + + + + + + + + + + + + + + + + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + Step.Application + + + Step_Icon.ico + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + --> \ No newline at end of file diff --git a/Step/wwwroot/assets/icons/_png/square-list-trash.png b/Step/wwwroot/assets/icons/_png/square-list-trash.png new file mode 100644 index 00000000..8b74762b Binary files /dev/null and b/Step/wwwroot/assets/icons/_png/square-list-trash.png differ diff --git a/Step/wwwroot/assets/icons/_png/trash.png b/Step/wwwroot/assets/icons/_png/trash.png new file mode 100644 index 00000000..d89c3c7a Binary files /dev/null and b/Step/wwwroot/assets/icons/_png/trash.png differ diff --git a/Step/wwwroot/assets/styles/base/card.less b/Step/wwwroot/assets/styles/base/card.less index 7d61f07c..bbbe83bf 100644 --- a/Step/wwwroot/assets/styles/base/card.less +++ b/Step/wwwroot/assets/styles/base/card.less @@ -834,13 +834,43 @@ } .card-element-queue{ - width: 352px; + width: 408px; height: 64px; display: flex; flex-flow: row; border-radius: 2px; background-color: @color-background-white; box-shadow: 0 1px 2px 0 @color-black-40; + &.border-green{ + border: solid 2px @color-apple-green; + .card-element-queue-right{ + .square-number{ + width: 112px; + } + } + } + &.border-blue{ + border: solid 2px @color-clear-blue; + } + &.border-orange{ + border: solid 2px @color-squash; + } + &.finished{ + border: none; + font-size: 18px; + .card-element-queue-name{ + color: @color-label-grey; + } + .card-element-queue-right{ + .square-number{ + width: 112px; + label{ + font-size: 25px; + color: @color-clear-blue; + } + } + } + } .card-element-queue-name{ width: 100%; display: flex; @@ -854,6 +884,7 @@ display: flex; align-items: center; justify-content: flex-end; + position: relative; .square-number{ width: 48px; height: 48px; @@ -874,6 +905,9 @@ } } } + .smooth-dnd-draggable-wrapper .element-queue:first-child{ + margin-top: 3px; + } .card-production-cms{ width: 1024px; @@ -989,6 +1023,75 @@ width: 100%; display: flex; flex-flow: column; + .queue-header{ + height: 64px; + width: 100%; + .tab-box { + height: 64px; + width: 100%; + background-color: @color-whitethree; + display: flex; + flex-direction: row; + border: none !important; + .tab { + flex-grow: 0; + flex-shrink: 0; + float: left !important; + width: 256px !important; + height: 100% !important; + margin: 0 !important; + padding: 0; + border: none !important; + border-right: solid 1px @color-label-grey !important; + background-color: @color-whitethree; + font-size: 18px !important; + line-height: 1 !important; + color: @color-greyish-brown !important; + position: relative; + &.plus { + border-right: none !important; + .btn { + float: left !important; + margin: 0; + width: 48px; + height: 48px; + position: absolute; + top: calc(~"50% - 24px"); + margin-left: 20px; + padding: 0; + .fa { + vertical-align: middle; + font-size: 21px; + } + } + } + } + .tab:last-child { + border-right: none !important; + } + .active { + background-color: @color-white; + border-top: solid 2px @color-clear-blue !important; + } + .tab-box-scroll { + width: 100%; + overflow-y: hidden; + overflow-x: auto; + display: flex; + flex-direction: row; + flex-basis: auto; + &::-webkit-scrollbar { + width: 5px; + height: 5px; + } + &::-webkit-scrollbar-thumb { + border-radius: 5px; + height: 1px; + background-color: rgba(0, 0, 0, 0.3); + } + } + } + } .queue-body{ height: calc(~'100% - 63px'); width: calc(~'100% - 16px'); @@ -996,13 +1099,14 @@ flex-flow: column; align-items: center; justify-content: flex-start; - margin: 16px 0 0 8px; + margin: 16px 0 0 4px; .element-queue{ display: flex; flex-flow: row; align-items: center; margin-bottom: 16px; - width: 400px; + width: 432px; + margin-right: 8px; label.number{ display: flex; height: 100%; @@ -1011,6 +1115,40 @@ color: @color-greyish-brown; } } + & .popup{ + position: absolute; + display: flex; + padding: 4px; + .edit-reps{ + width: 100%; + height: calc(~'100% - 26px');; + display: flex; + align-items: center; + justify-content: space-around; + } + // &:before { + // content: "\f0d8"; + // color: @color-silver; + // position: absolute; + // top: -26px; + // left: calc(~'50% - 10px'); + // font-family: 'fontawesome'; + // font-size: 38px; + // } + .group-button{ + width: 100%; + display: flex; + justify-content: flex-end; + .btn.btn-success.btn-small{ + height: 26px; + font-size: 12px; + } + } + input{ + width: 50px; + height: 30px; + } + } } .queue-footer{ @@ -1058,6 +1196,7 @@ width: 502px; height: 768px; background-color: @color-background-white; + position: relative; .card-job-production-header{ height: 63px; width: 100%; @@ -1222,6 +1361,18 @@ } + .card-job-production-box-start{ + position: absolute; + z-index: 100; + width: 100%; + height: 100%; + top: 0; + background-color: rgba(255, 255, 255, 0.95); + display: flex; + align-items: center; + justify-content: center; + } + .card-production-section-file{ width: 400px; diff --git a/Step/wwwroot/assets/styles/base/layout.less b/Step/wwwroot/assets/styles/base/layout.less index 23d2b3f7..6d49049d 100644 --- a/Step/wwwroot/assets/styles/base/layout.less +++ b/Step/wwwroot/assets/styles/base/layout.less @@ -1,6 +1,7 @@ // out: false, sourceMap: false, main: ../style.less @import "colors.less"; @import "modals.less"; +@import "popups.less"; @import "grid-system.less"; @import "input.less"; @import "buttons.less"; diff --git a/Step/wwwroot/assets/styles/base/modals.less b/Step/wwwroot/assets/styles/base/modals.less index 66f6939d..de5b2987 100644 --- a/Step/wwwroot/assets/styles/base/modals.less +++ b/Step/wwwroot/assets/styles/base/modals.less @@ -798,7 +798,7 @@ } } -.@{modal}.modal-load-program { +.@{modal}.modal-load-program, .@{modal}.modal-add-element-queue { width: @modal-load-program-width; height: @modal-load-program-height; top: calc(~"50%" - @modal-load-program-height / 2); @@ -830,7 +830,7 @@ color: #fff; } } - .modal-load-program-header { + .modal-load-program-header, .modal-add-element-queue-header { height: 80px; width: 100%; display: flex; @@ -878,7 +878,7 @@ } } } - .modal-load-program-body { + .modal-load-program-body, .modal-add-element-queue-body { height: 631px; width: 100%; display: flex; @@ -1134,7 +1134,7 @@ } } } - .modal-load-program-footer { + .modal-load-program-footer, .modal-add-element-queue-footer { height: 79px; width: 100%; display: flex; diff --git a/Step/wwwroot/assets/styles/base/popups.less b/Step/wwwroot/assets/styles/base/popups.less new file mode 100644 index 00000000..74df2ae3 --- /dev/null +++ b/Step/wwwroot/assets/styles/base/popups.less @@ -0,0 +1,111 @@ +// out: false, sourceMap: false, main: ../style.less + +@import "colors.less"; +@import "fonts.less"; + +@popup: popup; + +.@{popup}{ + width: 288px; + height: 218px; + display: flex; + flex-flow: column; + background-color: @color-background-white; + z-index: 100; + header{ + height: 64px; + border-bottom: solid 2px @color-silver; + position: relative; + display: flex; + align-items: center; + font-size: 16px; + color: @color-darkish-blue; + padding-left: 16px; + button.close { + position: absolute; + width: 28px; + height: 28px; + border-radius: 50%; + border: none; + background-color: @color-background-white; + color: @color-darkish-blue; + top: calc(50% - 20px); + right: 14px; + font-size: 16px; + cursor: pointer; + } + button.close:active { + background-color: @color-clear-blue; + color: @color-white; + } + } + section.body{ + width: 100%; + height: calc(~'100% - 64px'); + } +} + +// .@{popup}.arrow-bottom::after, .@{popup}.arrow-top::after, .@{popup}.arrow-right::after, .@{popup}.arrow-left::after{ +// content: ""; +// position: absolute; +// border-width: 15px; +// border-style: solid; +// } + +// .@{popup}.arrow-bottom::after, .@{popup}.arrow-top::after{ +// left: 50%; +// margin-left: -15px; +// } + +// .@{popup}.arrow-right::after, .@{popup}.arrow-left::after{ +// top: 50%; +// margin-top: -15px; +// } + +// .@{popup}.arrow-bottom::after{ +// top: 100%; +// border-color: @color-silver transparent transparent transparent; +// } + +// .@{popup}.arrow-top::after{ +// bottom: 100%; +// border-color: transparent transparent @color-silver transparent; +// } + +// .@{popup}.arrow-right::after{ +// left: 100%; +// border-color: transparent transparent transparent @color-silver; +// } + +// .@{popup}.arrow-left::after{ +// right: 100%; +// border-color: transparent @color-silver transparent transparent; +// } + +.@{popup}.arrow-top { + border: 2px solid @color-clear-blue; +} + +.@{popup}.arrow-top::before { + content: ''; + display: block; + position: absolute; + left: 128px; + bottom: 100%; + width: 0; + height: 0; + border: 18px solid transparent; + border-bottom-color: @color-clear-blue; +} + +.@{popup}.arrow-top::after { + content: ''; + display: block; + position: absolute; + left: 130px; + bottom: 100%; + width: 0; + height: 0; + border: 16px solid transparent; + border-bottom-color: @color-background-white; +} \ No newline at end of file diff --git a/Step/wwwroot/assets/styles/style.css b/Step/wwwroot/assets/styles/style.css index e8b233c1..52b4dc3f 100644 --- a/Step/wwwroot/assets/styles/style.css +++ b/Step/wwwroot/assets/styles/style.css @@ -733,14 +733,16 @@ width: 100%; border: none; } -.modal.modal-load-program { +.modal.modal-load-program, +.modal.modal-add-element-queue { width: 1808px; height: 873px; top: calc(50% - 436.5px); left: calc(50% - 904px); background-color: #fff; } -.modal.modal-load-program header { +.modal.modal-load-program header, +.modal.modal-add-element-queue header { display: flex; align-items: center; padding-left: 24px; @@ -748,7 +750,8 @@ font-size: 20px; color: #002680; } -.modal.modal-load-program header button.close { +.modal.modal-load-program header button.close, +.modal.modal-add-element-queue header button.close { position: absolute; width: 28px; height: 28px; @@ -761,17 +764,24 @@ font-size: 16px; cursor: pointer; } -.modal.modal-load-program header button.close:active { +.modal.modal-load-program header button.close:active, +.modal.modal-add-element-queue header button.close:active { background-color: #1791ff; color: #fff; } -.modal.modal-load-program .modal-load-program-header { +.modal.modal-load-program .modal-load-program-header, +.modal.modal-add-element-queue .modal-load-program-header, +.modal.modal-load-program .modal-add-element-queue-header, +.modal.modal-add-element-queue .modal-add-element-queue-header { height: 80px; width: 100%; display: flex; flex-flow: column; } -.modal.modal-load-program .modal-load-program-header .box-search { +.modal.modal-load-program .modal-load-program-header .box-search, +.modal.modal-add-element-queue .modal-load-program-header .box-search, +.modal.modal-load-program .modal-add-element-queue-header .box-search, +.modal.modal-add-element-queue .modal-add-element-queue-header .box-search { width: 100%; height: 80px; display: flex; @@ -779,28 +789,46 @@ align-items: center; background-color: #979797; } -.modal.modal-load-program .modal-load-program-header .box-search .path { +.modal.modal-load-program .modal-load-program-header .box-search .path, +.modal.modal-add-element-queue .modal-load-program-header .box-search .path, +.modal.modal-load-program .modal-add-element-queue-header .box-search .path, +.modal.modal-add-element-queue .modal-add-element-queue-header .box-search .path { display: flex; flex-flow: row; color: #fff; margin-left: 20px; } -.modal.modal-load-program .modal-load-program-header .box-search .path .child { +.modal.modal-load-program .modal-load-program-header .box-search .path .child, +.modal.modal-add-element-queue .modal-load-program-header .box-search .path .child, +.modal.modal-load-program .modal-add-element-queue-header .box-search .path .child, +.modal.modal-add-element-queue .modal-add-element-queue-header .box-search .path .child { display: flex; flex-flow: row; } -.modal.modal-load-program .modal-load-program-header .box-search .path .child div + .fa.fa-chevron-right:first-child { +.modal.modal-load-program .modal-load-program-header .box-search .path .child div + .fa.fa-chevron-right:first-child, +.modal.modal-add-element-queue .modal-load-program-header .box-search .path .child div + .fa.fa-chevron-right:first-child, +.modal.modal-load-program .modal-add-element-queue-header .box-search .path .child div + .fa.fa-chevron-right:first-child, +.modal.modal-add-element-queue .modal-add-element-queue-header .box-search .path .child div + .fa.fa-chevron-right:first-child { display: none; } -.modal.modal-load-program .modal-load-program-header .box-search .path .child .fa { +.modal.modal-load-program .modal-load-program-header .box-search .path .child .fa, +.modal.modal-add-element-queue .modal-load-program-header .box-search .path .child .fa, +.modal.modal-load-program .modal-add-element-queue-header .box-search .path .child .fa, +.modal.modal-add-element-queue .modal-add-element-queue-header .box-search .path .child .fa { margin: 0px 22px; } -.modal.modal-load-program .modal-load-program-header .box-search .search { +.modal.modal-load-program .modal-load-program-header .box-search .search, +.modal.modal-add-element-queue .modal-load-program-header .box-search .search, +.modal.modal-load-program .modal-add-element-queue-header .box-search .search, +.modal.modal-add-element-queue .modal-add-element-queue-header .box-search .search { display: flex; width: 100%; justify-content: flex-end; } -.modal.modal-load-program .modal-load-program-header .box-search .search input { +.modal.modal-load-program .modal-load-program-header .box-search .search input, +.modal.modal-add-element-queue .modal-load-program-header .box-search .search input, +.modal.modal-load-program .modal-add-element-queue-header .box-search .search input, +.modal.modal-add-element-queue .modal-add-element-queue-header .box-search .search input { width: 688px; height: 48px; border-radius: 2px; @@ -808,28 +836,43 @@ border: solid 1px #dfdfdf; background-color: #f8f8f8; } -.modal.modal-load-program .modal-load-program-body { +.modal.modal-load-program .modal-load-program-body, +.modal.modal-add-element-queue .modal-load-program-body, +.modal.modal-load-program .modal-add-element-queue-body, +.modal.modal-add-element-queue .modal-add-element-queue-body { height: 631px; width: 100%; display: flex; flex-flow: row; } -.modal.modal-load-program .modal-load-program-body hr { +.modal.modal-load-program .modal-load-program-body hr, +.modal.modal-add-element-queue .modal-load-program-body hr, +.modal.modal-load-program .modal-add-element-queue-body hr, +.modal.modal-add-element-queue .modal-add-element-queue-body hr { width: 5%; } -.modal.modal-load-program .modal-load-program-body .first-column { +.modal.modal-load-program .modal-load-program-body .first-column, +.modal.modal-add-element-queue .modal-load-program-body .first-column, +.modal.modal-load-program .modal-add-element-queue-body .first-column, +.modal.modal-add-element-queue .modal-add-element-queue-body .first-column { min-width: 215px; border-right: solid 2px #e7e7e7; display: flex; flex-flow: column; padding-top: 19px; } -.modal.modal-load-program .modal-load-program-body .first-column .card-folder-path { +.modal.modal-load-program .modal-load-program-body .first-column .card-folder-path, +.modal.modal-add-element-queue .modal-load-program-body .first-column .card-folder-path, +.modal.modal-load-program .modal-add-element-queue-body .first-column .card-folder-path, +.modal.modal-add-element-queue .modal-add-element-queue-body .first-column .card-folder-path { width: 200px; display: flex; margin-top: 8px 0 8px 5px; } -.modal.modal-load-program .modal-load-program-body .second-column { +.modal.modal-load-program .modal-load-program-body .second-column, +.modal.modal-add-element-queue .modal-load-program-body .second-column, +.modal.modal-load-program .modal-add-element-queue-body .second-column, +.modal.modal-add-element-queue .modal-add-element-queue-body .second-column { height: calc(100% - 19px); min-width: 445px; border-right: solid 2px #e7e7e7; @@ -837,22 +880,34 @@ flex-flow: column; padding-top: 19px; } -.modal.modal-load-program .modal-load-program-body .second-column .content { +.modal.modal-load-program .modal-load-program-body .second-column .content, +.modal.modal-add-element-queue .modal-load-program-body .second-column .content, +.modal.modal-load-program .modal-add-element-queue-body .second-column .content, +.modal.modal-add-element-queue .modal-add-element-queue-body .second-column .content { width: 94%; height: 100%; } -.modal.modal-load-program .modal-load-program-body .second-column .content .card-folder-path { +.modal.modal-load-program .modal-load-program-body .second-column .content .card-folder-path, +.modal.modal-add-element-queue .modal-load-program-body .second-column .content .card-folder-path, +.modal.modal-load-program .modal-add-element-queue-body .second-column .content .card-folder-path, +.modal.modal-add-element-queue .modal-add-element-queue-body .second-column .content .card-folder-path { width: 371px; display: flex; margin-top: 8px 0 8px 8px; } -.modal.modal-load-program .modal-load-program-body .second-column .group-btn { +.modal.modal-load-program .modal-load-program-body .second-column .group-btn, +.modal.modal-add-element-queue .modal-load-program-body .second-column .group-btn, +.modal.modal-load-program .modal-add-element-queue-body .second-column .group-btn, +.modal.modal-add-element-queue .modal-add-element-queue-body .second-column .group-btn { display: flex; flex-flow: row; justify-content: center; margin-bottom: 16px; } -.modal.modal-load-program .modal-load-program-body .second-column .group-btn input { +.modal.modal-load-program .modal-load-program-body .second-column .group-btn input, +.modal.modal-add-element-queue .modal-load-program-body .second-column .group-btn input, +.modal.modal-load-program .modal-add-element-queue-body .second-column .group-btn input, +.modal.modal-add-element-queue .modal-add-element-queue-body .second-column .group-btn input { width: 360px; height: 48px; padding: 0; @@ -861,22 +916,34 @@ border: none; border-bottom: 1px solid rgba(0, 0, 0, 0.4); } -.modal.modal-load-program .modal-load-program-body .second-column .group-btn input[type="text"] { +.modal.modal-load-program .modal-load-program-body .second-column .group-btn input[type="text"], +.modal.modal-add-element-queue .modal-load-program-body .second-column .group-btn input[type="text"], +.modal.modal-load-program .modal-add-element-queue-body .second-column .group-btn input[type="text"], +.modal.modal-add-element-queue .modal-add-element-queue-body .second-column .group-btn input[type="text"] { padding-left: 5px; outline: none ; } -.modal.modal-load-program .modal-load-program-body .second-column .group-btn input:focus { +.modal.modal-load-program .modal-load-program-body .second-column .group-btn input:focus, +.modal.modal-add-element-queue .modal-load-program-body .second-column .group-btn input:focus, +.modal.modal-load-program .modal-add-element-queue-body .second-column .group-btn input:focus, +.modal.modal-add-element-queue .modal-add-element-queue-body .second-column .group-btn input:focus { border-bottom: 1px solid #1791ff; box-shadow: none; } -.modal.modal-load-program .modal-load-program-body .second-column .group-btn i { +.modal.modal-load-program .modal-load-program-body .second-column .group-btn i, +.modal.modal-add-element-queue .modal-load-program-body .second-column .group-btn i, +.modal.modal-load-program .modal-add-element-queue-body .second-column .group-btn i, +.modal.modal-add-element-queue .modal-add-element-queue-body .second-column .group-btn i { width: 44px; height: 44px; padding: 0; margin-top: 4px; color: #002680; } -.modal.modal-load-program .modal-load-program-body .third-column { +.modal.modal-load-program .modal-load-program-body .third-column, +.modal.modal-add-element-queue .modal-load-program-body .third-column, +.modal.modal-load-program .modal-add-element-queue-body .third-column, +.modal.modal-add-element-queue .modal-add-element-queue-body .third-column { height: calc(100% - 19px); min-width: 447px; border-right: solid 2px #e7e7e7; @@ -884,16 +951,25 @@ flex-flow: column; padding-top: 19px; } -.modal.modal-load-program .modal-load-program-body .third-column .content { +.modal.modal-load-program .modal-load-program-body .third-column .content, +.modal.modal-add-element-queue .modal-load-program-body .third-column .content, +.modal.modal-load-program .modal-add-element-queue-body .third-column .content, +.modal.modal-add-element-queue .modal-add-element-queue-body .third-column .content { width: 94%; height: 100%; } -.modal.modal-load-program .modal-load-program-body .third-column .content .card-folder-path { +.modal.modal-load-program .modal-load-program-body .third-column .content .card-folder-path, +.modal.modal-add-element-queue .modal-load-program-body .third-column .content .card-folder-path, +.modal.modal-load-program .modal-add-element-queue-body .third-column .content .card-folder-path, +.modal.modal-add-element-queue .modal-add-element-queue-body .third-column .content .card-folder-path { width: 371px; display: flex; margin-top: 8px 0 8px 8px; } -.modal.modal-load-program .modal-load-program-body .third-column .label-folder-empty { +.modal.modal-load-program .modal-load-program-body .third-column .label-folder-empty, +.modal.modal-add-element-queue .modal-load-program-body .third-column .label-folder-empty, +.modal.modal-load-program .modal-add-element-queue-body .third-column .label-folder-empty, +.modal.modal-add-element-queue .modal-add-element-queue-body .third-column .label-folder-empty { display: flex; width: 100%; height: 100%; @@ -902,13 +978,19 @@ color: #4b4b4b; font-size: 20px; } -.modal.modal-load-program .modal-load-program-body .third-column .group-btn { +.modal.modal-load-program .modal-load-program-body .third-column .group-btn, +.modal.modal-add-element-queue .modal-load-program-body .third-column .group-btn, +.modal.modal-load-program .modal-add-element-queue-body .third-column .group-btn, +.modal.modal-add-element-queue .modal-add-element-queue-body .third-column .group-btn { display: flex; flex-flow: row; justify-content: center; margin-bottom: 16px; } -.modal.modal-load-program .modal-load-program-body .third-column .group-btn input { +.modal.modal-load-program .modal-load-program-body .third-column .group-btn input, +.modal.modal-add-element-queue .modal-load-program-body .third-column .group-btn input, +.modal.modal-load-program .modal-add-element-queue-body .third-column .group-btn input, +.modal.modal-add-element-queue .modal-add-element-queue-body .third-column .group-btn input { width: 360px; height: 48px; padding: 0; @@ -917,22 +999,34 @@ border: none; border-bottom: 1px solid rgba(0, 0, 0, 0.4); } -.modal.modal-load-program .modal-load-program-body .third-column .group-btn input[type="text"] { +.modal.modal-load-program .modal-load-program-body .third-column .group-btn input[type="text"], +.modal.modal-add-element-queue .modal-load-program-body .third-column .group-btn input[type="text"], +.modal.modal-load-program .modal-add-element-queue-body .third-column .group-btn input[type="text"], +.modal.modal-add-element-queue .modal-add-element-queue-body .third-column .group-btn input[type="text"] { padding-left: 5px; outline: none ; } -.modal.modal-load-program .modal-load-program-body .third-column .group-btn input:focus { +.modal.modal-load-program .modal-load-program-body .third-column .group-btn input:focus, +.modal.modal-add-element-queue .modal-load-program-body .third-column .group-btn input:focus, +.modal.modal-load-program .modal-add-element-queue-body .third-column .group-btn input:focus, +.modal.modal-add-element-queue .modal-add-element-queue-body .third-column .group-btn input:focus { border-bottom: 1px solid #1791ff; box-shadow: none; } -.modal.modal-load-program .modal-load-program-body .third-column .group-btn i { +.modal.modal-load-program .modal-load-program-body .third-column .group-btn i, +.modal.modal-add-element-queue .modal-load-program-body .third-column .group-btn i, +.modal.modal-load-program .modal-add-element-queue-body .third-column .group-btn i, +.modal.modal-add-element-queue .modal-add-element-queue-body .third-column .group-btn i { width: 44px; height: 44px; padding: 0; margin-top: 4px; color: #002680; } -.modal.modal-load-program .modal-load-program-body .selected-item { +.modal.modal-load-program .modal-load-program-body .selected-item, +.modal.modal-add-element-queue .modal-load-program-body .selected-item, +.modal.modal-load-program .modal-add-element-queue-body .selected-item, +.modal.modal-add-element-queue .modal-add-element-queue-body .selected-item { width: 660px; height: 100%; display: flex; @@ -940,30 +1034,45 @@ justify-content: flex-end; padding: 0 16px 0 22px; } -.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-header { +.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-header, +.modal.modal-add-element-queue .modal-load-program-body .selected-item .selected-item-header, +.modal.modal-load-program .modal-add-element-queue-body .selected-item .selected-item-header, +.modal.modal-add-element-queue .modal-add-element-queue-body .selected-item .selected-item-header { height: 78px; width: 100%; display: flex; flex-flow: row; align-items: center; } -.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-header .subtitle { +.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-header .subtitle, +.modal.modal-add-element-queue .modal-load-program-body .selected-item .selected-item-header .subtitle, +.modal.modal-load-program .modal-add-element-queue-body .selected-item .selected-item-header .subtitle, +.modal.modal-add-element-queue .modal-add-element-queue-body .selected-item .selected-item-header .subtitle { display: flex; flex-flow: row; font-size: 13px; line-height: 4px; } -.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-header .subtitle .title { +.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-header .subtitle .title, +.modal.modal-add-element-queue .modal-load-program-body .selected-item .selected-item-header .subtitle .title, +.modal.modal-load-program .modal-add-element-queue-body .selected-item .selected-item-header .subtitle .title, +.modal.modal-add-element-queue .modal-add-element-queue-body .selected-item .selected-item-header .subtitle .title { width: 110px; text-align: right; color: #002680; } -.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-header .subtitle .text { +.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-header .subtitle .text, +.modal.modal-add-element-queue .modal-load-program-body .selected-item .selected-item-header .subtitle .text, +.modal.modal-load-program .modal-add-element-queue-body .selected-item .selected-item-header .subtitle .text, +.modal.modal-add-element-queue .modal-add-element-queue-body .selected-item .selected-item-header .subtitle .text { margin-right: 40px; color: #4b4b4b; margin-left: 5px; } -.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-header .selected-item-title { +.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-header .selected-item-title, +.modal.modal-add-element-queue .modal-load-program-body .selected-item .selected-item-header .selected-item-title, +.modal.modal-load-program .modal-add-element-queue-body .selected-item .selected-item-header .selected-item-title, +.modal.modal-add-element-queue .modal-add-element-queue-body .selected-item .selected-item-header .selected-item-title { height: 100%; width: 100%; display: flex; @@ -973,17 +1082,26 @@ font-size: 26px; line-height: 55px; } -.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-header .group-button { +.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-header .group-button, +.modal.modal-add-element-queue .modal-load-program-body .selected-item .selected-item-header .group-button, +.modal.modal-load-program .modal-add-element-queue-body .selected-item .selected-item-header .group-button, +.modal.modal-add-element-queue .modal-add-element-queue-body .selected-item .selected-item-header .group-button { height: 100%; width: 100%; display: flex; align-items: center; justify-content: flex-end; } -.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-header .group-button i { +.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-header .group-button i, +.modal.modal-add-element-queue .modal-load-program-body .selected-item .selected-item-header .group-button i, +.modal.modal-load-program .modal-add-element-queue-body .selected-item .selected-item-header .group-button i, +.modal.modal-add-element-queue .modal-add-element-queue-body .selected-item .selected-item-header .group-button i { font-size: 24px; } -.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body { +.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body, +.modal.modal-add-element-queue .modal-load-program-body .selected-item .selected-item-body, +.modal.modal-load-program .modal-add-element-queue-body .selected-item .selected-item-body, +.modal.modal-add-element-queue .modal-add-element-queue-body .selected-item .selected-item-body { width: 100%; height: calc(100% - 78px); position: relative; @@ -991,20 +1109,29 @@ display: flex; flex-flow: column; } -.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body .selected-item-body-image { +.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body .selected-item-body-image, +.modal.modal-add-element-queue .modal-load-program-body .selected-item .selected-item-body .selected-item-body-image, +.modal.modal-load-program .modal-add-element-queue-body .selected-item .selected-item-body .selected-item-body-image, +.modal.modal-add-element-queue .modal-add-element-queue-body .selected-item .selected-item-body .selected-item-body-image { display: flex; width: 100%; margin-top: 10px; height: 336px; align-items: center; } -.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body .selected-item-body-image img { +.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body .selected-item-body-image img, +.modal.modal-add-element-queue .modal-load-program-body .selected-item .selected-item-body .selected-item-body-image img, +.modal.modal-load-program .modal-add-element-queue-body .selected-item .selected-item-body .selected-item-body-image img, +.modal.modal-add-element-queue .modal-add-element-queue-body .selected-item .selected-item-body .selected-item-body-image img { display: block; margin: auto; max-height: 336px; box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 0.4); } -.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body .selected-item-body-image .noimage { +.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body .selected-item-body-image .noimage, +.modal.modal-add-element-queue .modal-load-program-body .selected-item .selected-item-body .selected-item-body-image .noimage, +.modal.modal-load-program .modal-add-element-queue-body .selected-item .selected-item-body .selected-item-body-image .noimage, +.modal.modal-add-element-queue .modal-add-element-queue-body .selected-item .selected-item-body .selected-item-body-image .noimage { display: block; margin: auto; height: 290px; @@ -1016,7 +1143,10 @@ box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 0.4); border: 1px solid rgba(0, 0, 0, 0.1); } -.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body .selected-item-body-description { +.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body .selected-item-body-description, +.modal.modal-add-element-queue .modal-load-program-body .selected-item .selected-item-body .selected-item-body-description, +.modal.modal-load-program .modal-add-element-queue-body .selected-item .selected-item-body .selected-item-body-description, +.modal.modal-add-element-queue .modal-add-element-queue-body .selected-item .selected-item-body .selected-item-body-description { display: flex; width: 100%; margin-top: 10px; @@ -1024,7 +1154,10 @@ height: calc(100% - 380px); flex-flow: column; } -.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body .selected-item-body-description .row { +.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body .selected-item-body-description .row, +.modal.modal-add-element-queue .modal-load-program-body .selected-item .selected-item-body .selected-item-body-description .row, +.modal.modal-load-program .modal-add-element-queue-body .selected-item .selected-item-body .selected-item-body-description .row, +.modal.modal-add-element-queue .modal-add-element-queue-body .selected-item .selected-item-body .selected-item-body-description .row { height: 32px; min-height: 32px; display: flex; @@ -1034,18 +1167,30 @@ text-align: justify; overflow: hidden; } -.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body .selected-item-body-description .row label { +.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body .selected-item-body-description .row label, +.modal.modal-add-element-queue .modal-load-program-body .selected-item .selected-item-body .selected-item-body-description .row label, +.modal.modal-load-program .modal-add-element-queue-body .selected-item .selected-item-body .selected-item-body-description .row label, +.modal.modal-add-element-queue .modal-add-element-queue-body .selected-item .selected-item-body .selected-item-body-description .row label { font-size: 18px; margin-left: 5px; white-space: nowrap; } -.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body .selected-item-body-description .row:nth-child(odd) { +.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body .selected-item-body-description .row:nth-child(odd), +.modal.modal-add-element-queue .modal-load-program-body .selected-item .selected-item-body .selected-item-body-description .row:nth-child(odd), +.modal.modal-load-program .modal-add-element-queue-body .selected-item .selected-item-body .selected-item-body-description .row:nth-child(odd), +.modal.modal-add-element-queue .modal-add-element-queue-body .selected-item .selected-item-body .selected-item-body-description .row:nth-child(odd) { background-color: rgba(23, 145, 255, 0.3); } -.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body .selected-item-body-description .row:nth-child(even) { +.modal.modal-load-program .modal-load-program-body .selected-item .selected-item-body .selected-item-body-description .row:nth-child(even), +.modal.modal-add-element-queue .modal-load-program-body .selected-item .selected-item-body .selected-item-body-description .row:nth-child(even), +.modal.modal-load-program .modal-add-element-queue-body .selected-item .selected-item-body .selected-item-body-description .row:nth-child(even), +.modal.modal-add-element-queue .modal-add-element-queue-body .selected-item .selected-item-body .selected-item-body-description .row:nth-child(even) { background-color: #f3f3f3; } -.modal.modal-load-program .modal-load-program-body .selected-item .notselecteditem { +.modal.modal-load-program .modal-load-program-body .selected-item .notselecteditem, +.modal.modal-add-element-queue .modal-load-program-body .selected-item .notselecteditem, +.modal.modal-load-program .modal-add-element-queue-body .selected-item .notselecteditem, +.modal.modal-add-element-queue .modal-add-element-queue-body .selected-item .notselecteditem { position: absolute; right: 0; width: 695px; @@ -1058,7 +1203,10 @@ align-items: center; justify-content: center; } -.modal.modal-load-program .modal-load-program-footer { +.modal.modal-load-program .modal-load-program-footer, +.modal.modal-add-element-queue .modal-load-program-footer, +.modal.modal-load-program .modal-add-element-queue-footer, +.modal.modal-add-element-queue .modal-add-element-queue-footer { height: 79px; width: 100%; display: flex; @@ -1695,6 +1843,70 @@ align-items: center; justify-content: flex-end; } +.popup { + width: 288px; + height: 218px; + display: flex; + flex-flow: column; + background-color: #fff; + z-index: 100; +} +.popup header { + height: 64px; + border-bottom: solid 2px #bbbcbc; + position: relative; + display: flex; + align-items: center; + font-size: 16px; + color: #002680; + padding-left: 16px; +} +.popup header button.close { + position: absolute; + width: 28px; + height: 28px; + border-radius: 50%; + border: none; + background-color: #fff; + color: #002680; + top: calc(30%); + right: 14px; + font-size: 16px; + cursor: pointer; +} +.popup header button.close:active { + background-color: #1791ff; + color: #fff; +} +.popup section.body { + width: 100%; + height: calc(100% - 64px); +} +.popup.arrow-top { + border: 2px solid #1791ff; +} +.popup.arrow-top::before { + content: ''; + display: block; + position: absolute; + left: 128px; + bottom: 100%; + width: 0; + height: 0; + border: 18px solid transparent; + border-bottom-color: #1791ff; +} +.popup.arrow-top::after { + content: ''; + display: block; + position: absolute; + left: 130px; + bottom: 100%; + width: 0; + height: 0; + border: 16px solid transparent; + border-bottom-color: #fff; +} .row { display: flex; width: 100%; @@ -5686,7 +5898,7 @@ footer .container button.big:before { cursor: not-allowed; } .card-element-queue { - width: 352px; + width: 408px; height: 64px; display: flex; flex-flow: row; @@ -5694,6 +5906,32 @@ footer .container button.big:before { background-color: #fff; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4); } +.card-element-queue.border-green { + border: solid 2px #7ed321; +} +.card-element-queue.border-green .card-element-queue-right .square-number { + width: 112px; +} +.card-element-queue.border-blue { + border: solid 2px #1791ff; +} +.card-element-queue.border-orange { + border: solid 2px #f5a623; +} +.card-element-queue.finished { + border: none; + font-size: 18px; +} +.card-element-queue.finished .card-element-queue-name { + color: #979797; +} +.card-element-queue.finished .card-element-queue-right .square-number { + width: 112px; +} +.card-element-queue.finished .card-element-queue-right .square-number label { + font-size: 25px; + color: #1791ff; +} .card-element-queue .card-element-queue-name { width: 100%; display: flex; @@ -5707,6 +5945,7 @@ footer .container button.big:before { display: flex; align-items: center; justify-content: flex-end; + position: relative; } .card-element-queue .card-element-queue-right .square-number { width: 48px; @@ -5726,6 +5965,9 @@ footer .container button.big:before { .card-element-queue .card-element-queue-right button.btn i.fa.fa-trash { font-size: 24px; } +.smooth-dnd-draggable-wrapper .element-queue:first-child { + margin-top: 3px; +} .card-production-cms { width: 1024px; height: 768px; @@ -5835,6 +6077,75 @@ footer .container button.big:before { display: flex; flex-flow: column; } +.card-queue-production .card-queue-production-body .queue-header { + height: 64px; + width: 100%; +} +.card-queue-production .card-queue-production-body .queue-header .tab-box { + height: 64px; + width: 100%; + background-color: #e7e7e7; + display: flex; + flex-direction: row; + border: none !important; +} +.card-queue-production .card-queue-production-body .queue-header .tab-box .tab { + flex-grow: 0; + flex-shrink: 0; + float: left !important; + width: 256px !important; + height: 100% !important; + margin: 0 !important; + padding: 0; + border: none !important; + border-right: solid 1px #979797 !important; + background-color: #e7e7e7; + font-size: 18px !important; + line-height: 1 !important; + color: #4b4b4b !important; + position: relative; +} +.card-queue-production .card-queue-production-body .queue-header .tab-box .tab.plus { + border-right: none !important; +} +.card-queue-production .card-queue-production-body .queue-header .tab-box .tab.plus .btn { + float: left !important; + margin: 0; + width: 48px; + height: 48px; + position: absolute; + top: calc(50% - 24px); + margin-left: 20px; + padding: 0; +} +.card-queue-production .card-queue-production-body .queue-header .tab-box .tab.plus .btn .fa { + vertical-align: middle; + font-size: 21px; +} +.card-queue-production .card-queue-production-body .queue-header .tab-box .tab:last-child { + border-right: none !important; +} +.card-queue-production .card-queue-production-body .queue-header .tab-box .active { + background-color: #fff; + border-top: solid 2px #1791ff !important; +} +.card-queue-production .card-queue-production-body .queue-header .tab-box .tab-box-scroll { + width: 100%; + overflow-y: hidden; + overflow-x: auto; + display: flex; + flex-direction: row; + flex-basis: auto; +} +.card-queue-production .card-queue-production-body .queue-header .tab-box .tab-box-scroll::-webkit-scrollbar { + width: 5px; + height: 5px; +} +.card-queue-production .card-queue-production-body .queue-header .tab-box .tab-box-scroll::-webkit-scrollbar-thumb { + border-radius: 5px; + height: 1px; + background-color: rgba(0, 0, 0, 0.3); +} .card-queue-production .card-queue-production-body .queue-body { height: calc(100% - 63px); width: calc(100% - 16px); @@ -5842,14 +6153,15 @@ footer .container button.big:before { flex-flow: column; align-items: center; justify-content: flex-start; - margin: 16px 0 0 8px; + margin: 16px 0 0 4px; } .card-queue-production .card-queue-production-body .queue-body .element-queue { display: flex; flex-flow: row; align-items: center; margin-bottom: 16px; - width: 400px; + width: 432px; + margin-right: 8px; } .card-queue-production .card-queue-production-body .queue-body .element-queue label.number { display: flex; @@ -5858,6 +6170,31 @@ footer .container button.big:before { font-size: 20px; color: #4b4b4b; } +.card-queue-production .card-queue-production-body .queue-body .popup { + position: absolute; + display: flex; + padding: 4px; +} +.card-queue-production .card-queue-production-body .queue-body .popup .edit-reps { + width: 100%; + height: calc(100% - 26px); + display: flex; + align-items: center; + justify-content: space-around; +} +.card-queue-production .card-queue-production-body .queue-body .popup .group-button { + width: 100%; + display: flex; + justify-content: flex-end; +} +.card-queue-production .card-queue-production-body .queue-body .popup .group-button .btn.btn-success.btn-small { + height: 26px; + font-size: 12px; +} +.card-queue-production .card-queue-production-body .queue-body .popup input { + width: 50px; + height: 30px; +} .card-queue-production .card-queue-production-body .queue-footer { display: flex; margin: 20px 0 0 8px; @@ -5900,6 +6237,7 @@ footer .container button.big:before { width: 502px; height: 768px; background-color: #fff; + position: relative; } .card-job-production .card-job-production-header { height: 63px; @@ -6061,6 +6399,17 @@ footer .container button.big:before { .card-job-production .card-job-production-body .card-job-production-body-bottom .content-box.scrollable { width: 97%; } +.card-job-production-box-start { + position: absolute; + z-index: 100; + width: 100%; + height: 100%; + top: 0; + background-color: rgba(255, 255, 255, 0.95); + display: flex; + align-items: center; + justify-content: center; +} .card-production-section-file { width: 400px; height: 48px; diff --git a/Step/wwwroot/index.html b/Step/wwwroot/index.html index 97c2a272..8af04320 100644 --- a/Step/wwwroot/index.html +++ b/Step/wwwroot/index.html @@ -7,7 +7,7 @@ - Step + CMS Active diff --git a/Step/wwwroot/src/@types/production.d.ts b/Step/wwwroot/src/@types/production.d.ts new file mode 100644 index 00000000..50d7981f --- /dev/null +++ b/Step/wwwroot/src/@types/production.d.ts @@ -0,0 +1,10 @@ +declare module server { + export interface PartProgramModel { + absolutePath: string, + id: number, + partProgramName: string, + remainingReps: number, + reps: number, + status: number + } +} \ No newline at end of file diff --git a/Step/wwwroot/src/app.routes.js b/Step/wwwroot/src/app.routes.js index 11d8bbcc..2b9b29ed 100644 --- a/Step/wwwroot/src/app.routes.js +++ b/Step/wwwroot/src/app.routes.js @@ -55,51 +55,51 @@ import { } from "./app.modules"; export let routes = [ - { path: "", component: Home, name: "home", meta: { title: "Step - Dashboard" } }, - { path: "/production", component: Production, meta: { title: "Step - Production", area: "production" } }, + { path: "", component: Home, name: "home", meta: { title: "Dashboard" } }, + { path: "/production", component: Production, meta: { title: "Production", area: "production" } }, - { path: "/tooling", component: Tooling, meta: { title: "Step - Tools", area: "tooling" } }, - { name: "tooling-depot", path: "/tooling-depot/:id", component: Depot, meta: { title: "Step - Depot", area: "depot" } }, + { path: "/tooling", component: Tooling, meta: { title: "Tools", area: "tooling" } }, + { name: "tooling-depot", path: "/tooling-depot/:id", component: Depot, meta: { title: "Depot", area: "depot" } }, - { path: "/summary-depot", component: SummaryDepot, meta: { title: "Step - Summary-Depot", area: "summary-depot" } }, - { path: "/tooling-equipment/:id?", component: ToolingEquipment, meta: { title: "Step - Tooling-Equipment", area: "tooling-equipment" } }, - { path: "/tooling-families", component: ToolingFamilies, meta: { title: "Step - Tooling-Families", area: "tooling-families" } }, - { path: "/tooling-shanks", component: ToolingShanks, meta: { title: "Step - Tooling-Shanks", area: "tooling-shanks" } }, - { path: "/tooling-magpos", component: ToolingMagPos, meta: { title: "Step - Tooling-MagPos", area: "tooling-magpos" } }, - { path: "/info-equipment", component: InfoEquipment, meta: { title: "Step - Info-Equipment", area: "info-equipment" } }, - { path: "/utilities", component: Utilities, meta: { title: "Step - Utilities", area: "utilities" } }, - { path: "/card-utilities", component: CardUtilities, meta: { title: "Step - Card-Utilities", area: "card-utilities" } }, - { path: "/card-tool-depot", component: CardToolDepot, meta: { title: "Step - Card-Tool-Depot", area: "card-tool-depot" } }, - { path: "/load-depot", component: LoadDepot, meta: { title: "Step - Load-Depot", area: "loaddepot" } }, + { path: "/summary-depot", component: SummaryDepot, meta: { title: "Summary-Depot", area: "summary-depot" } }, + { path: "/tooling-equipment/:id?", component: ToolingEquipment, meta: { title: "Tooling-Equipment", area: "tooling-equipment" } }, + { path: "/tooling-families", component: ToolingFamilies, meta: { title: "Tooling-Families", area: "tooling-families" } }, + { path: "/tooling-shanks", component: ToolingShanks, meta: { title: "Tooling-Shanks", area: "tooling-shanks" } }, + { path: "/tooling-magpos", component: ToolingMagPos, meta: { title: "Tooling-MagPos", area: "tooling-magpos" } }, + { path: "/info-equipment", component: InfoEquipment, meta: { title: "Info-Equipment", area: "info-equipment" } }, + { path: "/utilities", component: Utilities, meta: { title: "Utilities", area: "utilities" } }, + { path: "/card-utilities", component: CardUtilities, meta: { title: "Card-Utilities", area: "card-utilities" } }, + { path: "/card-tool-depot", component: CardToolDepot, meta: { title: "Card-Tool-Depot", area: "card-tool-depot" } }, + { path: "/load-depot", component: LoadDepot, meta: { title: "Load-Depot", area: "loaddepot" } }, - { path: "/softkeys-prefered", component: SoftKeysPrefered, meta: { title: "Step - Softkeys-Prefered", area: "softkeys-prefered" } }, - { path: "/create-queue", component: CreateQueue, meta: { title: "Step - Create-Queue", area: "create-queue" } }, + { path: "/softkeys-prefered", component: SoftKeysPrefered, meta: { title: "Softkeys-Prefered", area: "softkeys-prefered" } }, + { path: "/create-queue", component: CreateQueue, meta: { title: "Create-Queue", area: "create-queue" } }, - { path: "/head-spindle", component: HeadSpindle, meta: { title: "Step - Head-Spindle", area: "head-spindle" } }, - { path: "/head-production", component: HeadProduction, meta: { title: "Step - Head-Production", area: "head-production" } }, - { path: "/card-axes-production", component: CardAxesProduction, meta: { title: "Step - Card-Axes-Production", area: "card-axes-production" } }, - { path: "/card-production-cms", component: CardProductionCms, meta: { title: "Step - Card-Production-Cms", area: "card-production-cms" } }, - { path: "/card-queue-production", component: CardQueueProduction, meta: { title: "Step - Card-Queue-Production", area: "card-queue-production" } }, - { path: "/card-job-production", component: CardJobProduction, meta: { title: "Step - Card-Job-Production", area: "card-job-production" } }, - { path: "/card-production-section-file", component: CardProductionSectionFile, meta: { title: "Step - Card-Production-Section-File", area: "card-production-section-file" } }, - { path: "/modal-load-program", component: ModalLoadProgram, meta: { title: "Step - Modal-Load-Program", area: "modal-load-program" } }, + { path: "/head-spindle", component: HeadSpindle, meta: { title: "Head-Spindle", area: "head-spindle" } }, + { path: "/head-production", component: HeadProduction, meta: { title: "Head-Production", area: "head-production" } }, + { path: "/card-axes-production", component: CardAxesProduction, meta: { title: "Card-Axes-Production", area: "card-axes-production" } }, + { path: "/card-production-cms", component: CardProductionCms, meta: { title: "Card-Production-Cms", area: "card-production-cms" } }, + { path: "/card-queue-production", component: CardQueueProduction, meta: { title: "Card-Queue-Production", area: "card-queue-production" } }, + { path: "/card-job-production", component: CardJobProduction, meta: { title: "Card-Job-Production", area: "card-job-production" } }, + { path: "/card-production-section-file", component: CardProductionSectionFile, meta: { title: "Card-Production-Section-File", area: "card-production-section-file" } }, + { path: "/modal-load-program", component: ModalLoadProgram, meta: { title: "Modal-Load-Program", area: "modal-load-program" } }, - { path: "/modal-job-add-parameter", component: ModalJobAddParameter, meta: { title: "Step - Modal-Job-Add-Parameter", area: "modal-job-add-parameter" } }, - { path: "/modal-edit-job", component: ModalEditJob, meta: { title: "Step - Modal-Edit-Job", area: "modal-edit-job" } }, + { path: "/modal-job-add-parameter", component: ModalJobAddParameter, meta: { title: "Modal-Job-Add-Parameter", area: "modal-job-add-parameter" } }, + { path: "/modal-edit-job", component: ModalEditJob, meta: { title: "Modal-Edit-Job", area: "modal-edit-job" } }, - { path: "/modal-add-offset-tool", component: ModalAddOffsetTool, meta: { title: "Step - Modal-Add-Offset-Tool", area: "modal-add-offset-tool" } }, + { path: "/modal-add-offset-tool", component: ModalAddOffsetTool, meta: { title: "Modal-Add-Offset-Tool", area: "modal-add-offset-tool" } }, - { path: "/card-folder-path", component: CardFolderPath, meta: { title: "Step - Card-Folder-Path", area: "card-folder-path" } }, - { path: "/card-element-queue", component: CardElementQueue, meta: { title: "Step - Card-Element-Queue", area: "card-element-queue" } }, + { path: "/card-folder-path", component: CardFolderPath, meta: { title: "Card-Folder-Path", area: "card-folder-path" } }, + { path: "/card-element-queue", component: CardElementQueue, meta: { title: "Card-Element-Queue", area: "card-element-queue" } }, - { path: "/card-assisted-tooling", component: CardAssistedTooling, meta: { title: "Step - Card-Assisted-Tooling", area: "card-assisted-tooling" } }, + { path: "/card-assisted-tooling", component: CardAssistedTooling, meta: { title: "Card-Assisted-Tooling", area: "card-assisted-tooling" } }, - { path: "/depot-action-loading", component: DepotActionLoading, meta: { title: "Step - Depot-Action-Loading", area: "depot-action-loading" } }, - { path: "/depot-action-transfer", component: DepotActionTransfer, meta: { title: "Step - Depot-Action-Transfer", area: "depot-action-transfer" } }, - { path: "/depot-action-unloading", component: DepotActionUnloading, meta: { title: "Step - Depot-Action-Unloading", area: "depot-action-unloading" } }, - { path: "/depot-action-generic", component: DepotActionGeneric, meta: { title: "Step - Depot-Action-Generic", area: "depot-action-generic" } }, + { path: "/depot-action-loading", component: DepotActionLoading, meta: { title: "Depot-Action-Loading", area: "depot-action-loading" } }, + { path: "/depot-action-transfer", component: DepotActionTransfer, meta: { title: "Depot-Action-Transfer", area: "depot-action-transfer" } }, + { path: "/depot-action-unloading", component: DepotActionUnloading, meta: { title: "Depot-Action-Unloading", area: "depot-action-unloading" } }, + { path: "/depot-action-generic", component: DepotActionGeneric, meta: { title: "Depot-Action-Generic", area: "depot-action-generic" } }, - { path: "/alarm-history", component: AlarmHistory, meta: { title: "Step - Alarm-History", area: "alarm-history" } }, + { path: "/alarm-history", component: AlarmHistory, meta: { title: "Alarm-History", area: "alarm-history" } }, { path: "/job-editor", component: JobEditor, meta: { title: "Job-Editor", area: "job-editor" } }, @@ -109,19 +109,19 @@ export let routes = [ { path: "/modal-missing-tools", component: ModalMissingTools, meta: { title: "Modal Missing Tools", area: "modal-missing-tools" } }, - { path: "/program-management", component: ProgramManagement, meta: { title: "Step - Program-Management", area: "program-management" } }, + { path: "/program-management", component: ProgramManagement, meta: { title: "Program-Management", area: "program-management" } }, - { path: "/maintenance-progress", component: MaintenanceProgress, meta: { title: "Step - Maintenance-Progress", area: "maintenance-progress" } }, - { path: "/maintenance-card", component: MaintenanceCard, meta: { title: "Step - Maintenance-Card", area: "maintenance-card" } }, - { path: "/card-maintenance-wizard", component: MaintenanceWizard, meta: { title: "Step - Maintenance-Wizard", area: "card-maintenance-wizard" } }, - { path: "/create-maintenance", component: CreateMaintenance, meta: { title: "Step - Create-Maintenance", area: "create-maintenance" } }, - { path: "/create-maintenance", component: CreateMaintenance, meta: { title: "Step - Create-Maintenance", area: "create-maintenance" } }, - { path: "/modal-iframe", component: ModalIframe, meta: { title: "Step - Modal-Iframe", area: "modal-iframe" } }, - { path: "/report", meta: { title: "Step - Reports", area: "report" } }, - { path: "/alarms", meta: { title: "Step - Alarms", area: "alarms" } }, - { path: "/maintenance/:id?", name: "maintenance", component: Maintenance, meta: { title: "Step - Maintenance", area: "maintenance" } }, + { path: "/maintenance-progress", component: MaintenanceProgress, meta: { title: "Maintenance-Progress", area: "maintenance-progress" } }, + { path: "/maintenance-card", component: MaintenanceCard, meta: { title: "Maintenance-Card", area: "maintenance-card" } }, + { path: "/card-maintenance-wizard", component: MaintenanceWizard, meta: { title: "Maintenance-Wizard", area: "card-maintenance-wizard" } }, + { path: "/create-maintenance", component: CreateMaintenance, meta: { title: "Create-Maintenance", area: "create-maintenance" } }, + { path: "/create-maintenance", component: CreateMaintenance, meta: { title: "Create-Maintenance", area: "create-maintenance" } }, + { path: "/modal-iframe", component: ModalIframe, meta: { title: "Modal-Iframe", area: "modal-iframe" } }, + { path: "/report", meta: { title: "Reports", area: "report" } }, + { path: "/alarms", meta: { title: "Alarms", area: "alarms" } }, + { path: "/maintenance/:id?", name: "maintenance", component: Maintenance, meta: { title: "Maintenance", area: "maintenance" } }, /* path precedente cosa fare? Non ha il component */ - // { path: "/utilities", meta: { title: "Step - Utility", area: "utilities" } }, + // { path: "/utilities", meta: { title: "Utility", area: "utilities" } }, { path: "/scada", component: Scada, meta: { title: "", area: "scada" } }, { path: "/test/loader", component: TestLoader, name: "testloader" }, { path: "/test/empty", component: TestEmpty, name: "testloader" }, diff --git a/Step/wwwroot/src/components/tooling/tooling-equipment.ts b/Step/wwwroot/src/components/tooling/tooling-equipment.ts index 5685f260..90a60e3f 100644 --- a/Step/wwwroot/src/components/tooling/tooling-equipment.ts +++ b/Step/wwwroot/src/components/tooling/tooling-equipment.ts @@ -21,6 +21,10 @@ export default class toolingEquipment extends Vue { public get magazineStatusModel(): server.MagazineStatus { return (this.$store.state as AppModel).depot.magazineStatusModel; } + + public get familyOptionActive(): boolean { + return (this.$store.state as AppModel).tooling.familyOptionActive; + } public get tools(): server.Tool[] { return (this.$store.state as AppModel).tooling.tools; } public get ncTools(): server.ToolNc[] { return (this.$store.state as AppModel).tooling.ncTools; } @@ -88,12 +92,20 @@ export default class toolingEquipment extends Vue { return (this.$store.state as AppModel).tooling.ncFamilies; } - public familyNameFromId(id): any{ - if (((this.$store.state as AppModel).tooling.ncFamilies)[id]) - return ((this.$store.state as AppModel).tooling.ncFamilies)[id].name; + public familyNameFromId(id): any{ + var found = (this.$store.state as AppModel).tooling.ncFamilies.find(k => k.id == id); + if(found) + return found.name; return ''; } + public calcFamilyName(id): any{ + if(this.familyOptionActive) + return this.$options.filters.localize("tooling_family_abbreviation", 'F%d',id) + ' - ' + this.familyNameFromId(id); + else + return this.familyNameFromId(id); + } + public get categoriesEdge(): string[] { @@ -181,8 +193,6 @@ export default class toolingEquipment extends Vue { this.$nextTick(() => this.scrollList(this.ncTools.indexOf(ncTool))); } } - - } this.modalBlockMagazine(); } @@ -531,15 +541,18 @@ export default class toolingEquipment extends Vue { })); } else{ - awaiter(new ToolingService().SetNcTool(item).then(response => { - this.selectedTool = response; - let htmlelement = this.$refs.toolList as any; - htmlelement.scrollTop = htmlelement.scrollHeight; - - this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration; - this.edgeConfiguration = (this.$store.state as AppModel).tooling.edgesConfiguration; - this.disableList = false; - this.enableModify = false; + await awaiter(new ToolingService().SetNcTool(item).then(response => { + new ToolingService().GetNcFamilies().then(response => { + this.selectedTool = response; + let htmlelement = this.$refs.toolList as any; + htmlelement.scrollTop = htmlelement.scrollHeight; + + this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration; + this.edgeConfiguration = (this.$store.state as AppModel).tooling.edgesConfiguration; + this.disableList = false; + this.enableModify = false; + }); + })); } diff --git a/Step/wwwroot/src/components/tooling/tooling-equipment.vue b/Step/wwwroot/src/components/tooling/tooling-equipment.vue index 6e23262b..13e31f96 100644 --- a/Step/wwwroot/src/components/tooling/tooling-equipment.vue +++ b/Step/wwwroot/src/components/tooling/tooling-equipment.vue @@ -31,7 +31,7 @@
diff --git a/Step/wwwroot/src/config.ts b/Step/wwwroot/src/config.ts index 96f4b6ad..07c70d37 100644 --- a/Step/wwwroot/src/config.ts +++ b/Step/wwwroot/src/config.ts @@ -9,4 +9,4 @@ export const DEBUG_CONFIGURATION = CONFIGURATION_OSAI; // stabilisce se leggere la configurazione dal server o // se utilizzare la configurazione locale -export const USE_RUNTIME_CONFIGURATION = false; \ No newline at end of file +export const USE_RUNTIME_CONFIGURATION = true; \ No newline at end of file diff --git a/Step/wwwroot/src/main.js b/Step/wwwroot/src/main.js index 2badf3a7..2785423f 100644 --- a/Step/wwwroot/src/main.js +++ b/Step/wwwroot/src/main.js @@ -39,7 +39,11 @@ router.beforeEach((to, from, next) => { } } if (to.meta && to.meta.title) { - window.document.title = to.meta.title; + + if (typeof cmsClient == "undefined") + window.document.title = "CMS Active - " + to.meta.title; + else + window.document.title = to.meta.title; } next(); }); diff --git a/Step/wwwroot/src/modules/app-footer.ts b/Step/wwwroot/src/modules/app-footer.ts index 6234c88f..3dab507b 100644 --- a/Step/wwwroot/src/modules/app-footer.ts +++ b/Step/wwwroot/src/modules/app-footer.ts @@ -52,9 +52,9 @@ export default class AppFooter extends Vue { return new Array(); } - public startUtility(id) { - if (typeof cmsClient != "undefined") - cmsClient.openOrStartProcess(id); + public startUtility(id) { + if (typeof cmsClient != "undefined") + cmsClient.openOrStartProcess(id); } } diff --git a/Step/wwwroot/src/modules/base-components/cards/card-element-queue.vue b/Step/wwwroot/src/modules/base-components/cards/card-element-queue.vue index c58ea2b5..7cc1d4bd 100644 --- a/Step/wwwroot/src/modules/base-components/cards/card-element-queue.vue +++ b/Step/wwwroot/src/modules/base-components/cards/card-element-queue.vue @@ -1,23 +1,59 @@ \ No newline at end of file diff --git a/Step/wwwroot/src/modules/base-components/cards/card-job-production.vue b/Step/wwwroot/src/modules/base-components/cards/card-job-production.vue index 968dfdf0..e857cc3a 100644 --- a/Step/wwwroot/src/modules/base-components/cards/card-job-production.vue +++ b/Step/wwwroot/src/modules/base-components/cards/card-job-production.vue @@ -6,7 +6,8 @@
- + +
@@ -37,6 +38,11 @@
+
+
+ +
+
@@ -45,6 +51,7 @@ import Vue from "vue"; import cardProductionSectionFile from "./card-production-section-file.vue"; import moment from "moment"; import { fileService } from "../../../services/fileService"; +import { FileService } from '../../../services/fileService'; export default { components: { cardProductionSectionFile @@ -56,11 +63,36 @@ export default { return { enableIsoLines: true, enableFileSections: false, - rowSelected: "" + rowSelected: "", + startStopQueue: false, }; }, + mounted: function(){ + if(this.queueStatus == 0){ + this.startStopQueue = true; + } + else{ + this.startStopQueue = false; + } + }, + watch: { + queueStatus: function(n,o){ + if(n){ + if(n == 0){ + this.startStopQueue = true; + } + else{ + this.startStopQueue = false; + } + } + } + }, computed: { + selectedProcess: function() { + return this.$store.state.process.selectedProcess; + }, currentProgram: function() { + console.log(this.$store.state.process.currentProgram); return this.$store.state.process.currentProgram; }, indexofActiveLine: function() { @@ -79,6 +111,12 @@ export default { if(this.currentProgram) return new moment(this.currentProgram.timeLeft).format("HH : mm : SS"); return "00 : 00 : 00"; + }, + queueStatus: function(){ + return this.$store.state.process.queueStatus; + }, + startStopQueueEnabled: function(){ + return this.$store.state.process.startStopQueueEnabled; } }, methods: { @@ -99,6 +137,25 @@ export default { }, async deactivateProgram(){ await fileService.deactivateProgram(); + }, + async startQueue(){ + await new FileService().startQueue(this.selectedProcess); + if(this.queueStatus == 0){ + this.startStopQueue = false; + } + else{ + this.startStopQueue = true; + } + + }, + async stopQueue(){ + await new FileService().stopQueue(this.selectedProcess); + if(this.queueStatus == 0){ + this.startStopQueue = true; + } + else{ + this.startStopQueue = false; + } } } }; diff --git a/Step/wwwroot/src/modules/base-components/cards/card-production-cms.vue b/Step/wwwroot/src/modules/base-components/cards/card-production-cms.vue index f28d45ee..e0d4983d 100644 --- a/Step/wwwroot/src/modules/base-components/cards/card-production-cms.vue +++ b/Step/wwwroot/src/modules/base-components/cards/card-production-cms.vue @@ -35,7 +35,7 @@ export default { return {}; }, props: { - queue: { default: false } + queue: { default: true } }, components: { cardQueueProduction, diff --git a/Step/wwwroot/src/modules/base-components/cards/card-queue-production.vue b/Step/wwwroot/src/modules/base-components/cards/card-queue-production.vue index 861c5ae6..90cc0bc3 100644 --- a/Step/wwwroot/src/modules/base-components/cards/card-queue-production.vue +++ b/Step/wwwroot/src/modules/base-components/cards/card-queue-production.vue @@ -8,23 +8,43 @@
- +
-
-
- -
-
- -
-
- + +
+ + +
+ +
+
+ + +
+ + +
+
+ +
+
+
diff --git a/Step/wwwroot/src/modules/base-components/index.js b/Step/wwwroot/src/modules/base-components/index.js index 26531370..9d7eab27 100644 --- a/Step/wwwroot/src/modules/base-components/index.js +++ b/Step/wwwroot/src/modules/base-components/index.js @@ -1,4 +1,5 @@ import Modal from "./modal.vue"; +import Popup from "./popup.vue"; import Loader from "./loader.vue"; import AppRibbon from "./ribbons/app-ribbon.vue"; import UserInfo from "./user-info.vue"; @@ -21,6 +22,7 @@ import ModalAddOffsetTool from "./modal-add-offset-tool.vue"; export { Loader, Modal, + Popup, AppRibbon, UserInfo, ModalContainer, diff --git a/Step/wwwroot/src/modules/base-components/modal-add-element-queue.ts b/Step/wwwroot/src/modules/base-components/modal-add-element-queue.ts new file mode 100644 index 00000000..d2efe7b4 --- /dev/null +++ b/Step/wwwroot/src/modules/base-components/modal-add-element-queue.ts @@ -0,0 +1,230 @@ +import Vue from "vue"; +import Component from "vue-class-component"; +import Modal from "src/modules/base-components/modal.vue"; +import { ModalHelper } from "src/modules/base-components/ModalHelper"; +import { Factory, MessageService,awaiter } from "../../_base"; +// import { MaintenanceService } from "../services/maintenanceService"; +// import { store } from "src/store"; +// import { maintenanceActions } from "../store/maintenance.store"; +import moment from "moment"; +import cardFolderPath from "./cards/card-folder-path.vue"; +import cardElementQueue from "./cards/card-element-queue.vue"; +import * as iziToast from "izitoast"; +import { fileService } from "../../services/fileService"; + +declare var cmsClient: any; + + + + +interface PathInfo { + Name: string; + AbsolutePath: string; + Path: string; + IsDirectory: boolean; +} + +interface FileInfo { + Name: string; + AbsolutePath: string; + CreationDate: string; + LastModDate: string; + Content: Array; + PreviewBase64: any; +} + +@Component({ + components: { + modal: Modal, + cardFolderPath, + cardElementQueue + } +}) +export default class ModalAddElementQueue extends Vue { + driveList: Array = []; + currentPath: string = ""; + currentDrive: string = null; + lastClickPath: string = ""; + + breadcrumbs: Array = []; + + firstColumnData: Array = []; + secondColumnData: Array = []; + + isLocalNavigation: boolean = true; + selectedFile: FileInfo = null; + + currentFilterFirst: string = ""; + currentFilterSecond: string = ""; + + navigationDepth: number = 0; + + mounted() { + if (typeof cmsClient != "undefined") { + this.driveList = JSON.parse(cmsClient.getOSdriveList()); + } + } + + async navigateTo( + path: string, + absolutePath: string, + local: boolean, + todepth: number, + fromdepth: number + ) { + this.currentPath = absolutePath; + this.lastClickPath = absolutePath; + this.checkChangeNavigationType(local); + var files = await this.getFilesForPath(absolutePath, path, local); + + // controlla se impostare il currentDrive + if (fromdepth == 0) this.currentDrive = absolutePath; + + // controlla come organizzare le colonne. + if (this.navigationDepth == 2 && todepth == 2 && fromdepth == 2) { + this.fillArray(this.firstColumnData, this.secondColumnData); + } + + this.navigationDepth = todepth; + if (todepth == 1) { + this.fillArray(this.firstColumnData, files); + this.secondColumnData.splice(0, this.secondColumnData.length); + this.currentFilterFirst = ""; + this.selectedFile = null; + } + + if (todepth == 2) { + this.fillArray(this.secondColumnData, files); + this.currentFilterSecond = ""; + } + this.calcBreadCrumb(absolutePath); + } + + fillArray(destinationArray: Array, sourceArray: Array) { + destinationArray.splice(0, destinationArray.length); + for (const key in sourceArray) { + if (sourceArray.hasOwnProperty(key)) { + const element = sourceArray[key]; + destinationArray.push(element); + } + } + } + + checkChangeNavigationType(local: boolean) { + if (this.isLocalNavigation != local) { + this.navigationDepth = 0; + this.firstColumnData.splice(0, this.firstColumnData.length); + this.secondColumnData.splice(0, this.secondColumnData.length); + } + } + + async getFilesForPath(absolutePath: string, path: string, local: boolean): Promise> { + this.isLocalNavigation = local; + var result = null; + console.log(path); + if (local) result = JSON.parse(cmsClient.getFileList(absolutePath)); + else result = await awaiter(fileService.getFiles(path)); + return this.toUpperCaseModel(result).sort(this.compareDirectoriesFirst); + } + + private compareDirectoriesFirst(x,y){ + return (x.IsDirectory === y.IsDirectory)? 0 : x.IsDirectory? -1 : 1; + } + + toUpperCaseModel(data: Array): Array { + console.log(data) + return data.map(i => { + return { + Name: i.name || i.Name, + AbsolutePath: i.absolutePath || i.AbsolutePath, + Path: i.path || i.Path, + IsDirectory: (i.isDirectory != null && i.isDirectory) || (i.IsDirectory != null && i.IsDirectory) + }; + }); + } + + calcBreadCrumb(path: string) { + this.breadcrumbs.splice(0, this.breadcrumbs.length); + if (path.startsWith("\\\\")) { + this.breadcrumbs.push({ + name: "CN", + path: "\\\\" + });} + if (path) { + var fragments = path.split("\\"); + var __p = ""; + fragments.forEach(element => { + __p = __p + element + "\\"; + this.breadcrumbs.push({ + name: element, + path: __p + }); + }); + } + } + + isInPath(path) { + if (this.currentPath) return this.currentPath.startsWith(path); + return false; + } + + toUpperCaseFileModel(data: any): FileInfo { + return { + AbsolutePath: data.absolutePath || data.AbsolutePath, + Path: data.path || data.Path, + Content: data.content || data.Content, + CreationDate: data.creationDate || data.CreationDate, + LastModDate: data.lastModDate || data.LastModDate, + Name: data.name || data.Name, + PreviewBase64: data.previewBase64 || data.PreviewBase64 + } as FileInfo; + } + + async fileInfo(str, fromdepth: number) { + this.lastClickPath = str; + if (fromdepth == 1) + this.secondColumnData.splice(0, this.secondColumnData.length); + + if (this.isLocalNavigation && typeof cmsClient != "undefined") + this.selectedFile = this.toUpperCaseFileModel( + JSON.parse(cmsClient.getProgramInfo(str)) + ); + + if (!this.isLocalNavigation) + this.selectedFile = this.toUpperCaseFileModel( + await awaiter(fileService.getFileInfo(str))); + } + close() { + Factory.Get(MessageService).deleteChannel("esc_pressed"); + ModalHelper.HideModal(); + } + reload() { + this.driveList = JSON.parse(cmsClient.getOSdriveList()); + } + + getDate(date) { + return moment(date).format("L"); + } + + async loadProgram(path: string) { + if (this.isLocalNavigation && typeof cmsClient != "undefined") { + var resp = cmsClient.uploadAndAddToQueue(path, 1); + if(resp != "") + (iziToast as any).error({ + title: resp.split(";")[0], + message: resp.split(";")[1], + theme: "dark", + timeout: 10000, + class: "t-error", + transitionOut: "fadeOut", + }) + else + this.close(); + } + + // if (!this.isLocalNavigation) { + // await awaiter(fileService.activateProgram(path)); + // this.close(); + // } + } +} diff --git a/Step/wwwroot/src/modules/base-components/modal-add-element-queue.vue b/Step/wwwroot/src/modules/base-components/modal-add-element-queue.vue new file mode 100644 index 00000000..4fd74d4a --- /dev/null +++ b/Step/wwwroot/src/modules/base-components/modal-add-element-queue.vue @@ -0,0 +1,123 @@ + + \ No newline at end of file diff --git a/Step/wwwroot/src/modules/base-components/popup.ts b/Step/wwwroot/src/modules/base-components/popup.ts new file mode 100644 index 00000000..420f6883 --- /dev/null +++ b/Step/wwwroot/src/modules/base-components/popup.ts @@ -0,0 +1,15 @@ +import Vue from "vue"; +import { Component } from "vue-property-decorator"; + +@Component({ + name: "popup", + props: { + title: String, + type: String, + arrow: String + } +}) +export default class Popup extends Vue { + + +} \ No newline at end of file diff --git a/Step/wwwroot/src/modules/base-components/popup.vue b/Step/wwwroot/src/modules/base-components/popup.vue new file mode 100644 index 00000000..772f1b0b --- /dev/null +++ b/Step/wwwroot/src/modules/base-components/popup.vue @@ -0,0 +1,14 @@ + + diff --git a/Step/wwwroot/src/modules/machine-info-dialog.vue b/Step/wwwroot/src/modules/machine-info-dialog.vue index bc43dabb..be67596f 100644 --- a/Step/wwwroot/src/modules/machine-info-dialog.vue +++ b/Step/wwwroot/src/modules/machine-info-dialog.vue @@ -24,10 +24,10 @@
- - - - + + + +
diff --git a/Step/wwwroot/src/modules/under-the-hood/nc-hmi-menu.vue b/Step/wwwroot/src/modules/under-the-hood/nc-hmi-menu.vue index 6a2ef3d0..62c14ea4 100644 --- a/Step/wwwroot/src/modules/under-the-hood/nc-hmi-menu.vue +++ b/Step/wwwroot/src/modules/under-the-hood/nc-hmi-menu.vue @@ -2,7 +2,9 @@
-
@@ -12,6 +14,9 @@