Пример #1
0
 private void Init()
 {
     this.status_username.Text         = MESMainForm.currentUser;
     this.cb_curprocess.DropDownStyle  = ComboBoxStyle.DropDownList;
     this.cb_processItem.DropDownStyle = ComboBoxStyle.DropDownList;
     serviceClient     = new MesService.MesServiceClient();
     serviceClientTest = new MesServiceTest.MesServiceClient();
     stationListTemp   = new List <string>();
     DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, true);
     this.radGridView1.AllowRowHeaderContextMenu = false;
     DataSource();
     RefreshCurrentProcess();
     this.cb_processItem.Text = serviceClientTest.SelectCurrentTProcess();
 }
Пример #2
0
 private void TProcess_Load(object sender, EventArgs e)
 {
     Init();
     EventHandlers();
     UpdateProcesList();
     SelectStationList(this.currentSelectProcess);
     this.currentSelectProcess         = serviceClientTest.SelectCurrentTProcess();
     this.cb_processItem.SelectedIndex = this.cb_processItem.Items.IndexOf(this.currentSelectProcess);
     this.cb_curprocess.SelectedIndex  = this.cb_curprocess.Items.IndexOf(this.currentSelectProcess);
     RefreshControl();
 }
        public static bool InitDirectory(StandConfigType configType, bool IsCreateDirectory)
        {
            serviceClientTest = new MesServiceTest.MesServiceClient();
            var globalConfigPath = AppDomain.CurrentDomain.BaseDirectory + CommConfig.DeafaultConfigRoot;

            if (!Directory.Exists(globalConfigPath))
            {
                Directory.CreateDirectory(globalConfigPath);
            }
            //根据工站新建目录:每个工站下包含所有产品型号得子目录
            var processList = serviceClientTest.SelectAllTProcess();

            if (processList.Length < 1)
            {
                LogHelper.Log.Info("【InitStandConfig】未查询到所有产品");
            }
            var defaultRoot = ConfigurationManager.AppSettings["standConfigRoot"].ToString();

            QueryCurrentStandProductDirectory(defaultRoot);
            var currentProcess = serviceClientTest.SelectCurrentTProcess();

            if (currentProcess == "" || currentProcess == "NULL")
            {
                MessageBox.Show("请先设置工艺流程!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return(false);
            }
            //创建当前工艺文件夹
            var burnProductType         = defaultRoot + StandCommon.TurnStationConfigPath + currentProcess + "\\" + StandCommon.TurnStationFWName;
            var sensibilityProductType  = defaultRoot + StandCommon.SensibilityStationConfigPath + currentProcess;
            var shellProductType        = defaultRoot + StandCommon.ShellStationConfigPath + currentProcess;
            var airtageProductType      = defaultRoot + StandCommon.AirtageStationConfigPath + currentProcess;
            var stentProductType        = defaultRoot + StandCommon.StentStationConfigPath + currentProcess;
            var productTestProductType  = defaultRoot + StandCommon.ProductFinishStationConfigPath + currentProcess;
            var productCheckProductType = defaultRoot + StandCommon.CheckProductStationConfigPath + currentProcess;

            if (IsCreateDirectory)
            {
                if (configType == StandConfigType.burn)
                {
                    CreateNewDirectory(burnProductType);
                }
                else if (configType == StandConfigType.sensibility)
                {
                    CreateNewDirectory(sensibilityProductType);
                }
                else if (configType == StandConfigType.shell)
                {
                    CreateNewDirectory(shellProductType);
                }
                else if (configType == StandConfigType.airtage)
                {
                    CreateNewDirectory(airtageProductType);
                }
                else if (configType == StandConfigType.stent)
                {
                    CreateNewDirectory(stentProductType);
                }
                else if (configType == StandConfigType.productTest)
                {
                    CreateNewDirectory(productTestProductType);
                }
                else if (configType == StandConfigType.productCheck)
                {
                    CreateNewDirectory(defaultRoot + StandCommon.CheckProductStationConfigPath + currentProcess);
                }
            }
            return(true);
        }