Exemplo n.º 1
0
        //Initialisiert einen neuen HardwareController
        public HardwareController()
        {
            //LaserControl.ScriptV2.GlobalObjects.HardwareController = this;

            AllAxes = new List<Axis>();
            AllIOs = new List<IOController>();
            AllTools = new List<Tool>();

            /*SelectedTool = NoTool;
            PreviousSelectedTool = NoTool;
            AllTools.Add(NoTool);*/

            UseAbsCoordSystem = false;
            CrossOffsetRightUpper = new PointXD<int>(2);
            TableCenter = new PointXD<int>(2);
            TableOrigin = new PointXD<int>(2);
            ProbeOffset = new PointXD<int>(2);
            LoadPosition = new PointXD<int>(3);

            HomeWhileScribingCount = 0;
            HomeWhileScribingAxes = new List<string>();

            InternalLoad();

            NewTool("No-TOOL");
            NoTool = GetTool("NO-TOOL");
            NoTool.MyToolType = ToolType.NoTool;
            SelectedTool = NoTool;
            PreviousSelectedTool = NoTool;

            LaserControl.ScriptV2.GlobalObjects.HWC = this;

            /*
            #warning Static implementation of values for testing Table Origin
            TableOrigin[0] = 4422180;
            TableOrigin[1] = 1274006;

            #warning Static implementation of values for testing Table Center
            TableCenter[0] = 6457181;
            TableCenter[1] = 2956500;

            LoadPosition[0] = 500000;
            LoadPosition[1] = 600000;
            LoadPosition[2] = 0;

            IntelligentScribe = true;*/
        }
Exemplo n.º 2
0
        private void AllTools_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (AllTools.SelectedItem == null)
            {
                return;
            }
            Tool t = HWC.GetTool(AllTools.SelectedItem.ToString());
            if (t != null)
            {
                Current = t;
                Data.ControlIdent = t.ControlIdent;
                Data.CName = t.Name;
                Data.Focus = Axis.SConvertIntToStr(t.Fokus);
                Data.ToolTypeIndex = (int)t.MyToolType;
                Data.CO_X = Axis.SConvertIntToStr(t.CameraOffset[0]);
                Data.CO_Y = Axis.SConvertIntToStr(t.CameraOffset[1]);

                Data.RightVisibility = System.Windows.Visibility.Visible;

            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Erstellt eine neues Tool, speichert diese in AllTools und gibt dieses zurück.
 /// </summary>
 /// <param name="controlident">ControlIdent des neuen Tools</param>
 /// <returns>Das neu erstellte Tool</returns>
 public virtual Tool NewTool(string controlident)
 {
     controlident = controlident.ToUpper();
     if (AllTools.Exists(x => x.ControlIdent == controlident))
     {
         throw new Exception("A tool with this controlident allready exitst!");
     }
     Tool a = new Tool("", controlident, ToolType.NoTool);
     AllTools.Add(a);
     return a;
 }