diff --git a/CMS_CORE_Application/Form1.cs b/CMS_CORE_Application/Form1.cs index a02bc86..566550e 100644 --- a/CMS_CORE_Application/Form1.cs +++ b/CMS_CORE_Application/Form1.cs @@ -223,7 +223,7 @@ namespace CMS_CORE_Application // MagazineId = 1, // PositionId = 1 //}); - cmsError = N.TOOLS_WUnloadToolInMagazine(1, 53); + // cmsError = N.TOOLS_WUnloadToolInMagazine(1, 53); // cmsError = N.TOOLS_WLoadToolInMagazine(1, new NewToolInMagazineModel() { PositionId = 31, ToolId = 3 }); //cmsError = N.PLC_WRefreshAllMessages(); //cmsError = N.PLC_RHeadsData(headsTest, 1); diff --git a/CMS_CORE_Library/DataStructures.cs b/CMS_CORE_Library/DataStructures.cs index ad92341..425cb08 100644 --- a/CMS_CORE_Library/DataStructures.cs +++ b/CMS_CORE_Library/DataStructures.cs @@ -335,7 +335,9 @@ namespace CMS_CORE_Library MAX_MULTITOOL_LOCATION_REACHED = 17, MAG_POS_OCCUPIED = 18, MAGAZINE_OCCUPIED = 19, - TOOL_MOUNTED = 20 + TOOL_IS_MOUNTED = 20, + TOOL_AND_POSITION_NOT_MATCHING = 21 + } internal static CmsError NO_ERROR = new CmsError(CMS_ERROR_CODES.OK, ""); @@ -354,9 +356,11 @@ namespace CMS_CORE_Library internal static CmsError MAX_MULTITOOL_REACHED_ERROR = new CmsError(CMS_ERROR_CODES.MAX_MULTITOOL_REACHED, "error_max_multitools_reached"); internal static CmsError MAX_TOOLS_PER_MULTITOOL_REACHED_ERROR = new CmsError(CMS_ERROR_CODES.MAX_TOOLS_PER_MULTITOOL_REACHED, "error_max_tools_per_multitool_reached"); internal static CmsError MAX_MULTITOOL_LOCATION_REACHED_ERROR = new CmsError(CMS_ERROR_CODES.MAX_MULTITOOL_LOCATION_REACHED, "error_max_multitools_location_reached"); - internal static CmsError MAG_POS_OCCUPIED_ERROR = new CmsError(CMS_ERROR_CODES.MAG_POS_OCCUPIED, "error_magazine_position_occupied"); - internal static CmsError MAGAZINE_OCCUPIED_ERROR = new CmsError(CMS_ERROR_CODES.MAGAZINE_OCCUPIED, "error_magazine_occupied"); - internal static CmsError TOOL_MOUNTED_ERROR = new CmsError(CMS_ERROR_CODES.TOOL_MOUNTED, "error_tool_mounted"); + internal static CmsError MAGAZINE_POSITION_OCCUPIED_ERROR = new CmsError(CMS_ERROR_CODES.MAG_POS_OCCUPIED, "error_magazine_position_occupied"); + internal static CmsError MAGAZINE_BUSY_ERROR = new CmsError(CMS_ERROR_CODES.MAGAZINE_OCCUPIED, "error_magazine_occupied"); + internal static CmsError TOOL_IS_MOUNTED_ERROR = new CmsError(CMS_ERROR_CODES.TOOL_IS_MOUNTED, "error_tool_mounted"); + internal static CmsError TOOL_AND_POSITION_NOT_MATCHING_ERROR = new CmsError(CMS_ERROR_CODES.TOOL_IS_MOUNTED, "error_tool_and_position_not_matching"); + #endregion Cms Errors Codes @@ -656,6 +660,8 @@ namespace CMS_CORE_Library public int MaxToolsPerMultitools; public bool MultitoolOptionActive; + public bool FamilyOptionActive; + public bool MagPositionOptionActive; public List Magazines; public List ToolsConfiguration; diff --git a/CMS_CORE_Library/Demo/ILibraryService.cs b/CMS_CORE_Library/Demo/ILibraryService.cs index 39a15c6..8e88292 100644 --- a/CMS_CORE_Library/Demo/ILibraryService.cs +++ b/CMS_CORE_Library/Demo/ILibraryService.cs @@ -229,6 +229,9 @@ namespace Nc_Demo_Application.Server.Service [WebGet(UriTemplate = "tool_table/magazines_action", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json)] void GetMagazinesAction(out MagazineActionModel magazinesAction); + + [WebGet(UriTemplate = "tool_table/config", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json)] + void GetToolManagerConfiguration(out DemoToolManagerConfig config); #endregion } diff --git a/CMS_CORE_Library/Demo/Models/ToolDataModel.cs b/CMS_CORE_Library/Demo/Models/ToolDataModel.cs index 53de5a1..835744b 100644 --- a/CMS_CORE_Library/Demo/Models/ToolDataModel.cs +++ b/CMS_CORE_Library/Demo/Models/ToolDataModel.cs @@ -76,4 +76,14 @@ namespace CMS_CORE.Demo.Models public string FamilyName; public int ToolType; } + public class DemoToolManagerConfig + { + public int MaxTools; + public int MaxEdgePerTools; + public int MaxMultitools; + public int MaxToolsPerMultitools; + public bool MultitoolOption; + public bool FamilyOption; + public bool MagPositionOption; + } } \ No newline at end of file diff --git a/CMS_CORE_Library/Demo/Nc_Demo.cs b/CMS_CORE_Library/Demo/Nc_Demo.cs index 4fd1c9e..5ba4024 100644 --- a/CMS_CORE_Library/Demo/Nc_Demo.cs +++ b/CMS_CORE_Library/Demo/Nc_Demo.cs @@ -1652,36 +1652,51 @@ namespace CMS_CORE.Demo public override CmsError TOOLS_RConfiguration(ref ToolTableConfiguration config) { - config.ToolsConfiguration = SiemensToolFieldsConfig; - config.FamiliesConfiguration = SiemensFamilyFieldsConfig; - config.ShanksConfiguration = SiemensShankFieldsConfig; - config.MagazinePosConfiguration = SiemensMagazinePosFieldsConfig; - config.EdgesConfiguration = SiemensEdgesFieldsConfiguration; - - config.MaxTools = MAX_TOOL_NUMER; - config.MaxEdgesPerTools = MAX_EDGES_PER_TOOL; - config.MaxToolsPerFamily = MAX_TOOLS_PER_FAMILY; - config.MaxMultitools = MAX_MULTITOOLS_NUMBER; - config.MaxToolsPerMultitools = MAX_TOOLS_PER_MULTITOOLS; - - config.EdgesConfiguration.EdgesAdditionalParamsConfiguration = new Dictionary>(); - // Remove path and set only names - foreach (int key in DemoEdgesConfiguration.EdgesConfig.Keys) + try { - List tmpNames = new List(); - foreach (var conf in DemoEdgesConfiguration.EdgesConfig[key]) - { - tmpNames.Add(conf.Name); - } - config.EdgesConfiguration.EdgesAdditionalParamsConfiguration.Add(key, tmpNames); - } + config.ToolsConfiguration = SiemensToolFieldsConfig; + config.FamiliesConfiguration = SiemensFamilyFieldsConfig; + config.ShanksConfiguration = SiemensShankFieldsConfig; + config.MagazinePosConfiguration = SiemensMagazinePosFieldsConfig; + config.EdgesConfiguration = SiemensEdgesFieldsConfiguration; - config.Magazines = new List() + // Get config from demo + serverService.GetToolManagerConfiguration(out DemoToolManagerConfig demoConf); + + config.MaxTools = demoConf.MaxTools; + config.MaxEdgesPerTools = demoConf.MaxEdgePerTools; + config.MaxToolsPerFamily = demoConf.MaxMultitools; + config.MaxMultitools = demoConf.MaxMultitools; + config.MaxToolsPerMultitools = demoConf.MaxToolsPerMultitools; + // Options + config.MultitoolOptionActive = demoConf.MultitoolOption; + config.FamilyOptionActive = demoConf.FamilyOption; + config.MagPositionOptionActive = demoConf.MagPositionOption; + + config.EdgesConfiguration.EdgesAdditionalParamsConfiguration = new Dictionary>(); + // Remove path and set only names + foreach (int key in DemoEdgesConfiguration.EdgesConfig.Keys) + { + List tmpNames = new List(); + foreach (var conf in DemoEdgesConfiguration.EdgesConfig[key]) + { + tmpNames.Add(conf.Name); + } + config.EdgesConfiguration.EdgesAdditionalParamsConfiguration.Add(key, tmpNames); + } + + config.Magazines = new List() { new MagazineModel{Id = 1, Type = MAGAZINE_TYPE.MAGAZINE}, new MagazineModel{Id = 2, Type = MAGAZINE_TYPE.MAGAZINE}, new MagazineModel{Id = 3, Type = MAGAZINE_TYPE.SPINDLE}, }; + } + catch (Exception ex) + { + return ManageException(ex); + } + return NO_ERROR; } diff --git a/CMS_CORE_Library/Siemens/Nc_Siemens.cs b/CMS_CORE_Library/Siemens/Nc_Siemens.cs index ea1c18e..8a33791 100644 --- a/CMS_CORE_Library/Siemens/Nc_Siemens.cs +++ b/CMS_CORE_Library/Siemens/Nc_Siemens.cs @@ -7,7 +7,6 @@ using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; -using System.Reflection; using System.Text; using System.Text.RegularExpressions; using System.Threading; @@ -58,7 +57,7 @@ namespace CMS_CORE.Siemens private const string LOCALE_TOOL_FILE_PATH = "C:\\TO_INI.INI"; // Global Variables - private DateTime Last_Static_Read; + private static DateTime Last_Static_Read; private ushort TimeoutConn; private String Cnc_name; @@ -71,7 +70,9 @@ namespace CMS_CORE.Siemens private List ChannelAxesId; // Alarms Handler - private AlarmSvc SiemensAlmSvc; + private AlarmSvc SiemensAlmSvc = null; + + private Alarm[] SiemensAlarms; // Tool table listeners private static ToolMngmntSvc SiemensToolSvc = null; @@ -93,8 +94,6 @@ namespace CMS_CORE.Siemens private static bool LIFE_OPTION_ACTIVE; private static bool MULTITOOL_OPTION_ACTIVE; - private Alarm[] SiemensAlarms; - private static string PlcMessagesFilePath = "C:\\Program Files (x86)\\Siemens\\MotionControl\\oem\\sinumerik\\hmi\\lng\\"; private const string AXES_FILE_PATH = "C:\\CMS\\axes.xml"; @@ -144,15 +143,11 @@ namespace CMS_CORE.Siemens if (cmsError.IsError()) return cmsError; - //Set Connected to FALSE and close the session + // Set Connected to FALSE and close the session Connected = true; - //Read static Data - cmsError = ReadStaticNCData(); - if (cmsError.IsError()) - return cmsError; - //Setup the alarms (Only managed in this way (Siemens Thread) + SiemensAlarms = new Alarm[] { }; SiemensAlmSvc = new AlarmSvc(ConvertToSTEPLanguage(SiemensLanguage).ThreeLetterISOLanguageName); SiemensAlmSvc.Subscribe(AlarmsChanged); @@ -160,10 +155,10 @@ namespace CMS_CORE.Siemens if (SiemensToolSvc == null) { SiemensToolSvc = new ToolMngmntSvc(1); + ToolMngmtListGuid = SiemensToolSvc.Subscribe(ToolMngmtSvcHandler); MagazinePositionSvc = new DataSvc(); MagazineActionsSvc = new DataSvc(); - ToolMngmtListGuid = SiemensToolSvc.Subscribe(ToolMngmtSvcHandler); SetupToolTableData(); } } @@ -182,6 +177,11 @@ namespace CMS_CORE.Siemens Connected = false; if (SiemensToolSvc != null) SiemensToolSvc.UnSubscribe(ToolMngmtSvcHandler); + if (MagazinePositionSvc != null) + MagazinePositionSvc.UnSubscribe(MagazinePositionEnabled_OnChange); + if (MagazineActionsSvc != null) + MagazineActionsSvc.UnSubscribe(MagazineAction_OnChange); + return NO_ERROR; } @@ -229,9 +229,10 @@ namespace CMS_CORE.Siemens if (!LIFE_OPTION_ACTIVE) RemoveLifeParamsFromConfig(); - // Parse file + // Read file PopulateToolsTableFromFileStrings(toolsStrings); + Array.Clear(toolsStrings, 0, toolsStrings.Count()); // Setup magazine positions listener List magPosItems = new List(); foreach (var position in MagazinePositionsData) @@ -244,8 +245,9 @@ namespace CMS_CORE.Siemens }); } - // Subscribe - MagazinePositionSvc.Subscribe(MagazinePositionEnabled_OnChange, magPosItems.ToArray()); + if (magPosItems.Count > 0) + // Subscribe + MagazinePositionSvc.Subscribe(MagazinePositionEnabled_OnChange, magPosItems.ToArray()); // Setup magazine actions listener Item magActionsItem = new Item() @@ -487,6 +489,7 @@ namespace CMS_CORE.Siemens alarms = SiemensAlarms. Where(x => (x.Id < IDMinPLCMessage || x.Id > IDMaxPLCMessage) && (x.Id < IDMinChannel || x.Id > IDMaxChannel)) .Select(x => new AlarmModel() { Id = (uint)x.Id, Message = x.Message, IsWarning = false, Process = 0, DateTime = x.TimeStamp }) + .GroupBy(x => x.Id).Select(x => x.First()) .ToList(); return NO_ERROR; @@ -1884,8 +1887,12 @@ namespace CMS_CORE.Siemens config.MaxToolsPerFamily = MAX_TOOLS_PER_FAMILY; config.MaxMultitools = MAX_MULTITOOLS_NUMBER; config.MaxToolsPerMultitools = MAX_TOOLS_PER_MULTITOOL; + // Set options config.MultitoolOptionActive = MULTITOOL_OPTION_ACTIVE; + config.FamilyOptionActive = true; + config.MagPositionOptionActive = true; + // Set fields configurations config.ToolsConfiguration = SiemensToolFieldsConfig; config.FamiliesConfiguration = SiemensFamilyFieldsConfig; @@ -2075,7 +2082,7 @@ namespace CMS_CORE.Siemens // Check if tool is mounted in magazine bool isMounted = MagazineMountedTools.Exists(x => x.ToolId == tool.Id); if (isMounted) - return TOOL_MOUNTED_ERROR; + return TOOL_IS_MOUNTED_ERROR; try { @@ -2126,6 +2133,20 @@ namespace CMS_CORE.Siemens public override CmsError TOOLS_RShanksData(ref List shanksData) { shanksData = MultitoolsData; + + foreach (ShankModel shank in shanksData) + { + foreach (ShankChildModel child in shank.ChildsTools) + { + // Find tool by id + SiemensToolModel tool = ToolTableData.Where(x => x.Id == child.Id).First(); + if (tool != null) + { + child.FamilyName = tool.FamilyName; + child.ToolType = tool.ToolType; + } + } + } return NO_ERROR; } @@ -2136,7 +2157,7 @@ namespace CMS_CORE.Siemens return MAX_MULTITOOL_REACHED_ERROR; // Check data - CmsError cmsError = CheckMultitoolData(ref shank); + CmsError cmsError = CheckMultitoolData(ref shank, false); if (cmsError.IsError()) return cmsError; @@ -2163,7 +2184,7 @@ namespace CMS_CORE.Siemens DataSvc dataSvc = new DataSvc(); // WriteMultitool position type = 0 in order to load tools - for(int i = 0; i < MAX_TOOLS_PER_MULTITOOL; i++) + for (int i = 0; i < MAX_TOOLS_PER_MULTITOOL; i++) { int paramId = (i * 6) + 3; @@ -2189,7 +2210,7 @@ namespace CMS_CORE.Siemens public override CmsError TOOLS_WUpdateShank(ref ShankModel shank) { - CmsError cmsError = CheckMultitoolData(ref shank); + CmsError cmsError = CheckMultitoolData(ref shank, true); if (cmsError.IsError()) return cmsError; @@ -2225,7 +2246,7 @@ namespace CMS_CORE.Siemens return NO_ERROR; } - private CmsError CheckMultitoolData(ref ShankModel shank) + private CmsError CheckMultitoolData(ref ShankModel shank, bool isUpdate) { //Check if the NC is Connected CmsError cmsError = CheckConnection(); @@ -2238,16 +2259,15 @@ namespace CMS_CORE.Siemens int totalNumberOfChilds = 0; foreach (ShankModel multi in MultitoolsData) { - if (shank.Name == multi.Name) + if (shank.Name == multi.Name && shank.Id != multi.Id) return INCORRECT_PARAMETERS_ERROR; // Calculate max number of childs totalNumberOfChilds += multi.MaxChilds; } // Check if there are enough locations - if (totalNumberOfChilds + MAX_TOOLS_PER_MULTITOOL > MAX_MULTITOOLS_LOCATIONS) + if (!isUpdate && totalNumberOfChilds + MAX_TOOLS_PER_MULTITOOL > MAX_MULTITOOLS_LOCATIONS) return MAX_MULTITOOL_LOCATION_REACHED_ERROR; - return NO_ERROR; } @@ -2265,7 +2285,7 @@ namespace CMS_CORE.Siemens // Check if multitool is mounted in magazine bool isMounted = MagazineMountedTools.Exists(x => x.ToolId == multitool.Id); if (isMounted) - return TOOL_MOUNTED_ERROR; + return TOOL_IS_MOUNTED_ERROR; try { // Create string parameters @@ -2488,18 +2508,39 @@ namespace CMS_CORE.Siemens public override CmsError TOOLS_WLoadToolInMagazine(int magazineId, NewToolInMagazineModel newMagazineTool) { - //Check if the NC is Connected - CmsError cmsError = CheckConnection(); - if (cmsError.IsError()) - return cmsError; + // Check if magazine is occupied + if (MagazineAction.Action != MAGAZINE_ACTIONS.NONE) + return MAGAZINE_BUSY_ERROR; + + // Get magazine position type + PositionModel position = MagazinePositionsData.Where(x => x.PositionId == newMagazineTool.PositionId && x.MagazineId == magazineId).FirstOrDefault(); + if (position == null) + return INCORRECT_PARAMETERS_ERROR; + + // Get tool data + var tool = ToolTableData.Where(x => x.Id == newMagazineTool.ToolId).FirstOrDefault(); + if (tool == null) + return INCORRECT_PARAMETERS_ERROR; // Check if magazine position is occupied MountedToolModel magPos = MagazineMountedTools.Where(x => x.MagazineId == magazineId && x.PositionId == newMagazineTool.PositionId).FirstOrDefault(); if (magPos != null) - return MAG_POS_OCCUPIED_ERROR; + return MAGAZINE_POSITION_OCCUPIED_ERROR; - if (MagazineAction.Action != MAGAZINE_ACTIONS.NONE) - return MAGAZINE_OCCUPIED_ERROR; + // Check type + if (tool.MagazinePositionType != position.Type) + return TOOL_AND_POSITION_NOT_MATCHING_ERROR; + + for (int i = 1; i < tool.LeftSize; i++) + { + int nextPos = (60 - (newMagazineTool.PositionId - i)); + MagazinePositionsData.FindIndex(x => x.MagazineId == magazineId && x.PositionId == nextPos); + } + + //Check if the NC is Connected + CmsError cmsError = CheckConnection(); + if (cmsError.IsError()) + return cmsError; try { @@ -2528,14 +2569,14 @@ namespace CMS_CORE.Siemens public override CmsError TOOLS_WUnloadToolInMagazine(int magazineId, int positionId) { + if (MagazineAction.Action != MAGAZINE_ACTIONS.NONE) + return MAGAZINE_BUSY_ERROR; + //Check if the NC is Connected CmsError cmsError = CheckConnection(); if (cmsError.IsError()) return cmsError; - if (MagazineAction.Action != MAGAZINE_ACTIONS.NONE) - return MAGAZINE_OCCUPIED_ERROR; - try { //UnLoad tool in magazine @@ -2563,6 +2604,14 @@ namespace CMS_CORE.Siemens public override CmsError TOOLS_WLoadToolIntoShank(int shankId, int positionId, int toolId) { + // Check if mt exists + ShankModel shank = MultitoolsData.Where(x => x.Id == shankId).FirstOrDefault(); + if (shank == null) + return INCORRECT_PARAMETERS_ERROR; + // Check if tool can be loaded + if (shank.ChildsTools.Count >= MAX_TOOLS_PER_MULTITOOL) + return MAX_TOOLS_PER_MULTITOOL_REACHED_ERROR; + //Check if the NC is Connected CmsError cmsError = CheckConnection(); if (cmsError.IsError()) @@ -2570,14 +2619,6 @@ namespace CMS_CORE.Siemens try { - // Check if can load - ShankModel shank = MultitoolsData.Where(x => x.Id == shankId).FirstOrDefault(); - if (shank == null) - return INCORRECT_PARAMETERS_ERROR; - - if (shank.ChildsTools.Count >= MAX_TOOLS_PER_MULTITOOL) - return MAX_TOOLS_PER_MULTITOOL_REACHED_ERROR; - DataSvc dataSvc = new DataSvc(); int paramId = ((positionId - 1) * 6) + 5; @@ -2672,9 +2713,9 @@ namespace CMS_CORE.Siemens foreach (var pos in magazinePos) { - var tool = GetToolOrMultitool(pos.ToolId); + var tool = GetToolOrMultitool(pos.ToolId); if (tool is SiemensToolModel) - pos.ChildTool = GetToolOrMultitool(pos.ToolId) as SiemensToolModel; + pos.ChildTool = tool as SiemensToolModel; else if (tool is ShankModel) pos.ChildShank = tool as ShankModel; } @@ -2695,13 +2736,18 @@ namespace CMS_CORE.Siemens if (tool is ShankModel) // If multitool { mountedIds.Add((tool as ShankModel).Id); // Add multitool id - mountedIds.AddRange((tool as ShankModel).ChildsTools.Select(x => x.Id).ToList()); // Add childsId } else if (tool is SiemensToolModel) // If tool { mountedIds.Add((tool as SiemensToolModel).Id); } } + // Add tools mounted in multitools + foreach (var multi in MultitoolsData) + { + if (multi.ChildsTools.Count > 0) + mountedIds.AddRange(multi.ChildsTools.Select(x => x.Id).ToList()); + } // Filter tools tools = ToolTableData @@ -3051,44 +3097,6 @@ namespace CMS_CORE.Siemens return false; } - private void MountToolToMagazineList(int toolId, int magazineId, int positionId) - { - // Find if position exist - MountedToolModel mounted = MagazineMountedTools - .Where(x => x.MagazineId == magazineId && x.PositionId == positionId) - .FirstOrDefault(); - if (mounted != null) - return; - - int foundId = 0; - // Find tool by id - SiemensToolModel tool = ToolTableData.Where(x => x.Id == toolId).FirstOrDefault(); - // Find position by id - if (tool != null) - { - // Add new Magazine-Tool - foundId = tool.Id; - } - else - { - // Find shank by id - ShankModel shank = MultitoolsData.Where(x => x.Id == toolId).FirstOrDefault(); - if (shank != null) - { - foundId = shank.Id; - } - } - - if (foundId > 0) - // Add new MagazinePos-Tool - MagazineMountedTools.Add(new MountedToolModel() - { - MagazineId = magazineId, - PositionId = positionId, - ToolId = tool.Id - }); - } - //private void CheckData(object obj, List config) //{ // foreach(PropertyInfo prop in obj.GetType().GetProperties()) @@ -3536,7 +3544,7 @@ namespace CMS_CORE.Siemens } break; - case "$TC_MPP1": + case "$TC_MPP2": { MagazinePositionsData.Add(new PositionModel() { @@ -3571,15 +3579,11 @@ namespace CMS_CORE.Siemens int toolId = Convert.ToInt32(actualString.Split('=').LastOrDefault()); if (toolId != 0) { - // Find tool by id - SiemensToolModel tool = ToolTableData.Where(x => x.Id == toolId).First(); // Add new multitool child MultitoolsData[multitoolIndex].ChildsTools.Add(new ShankChildModel() { Id = toolId, - MultitoolId = secondId, - FamilyName = tool.FamilyName, - ToolType = tool.ToolType + MultitoolId = secondId }); } } @@ -3708,14 +3712,48 @@ namespace CMS_CORE.Siemens LeftSize = Convert.ToByte(toolsStrings.FirstOrDefault(X => X.StartsWith("$TC_MTP3[" + multitoolId)).Split('=').LastOrDefault()), RightSize = Convert.ToByte(toolsStrings.FirstOrDefault(X => X.StartsWith("$TC_MTP4[" + multitoolId)).Split('=').LastOrDefault()), MagazinePositionType = Convert.ToByte(toolsStrings.FirstOrDefault(x => x.StartsWith("$TC_MTP7[" + multitoolId)).Split('=').LastOrDefault()), + MaxChilds = Convert.ToInt32(toolsStrings.FirstOrDefault(x => x.StartsWith("$TC_MTPN[" + multitoolId)).Split('=').LastOrDefault()), IsEnabled = GetBitValue(toolStatus, 2), IsInhibited = GetBitValue(toolStatus, 3), InChangeTool = GetBitValue(toolStatus, 6), InFixedPlace = GetBitValue(toolStatus, 7), InUse = GetBitValue(toolStatus, 8), - ChildsTools = oldShank == null ? new List() : oldShank.ChildsTools + ChildsTools = new List() }; + // Populate shank childs + for (int i = 1; i <= MAX_TOOLS_PER_MULTITOOL; i++) + { + // Find if position exists + var multitoolPos = toolsStrings.FirstOrDefault(x => x.Contains("$TC_MTPP6[" + multitoolId + "," + i)); + if (multitoolPos != null) + { + // If not empty + int toolId = Convert.ToInt32(multitoolPos.Split('=').LastOrDefault()); + if (toolId != 0) + { + shank.ChildsTools.Add(new ShankChildModel() + { + Id = toolId, + MultitoolId = i + }); + } + } + } + + // Check position in magazine + // Read magazine id from memory + DataSvc dataSvc = new DataSvc(); + Item item = new Item() { Path = string.Format("/Tool/MT/multitoolInMag[{0}]", multitoolId) }; + // Read magazine position + dataSvc.Read(item); + int magazineId = Convert.ToInt32(item.Value); + item = new Item() { Path = string.Format("/Tool/MT/multitoolInPlace[{0}]", multitoolId) }; + dataSvc.Read(item); + int positionId = Convert.ToInt32(item.Value); + + MountToolToMagazineList(multitoolId, magazineId, positionId); + return shank; } @@ -3759,24 +3797,24 @@ namespace CMS_CORE.Siemens private void ToolMngmtSvcHandler(Guid guid, ToolInfo[] toolInfos) { - try - { - // For each new action - for (int i = 0; i < toolInfos.Count(); i++) - { // Choose behavior based on the actions - ActionsHandler(toolInfos[i]); - } - } - catch (Exception ex) - { - Console.WriteLine(ex.Message); + //try + //{ + // string[] toolsStrings = ReadToolTableFile(); + // PopulateToolsTableFromFileStrings(toolsStrings); + // For each new action + for (int i = 0; i < toolInfos.Count(); i++) + { // Choose behavior based on the actions + ActionsHandler(toolInfos[i]); } -} + //} + //catch (Exception ex) + //{ + // Console.WriteLine(ex.Message); + //} + } private void ActionsHandler(ToolInfo toolInfo) { - string[] toolsStrings = ReadToolTableFile(); - switch (toolInfo.action) { case ToolAction.TOOL_DELETED: @@ -3807,7 +3845,7 @@ namespace CMS_CORE.Siemens case ToolAction.TOOL_CREATED: { - // string[] toolsStrings = ReadToolTableFile(); + string[] toolsStrings = ReadToolTableFile(); SiemensToolModel newTool = CreateToolFromId((int)toolInfo.tNo, toolsStrings); if (newTool != null) @@ -3825,7 +3863,7 @@ namespace CMS_CORE.Siemens case ToolAction.TOOL_DATA_CHANGED: { - // string[] toolsStrings = ReadToolTableFile(); + string[] toolsStrings = ReadToolTableFile(); // Fin edited toolIndex int toolIndex = ToolTableData.FindIndex(t => t.Id == toolInfo.tNo); @@ -3858,58 +3896,94 @@ namespace CMS_CORE.Siemens MultitoolsData.Add(newMultitool); } } + + Array.Clear(toolsStrings, 0, toolsStrings.Count()); } break; case ToolAction.TOOL_MOVED: { - // Read magazine id from memory - DataSvc dataSvc = new DataSvc(); - Item item = new Item() { Path = string.Format("/Tool/Data/toolInMag[{0}]", toolInfo.tNo) }; - try + int magazineId = 0; + int positionId = 0; + + var tool = GetToolOrMultitool(Convert.ToInt32(toolInfo.tNo)); + if (tool is SiemensToolModel) { - dataSvc.Read(item); - int magazineId = Convert.ToInt32(item.Value); - item = new Item() { Path = string.Format("/Tool/Data/toolInPlace[{0}]", toolInfo.tNo) }; - dataSvc.Read(item); - int positionId = Convert.ToInt32(item.Value); - - // Remove tool from list - MagazineMountedTools.RemoveAll(mountTool => PositionContainsTool(mountTool, (int)toolInfo.tNo)); - - // If load magazine != 0, add new tool - if (magazineId != 0) + // TODO remove when Siemens Library bugs have been fixed + if (ToolIsInMultitool((int)toolInfo.tNo)) + return; + else { - MountToolToMagazineList((int)toolInfo.tNo, magazineId, positionId); + // Read magazine id from memory + DataSvc dataSvc = new DataSvc(); + Item item = new Item() { Path = string.Format("/Tool/Data/toolInMag[{0}]", (int)toolInfo.tNo) }; + // Read magazine position + dataSvc.Read(item); + magazineId = Convert.ToInt32(item.Value); + item = new Item() { Path = string.Format("/Tool/Data/toolInPlace[{0}]", toolInfo.tNo) }; + dataSvc.Read(item); + positionId = Convert.ToInt32(item.Value); } } - catch ( Exception ex) - { - // Check that the move is inside a multitool - item = new Item() { Path = string.Format("/Tool/Data/toolInMultitool[{0}]", toolInfo.tNo) }; - dataSvc.Read(item); - // Check if readed multitool id exists - int mtIndex = MultitoolsData.FindIndex(x => x.Id == Convert.ToInt32(item.Value)); - if(mtIndex >= 0) - { - int childIndex = MultitoolsData[mtIndex].ChildsTools.FindIndex(x => x.Id == toolInfo.tNo); - if(childIndex < 0) - { - MultitoolsData[mtIndex].ChildsTools.Add(new ShankChildModel() - { - Id = Convert.ToInt32(toolInfo.tNo), - MultitoolId = MultitoolsData[mtIndex].ChildsTools.Count + 1 // TODO ADD TOOL DATA OR REMOVE - }); - } - } - } - + MountToolToMagazineList((int)toolInfo.tNo, magazineId, positionId); + + //catch (Exception ex) + //{ + // int shankIdx = MultitoolsData.FindIndex(x => x.Id == toolInfo.tNo); + // if (shankIdx < 0) + // { + // // Check that the move is inside a multitool + // item = new Item() { Path = string.Format("/Tool/Data/toolInMultitool[{0}]", toolInfo.tNo) }; + // dataSvc.Read(item); + // // Check if readed multitool id exists + // int mtIndex = MultitoolsData.FindIndex(x => x.Id == Convert.ToInt32(item.Value)); + // if (mtIndex >= 0) + // { + // int childIndex = MultitoolsData[mtIndex].ChildsTools.FindIndex(x => x.Id == toolInfo.tNo); + // if (childIndex < 0) + // { + // MultitoolsData[mtIndex].ChildsTools.Add(new ShankChildModel() + // { + // Id = Convert.ToInt32(toolInfo.tNo), + // MultitoolId = MultitoolsData[mtIndex].ChildsTools.Count + 1 // TODO ADD TOOL DATA OR REMOVE + // }); + // } + // } + // } + //} } break; } } + private void MountToolToMagazineList(int toolId, int magazineId, int positionId) + { + // Remove tool from list + MagazineMountedTools.RemoveAll(mountTool => PositionContainsTool(mountTool, toolId)); + + // If load magazine != 0, add new tool + if (magazineId != 0) + { + // Find if position exist + MountedToolModel mounted = MagazineMountedTools + .Where(x => x.MagazineId == magazineId && x.PositionId == positionId) + .FirstOrDefault(); + if (mounted != null) + return; + + // Find tool by id + var tool = GetToolOrMultitool(toolId); + if (tool is SiemensToolModel || tool is ShankModel) + MagazineMountedTools.Add(new MountedToolModel() + { + MagazineId = magazineId, + PositionId = positionId, + ToolId = toolId + }); + } + } + private int GetLastToolId() { Item item = new Item() @@ -4026,6 +4100,19 @@ namespace CMS_CORE.Siemens } } + private bool ToolIsInMultitool(int toolId) + { + foreach (ShankModel multi in MultitoolsData) + { + if (multi.ChildsTools.FindIndex(x => x.Id == toolId) >= 0) + { + return true; + } + } + + return false; + } + #endregion Tool private functions } diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Constants.cs b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Constants.cs index 8fd1392..348fa35 100644 --- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Constants.cs +++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Constants.cs @@ -10,6 +10,7 @@ namespace Nc_Demo_Application // Database query public const string READ_NC_DATA_QUERY = "SELECT * FROM nc_data"; + public const string READ_TOOL_MANAGER_CONFIG_QUERY = "SELECT * FROM tool_manager_config"; public const string READ_NC_PROCESS_QUERY = "SELECT * FROM process"; public const string READ_NC_ALARMS_QUERY = "SELECT * FROM alarm"; public const string READ_NC_AXES_QUERY = "SELECT * FROM axis"; @@ -17,7 +18,7 @@ namespace Nc_Demo_Application public const string READ_TOOLS_QUERY = "SELECT * FROM tool"; public const string READ_FAMILIES_QUERY = "SELECT * FROM family"; public const string READ_SHANKS_QUERY = "SELECT * FROM shank"; - public const string READ_MAGAZINES_QUERY = "SELECT * FROM magazine"; + public const string READ_MAGAZINES_QUERY = "SELECT * FROM magazine_position"; public const string READ_MAGAZINES_ACTION_QUERY = "SELECT * FROM magazine_status"; public const string READ_EDGES_QUERY = "SELECT * FROM edge"; diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Database/DatabaseController.cs b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Database/DatabaseController.cs index 7b79fe4..4062b65 100644 --- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Database/DatabaseController.cs +++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Database/DatabaseController.cs @@ -29,6 +29,7 @@ namespace Nc_Demo_Application.Database private DataTable MagazinesPositionDataTable; private DataTable MagazinesActionDataTable; private DataTable EdgeDataTable; + private DataTable ToolMagerConfigDataTable; #region Constructor & Private functions @@ -47,6 +48,8 @@ namespace Nc_Demo_Application.Database NcProcessDataTable = new DataTable(); BinaryMemory = new DataTable(); EdgeDataTable = new DataTable(); + ToolMagerConfigDataTable = new DataTable(); + // Create ncProcess columns NcProcessDataTable.Columns.Add("status", typeof(PROC_STATUS)); @@ -88,6 +91,7 @@ namespace Nc_Demo_Application.Database MagazinesPositionDataTable.Dispose(); EdgeDataTable.Dispose(); MagazinesActionDataTable.Dispose(); + ToolMagerConfigDataTable.Dispose(); // Close sql connection sqlConnection.Close(); @@ -213,6 +217,76 @@ namespace Nc_Demo_Application.Database #endregion Nc Data Methods + #region + + public ToolManagerConfig ReadToolManagerConfig() + { + try + { + ReadDataFromDatabase(READ_TOOL_MANAGER_CONFIG_QUERY, ref ToolMagerConfigDataTable); + + return GetToolManagerConfig(); + } + catch (Exception ex) + { + Console.WriteLine("ReadNcData exception: " + ex.Message); + return null; + } + } + + public ToolManagerConfig GetToolManagerConfig() + { + ToolManagerConfig ToolManConfig = new ToolManagerConfig(); + + // Populate ToolManagerConfig with db data + foreach (DataRow row in ToolMagerConfigDataTable.Rows) + { + ToolManConfig.MaxTools = Convert.ToInt32(row["max_tool"]); + ToolManConfig.MaxEdgePerTools = Convert.ToInt32(row["max_edges_per_tool"]); + ToolManConfig.MaxMultitools = Convert.ToInt32(row["max_multitool"]); + ToolManConfig.MaxToolsPerMultitools = Convert.ToInt32(row["max_tools_per_multitool"]); + ToolManConfig.MultitoolOption = Convert.ToBoolean(row["magazine_option"]); + ToolManConfig.FamilyOption = Convert.ToBoolean(row["family_option"]); + ToolManConfig.MagPositionOption = Convert.ToBoolean(row["mag_pos_option"]); + } + + return ToolManConfig; + } + + public ToolManagerConfig UpdateToolManagerConfig(ToolManagerConfig config) + { + try + { + // Update local ncDatatable data + foreach (DataRow row in ToolMagerConfigDataTable.Rows) + { + row["max_tool"] = config.MaxTools; + row["max_edges_per_tool"] = config.MaxEdgePerTools; + row["max_multitool"] = config.MaxMultitools; + row["max_tools_per_multitool"] = config.MaxToolsPerMultitools; + row["magazine_option"] = config.MultitoolOption ? 1 : 0; + row["family_option"] = config.FamilyOption ? 1 : 0; + row["mag_pos_option"] = config.MagPositionOption ? 1 : 0; + } + + UpdateToolManagerConfigQuery(ToolMagerConfigDataTable); + + return config; + } + catch (Exception ex) + { + Console.WriteLine("Update config exception: " + ex.Message); + } + + return null; + } + + private void UpdateToolManagerConfigQuery(DataTable config) + { + UpdateDatabaseFromDataTable(config, READ_TOOL_MANAGER_CONFIG_QUERY); + } + #endregion + #region Nc Processes Data public DataTable ReadNcProcesses() @@ -727,6 +801,7 @@ namespace Nc_Demo_Application.Database public List GetShanks() { int lastId = 0; + List shanks = new List(); foreach (DataRow row in ShanksDataTable.Rows) { @@ -736,7 +811,6 @@ namespace Nc_Demo_Application.Database lastId = Convert.ToInt32(row["id"]); // Create&Populate shanks childs - int i = 1; List childTools = GetToolsData() .Where(x => x.ShanksId == lastId) .Select(x => new ShankChildDataModel() @@ -744,7 +818,7 @@ namespace Nc_Demo_Application.Database Id = x.Id, ToolType = x.ToolType, FamilyName = x.FamilyName, - MultitoolId = i++ + MultitoolId = x.MultitoolId }) .ToList(); @@ -782,7 +856,7 @@ namespace Nc_Demo_Application.Database { // Create new row that must be inserted DataRow row = ShanksDataTable.NewRow(); - int id = GetToolMultiToolId(); + int id = GetNextToolOrMultiToolId(); // Setup autoincrement Id newShank.Id = id; @@ -907,6 +981,7 @@ namespace Nc_Demo_Application.Database Id = Convert.ToInt32(row["id"]), FamilyName = row["family"].ToString(), ChildId = Convert.ToInt32(row["childId"]), + MultitoolId = Convert.ToInt32(row["multitoolId"]), MagazinePositionType = Convert.ToInt32(row["magazinePositionType"]), ToolType = Convert.ToInt32(row["toolType"]), LeftSize = Convert.ToInt32(row["sizeLeft"]), @@ -949,7 +1024,7 @@ namespace Nc_Demo_Application.Database // Create new row that must be inserted DataRow row = ToolsDataTable.NewRow(); // Find & set new item Id - toolData.Id = GetToolMultiToolId(); + toolData.Id = GetNextToolOrMultiToolId(); // Get child id toolData.ChildId = GetFamilyChildId(toolData.FamilyName); @@ -974,7 +1049,8 @@ namespace Nc_Demo_Application.Database row["changeTool"] = toolData.InChangeTool; row["isInUse"] = toolData.IsInUse; row["preAlarm"] = toolData.PreAlarm; - row["shankId"] = toolData.ShanksId; + row["shankId"] = 0; + row["multitoolId"] = 0; // Add the new row ToolsDataTable.Rows.Add(row); @@ -1009,6 +1085,9 @@ namespace Nc_Demo_Application.Database else if (toolData.ChildId != 0) row["childId"] = toolData.ChildId; + if(toolData.MultitoolId != 0) + row["multitoolId"] = toolData.MultitoolId; + row["family"] = toolData.FamilyName; row["magazinePositionType"] = toolData.MagazinePositionType; row["toolType"] = toolData.ToolType; @@ -1041,7 +1120,7 @@ namespace Nc_Demo_Application.Database return null; } - public bool UpdateToolShank(int shankId, int toolId) + public bool UpdateToolShank(int shankId, int toolId, int positionId) { try { @@ -1052,6 +1131,7 @@ namespace Nc_Demo_Application.Database return false; row["shankId"] = shankId; + row["multitoolId"] = positionId; UpdateTool(ToolsDataTable); } @@ -1083,7 +1163,7 @@ namespace Nc_Demo_Application.Database return 1; } - private int GetToolMultiToolId() + private int GetNextToolOrMultiToolId() { int max = 0; if (ToolsDataTable.Rows.Count > 0) @@ -1331,7 +1411,8 @@ namespace Nc_Demo_Application.Database { PositionId = Convert.ToInt32(row["positionId"]), MagazineId = Convert.ToInt32(row["magazineId"]), - Type = Convert.ToInt32(row["type"]) + Type = Convert.ToInt32(row["type"]), + Disabled = Convert.ToInt32(row["disabled"]) == 1 }; positions.Add(tmpPositions); @@ -1360,7 +1441,8 @@ namespace Nc_Demo_Application.Database { PositionId = Convert.ToInt32(row["positionId"]), MagazineId = Convert.ToInt32(row["magazineId"]), - Type = Convert.ToInt32(row["type"]) + Type = Convert.ToInt32(row["type"]), + Disabled = Convert.ToInt32(row["disabled"]) == 1 }; int shankId = Convert.ToInt32(row["shankId"]); @@ -1431,6 +1513,7 @@ namespace Nc_Demo_Application.Database // Update positions type row["type"] = position.Type; + row["disabled"] = position.Disabled; // Save UpdatePositions(MagazinesPositionDataTable); } diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Database/Models/ToolsDataModel.cs b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Database/Models/ToolsDataModel.cs index 51e3847..006b747 100644 --- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Database/Models/ToolsDataModel.cs +++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Database/Models/ToolsDataModel.cs @@ -8,6 +8,7 @@ namespace Nc_Demo_Application.Database.Models public int Id; public string FamilyName; public int ChildId; + public int MultitoolId; public int MagazinePositionType; public int ToolType; public int LeftSize; @@ -58,6 +59,7 @@ namespace Nc_Demo_Application.Database.Models public int PositionId; public int MagazineId; public int Type; + public bool Disabled; public bool IsMultiTool; public ShankDataModel Shank; public PositionsChild ChildTools; @@ -69,7 +71,7 @@ namespace Nc_Demo_Application.Database.Models public string FamilyName; public int ToolType; } - + public class EdgesDataModel { public int Id; @@ -103,4 +105,14 @@ namespace Nc_Demo_Application.Database.Models public bool IsMultitool; } + public class ToolManagerConfig + { + public int MaxTools; + public int MaxEdgePerTools; + public int MaxMultitools; + public int MaxToolsPerMultitools; + public bool MultitoolOption; + public bool FamilyOption; + public bool MagPositionOption; + } } \ No newline at end of file diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Nc_Demo_Db.db b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Nc_Demo_Db.db index ebd862e..426c78f 100644 Binary files a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Nc_Demo_Db.db and b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Nc_Demo_Db.db differ diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Service/ILibraryService.cs b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Service/ILibraryService.cs index 69fa16d..0ef60e8 100644 --- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Service/ILibraryService.cs +++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Service/ILibraryService.cs @@ -231,6 +231,9 @@ namespace Nc_Demo_Application.Server.Service [WebGet(UriTemplate = "tool_table/magazines_action", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json)] void GetMagazinesAction(out MagazineActionModel magazinesAction); + + [WebGet(UriTemplate = "tool_table/config", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json)] + void GetToolManagerConfiguration(out ToolManagerConfig config); #endregion } } diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Service/LibraryService.cs b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Service/LibraryService.cs index fc05232..315f0b6 100644 --- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Service/LibraryService.cs +++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Service/LibraryService.cs @@ -517,22 +517,18 @@ namespace Nc_Demo_Application.Server.Service { if(Convert.ToInt32(toolId) != 0) { - DatabaseController.getInstance().UpdateToolShank(Convert.ToInt32(shankId), Convert.ToInt32(toolId)); + DatabaseController.getInstance().UpdateToolShank(Convert.ToInt32(shankId), Convert.ToInt32(toolId), Convert.ToInt32(positionId)); } else { + // Get tool in that position GetTools(out List tools); - tools = tools.Where(x => x.ShanksId == Convert.ToInt32(shankId)).ToList(); + var tool = tools.Where(x => x.ShanksId == Convert.ToInt32(shankId) && x.MultitoolId == Convert.ToInt32(positionId)).FirstOrDefault(); if(tools == null) throw new WebFaultException(HttpStatusCode.NotFound); - if(tools.Count < Convert.ToInt32(positionId)) - throw new WebFaultException(HttpStatusCode.BadRequest); - - tools[Convert.ToInt32(positionId) - 1].ShanksId = 0; - - DatabaseController.getInstance().UpdateToolData(tools[Convert.ToInt32(positionId) - 1]); + DatabaseController.getInstance().UpdateToolShank(0, tool.Id , 0); } } @@ -620,6 +616,12 @@ namespace Nc_Demo_Application.Server.Service { magazinesAction = DatabaseController.getInstance().GetMagazinesActionModel(); } + + public void GetToolManagerConfiguration(out ToolManagerConfig config) + { + config = DatabaseController.getInstance().GetToolManagerConfig(); + } + #endregion Positions } } \ No newline at end of file diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.Designer.cs b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.Designer.cs index 09ad62f..5b03f73 100644 --- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.Designer.cs +++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.Designer.cs @@ -39,8 +39,18 @@ namespace Nc_Demo_Application System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DemoApplicationForm)); this.serverStatusLabel = new System.Windows.Forms.Label(); this.ncDataPage = new System.Windows.Forms.TabPage(); - this.toolStrip5 = new Nc_Demo_Application.Views.ToolStripEx(); - this.saveNcDataButton = new System.Windows.Forms.ToolStripButton(); + this.magPositionOptionCheckbox = new System.Windows.Forms.CheckBox(); + this.familyOptCheckbox = new System.Windows.Forms.CheckBox(); + this.label31 = new System.Windows.Forms.Label(); + this.maxToolXMultiTxb = new System.Windows.Forms.TextBox(); + this.label30 = new System.Windows.Forms.Label(); + this.maxMultitoolTxb = new System.Windows.Forms.TextBox(); + this.label29 = new System.Windows.Forms.Label(); + this.maxEdgeXToolTxb = new System.Windows.Forms.TextBox(); + this.label28 = new System.Windows.Forms.Label(); + this.maxToolTxb = new System.Windows.Forms.TextBox(); + this.multitoolOptCheckbox = new System.Windows.Forms.CheckBox(); + this.label27 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); @@ -60,8 +70,6 @@ namespace Nc_Demo_Application this.NCNameLabel = new System.Windows.Forms.Label(); this.ncTabControl = new System.Windows.Forms.TabControl(); this.processPage = new System.Windows.Forms.TabPage(); - this.toolStrip1 = new Nc_Demo_Application.Views.ToolStripEx(); - this.saveNcProcessData = new System.Windows.Forms.ToolStripButton(); this.ncProcessGridView = new System.Windows.Forms.DataGridView(); this.ncProcessIdColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ProcessPartProgram = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -69,16 +77,12 @@ namespace Nc_Demo_Application this.ncProcessStatusColumn = new System.Windows.Forms.DataGridViewComboBoxColumn(); this.ncProcessModeColumn = new System.Windows.Forms.DataGridViewComboBoxColumn(); this.alarms = new System.Windows.Forms.TabPage(); - this.toolStrip3 = new Nc_Demo_Application.Views.ToolStripEx(); - this.saveNcAlarmsButton = new System.Windows.Forms.ToolStripButton(); this.ncAlarmsGridView = new System.Windows.Forms.DataGridView(); this.ncAlarmCodeColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ncAlarmProcessIdColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ncAlarmTextColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ncAlarmIdColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ncAxesPage = new System.Windows.Forms.TabPage(); - this.toolStrip4 = new Nc_Demo_Application.Views.ToolStripEx(); - this.saveNcAxesButton = new System.Windows.Forms.ToolStripButton(); this.ncAxisGridView = new System.Windows.Forms.DataGridView(); this.axisIdColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.axisNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -96,18 +100,9 @@ namespace Nc_Demo_Application this.BinaryMemoryBinaryColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.BinaryMemoryWordColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.BinaryMemoryIntegerColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.toolStrip2 = new Nc_Demo_Application.Views.ToolStripEx(); - this.saveBinaryMemoryButton = new System.Windows.Forms.ToolStripButton(); - this.addRowsBinaryMemory = new System.Windows.Forms.ToolStripButton(); - this.deleteRowsBinaryMemory = new System.Windows.Forms.ToolStripButton(); this.partProgramPage = new System.Windows.Forms.TabPage(); this.fileContentTextBox = new System.Windows.Forms.TextBox(); this.fileTreeView = new System.Windows.Forms.TreeView(); - this.toolStrip6 = new Nc_Demo_Application.Views.ToolStripEx(); - this.saveFileButton = new System.Windows.Forms.ToolStripButton(); - this.deleteFileButton = new System.Windows.Forms.ToolStripButton(); - this.addFileButton = new System.Windows.Forms.ToolStripButton(); - this.newFileNameTextBox = new System.Windows.Forms.ToolStripTextBox(); this.magazinesTab = new System.Windows.Forms.TabPage(); this.label26 = new System.Windows.Forms.Label(); this.label25 = new System.Windows.Forms.Label(); @@ -127,8 +122,7 @@ namespace Nc_Demo_Application this.positionType = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ShankId = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.magazineToolId = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.toolStripEx2 = new Nc_Demo_Application.Views.ToolStripEx(); - this.saveMagazinesButton = new System.Windows.Forms.ToolStripButton(); + this.disablePosition = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.familiesTab = new System.Windows.Forms.TabPage(); this.label18 = new System.Windows.Forms.Label(); this.shanksDataGridView = new System.Windows.Forms.DataGridView(); @@ -147,9 +141,9 @@ namespace Nc_Demo_Application this.familiesDataGridView = new System.Windows.Forms.DataGridView(); this.id = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.toolStripEx1 = new Nc_Demo_Application.Views.ToolStripEx(); - this.saveFamiliesButton = new System.Windows.Forms.ToolStripButton(); this.toolsPage = new System.Windows.Forms.TabPage(); + this.label32 = new System.Windows.Forms.Label(); + this.multitoolIdTxb = new System.Windows.Forms.TextBox(); this.label20 = new System.Windows.Forms.Label(); this.maxAccTxt = new System.Windows.Forms.TextBox(); this.label14 = new System.Windows.Forms.Label(); @@ -223,38 +217,59 @@ namespace Nc_Demo_Application this.param29 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.param30 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.param34 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.stopServer = new System.Windows.Forms.Button(); + this.versionLabel = new System.Windows.Forms.Label(); + this.toolStrip5 = new Nc_Demo_Application.Views.ToolStripEx(); + this.saveNcDataButton = new System.Windows.Forms.ToolStripButton(); + this.toolStrip1 = new Nc_Demo_Application.Views.ToolStripEx(); + this.saveNcProcessData = new System.Windows.Forms.ToolStripButton(); + this.toolStrip3 = new Nc_Demo_Application.Views.ToolStripEx(); + this.saveNcAlarmsButton = new System.Windows.Forms.ToolStripButton(); + this.toolStrip4 = new Nc_Demo_Application.Views.ToolStripEx(); + this.saveNcAxesButton = new System.Windows.Forms.ToolStripButton(); + this.toolStrip2 = new Nc_Demo_Application.Views.ToolStripEx(); + this.saveBinaryMemoryButton = new System.Windows.Forms.ToolStripButton(); + this.addRowsBinaryMemory = new System.Windows.Forms.ToolStripButton(); + this.deleteRowsBinaryMemory = new System.Windows.Forms.ToolStripButton(); + this.toolStrip6 = new Nc_Demo_Application.Views.ToolStripEx(); + this.saveFileButton = new System.Windows.Forms.ToolStripButton(); + this.deleteFileButton = new System.Windows.Forms.ToolStripButton(); + this.addFileButton = new System.Windows.Forms.ToolStripButton(); + this.newFileNameTextBox = new System.Windows.Forms.ToolStripTextBox(); + this.toolStripEx2 = new Nc_Demo_Application.Views.ToolStripEx(); + this.saveMagazinesButton = new System.Windows.Forms.ToolStripButton(); + this.toolStripEx1 = new Nc_Demo_Application.Views.ToolStripEx(); + this.saveFamiliesButton = new System.Windows.Forms.ToolStripButton(); this.toolStrip7 = new Nc_Demo_Application.Views.ToolStripEx(); this.refreshToolUI = new System.Windows.Forms.ToolStripButton(); this.removeTool = new System.Windows.Forms.ToolStripButton(); this.addTool = new System.Windows.Forms.ToolStripButton(); - this.stopServer = new System.Windows.Forms.Button(); - this.versionLabel = new System.Windows.Forms.Label(); this.ncDataPage.SuspendLayout(); - this.toolStrip5.SuspendLayout(); this.ncTabControl.SuspendLayout(); this.processPage.SuspendLayout(); - this.toolStrip1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.ncProcessGridView)).BeginInit(); this.alarms.SuspendLayout(); - this.toolStrip3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.ncAlarmsGridView)).BeginInit(); this.ncAxesPage.SuspendLayout(); - this.toolStrip4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.ncAxisGridView)).BeginInit(); this.byteMemoryPage.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.binaryMemoryGridView)).BeginInit(); - this.toolStrip2.SuspendLayout(); this.partProgramPage.SuspendLayout(); - this.toolStrip6.SuspendLayout(); this.magazinesTab.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.magazinesGridView)).BeginInit(); - this.toolStripEx2.SuspendLayout(); this.familiesTab.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.shanksDataGridView)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.familiesDataGridView)).BeginInit(); - this.toolStripEx1.SuspendLayout(); this.toolsPage.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.edgesDataGridView)).BeginInit(); + this.toolStrip5.SuspendLayout(); + this.toolStrip1.SuspendLayout(); + this.toolStrip3.SuspendLayout(); + this.toolStrip4.SuspendLayout(); + this.toolStrip2.SuspendLayout(); + this.toolStrip6.SuspendLayout(); + this.toolStripEx2.SuspendLayout(); + this.toolStripEx1.SuspendLayout(); this.toolStrip7.SuspendLayout(); this.SuspendLayout(); // @@ -271,6 +286,18 @@ namespace Nc_Demo_Application // ncDataPage // this.ncDataPage.BackColor = System.Drawing.SystemColors.Control; + this.ncDataPage.Controls.Add(this.magPositionOptionCheckbox); + this.ncDataPage.Controls.Add(this.familyOptCheckbox); + this.ncDataPage.Controls.Add(this.label31); + this.ncDataPage.Controls.Add(this.maxToolXMultiTxb); + this.ncDataPage.Controls.Add(this.label30); + this.ncDataPage.Controls.Add(this.maxMultitoolTxb); + this.ncDataPage.Controls.Add(this.label29); + this.ncDataPage.Controls.Add(this.maxEdgeXToolTxb); + this.ncDataPage.Controls.Add(this.label28); + this.ncDataPage.Controls.Add(this.maxToolTxb); + this.ncDataPage.Controls.Add(this.multitoolOptCheckbox); + this.ncDataPage.Controls.Add(this.label27); this.ncDataPage.Controls.Add(this.toolStrip5); this.ncDataPage.Controls.Add(this.label6); this.ncDataPage.Controls.Add(this.label5); @@ -296,26 +323,109 @@ namespace Nc_Demo_Application this.ncDataPage.TabIndex = 0; this.ncDataPage.Text = "Nc Data"; // - // toolStrip5 + // magPositionOptionCheckbox // - this.toolStrip5.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.saveNcDataButton}); - this.toolStrip5.Location = new System.Drawing.Point(3, 3); - this.toolStrip5.Name = "toolStrip5"; - this.toolStrip5.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional; - this.toolStrip5.Size = new System.Drawing.Size(972, 25); - this.toolStrip5.TabIndex = 53; - this.toolStrip5.Text = "toolStrip5"; + this.magPositionOptionCheckbox.AutoSize = true; + this.magPositionOptionCheckbox.Location = new System.Drawing.Point(219, 341); + this.magPositionOptionCheckbox.Name = "magPositionOptionCheckbox"; + this.magPositionOptionCheckbox.Size = new System.Drawing.Size(121, 17); + this.magPositionOptionCheckbox.TabIndex = 65; + this.magPositionOptionCheckbox.Text = "Mag Position Option"; + this.magPositionOptionCheckbox.UseVisualStyleBackColor = true; // - // saveNcDataButton + // familyOptCheckbox // - this.saveNcDataButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.saveNcDataButton.Image = global::Nc_Demo_Application.Properties.Resources.saveButton; - this.saveNcDataButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.saveNcDataButton.Name = "saveNcDataButton"; - this.saveNcDataButton.Size = new System.Drawing.Size(23, 22); - this.saveNcDataButton.Text = "toolStripButton1"; - this.saveNcDataButton.Click += new System.EventHandler(this.SaveCnDataButton_Click); + this.familyOptCheckbox.AutoSize = true; + this.familyOptCheckbox.Location = new System.Drawing.Point(19, 341); + this.familyOptCheckbox.Name = "familyOptCheckbox"; + this.familyOptCheckbox.Size = new System.Drawing.Size(89, 17); + this.familyOptCheckbox.TabIndex = 64; + this.familyOptCheckbox.Text = "Family Option"; + this.familyOptCheckbox.UseVisualStyleBackColor = true; + // + // label31 + // + this.label31.AutoSize = true; + this.label31.Location = new System.Drawing.Point(591, 296); + this.label31.Name = "label31"; + this.label31.Size = new System.Drawing.Size(86, 13); + this.label31.TabIndex = 63; + this.label31.Text = "Max Tool X Multi"; + // + // maxToolXMultiTxb + // + this.maxToolXMultiTxb.Location = new System.Drawing.Point(684, 293); + this.maxToolXMultiTxb.Name = "maxToolXMultiTxb"; + this.maxToolXMultiTxb.Size = new System.Drawing.Size(100, 20); + this.maxToolXMultiTxb.TabIndex = 62; + // + // label30 + // + this.label30.AutoSize = true; + this.label30.Location = new System.Drawing.Point(401, 296); + this.label30.Name = "label30"; + this.label30.Size = new System.Drawing.Size(69, 13); + this.label30.TabIndex = 61; + this.label30.Text = "Max Multitool"; + // + // maxMultitoolTxb + // + this.maxMultitoolTxb.Location = new System.Drawing.Point(476, 293); + this.maxMultitoolTxb.Name = "maxMultitoolTxb"; + this.maxMultitoolTxb.Size = new System.Drawing.Size(100, 20); + this.maxMultitoolTxb.TabIndex = 60; + // + // label29 + // + this.label29.AutoSize = true; + this.label29.Location = new System.Drawing.Point(190, 296); + this.label29.Name = "label29"; + this.label29.Size = new System.Drawing.Size(87, 13); + this.label29.TabIndex = 59; + this.label29.Text = "Max Edge x Tool"; + // + // maxEdgeXToolTxb + // + this.maxEdgeXToolTxb.Location = new System.Drawing.Point(283, 294); + this.maxEdgeXToolTxb.Name = "maxEdgeXToolTxb"; + this.maxEdgeXToolTxb.Size = new System.Drawing.Size(100, 20); + this.maxEdgeXToolTxb.TabIndex = 58; + // + // label28 + // + this.label28.AutoSize = true; + this.label28.Location = new System.Drawing.Point(16, 296); + this.label28.Name = "label28"; + this.label28.Size = new System.Drawing.Size(54, 13); + this.label28.TabIndex = 57; + this.label28.Text = "Max_Tool"; + // + // maxToolTxb + // + this.maxToolTxb.Location = new System.Drawing.Point(76, 293); + this.maxToolTxb.Name = "maxToolTxb"; + this.maxToolTxb.Size = new System.Drawing.Size(100, 20); + this.maxToolTxb.TabIndex = 56; + // + // multitoolOptCheckbox + // + this.multitoolOptCheckbox.AutoSize = true; + this.multitoolOptCheckbox.Location = new System.Drawing.Point(114, 341); + this.multitoolOptCheckbox.Name = "multitoolOptCheckbox"; + this.multitoolOptCheckbox.Size = new System.Drawing.Size(99, 17); + this.multitoolOptCheckbox.TabIndex = 55; + this.multitoolOptCheckbox.Text = "Multitool Option"; + this.multitoolOptCheckbox.UseVisualStyleBackColor = true; + // + // label27 + // + this.label27.AutoSize = true; + this.label27.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label27.Location = new System.Drawing.Point(16, 261); + this.label27.Name = "label27"; + this.label27.Size = new System.Drawing.Size(108, 18); + this.label27.TabIndex = 54; + this.label27.Text = "Configurations:"; // // label6 // @@ -487,28 +597,6 @@ namespace Nc_Demo_Application this.processPage.TabIndex = 1; this.processPage.Text = "Nc Process"; // - // toolStrip1 - // - this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None; - this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.saveNcProcessData}); - this.toolStrip1.Location = new System.Drawing.Point(3, 3); - this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.Size = new System.Drawing.Size(35, 25); - this.toolStrip1.TabIndex = 9; - this.toolStrip1.Text = "toolStrip1"; - this.toolStrip1.Click += new System.EventHandler(this.SaveNcProcessData_Click); - // - // saveNcProcessData - // - this.saveNcProcessData.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.saveNcProcessData.Image = global::Nc_Demo_Application.Properties.Resources.saveButton; - this.saveNcProcessData.ImageTransparentColor = System.Drawing.Color.Magenta; - this.saveNcProcessData.Name = "saveNcProcessData"; - this.saveNcProcessData.Size = new System.Drawing.Size(23, 22); - this.saveNcProcessData.Text = "Save"; - this.saveNcProcessData.Click += new System.EventHandler(this.SaveNcProcessData_Click); - // // ncProcessGridView // this.ncProcessGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -576,32 +664,6 @@ namespace Nc_Demo_Application this.alarms.Text = "NC Alarms"; this.alarms.UseVisualStyleBackColor = true; // - // toolStrip3 - // - this.toolStrip3.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.toolStrip3.Dock = System.Windows.Forms.DockStyle.None; - this.toolStrip3.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.saveNcAlarmsButton}); - this.toolStrip3.Location = new System.Drawing.Point(0, 0); - this.toolStrip3.Name = "toolStrip3"; - this.toolStrip3.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; - this.toolStrip3.Size = new System.Drawing.Size(35, 25); - this.toolStrip3.TabIndex = 2; - this.toolStrip3.Text = "toolStrip3"; - this.toolStrip3.Click += new System.EventHandler(this.SaveNcAlarmsButton_Click); - // - // saveNcAlarmsButton - // - this.saveNcAlarmsButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.saveNcAlarmsButton.Image = global::Nc_Demo_Application.Properties.Resources.saveButton; - this.saveNcAlarmsButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.saveNcAlarmsButton.Name = "saveNcAlarmsButton"; - this.saveNcAlarmsButton.Size = new System.Drawing.Size(23, 22); - this.saveNcAlarmsButton.Text = "Save"; - this.saveNcAlarmsButton.Click += new System.EventHandler(this.SaveNcAlarmsButton_Click); - // // ncAlarmsGridView // this.ncAlarmsGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -659,26 +721,6 @@ namespace Nc_Demo_Application this.ncAxesPage.Text = "Axes"; this.ncAxesPage.UseVisualStyleBackColor = true; // - // toolStrip4 - // - this.toolStrip4.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.saveNcAxesButton}); - this.toolStrip4.Location = new System.Drawing.Point(0, 0); - this.toolStrip4.Name = "toolStrip4"; - this.toolStrip4.Size = new System.Drawing.Size(978, 25); - this.toolStrip4.TabIndex = 53; - this.toolStrip4.Text = "toolStrip4"; - // - // saveNcAxesButton - // - this.saveNcAxesButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.saveNcAxesButton.Image = global::Nc_Demo_Application.Properties.Resources.saveButton; - this.saveNcAxesButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.saveNcAxesButton.Name = "saveNcAxesButton"; - this.saveNcAxesButton.Size = new System.Drawing.Size(23, 22); - this.saveNcAxesButton.Text = "Save"; - this.saveNcAxesButton.Click += new System.EventHandler(this.SaveNcAxesButton_Click); - // // ncAxisGridView // this.ncAxisGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; @@ -825,49 +867,6 @@ namespace Nc_Demo_Application this.BinaryMemoryIntegerColumn.HeaderText = "Integer"; this.BinaryMemoryIntegerColumn.Name = "BinaryMemoryIntegerColumn"; // - // toolStrip2 - // - this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.saveBinaryMemoryButton, - this.addRowsBinaryMemory, - this.deleteRowsBinaryMemory}); - this.toolStrip2.Location = new System.Drawing.Point(0, 0); - this.toolStrip2.Name = "toolStrip2"; - this.toolStrip2.Size = new System.Drawing.Size(978, 25); - this.toolStrip2.TabIndex = 1; - this.toolStrip2.Text = "toolStrip2"; - // - // saveBinaryMemoryButton - // - this.saveBinaryMemoryButton.CheckOnClick = true; - this.saveBinaryMemoryButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.saveBinaryMemoryButton.Image = global::Nc_Demo_Application.Properties.Resources.saveButton; - this.saveBinaryMemoryButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.saveBinaryMemoryButton.Name = "saveBinaryMemoryButton"; - this.saveBinaryMemoryButton.Size = new System.Drawing.Size(23, 22); - this.saveBinaryMemoryButton.Text = "Save"; - this.saveBinaryMemoryButton.Click += new System.EventHandler(this.SaveBinaryMemory_Click); - // - // addRowsBinaryMemory - // - this.addRowsBinaryMemory.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.addRowsBinaryMemory.Image = global::Nc_Demo_Application.Properties.Resources.addButton; - this.addRowsBinaryMemory.ImageTransparentColor = System.Drawing.Color.Magenta; - this.addRowsBinaryMemory.Name = "addRowsBinaryMemory"; - this.addRowsBinaryMemory.Size = new System.Drawing.Size(23, 22); - this.addRowsBinaryMemory.Text = "Add 4 Rows"; - this.addRowsBinaryMemory.Click += new System.EventHandler(this.addRowsBinaryMemory_Click); - // - // deleteRowsBinaryMemory - // - this.deleteRowsBinaryMemory.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.deleteRowsBinaryMemory.Image = global::Nc_Demo_Application.Properties.Resources.removeButton; - this.deleteRowsBinaryMemory.ImageTransparentColor = System.Drawing.Color.Magenta; - this.deleteRowsBinaryMemory.Name = "deleteRowsBinaryMemory"; - this.deleteRowsBinaryMemory.Size = new System.Drawing.Size(23, 22); - this.deleteRowsBinaryMemory.Text = "Remove 4 rows"; - this.deleteRowsBinaryMemory.Click += new System.EventHandler(this.deleteRowsBinaryMemory_Click); - // // partProgramPage // this.partProgramPage.Controls.Add(this.fileContentTextBox); @@ -905,55 +904,6 @@ namespace Nc_Demo_Application this.fileTreeView.TabIndex = 0; this.fileTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.FileTreeView_AfterSelect); // - // toolStrip6 - // - this.toolStrip6.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.saveFileButton, - this.deleteFileButton, - this.addFileButton, - this.newFileNameTextBox}); - this.toolStrip6.Location = new System.Drawing.Point(3, 3); - this.toolStrip6.Name = "toolStrip6"; - this.toolStrip6.Size = new System.Drawing.Size(972, 25); - this.toolStrip6.TabIndex = 1; - this.toolStrip6.Text = "toolStrip6"; - // - // saveFileButton - // - this.saveFileButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.saveFileButton.Enabled = false; - this.saveFileButton.Image = global::Nc_Demo_Application.Properties.Resources.saveButton; - this.saveFileButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.saveFileButton.Name = "saveFileButton"; - this.saveFileButton.Size = new System.Drawing.Size(23, 22); - this.saveFileButton.Text = "Save file"; - this.saveFileButton.Click += new System.EventHandler(this.SaveFileButton_Click); - // - // deleteFileButton - // - this.deleteFileButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.deleteFileButton.Image = global::Nc_Demo_Application.Properties.Resources.removeButton; - this.deleteFileButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.deleteFileButton.Name = "deleteFileButton"; - this.deleteFileButton.Size = new System.Drawing.Size(23, 22); - this.deleteFileButton.Text = "Delete file"; - this.deleteFileButton.Click += new System.EventHandler(this.DeleteFile_Click); - // - // addFileButton - // - this.addFileButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.addFileButton.Image = global::Nc_Demo_Application.Properties.Resources.addButton; - this.addFileButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.addFileButton.Name = "addFileButton"; - this.addFileButton.Size = new System.Drawing.Size(23, 22); - this.addFileButton.Text = "Add file"; - this.addFileButton.Click += new System.EventHandler(this.AddFile_Click); - // - // newFileNameTextBox - // - this.newFileNameTextBox.Name = "newFileNameTextBox"; - this.newFileNameTextBox.Size = new System.Drawing.Size(100, 25); - // // magazinesTab // this.magazinesTab.Controls.Add(this.label26); @@ -1086,7 +1036,8 @@ namespace Nc_Demo_Application this.positionId, this.positionType, this.ShankId, - this.magazineToolId}); + this.magazineToolId, + this.disablePosition}); this.magazinesGridView.Location = new System.Drawing.Point(0, 90); this.magazinesGridView.Name = "magazinesGridView"; this.magazinesGridView.Size = new System.Drawing.Size(978, 548); @@ -1136,25 +1087,13 @@ namespace Nc_Demo_Application this.magazineToolId.HeaderText = "Tool Id"; this.magazineToolId.Name = "magazineToolId"; // - // toolStripEx2 + // disablePosition // - this.toolStripEx2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.saveMagazinesButton}); - this.toolStripEx2.Location = new System.Drawing.Point(3, 3); - this.toolStripEx2.Name = "toolStripEx2"; - this.toolStripEx2.Size = new System.Drawing.Size(972, 25); - this.toolStripEx2.TabIndex = 1; - this.toolStripEx2.Text = "toolStripEx2"; - // - // saveMagazinesButton - // - this.saveMagazinesButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.saveMagazinesButton.Image = global::Nc_Demo_Application.Properties.Resources.saveButton; - this.saveMagazinesButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.saveMagazinesButton.Name = "saveMagazinesButton"; - this.saveMagazinesButton.Size = new System.Drawing.Size(23, 22); - this.saveMagazinesButton.Text = "Save"; - this.saveMagazinesButton.Click += new System.EventHandler(this.SaveMagazinesButton_Click); + this.disablePosition.DataPropertyName = "disabled"; + this.disablePosition.FalseValue = "0"; + this.disablePosition.HeaderText = "Disabled"; + this.disablePosition.Name = "disablePosition"; + this.disablePosition.TrueValue = "1"; // // familiesTab // @@ -1336,27 +1275,10 @@ namespace Nc_Demo_Application this.name.HeaderText = "Name"; this.name.Name = "name"; // - // toolStripEx1 - // - this.toolStripEx1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.saveFamiliesButton}); - this.toolStripEx1.Location = new System.Drawing.Point(3, 3); - this.toolStripEx1.Name = "toolStripEx1"; - this.toolStripEx1.Size = new System.Drawing.Size(972, 25); - this.toolStripEx1.TabIndex = 0; - this.toolStripEx1.Text = "toolStripEx1"; - // - // saveFamiliesButton - // - this.saveFamiliesButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.saveFamiliesButton.Image = global::Nc_Demo_Application.Properties.Resources.saveButton; - this.saveFamiliesButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.saveFamiliesButton.Name = "saveFamiliesButton"; - this.saveFamiliesButton.Size = new System.Drawing.Size(23, 22); - this.saveFamiliesButton.Click += new System.EventHandler(this.SaveFamiliesButton_Click); - // // toolsPage // + this.toolsPage.Controls.Add(this.label32); + this.toolsPage.Controls.Add(this.multitoolIdTxb); this.toolsPage.Controls.Add(this.label20); this.toolsPage.Controls.Add(this.maxAccTxt); this.toolsPage.Controls.Add(this.label14); @@ -1403,8 +1325,33 @@ namespace Nc_Demo_Application this.toolsPage.Text = "Tools"; this.toolsPage.UseVisualStyleBackColor = true; // + // label32 + // + this.label32.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.label32.AutoSize = true; + this.label32.Location = new System.Drawing.Point(756, 93); + this.label32.Name = "label32"; + this.label32.Size = new System.Drawing.Size(65, 13); + this.label32.TabIndex = 41; + this.label32.Text = "MultiTool Id:"; + // + // multitoolIdTxb + // + this.multitoolIdTxb.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.multitoolIdTxb.Location = new System.Drawing.Point(827, 90); + this.multitoolIdTxb.Name = "multitoolIdTxb"; + this.multitoolIdTxb.Size = new System.Drawing.Size(49, 20); + this.multitoolIdTxb.TabIndex = 40; + // // label20 // + this.label20.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.label20.AutoSize = true; this.label20.Location = new System.Drawing.Point(309, 162); this.label20.Name = "label20"; @@ -1414,6 +1361,9 @@ namespace Nc_Demo_Application // // maxAccTxt // + this.maxAccTxt.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.maxAccTxt.Location = new System.Drawing.Point(364, 155); this.maxAccTxt.Name = "maxAccTxt"; this.maxAccTxt.Size = new System.Drawing.Size(49, 20); @@ -1421,6 +1371,9 @@ namespace Nc_Demo_Application // // label14 // + this.label14.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.label14.AutoSize = true; this.label14.Location = new System.Drawing.Point(171, 162); this.label14.Name = "label14"; @@ -1430,6 +1383,9 @@ namespace Nc_Demo_Application // // maxSpeedTxt // + this.maxSpeedTxt.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.maxSpeedTxt.CausesValidation = false; this.maxSpeedTxt.Location = new System.Drawing.Point(238, 155); this.maxSpeedTxt.Name = "maxSpeedTxt"; @@ -1438,6 +1394,9 @@ namespace Nc_Demo_Application // // isEnabledCheckBox // + this.isEnabledCheckBox.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.isEnabledCheckBox.AutoSize = true; this.isEnabledCheckBox.Location = new System.Drawing.Point(186, 233); this.isEnabledCheckBox.Name = "isEnabledCheckBox"; @@ -1449,8 +1408,11 @@ namespace Nc_Demo_Application // // label19 // + this.label19.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.label19.AutoSize = true; - this.label19.Location = new System.Drawing.Point(845, 92); + this.label19.Location = new System.Drawing.Point(638, 93); this.label19.Name = "label19"; this.label19.Size = new System.Drawing.Size(53, 13); this.label19.TabIndex = 33; @@ -1458,13 +1420,19 @@ namespace Nc_Demo_Application // // shankIdTextBox // - this.shankIdTextBox.Location = new System.Drawing.Point(904, 89); + this.shankIdTextBox.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.shankIdTextBox.Location = new System.Drawing.Point(697, 90); this.shankIdTextBox.Name = "shankIdTextBox"; this.shankIdTextBox.Size = new System.Drawing.Size(49, 20); this.shankIdTextBox.TabIndex = 32; // // label16 // + this.label16.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.label16.AutoSize = true; this.label16.Location = new System.Drawing.Point(428, 160); this.label16.Name = "label16"; @@ -1474,6 +1442,9 @@ namespace Nc_Demo_Application // // magazinePositionTypeTxt // + this.magazinePositionTypeTxt.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.magazinePositionTypeTxt.Location = new System.Drawing.Point(505, 155); this.magazinePositionTypeTxt.Name = "magazinePositionTypeTxt"; this.magazinePositionTypeTxt.Size = new System.Drawing.Size(49, 20); @@ -1490,6 +1461,9 @@ namespace Nc_Demo_Application // // label13 // + this.label13.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.label13.AutoSize = true; this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F); this.label13.Location = new System.Drawing.Point(180, 40); @@ -1511,6 +1485,9 @@ namespace Nc_Demo_Application // // preAlarmCheckBox // + this.preAlarmCheckBox.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.preAlarmCheckBox.AutoSize = true; this.preAlarmCheckBox.Location = new System.Drawing.Point(869, 233); this.preAlarmCheckBox.Name = "preAlarmCheckBox"; @@ -1521,6 +1498,9 @@ namespace Nc_Demo_Application // // useCheckBox // + this.useCheckBox.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.useCheckBox.AutoSize = true; this.useCheckBox.Location = new System.Drawing.Point(794, 233); this.useCheckBox.Name = "useCheckBox"; @@ -1531,6 +1511,9 @@ namespace Nc_Demo_Application // // changeToolCheckBox // + this.changeToolCheckBox.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.changeToolCheckBox.AutoSize = true; this.changeToolCheckBox.Location = new System.Drawing.Point(695, 233); this.changeToolCheckBox.Name = "changeToolCheckBox"; @@ -1541,8 +1524,11 @@ namespace Nc_Demo_Application // // measuredCheckBox // + this.measuredCheckBox.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.measuredCheckBox.AutoSize = true; - this.measuredCheckBox.Location = new System.Drawing.Point(578, 233); + this.measuredCheckBox.Location = new System.Drawing.Point(586, 233); this.measuredCheckBox.Name = "measuredCheckBox"; this.measuredCheckBox.Size = new System.Drawing.Size(73, 17); this.measuredCheckBox.TabIndex = 21; @@ -1551,6 +1537,9 @@ namespace Nc_Demo_Application // // inhibitedCheckBox // + this.inhibitedCheckBox.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.inhibitedCheckBox.AutoSize = true; this.inhibitedCheckBox.Location = new System.Drawing.Point(488, 233); this.inhibitedCheckBox.Name = "inhibitedCheckBox"; @@ -1561,6 +1550,9 @@ namespace Nc_Demo_Application // // fixedPlaceCheckBox // + this.fixedPlaceCheckBox.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.fixedPlaceCheckBox.AutoSize = true; this.fixedPlaceCheckBox.Location = new System.Drawing.Point(385, 233); this.fixedPlaceCheckBox.Name = "fixedPlaceCheckBox"; @@ -1571,6 +1563,9 @@ namespace Nc_Demo_Application // // isActiveCheckBox // + this.isActiveCheckBox.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.isActiveCheckBox.AutoSize = true; this.isActiveCheckBox.Location = new System.Drawing.Point(295, 233); this.isActiveCheckBox.Name = "isActiveCheckBox"; @@ -1581,6 +1576,9 @@ namespace Nc_Demo_Application // // cooling1CheckBox // + this.cooling1CheckBox.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.cooling1CheckBox.AutoSize = true; this.cooling1CheckBox.Location = new System.Drawing.Point(815, 157); this.cooling1CheckBox.Name = "cooling1CheckBox"; @@ -1592,6 +1590,9 @@ namespace Nc_Demo_Application // // cooling2CheckBox // + this.cooling2CheckBox.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.cooling2CheckBox.AutoSize = true; this.cooling2CheckBox.Location = new System.Drawing.Point(891, 159); this.cooling2CheckBox.Name = "cooling2CheckBox"; @@ -1603,8 +1604,11 @@ namespace Nc_Demo_Application // // label12 // + this.label12.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.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(197, 93); + this.label12.Location = new System.Drawing.Point(175, 93); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(47, 13); this.label12.TabIndex = 15; @@ -1612,14 +1616,20 @@ namespace Nc_Demo_Application // // rotationSelect // + this.rotationSelect.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.rotationSelect.FormattingEnabled = true; - this.rotationSelect.Location = new System.Drawing.Point(250, 90); + this.rotationSelect.Location = new System.Drawing.Point(228, 90); this.rotationSelect.Name = "rotationSelect"; this.rotationSelect.Size = new System.Drawing.Size(101, 21); this.rotationSelect.TabIndex = 14; // // label11 // + this.label11.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.label11.AutoSize = true; this.label11.Location = new System.Drawing.Point(685, 158); this.label11.Name = "label11"; @@ -1629,6 +1639,9 @@ namespace Nc_Demo_Application // // rightSizeTxt // + this.rightSizeTxt.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.rightSizeTxt.Location = new System.Drawing.Point(749, 155); this.rightSizeTxt.Name = "rightSizeTxt"; this.rightSizeTxt.Size = new System.Drawing.Size(49, 20); @@ -1636,6 +1649,9 @@ namespace Nc_Demo_Application // // label10 // + this.label10.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.label10.AutoSize = true; this.label10.Location = new System.Drawing.Point(568, 158); this.label10.Name = "label10"; @@ -1645,6 +1661,9 @@ namespace Nc_Demo_Application // // leftSizeTxt // + this.leftSizeTxt.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.leftSizeTxt.Location = new System.Drawing.Point(628, 155); this.leftSizeTxt.Name = "leftSizeTxt"; this.leftSizeTxt.Size = new System.Drawing.Size(49, 20); @@ -1652,8 +1671,11 @@ namespace Nc_Demo_Application // // label9 // + this.label9.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.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(382, 93); + this.label9.Location = new System.Drawing.Point(347, 43); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(55, 13); this.label9.TabIndex = 9; @@ -1661,16 +1683,22 @@ namespace Nc_Demo_Application // // toolTypeSelect // + this.toolTypeSelect.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.toolTypeSelect.FormattingEnabled = true; - this.toolTypeSelect.Location = new System.Drawing.Point(446, 90); + this.toolTypeSelect.Location = new System.Drawing.Point(411, 40); this.toolTypeSelect.Name = "toolTypeSelect"; this.toolTypeSelect.Size = new System.Drawing.Size(111, 21); this.toolTypeSelect.TabIndex = 8; // // label8 // + this.label8.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.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(739, 92); + this.label8.Location = new System.Drawing.Point(520, 93); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(45, 13); this.label8.TabIndex = 7; @@ -1678,15 +1706,21 @@ namespace Nc_Demo_Application // // childIdTxt // - this.childIdTxt.Location = new System.Drawing.Point(790, 89); + this.childIdTxt.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.childIdTxt.Location = new System.Drawing.Point(571, 90); this.childIdTxt.Name = "childIdTxt"; this.childIdTxt.Size = new System.Drawing.Size(49, 20); this.childIdTxt.TabIndex = 6; // // label7 // + this.label7.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.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(577, 92); + this.label7.Location = new System.Drawing.Point(352, 93); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(39, 13); this.label7.TabIndex = 5; @@ -1694,13 +1728,19 @@ namespace Nc_Demo_Application // // familyTxt // - this.familyTxt.Location = new System.Drawing.Point(622, 89); + this.familyTxt.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.familyTxt.Location = new System.Drawing.Point(397, 90); this.familyTxt.Name = "familyTxt"; this.familyTxt.Size = new System.Drawing.Size(102, 20); this.familyTxt.TabIndex = 4; // // toolsIdLlb // + this.toolsIdLlb.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.toolsIdLlb.AutoSize = true; this.toolsIdLlb.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F); this.toolsIdLlb.Location = new System.Drawing.Point(267, 40); @@ -1729,6 +1769,9 @@ namespace Nc_Demo_Application // // edgesDataGridView // + this.edgesDataGridView.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.edgesDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.edgesDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.edgesId, @@ -1994,6 +2037,248 @@ namespace Nc_Demo_Application this.param34.HeaderText = "34"; this.param34.Name = "param34"; // + // stopServer + // + this.stopServer.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.stopServer.Location = new System.Drawing.Point(906, 687); + this.stopServer.Name = "stopServer"; + this.stopServer.Size = new System.Drawing.Size(91, 30); + this.stopServer.TabIndex = 8; + this.stopServer.Text = "Stop"; + this.stopServer.UseVisualStyleBackColor = true; + this.stopServer.Click += new System.EventHandler(this.StopServer_Click); + // + // versionLabel + // + this.versionLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.versionLabel.AutoSize = true; + this.versionLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.versionLabel.Location = new System.Drawing.Point(811, 691); + this.versionLabel.Name = "versionLabel"; + this.versionLabel.Size = new System.Drawing.Size(89, 20); + this.versionLabel.TabIndex = 11; + this.versionLabel.Text = "Version: 29"; + // + // toolStrip5 + // + this.toolStrip5.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.saveNcDataButton}); + this.toolStrip5.Location = new System.Drawing.Point(3, 3); + this.toolStrip5.Name = "toolStrip5"; + this.toolStrip5.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional; + this.toolStrip5.Size = new System.Drawing.Size(972, 25); + this.toolStrip5.TabIndex = 53; + this.toolStrip5.Text = "toolStrip5"; + // + // saveNcDataButton + // + this.saveNcDataButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.saveNcDataButton.Image = global::Nc_Demo_Application.Properties.Resources.saveButton; + this.saveNcDataButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.saveNcDataButton.Name = "saveNcDataButton"; + this.saveNcDataButton.Size = new System.Drawing.Size(23, 22); + this.saveNcDataButton.Text = "toolStripButton1"; + this.saveNcDataButton.Click += new System.EventHandler(this.SaveCnDataButton_Click); + // + // toolStrip1 + // + this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None; + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.saveNcProcessData}); + this.toolStrip1.Location = new System.Drawing.Point(3, 3); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(35, 25); + this.toolStrip1.TabIndex = 9; + this.toolStrip1.Text = "toolStrip1"; + this.toolStrip1.Click += new System.EventHandler(this.SaveNcProcessData_Click); + // + // saveNcProcessData + // + this.saveNcProcessData.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.saveNcProcessData.Image = global::Nc_Demo_Application.Properties.Resources.saveButton; + this.saveNcProcessData.ImageTransparentColor = System.Drawing.Color.Magenta; + this.saveNcProcessData.Name = "saveNcProcessData"; + this.saveNcProcessData.Size = new System.Drawing.Size(23, 22); + this.saveNcProcessData.Text = "Save"; + this.saveNcProcessData.Click += new System.EventHandler(this.SaveNcProcessData_Click); + // + // toolStrip3 + // + this.toolStrip3.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.toolStrip3.Dock = System.Windows.Forms.DockStyle.None; + this.toolStrip3.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.saveNcAlarmsButton}); + this.toolStrip3.Location = new System.Drawing.Point(0, 0); + this.toolStrip3.Name = "toolStrip3"; + this.toolStrip3.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; + this.toolStrip3.Size = new System.Drawing.Size(35, 25); + this.toolStrip3.TabIndex = 2; + this.toolStrip3.Text = "toolStrip3"; + this.toolStrip3.Click += new System.EventHandler(this.SaveNcAlarmsButton_Click); + // + // saveNcAlarmsButton + // + this.saveNcAlarmsButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.saveNcAlarmsButton.Image = global::Nc_Demo_Application.Properties.Resources.saveButton; + this.saveNcAlarmsButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.saveNcAlarmsButton.Name = "saveNcAlarmsButton"; + this.saveNcAlarmsButton.Size = new System.Drawing.Size(23, 22); + this.saveNcAlarmsButton.Text = "Save"; + this.saveNcAlarmsButton.Click += new System.EventHandler(this.SaveNcAlarmsButton_Click); + // + // toolStrip4 + // + this.toolStrip4.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.saveNcAxesButton}); + this.toolStrip4.Location = new System.Drawing.Point(0, 0); + this.toolStrip4.Name = "toolStrip4"; + this.toolStrip4.Size = new System.Drawing.Size(978, 25); + this.toolStrip4.TabIndex = 53; + this.toolStrip4.Text = "toolStrip4"; + // + // saveNcAxesButton + // + this.saveNcAxesButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.saveNcAxesButton.Image = global::Nc_Demo_Application.Properties.Resources.saveButton; + this.saveNcAxesButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.saveNcAxesButton.Name = "saveNcAxesButton"; + this.saveNcAxesButton.Size = new System.Drawing.Size(23, 22); + this.saveNcAxesButton.Text = "Save"; + this.saveNcAxesButton.Click += new System.EventHandler(this.SaveNcAxesButton_Click); + // + // toolStrip2 + // + this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.saveBinaryMemoryButton, + this.addRowsBinaryMemory, + this.deleteRowsBinaryMemory}); + this.toolStrip2.Location = new System.Drawing.Point(0, 0); + this.toolStrip2.Name = "toolStrip2"; + this.toolStrip2.Size = new System.Drawing.Size(978, 25); + this.toolStrip2.TabIndex = 1; + this.toolStrip2.Text = "toolStrip2"; + // + // saveBinaryMemoryButton + // + this.saveBinaryMemoryButton.CheckOnClick = true; + this.saveBinaryMemoryButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.saveBinaryMemoryButton.Image = global::Nc_Demo_Application.Properties.Resources.saveButton; + this.saveBinaryMemoryButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.saveBinaryMemoryButton.Name = "saveBinaryMemoryButton"; + this.saveBinaryMemoryButton.Size = new System.Drawing.Size(23, 22); + this.saveBinaryMemoryButton.Text = "Save"; + this.saveBinaryMemoryButton.Click += new System.EventHandler(this.SaveBinaryMemory_Click); + // + // addRowsBinaryMemory + // + this.addRowsBinaryMemory.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.addRowsBinaryMemory.Image = global::Nc_Demo_Application.Properties.Resources.addButton; + this.addRowsBinaryMemory.ImageTransparentColor = System.Drawing.Color.Magenta; + this.addRowsBinaryMemory.Name = "addRowsBinaryMemory"; + this.addRowsBinaryMemory.Size = new System.Drawing.Size(23, 22); + this.addRowsBinaryMemory.Text = "Add 4 Rows"; + this.addRowsBinaryMemory.Click += new System.EventHandler(this.addRowsBinaryMemory_Click); + // + // deleteRowsBinaryMemory + // + this.deleteRowsBinaryMemory.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.deleteRowsBinaryMemory.Image = global::Nc_Demo_Application.Properties.Resources.removeButton; + this.deleteRowsBinaryMemory.ImageTransparentColor = System.Drawing.Color.Magenta; + this.deleteRowsBinaryMemory.Name = "deleteRowsBinaryMemory"; + this.deleteRowsBinaryMemory.Size = new System.Drawing.Size(23, 22); + this.deleteRowsBinaryMemory.Text = "Remove 4 rows"; + this.deleteRowsBinaryMemory.Click += new System.EventHandler(this.deleteRowsBinaryMemory_Click); + // + // toolStrip6 + // + this.toolStrip6.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.saveFileButton, + this.deleteFileButton, + this.addFileButton, + this.newFileNameTextBox}); + this.toolStrip6.Location = new System.Drawing.Point(3, 3); + this.toolStrip6.Name = "toolStrip6"; + this.toolStrip6.Size = new System.Drawing.Size(972, 25); + this.toolStrip6.TabIndex = 1; + this.toolStrip6.Text = "toolStrip6"; + // + // saveFileButton + // + this.saveFileButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.saveFileButton.Enabled = false; + this.saveFileButton.Image = global::Nc_Demo_Application.Properties.Resources.saveButton; + this.saveFileButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.saveFileButton.Name = "saveFileButton"; + this.saveFileButton.Size = new System.Drawing.Size(23, 22); + this.saveFileButton.Text = "Save file"; + this.saveFileButton.Click += new System.EventHandler(this.SaveFileButton_Click); + // + // deleteFileButton + // + this.deleteFileButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.deleteFileButton.Image = global::Nc_Demo_Application.Properties.Resources.removeButton; + this.deleteFileButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.deleteFileButton.Name = "deleteFileButton"; + this.deleteFileButton.Size = new System.Drawing.Size(23, 22); + this.deleteFileButton.Text = "Delete file"; + this.deleteFileButton.Click += new System.EventHandler(this.DeleteFile_Click); + // + // addFileButton + // + this.addFileButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.addFileButton.Image = global::Nc_Demo_Application.Properties.Resources.addButton; + this.addFileButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.addFileButton.Name = "addFileButton"; + this.addFileButton.Size = new System.Drawing.Size(23, 22); + this.addFileButton.Text = "Add file"; + this.addFileButton.Click += new System.EventHandler(this.AddFile_Click); + // + // newFileNameTextBox + // + this.newFileNameTextBox.Name = "newFileNameTextBox"; + this.newFileNameTextBox.Size = new System.Drawing.Size(100, 25); + // + // toolStripEx2 + // + this.toolStripEx2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.saveMagazinesButton}); + this.toolStripEx2.Location = new System.Drawing.Point(3, 3); + this.toolStripEx2.Name = "toolStripEx2"; + this.toolStripEx2.Size = new System.Drawing.Size(972, 25); + this.toolStripEx2.TabIndex = 1; + this.toolStripEx2.Text = "toolStripEx2"; + // + // saveMagazinesButton + // + this.saveMagazinesButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.saveMagazinesButton.Image = global::Nc_Demo_Application.Properties.Resources.saveButton; + this.saveMagazinesButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.saveMagazinesButton.Name = "saveMagazinesButton"; + this.saveMagazinesButton.Size = new System.Drawing.Size(23, 22); + this.saveMagazinesButton.Text = "Save"; + this.saveMagazinesButton.Click += new System.EventHandler(this.SaveMagazinesButton_Click); + // + // toolStripEx1 + // + this.toolStripEx1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.saveFamiliesButton}); + this.toolStripEx1.Location = new System.Drawing.Point(3, 3); + this.toolStripEx1.Name = "toolStripEx1"; + this.toolStripEx1.Size = new System.Drawing.Size(972, 25); + this.toolStripEx1.TabIndex = 0; + this.toolStripEx1.Text = "toolStripEx1"; + // + // saveFamiliesButton + // + this.saveFamiliesButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.saveFamiliesButton.Image = global::Nc_Demo_Application.Properties.Resources.saveButton; + this.saveFamiliesButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.saveFamiliesButton.Name = "saveFamiliesButton"; + this.saveFamiliesButton.Size = new System.Drawing.Size(23, 22); + this.saveFamiliesButton.Click += new System.EventHandler(this.SaveFamiliesButton_Click); + // // toolStrip7 // this.toolStrip7.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -2036,27 +2321,6 @@ namespace Nc_Demo_Application this.addTool.Text = "toolStripButton1"; this.addTool.Click += new System.EventHandler(this.AddTool_Click); // - // stopServer - // - this.stopServer.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.stopServer.Location = new System.Drawing.Point(906, 687); - this.stopServer.Name = "stopServer"; - this.stopServer.Size = new System.Drawing.Size(91, 30); - this.stopServer.TabIndex = 8; - this.stopServer.Text = "Stop"; - this.stopServer.UseVisualStyleBackColor = true; - this.stopServer.Click += new System.EventHandler(this.StopServer_Click); - // - // versionLabel - // - this.versionLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.versionLabel.AutoSize = true; - this.versionLabel.Location = new System.Drawing.Point(843, 696); - this.versionLabel.Name = "versionLabel"; - this.versionLabel.Size = new System.Drawing.Size(57, 13); - this.versionLabel.TabIndex = 11; - this.versionLabel.Text = "Version:26"; - // // DemoApplicationForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -2075,47 +2339,47 @@ namespace Nc_Demo_Application this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.DemoApplicationForm_KeyDown); this.ncDataPage.ResumeLayout(false); this.ncDataPage.PerformLayout(); - this.toolStrip5.ResumeLayout(false); - this.toolStrip5.PerformLayout(); this.ncTabControl.ResumeLayout(false); this.processPage.ResumeLayout(false); this.processPage.PerformLayout(); - this.toolStrip1.ResumeLayout(false); - this.toolStrip1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.ncProcessGridView)).EndInit(); this.alarms.ResumeLayout(false); this.alarms.PerformLayout(); - this.toolStrip3.ResumeLayout(false); - this.toolStrip3.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.ncAlarmsGridView)).EndInit(); this.ncAxesPage.ResumeLayout(false); this.ncAxesPage.PerformLayout(); - this.toolStrip4.ResumeLayout(false); - this.toolStrip4.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.ncAxisGridView)).EndInit(); this.byteMemoryPage.ResumeLayout(false); this.byteMemoryPage.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.binaryMemoryGridView)).EndInit(); - this.toolStrip2.ResumeLayout(false); - this.toolStrip2.PerformLayout(); this.partProgramPage.ResumeLayout(false); this.partProgramPage.PerformLayout(); - this.toolStrip6.ResumeLayout(false); - this.toolStrip6.PerformLayout(); this.magazinesTab.ResumeLayout(false); this.magazinesTab.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.magazinesGridView)).EndInit(); - this.toolStripEx2.ResumeLayout(false); - this.toolStripEx2.PerformLayout(); this.familiesTab.ResumeLayout(false); this.familiesTab.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.shanksDataGridView)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.familiesDataGridView)).EndInit(); - this.toolStripEx1.ResumeLayout(false); - this.toolStripEx1.PerformLayout(); this.toolsPage.ResumeLayout(false); this.toolsPage.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.edgesDataGridView)).EndInit(); + this.toolStrip5.ResumeLayout(false); + this.toolStrip5.PerformLayout(); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + this.toolStrip3.ResumeLayout(false); + this.toolStrip3.PerformLayout(); + this.toolStrip4.ResumeLayout(false); + this.toolStrip4.PerformLayout(); + this.toolStrip2.ResumeLayout(false); + this.toolStrip2.PerformLayout(); + this.toolStrip6.ResumeLayout(false); + this.toolStrip6.PerformLayout(); + this.toolStripEx2.ResumeLayout(false); + this.toolStripEx2.PerformLayout(); + this.toolStripEx1.ResumeLayout(false); + this.toolStripEx1.PerformLayout(); this.toolStrip7.ResumeLayout(false); this.toolStrip7.PerformLayout(); this.ResumeLayout(false); @@ -2282,11 +2546,6 @@ namespace Nc_Demo_Application private System.Windows.Forms.DataGridViewTextBoxColumn param30; private System.Windows.Forms.DataGridViewTextBoxColumn param34; private System.Windows.Forms.CheckBox isEnabledCheckBox; - private System.Windows.Forms.DataGridViewTextBoxColumn magazineId; - private System.Windows.Forms.DataGridViewTextBoxColumn positionId; - private System.Windows.Forms.DataGridViewTextBoxColumn positionType; - private System.Windows.Forms.DataGridViewTextBoxColumn ShankId; - private System.Windows.Forms.DataGridViewTextBoxColumn magazineToolId; private System.Windows.Forms.DataGridViewTextBoxColumn shanksId; private System.Windows.Forms.DataGridViewTextBoxColumn shankName; private System.Windows.Forms.DataGridViewTextBoxColumn maxNChild; @@ -2317,6 +2576,26 @@ namespace Nc_Demo_Application private System.Windows.Forms.Label label21; private System.Windows.Forms.ComboBox magActionAction; private System.Windows.Forms.Label versionLabel; + private System.Windows.Forms.CheckBox multitoolOptCheckbox; + private System.Windows.Forms.Label label27; + private System.Windows.Forms.Label label31; + private System.Windows.Forms.TextBox maxToolXMultiTxb; + private System.Windows.Forms.Label label30; + private System.Windows.Forms.TextBox maxMultitoolTxb; + private System.Windows.Forms.Label label29; + private System.Windows.Forms.TextBox maxEdgeXToolTxb; + private System.Windows.Forms.Label label28; + private System.Windows.Forms.TextBox maxToolTxb; + private System.Windows.Forms.DataGridViewTextBoxColumn magazineId; + private System.Windows.Forms.DataGridViewTextBoxColumn positionId; + private System.Windows.Forms.DataGridViewTextBoxColumn positionType; + private System.Windows.Forms.DataGridViewTextBoxColumn ShankId; + private System.Windows.Forms.DataGridViewTextBoxColumn magazineToolId; + private System.Windows.Forms.DataGridViewCheckBoxColumn disablePosition; + private System.Windows.Forms.Label label32; + private System.Windows.Forms.TextBox multitoolIdTxb; + private System.Windows.Forms.CheckBox magPositionOptionCheckbox; + private System.Windows.Forms.CheckBox familyOptCheckbox; } } diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.cs b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.cs index e4bdfb7..38c8b0c 100644 --- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.cs +++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.cs @@ -113,6 +113,16 @@ namespace Nc_Demo_Application dateTimeTxb.Text = ncData.dateTime; machineNumberTxb.Text = ncData.machineNumber; processNumberTxb.Text = ncData.processCount.ToString(); + + ToolManagerConfig config = DatabaseController.getInstance().ReadToolManagerConfig(); + + maxToolTxb.Text = config.MaxTools.ToString(); + maxEdgeXToolTxb.Text = config.MaxEdgePerTools.ToString(); + maxMultitoolTxb.Text = config.MaxMultitools.ToString(); + maxToolXMultiTxb.Text = config.MaxToolsPerMultitools.ToString(); + multitoolOptCheckbox.Checked = config.MultitoolOption; + familyOptCheckbox.Checked = config.FamilyOption; + magPositionOptionCheckbox.Checked = config.MagPositionOption; } private void FillNcProcessInput() @@ -192,6 +202,19 @@ namespace Nc_Demo_Application // Update user data DatabaseController.getInstance().UpdateNcData(ncData); + + ToolManagerConfig config = new ToolManagerConfig() + { + MaxTools = Convert.ToInt32(maxToolTxb.Text), + MaxEdgePerTools = Convert.ToInt32(maxEdgeXToolTxb.Text), + MaxMultitools = Convert.ToInt32(maxMultitoolTxb.Text), + MaxToolsPerMultitools = Convert.ToInt32(maxToolXMultiTxb.Text), + MultitoolOption = multitoolOptCheckbox.Checked, + FamilyOption = familyOptCheckbox.Checked, + MagPositionOption = magPositionOptionCheckbox.Checked + }; + + DatabaseController.getInstance().UpdateToolManagerConfig(config); } private void SaveNcProcessData_Click(object sender, EventArgs e) @@ -609,6 +632,7 @@ namespace Nc_Demo_Application toolsIdLlb.Text = toolInfo.Id.ToString(); familyTxt.Text = toolInfo.FamilyName; childIdTxt.Text = toolInfo.ChildId.ToString(); + multitoolIdTxb.Text = toolInfo.MultitoolId.ToString(); magazinePositionTypeTxt.Text = toolInfo.MagazinePositionType.ToString(); rightSizeTxt.Text = toolInfo.RightSize.ToString(); leftSizeTxt.Text = toolInfo.LeftSize.ToString(); @@ -654,6 +678,7 @@ namespace Nc_Demo_Application // toolInfo.MagazineId = (int)magazineComboBox.SelectedItem; toolInfo.FamilyName = familyTxt.Text; toolInfo.ChildId = Convert.ToInt32(childIdTxt.Text); + toolInfo.MultitoolId = Convert.ToInt32(multitoolIdTxb.Text); toolInfo.MagazinePositionType = Convert.ToInt32(magazinePositionTypeTxt.Text); toolInfo.RightSize = Convert.ToInt32(rightSizeTxt.Text); toolInfo.LeftSize = Convert.ToInt32(leftSizeTxt.Text); @@ -713,8 +738,7 @@ namespace Nc_Demo_Application }; DatabaseController.getInstance().UpdateMagazineAction(magAction); } - - + private void refreshToolUI_Click(object sender, EventArgs e) { FillToolsInput(); diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.resx b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.resx index 0247cfe..46c8073 100644 --- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.resx +++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.resx @@ -150,6 +150,9 @@ True + + True + 869, 17