Beispiel #1
0
        private void FormMain_Load(object sender, EventArgs e)
        {
            RorzeInterface ctrl   = new RorzeInterface(this);
            RouteControl   RTCtrl = new RouteControl(this, ctrl);

            RTCtrl.ConnectAll();
        }
Beispiel #2
0
        void Application_Start(object sender, EventArgs e)
        {
            // 在应用程序启动时运行的代码
            Application["starttime"] = DateTime.Now;//在程序初始化的时候执行。在Web应用程序的生命周期里就执行一次,这里只能放一些公用的信息,比如HttpApplicationState。

            //MVC路由设置
            AreaRegistration.RegisterAllAreas();
            RouteControl.RegisterRouters(RouteTable.Routes);
        }
        private static FrameworkElement RouteWidget(string propertyName, Action updateAction)
        {
            var widget = new RouteControl()
            {
                UpdateAction = updateAction
            };
            var bind = new Binding(propertyName);

            widget.SetBinding(RouteControl.RouteProperty, bind);
            return(widget);
        }
Beispiel #4
0
        public FormMain()
        {
            InitializeComponent();
            XmlConfigurator.Configure();
            Initialize();

            HostControl = new RorzeInterface(this);
            RouteCtrl   = new RouteControl(HostControl);
            AlmMapping  = new AlarmMapping();

            this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
            this.Location      = new System.Drawing.Point(-200, 0);

            SanwaUtil.addPartition();
            SanwaUtil.dropPartition();
            ThreadPool.QueueUserWorkItem(new WaitCallback(DBUtil.consumeSqlCmd));
        }
Beispiel #5
0
        public static void UpdateLoadPortMapping(string PortName, string Mapping)
        {
            try
            {
                Form         form = Application.OpenForms["FormWaferMapping"];
                DataGridView Port_gv;
                if (form == null)
                {
                    return;
                }

                Port_gv = form.Controls.Find(PortName + "Assign_Gv", true).FirstOrDefault() as DataGridView;
                if (Port_gv == null)
                {
                    return;
                }

                if (Port_gv.InvokeRequired)
                {
                    UpdatePort ph = new UpdatePort(UpdateLoadPortMapping);
                    Port_gv.BeginInvoke(ph, PortName, Mapping);
                }
                else
                {
                    Node port = NodeManagement.Get(PortName);
                    //List<Job> MappingData = new List<Job>();
                    //port.IsMapping = true;
                    if (Mapping.Equals(""))
                    {
                        foreach (Job eachJob in port.JobList.Values)
                        {
                            JobManagement.Remove(eachJob.Job_Id);
                        }
                        port.JobList.Clear();
                        port.ReserveList.Clear();
                        JobManagement.ClearAssignJobByPort(port.Name);
                    }
                    else
                    {
                        int currentIdx = 1;
                        for (int i = 0; i < Mapping.Length; i++)
                        {
                            Job wafer = RouteControl.CreateJob();
                            wafer.Slot         = (i + 1).ToString();
                            wafer.FromPort     = PortName;
                            wafer.FromPortSlot = wafer.Slot;
                            wafer.Position     = PortName;
                            wafer.AlignerFlag  = false;
                            wafer.RecipeID     = "300MM";
                            string Slot = (i + 1).ToString("00");
                            switch (Mapping[i])
                            {
                            case '0':
                                wafer.Job_Id      = "No wafer";
                                wafer.Host_Job_Id = wafer.Job_Id;
                                //MappingData.Add(wafer);
                                break;

                            case '1':
                                while (true)
                                {
                                    wafer.Job_Id      = "Wafer" + currentIdx.ToString("00");
                                    wafer.Host_Job_Id = wafer.Job_Id;
                                    wafer.MapFlag     = true;
                                    if (JobManagement.Add(wafer.Job_Id, wafer))
                                    {
                                        //MappingData.Add(wafer);
                                        break;
                                    }
                                    currentIdx++;
                                }

                                break;

                            case '2':
                                wafer.Job_Id      = "Crossed";
                                wafer.Host_Job_Id = wafer.Job_Id;
                                wafer.MapFlag     = true;
                                //MappingData.Add(wafer);
                                break;

                            case '?':
                                wafer.Job_Id      = "Undefined";
                                wafer.Host_Job_Id = wafer.Job_Id;
                                wafer.MapFlag     = true;
                                //MappingData.Add(wafer);
                                break;

                            case 'W':
                                wafer.Job_Id      = "Double";
                                wafer.Host_Job_Id = wafer.Job_Id;
                                wafer.MapFlag     = true;
                                //MappingData.Add(wafer);
                                break;
                            }
                            if (!port.AddJob(wafer.Slot, wafer))
                            {
                                Job org = port.GetJob(wafer.Slot);
                                JobManagement.Remove(org.Job_Id);
                                port.RemoveJob(wafer.Slot);
                                port.AddJob(wafer.Slot, wafer);
                            }
                        }
                    }
                    List <Job> tmp = port.JobList.Values.ToList();
                    tmp.Sort((x, y) => { return(-Convert.ToInt16(x.Slot).CompareTo(Convert.ToInt16(y.Slot))); });
                    Port_gv.DataSource                          = tmp;
                    Port_gv.Columns["Slot"].Width               = 25;
                    Port_gv.Columns["Slot"].HeaderText          = "S";
                    Port_gv.Columns["Host_Job_Id"].Width        = 75;
                    Port_gv.Columns["DisplayDestination"].Width = 55;
                    Port_gv.Columns["DestinationSlot"].Width    = 30;
                    Port_gv.Columns["Offset"].Visible           = false;
                    Port_gv.Columns["Angle"].Visible            = false;
                    Port_gv.Columns["Job_Id"].Visible           = false;
                    Port_gv.Columns["Destination"].Visible      = false;
                    Port_gv.Columns["ProcessFlag"].Visible      = false;
                    // Port_gv.Columns["Piority"].Visible = false;
                    Port_gv.Columns["AlignerFlag"].Visible     = false;
                    Port_gv.Columns["OCRFlag"].Visible         = false;
                    Port_gv.Columns["AlignerFinished"].Visible = false;
                    Port_gv.Columns["OCRFinished"].Visible     = false;
                    Port_gv.Columns["Position"].Visible        = false;
                    Port_gv.Columns["FromPort"].Visible        = false;
                    Port_gv.Columns["LastNode"].Visible        = false;
                    Port_gv.Columns["CurrentState"].Visible    = false;
                    Port_gv.Columns["WaitToDo"].Visible        = false;
                    //Port_gv.Columns["FetchRobot"].Visible = false;
                    Port_gv.Columns["ProcessNode"].Visible           = false;
                    Port_gv.Columns["MapFlag"].Visible               = false;
                    Port_gv.Columns["DisplayDestination"].HeaderText = "Dest";
                    Port_gv.Columns["DestinationSlot"].HeaderText    = "DS";
                    Port_gv.Columns["Host_Job_Id"].HeaderText        = "ID";
                    Port_gv.ColumnHeadersDefaultCellStyle.Font       = new Font("Arial", 10);
                    Port_gv.Columns["NeedProcess"].Visible           = false;
                    Port_gv.Columns["OCRImgPath"].Visible            = false;
                    Port_gv.Columns["OCRScore"].Visible              = false;
                    Port_gv.Columns["LastSlot"].Visible              = false;
                    Port_gv.Columns["FromPortSlot"].Visible          = false;
                    Port_gv.Columns["AssignTime"].Visible            = false;
                    Port_gv.Columns["DefaultOCR"].Visible            = false;
                    Port_gv.Columns["RecipeID"].Visible              = false;
                    Port_gv.Columns["ErrPosition"].Visible           = false;
                    Port_gv.Columns["InProcess"].Visible             = false;
                    Port_gv.Columns["Host_Lot_Id"].Visible           = false;

                    MonitoringUpdate.UpdateNodesJob(PortName);
                    port.IsMapping = true;
                }
            }
            catch (Exception e)
            {
                logger.Error("UpdateLoadPortMapping: Update fail:" + e.StackTrace);
            }
        }
Beispiel #6
0
 private void Form1_Load(object sender, EventArgs e)
 {
     MainProcess = new RouteControl();
 }