public void SetModule(FAFramework.Module.FAModule module)
        {
            if (module == null) return;
            if (module.ProductInfo == null) return;

            Utility.BindingUtility.SetBindingObject(labelSamsungBarcode, BindingMode.OneWay, module.ProductInfo, Label.ContentProperty, "SamsungBarcode");
            Utility.BindingUtility.SetBindingObject(labelSpecialBarcode, BindingMode.OneWay, module.ProductInfo, Label.ContentProperty, "SpecialBarcode");
        }
        private PageRetryInfoSetting AddModuleRetrySettingPage(string name, FAFramework.Module.FAModule module, bool initialize)
        {
            PageRetryInfoSetting page = new PageRetryInfoSetting();
            UIUtility.AddPage(tabControlModuleRetrySetting, name, page);
            page.RetryInfoList.AddRange(module.RetryInfoList.Values);
            if (initialize)
                page.Initialize();

            return page;
        }
        public void AddProduct(FAFramework.Utility.FAProductInfo product)
        {
            FAFramework.Utility.FAProductInfo newProductInfo = new Utility.FAProductInfo();
            product.Copy(newProductInfo);
            ProductList.Add(newProductInfo);

            if (ProductList.Count > 0 &&
                ProductList.Count > LimitCount)
                ProductList.RemoveAt(0);
        }
        private PageTimeSetting AddModuleTimeSettingPage(string name, FAFramework.Module.FAModule module, bool initialize)
        {
            PageTimeSetting page = new PageTimeSetting();
            UIUtility.AddPage(tabControlModuleTimeSetting, name, page);

            foreach (KeyValuePair<string, FALibrary.Utility.FATime> item in module.TimeList)
            {
                PageTimeSetting.FANamedTime time = new PageTimeSetting.FANamedTime();
                time.Name = item.Key;
                time.Time = item.Value;
                page.TimeList.Add(time);
            }

            if (initialize)
                page.Initialize();

            return page;
        }
 public void Initialize(FAFramework.Equipment.EquipmentManager em)
 {
     Items = Equipment.MainEquipment.Instance.DebugList;
 }
Exemple #6
0
    public static void SetActionsToButton(Button button, FAFramework.Forms.Manual.WindowOperation.Operation[] actions, KeyValuePair<string, Func<bool>>[] status, string unknownName = "UNKNOWN")
    {
        FAFramework.Forms.Manual.WindowOperation.SetActionToButton(button, actions);

        var obj = new PartStatus();

        var tempStatus = status;
        var tempUnknownName = unknownName;
        obj.Execute =
            delegate()
            {
                foreach (var item in tempStatus)
                {
                    if (item.Value() == true)
                    {
                        obj.Status = item.Key;
                        return;
                    }
                }

                obj.Status = tempUnknownName;
            };

        Binding bd = new Binding("Status");
        bd.Source = obj;
        bd.Mode = BindingMode.OneWay;
        button.SetBinding(Button.ContentProperty, bd);

        GUIUpdateManager.Instance.Items.Add(obj.Execute);
    }
        private PageRetryInfoSetting AddModuleRetrySettingPage(string name, FAFramework.Module.FAModule module, bool initialize)
        {
            PageRetryInfoSetting page = new PageRetryInfoSetting();

            page.Width = double.NaN;
            page.Height = double.NaN;
            page.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
            page.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;

            Frame frame = new Frame();
            frame.Width = double.NaN;
            frame.Height = double.NaN;
            frame.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
            frame.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;
            frame.Content = page;

            TabItem tabItem = new TabItem();
            tabItem.Height = 50;
            tabItem.Header = name;
            tabItem.Content = frame;
            tabControlModuleRetrySetting.Items.Add(tabItem);

            page.RetryInfoList.AddRange(module.RetryInfoList.Values);

            if (initialize)
                page.Initialize();

            return page;
        }
        private PageTimeSetting AddModuleTimeSettingPage(string name, FAFramework.Module.FAModule module, bool initialize)
        {
            PageTimeSetting page = new PageTimeSetting();

            page.Width = double.NaN;
            page.Height = double.NaN;
            page.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
            page.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;

            Frame frame = new Frame();
            frame.Width = double.NaN;
            frame.Height = double.NaN;
            frame.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
            frame.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;
            frame.Content = page;

            TabItem tabItem = new TabItem();
            tabItem.Height = 50;
            tabItem.Header = name;
            tabItem.Content = frame;
            tabControlModuleTimeSetting.Items.Add(tabItem);

            foreach (KeyValuePair<string, FALibrary.Utility.FATime> item in module.TimeList)
            {
                PageTimeSetting.FANamedTime time = new PageTimeSetting.FANamedTime();
                time.Name = item.Key;
                time.Time = item.Value;
                page.TimeList.Add(time);
            }

            if (initialize)
                page.Initialize();

            return page;
        }