using SA_LTT; using SA_LTT.Info.RecipeInfo; using SA_LTT.Info.WaferInfo; using SA_LTT_UI.Viewer; using System; using System.Collections; using System.Drawing; using System.Windows.Forms; using static SA_LTT.Info.WaferInfo.WaferInfoManager; namespace SA_LTT_UI.Screen { public partial class ScreenMain : UserControl { private MainFrame _mainFrame; private AnimationEquipment _animationEquipment = new AnimationEquipment(); private WaferProcessPointView _waferProcessPointView = new WaferProcessPointView(); protected override CreateParams CreateParams { get { CreateParams MyCp = base.CreateParams; MyCp.ExStyle |= 0x02000000; return MyCp; } } public ScreenMain(MainFrame mainFrame) { InitializeComponent(); _mainFrame = mainFrame; elementHost2.Child = _animationEquipment; _animationEquipment.AddPortMouseDownEvent(AnimationPortMouseDown); _animationEquipment.AddChamberMouseDownEvent(AnimationChamberMouseDown); _animationEquipment.AddPreAlignerMouseDownEvent(AnimationPreAlignerMouseDown); _animationEquipment.AddRobotMouseDownEvent(AnimationRobotMouseDown); _animationEquipment.AddUvLaserMouseDownEvent(AnimationUvLaserMouseDown); _animationEquipment.AddScannerMouseDownEvent(AnimationScannerMouseDown); _animationEquipment.AddAttenuatorMouseDownEvent(AnimationAttenuatorMouseDown); _mainFrame.equipment.AddRecipeExcutedEvent(_sequence_RecipeExcuted); _mainFrame.equipment.AddProcessInfoExcutedEvent(_sequence_ProcessInfoExcuted); timer.Tick += Timer_Tick; timer.Start(); } private void _sequence_RecipeExcuted(Recipe recipe) { if(InvokeRequired) { BeginInvoke(new RecipeExcuteEvent(_sequence_RecipeExcuted), recipe); } else { _waferProcessPointView.ClearProcessArea(); _waferProcessPointView.Radius = recipe.Radius; _waferProcessPointView.PrimaryFlat = recipe.DistanceFromCenterToPrimaryFlat; tb_RecipeName.Text = recipe.Name; foreach (ProcessInfo processInfo in recipe.ProcessInfoList) { processInfo.SetProcessData(); _waferProcessPointView.AddProcessArea(processInfo.ProcessStartY, processInfo.ProcessEndY, processInfo.ProcessList.ToArray()); } } } private void _sequence_ProcessInfoExcuted(ProcessInfo processInfo, int processInfoIndex) { if (InvokeRequired) { BeginInvoke(new ProcessInfoExcuteEvent(_sequence_ProcessInfoExcuted), processInfo, processInfoIndex); } else { tb_RecipeEnergy.Text = processInfo.Energy.ToString(); _waferProcessPointView.HighlightProcessAreas(processInfoIndex); } } private void Timer_Tick(object sender, EventArgs e) { try { if (_mainFrame.equipment.IsEnergyDropCheckRun) { if (_mainFrame.energyDropCheckViewer.Visible == false) { EnergyDropCheckViewShow(); } else { if (_mainFrame.energyDropCheckViewer.TopMost == false) _mainFrame.energyDropCheckViewer.TopMost = true; } } else { if (_mainFrame.energyDropCheckViewer.TopMost) { _mainFrame.energyDropCheckViewer.TopMost = false; } } if (_mainFrame.equipment.IsAttenuatorCalRun) { if (_mainFrame.attenuatorCalViewer.Visible == false) { AttenuatorCalViewShow(); } else { if (_mainFrame.attenuatorCalViewer.TopMost == false) _mainFrame.attenuatorCalViewer.TopMost = true; } } else { if (_mainFrame.attenuatorCalViewer.TopMost) { _mainFrame.attenuatorCalViewer.TopMost = false; } } DDDDDDDDDDDDDDDDDDDDD.Text = _mainFrame.equipment.PmcStep.ToString(); DDDDDDDD.Text = _mainFrame.equipment.TmcStep.ToString(); _animationEquipment.SetDoor1Status(_mainFrame.equipment.crevis.DigitalInputs[SA_LTT.Module.Crevis.DigitalInput.DOOR_LOCK_OPEN_1]); _animationEquipment.SetDoor2Status(_mainFrame.equipment.crevis.DigitalInputs[SA_LTT.Module.Crevis.DigitalInput.DOOR_LOCK_OPEN_2]); _animationEquipment.SetDoor3Status(_mainFrame.equipment.crevis.DigitalInputs[SA_LTT.Module.Crevis.DigitalInput.DOOR_LOCK_OPEN_3]); _animationEquipment.SetDoor4Status(_mainFrame.equipment.crevis.DigitalInputs[SA_LTT.Module.Crevis.DigitalInput.DOOR_LOCK_OPEN_4]); _animationEquipment.SetDoorCPStatus(_mainFrame.equipment.crevis.DigitalInputs[SA_LTT.Module.Crevis.DigitalInput.CP_BOX_OPEN]); _animationEquipment.SetMotorPositionX(_mainFrame.equipment.powerPmac.GetAxisActualPos(SA_LTT.Module.PmacAxis.X_Axis)); _animationEquipment.SetMotorPositionY(_mainFrame.equipment.powerPmac.GetAxisActualPos(SA_LTT.Module.PmacAxis.Y_Axis)); _animationEquipment.SetMotorPositionT(_mainFrame.equipment.powerPmac.GetAxisActualPos(SA_LTT.Module.PmacAxis.T_Axis)); _animationEquipment.SetRobotPositionArm(_mainFrame.equipment.robot.PositionR); _animationEquipment.SetRobotPositionAngle(_mainFrame.equipment.robot.PositionT); _animationEquipment.SetRobotPositionZ(_mainFrame.equipment.robot.PositionZ); _animationEquipment.SetRobotWaferNum(_mainFrame.equipment.waferInfoManager.GetWaferInfo(WaferNumbers.Robot).SourceNumber); _animationEquipment.SetIsAlignRun(_mainFrame.equipment.preAligner.IsAlignRun); _animationEquipment.SetPreAlignerWaferNum(_mainFrame.equipment.waferInfoManager.GetWaferInfo(WaferNumbers.PreAligner).SourceNumber); _animationEquipment.SetChamberWaferNum(_mainFrame.equipment.chamber.WaferInfo.SourceNumber); _animationEquipment.SetChamberLiftPin(_mainFrame.equipment.chamber.IsLiftPinUp); _animationEquipment.SetChamberGate(_mainFrame.equipment.crevis.DigitalInputs[SA_LTT.Module.Crevis.DigitalInput.CMB_GATE_OPEN]); UpdateModuleConnectionInfo(); UpdateLaserInfo(); tb_Port1Status.Text = _mainFrame.equipment.port1Foup.status.ToString(); tb_Port2Status.Text = _mainFrame.equipment.port2Foup.status.ToString(); tb_TactTime.Text = _mainFrame.equipment.ProcessTactTimeSeconds.ToString("F3"); foreach (WaferNumbers info in Enum.GetValues(typeof(WaferNumbers))) { WaferInfo waferInfo = _mainFrame.equipment.waferInfoManager.GetWaferInfo(info); _animationEquipment.SetWaferExist(info, waferInfo); } } catch(Exception ex) { EquipmentLogManager.Instance.WriteExceptionLog(ex.StackTrace + "\r\n" + ex.Message); } } private void UpdateModuleConnectionInfo() { //lb_Scanner.BackColor = _mainFrame.equipment.scanner.IsInitialized ? Color.Lime : Color.Red; //lb_PreAligner.BackColor = _mainFrame.equipment.preAligner.IsOpen? Color.Lime : Color.Red; //lb_Robot.BackColor = _mainFrame.equipment.robot.IsOpen ? Color.Lime : Color.Red; //lb_Attenuator.BackColor = _mainFrame.equipment.attenuator.IsOpen ? Color.Lime : Color.Red; //lb_TempControler.BackColor = _mainFrame.equipment.tempControl.IsOpen ? Color.Lime : Color.Red; //lb_FFU.BackColor = _mainFrame.equipment.ffu.IsOpen ? Color.Lime : Color.Red; //lb_PowerPmac.BackColor = _mainFrame.equipment.powerPmac.IsOpen() ? Color.Lime : Color.Red; //lb_UvLaser.BackColor = _mainFrame.equipment.piLaser.IsOpen ? Color.Lime : Color.Red; //lb_PowerMeter.BackColor = _mainFrame.equipment.powerMeter.IsOpen ? Color.Lime : Color.Red; } private void UpdateLaserInfo() { lb_PowerOn.BackColor = _mainFrame.equipment.piLaser.CurrentPiLaserStatus.CurrentSystemStatus.PowerOn ? Color.Lime : Color.Red; lb_ShutterEnable.BackColor = _mainFrame.equipment.piLaser.CurrentPiLaserStatus.CurrentSystemStatus.ShutterEnabled ? Color.Lime : Color.Red; //lb_KeySwitch.BackColor = _mainFrame.equipment.piLaser.CurrentPiLaserStatus.CurrentSystemStatus.KeySwitch ? Color.Lime : Color.Red; //lb_LDDOn.BackColor = _mainFrame.equipment.piLaser.CurrentPiLaserStatus.CurrentSystemStatus.LddOn ? Color.Lime : Color.Red; //lb_QSWOn.BackColor = _mainFrame.equipment.piLaser.CurrentPiLaserStatus.CurrentSystemStatus.QswOn ? Color.Lime : Color.Red; //lb_ShutterInterlock.BackColor = _mainFrame.equipment.piLaser.CurrentPiLaserStatus.CurrentSystemStatus.ShutterInterlock ? Color.Lime : Color.Red; //lb_LDDInterlock.BackColor = _mainFrame.equipment.piLaser.CurrentPiLaserStatus.CurrentSystemStatus.LddInterlock ? Color.Lime : Color.Red; lb_LaserOn.BackColor = _mainFrame.equipment.scanner.IsLaserOn ? Color.Lime : Color.Red; lb_LaserOff.BackColor = !_mainFrame.equipment.scanner.IsLaserOn ? Color.Lime : Color.Red; lb_SetCurrent.Text = _mainFrame.equipment.piLaser.CurrentPiLaserStatus.SetCurrent.ToString("F2"); lb_ActualCurrent.Text = _mainFrame.equipment.piLaser.CurrentPiLaserStatus.ActualCurrent.ToString("F2"); //lb_DiodeVoltage.Text = _mainFrame.equipment.piLaser.CurrentPiLaserStatus.DiodeVoltage.ToString("F2"); //lb_MaxCurrent.Text = _mainFrame.equipment.piLaser.CurrentPiLaserStatus.MaxCurrent.ToString("F2"); lb_AttenuatorAngle.Text = _mainFrame.equipment.attenuator.Degree.ToString("F3"); } private void AnimationPortMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : WaferInfoViewer"); _mainFrame.waferInfoViewer.Show(); _mainFrame.waferInfoViewer.WindowState = FormWindowState.Normal; _mainFrame.waferInfoViewer.TopMost = true; _mainFrame.waferInfoViewer.TopMost = false; } private void AnimationChamberMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : ChamberViewer"); _mainFrame.chamberViewer.Show(); _mainFrame.chamberViewer.WindowState = FormWindowState.Normal; _mainFrame.chamberViewer.TopMost = true; _mainFrame.chamberViewer.TopMost = false; } private void AnimationPreAlignerMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : PreAlignerViewer"); _mainFrame.preAignViewer.Show(); _mainFrame.preAignViewer.WindowState = FormWindowState.Normal; _mainFrame.preAignViewer.TopMost = true; _mainFrame.preAignViewer.TopMost = false; } private void AnimationRobotMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : RobotViewer"); _mainFrame.robotViewer.Show(); _mainFrame.robotViewer.WindowState = FormWindowState.Normal; _mainFrame.robotViewer.TopMost = true; _mainFrame.robotViewer.TopMost = false; } private void AnimationUvLaserMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : UvLaserViewer"); _mainFrame.piLaserViewer.Show(); _mainFrame.piLaserViewer.WindowState = FormWindowState.Normal; _mainFrame.piLaserViewer.TopMost = true; _mainFrame.piLaserViewer.TopMost = false; } private void AnimationScannerMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : ScannerViewer"); _mainFrame.scannerViewer.Show(); _mainFrame.scannerViewer.WindowState = FormWindowState.Normal; _mainFrame.scannerViewer.TopMost = true; _mainFrame.scannerViewer.TopMost = false; } private void AnimationAttenuatorMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : AttenuatorViewer"); _mainFrame.attenuatorViewer.Show(); _mainFrame.attenuatorViewer.WindowState = FormWindowState.Normal; _mainFrame.attenuatorViewer.TopMost = true; _mainFrame.attenuatorViewer.TopMost = false; } private void btn_Start_Click(object sender, EventArgs e) { if (MessageBox.Show("Run 실행 하시겠습니까?", "확인", MessageBoxButtons.YesNo) == DialogResult.Yes) { if (_mainFrame.equipment.alarmManager.OccurredAlarms.Exists(x => x.Level == AlarmLevel.Heavy)) { MessageBox.Show("Alarm이 발생중입니다.", "확인", MessageBoxButtons.OK); return; } else { if(_mainFrame.equipment.piLaser.CurrentPiLaserStatus.EnableLdd == false || _mainFrame.equipment.piLaser.CurrentPiLaserStatus.EnableShutter == false || _mainFrame.equipment.piLaser.CurrentPiLaserStatus.SetCurrent != _mainFrame.equipment.piLaser.CurrentPiLaserStatus.MaxCurrent) { string message = string.Empty; if (_mainFrame.equipment.piLaser.CurrentPiLaserStatus.EnableLdd == false) { message += "LDD가 닫혀있습니다. \r\n"; } if (_mainFrame.equipment.piLaser.CurrentPiLaserStatus.EnableShutter == false) { message += "Shutter가 닫혀있습니다. \r\n"; } if (_mainFrame.equipment.piLaser.CurrentPiLaserStatus.SetCurrent != _mainFrame.equipment.piLaser.CurrentPiLaserStatus.MaxCurrent) { message += $"Set current가 {_mainFrame.equipment.piLaser.CurrentPiLaserStatus.MaxCurrent}이 아닙니다. \r\n \r\n"; } if (MessageBox.Show(message + "진행 하시겠습니까?", "확인", MessageBoxButtons.YesNo) != DialogResult.Yes) { return; } } if(_mainFrame.equipment.TmcStep == Sequence.TmcSteps.Wait && (_mainFrame.equipment.port1Foup.foupRecipe.Name == null || _mainFrame.equipment.port2Foup.foupRecipe.Name == null)) { string message = string.Empty; if (_mainFrame.equipment.port1Foup.foupRecipe.Name == null) { message += "Port1 recipe "; } if (_mainFrame.equipment.port2Foup.foupRecipe.Name == null) { message += "Port2 recipe "; } if (MessageBox.Show(message + "가 설정되어 있지 않습니다. 진행 하시겠습니까?", "확인", MessageBoxButtons.YesNo) != DialogResult.Yes) { return; } } if (_mainFrame.equipment.ProcessStart()) { SequenceViewShow(); EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : {((Control)sender).Text}"); } } } } private void btn_Pause_Click(object sender, EventArgs e) { EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : {((Control)sender).Text}"); _mainFrame.equipment.ProcessPause(); } private void btn_Stop_Click(object sender, EventArgs e) { if (MessageBox.Show("Sequence 초기화 및 \n완전 정지 하시겠습니까?", "확인", MessageBoxButtons.YesNo) == DialogResult.Yes) { if (_mainFrame.equipment.ProcessStatus != ProcessStatus.Pause) { if (_mainFrame.equipment.ProcessStatus != ProcessStatus.Idle) { MessageBox.Show("Pause 상태에서 변경이 가능 합니다.", "확인", MessageBoxButtons.OK); } return; } else { EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : {((Control)sender).Text}"); _mainFrame.equipment.ProcessStop(); } } } private void cb_Maint_CheckedChanged(object sender, EventArgs e) { if (_mainFrame.equipment.ProcessStatus != ProcessStatus.Idle) { if (_mainFrame.equipment.ProcessStatus != ProcessStatus.Idle) { Viewer.MessageBoxPad mbp = new Viewer.MessageBoxPad("Process status가 Idle이 아닙니다."); mbp.Show(); } cb_Maint_X.Checked = _mainFrame.equipment.EquipmentMode == EquipmentMode.Teach ? true : false; return; } if (cb_Maint_X.Checked) { if (_mainFrame.equipment.EquipmentMode == EquipmentMode.Auto && _mainFrame.equipment.ChangeMode(EquipmentMode.Teach)) { EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : {((Control)sender).Text} true"); _mainFrame.maintenanceViewer.Show(); cb_Maint_X.Checked = true; } else { cb_Maint_X.Checked = false; } } else { if (_mainFrame.equipment.EquipmentMode == EquipmentMode.Teach && _mainFrame.equipment.ChangeMode(EquipmentMode.Auto)) { EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : {((Control)sender).Text} false"); cb_Maint_X.Checked = false; } else { cb_Maint_X.Checked = true; } } } private void btn_Port1RecipeSet_Click(object sender, EventArgs e) { FoupRecipeSelectViewer foupRecipeSelectViewer = new FoupRecipeSelectViewer(_mainFrame); if (foupRecipeSelectViewer.ShowDialog() == DialogResult.OK) { if(foupRecipeSelectViewer.CurrentFoupRecipe != null) { _mainFrame.equipment.port1Foup.foupRecipe = foupRecipeSelectViewer.CurrentFoupRecipe.Clone(); btn_Port1RecipeSet.Text = _mainFrame.equipment.port1Foup.foupRecipe.Name; EquipmentLogManager.Instance.WriteButtonLog($"ScreenMain : Port1Recipe Set {_mainFrame.equipment.port1Foup.foupRecipe.Name}"); Port1RecipeUpdate(); } } } private void btn_Port2RecipeSet_Click(object sender, EventArgs e) { FoupRecipeSelectViewer foupRecipeSelectViewer = new FoupRecipeSelectViewer(_mainFrame); if (foupRecipeSelectViewer.ShowDialog() == DialogResult.OK) { if (foupRecipeSelectViewer.CurrentFoupRecipe != null) { _mainFrame.equipment.port2Foup.foupRecipe = foupRecipeSelectViewer.CurrentFoupRecipe.Clone(); btn_Port2RecipeSet_x.Text = _mainFrame.equipment.port2Foup.foupRecipe.Name; EquipmentLogManager.Instance.WriteButtonLog($"ScreenMain : Port2Recipe Set {_mainFrame.equipment.port1Foup.foupRecipe.Name}"); Port2RecipeUpdate(); } } } private void Port1RecipeUpdate() { //lv_Port1Recipes.Items.Clear(); //if (_mainFrame.equipment.port1Foup.foupRecipe != null) //{ // FoupRecipe originalRecipe = _mainFrame.equipment.foupRecipeManager.GetRecipe(_mainFrame.equipment.port1Foup.foupRecipe.Name); // for (int i = 24; i >= 0; i--) // { // ListViewItem lvi = new ListViewItem($"{i + 1}"); // if (originalRecipe.RecipeNames[i] == null) // { // lvi.SubItems.Add("Empty"); // } // else // { // lvi.SubItems.Add(originalRecipe.RecipeNames[i]); // } // lv_Port1Recipes.Items.Add(lvi); // } //} } private void Port2RecipeUpdate() { //lv_Port2Recipes.Items.Clear(); //if (_mainFrame.equipment.port2Foup.foupRecipe != null) //{ // FoupRecipe originalRecipe = _mainFrame.equipment.foupRecipeManager.GetRecipe(_mainFrame.equipment.port2Foup.foupRecipe.Name); // for (int i = 24; i >= 0; i--) // { // ListViewItem lvi = new ListViewItem($"{i + 1}"); // if (originalRecipe.RecipeNames[i] == null) // { // lvi.SubItems.Add("Empty"); // } // else // { // lvi.SubItems.Add(originalRecipe.RecipeNames[i]); // } // lv_Port2Recipes.Items.Add(lvi); // } //} } private void tb_Port1Status_DoubleClick(object sender, EventArgs e) { if(_mainFrame.equipment.ProcessStatus == ProcessStatus.Idle) { EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : {((Control)sender).Text} Ready"); _mainFrame.equipment.port1Foup.status = SA_LTT.Info.FoupInfo.FoupStatus.Ready; } else { Viewer.MessageBoxPad mbp = new Viewer.MessageBoxPad("Idle 상태에서만 변경 가능 합니다."); mbp.Show(); } } private void tb_Port2Status_DoubleClick(object sender, EventArgs e) { if (_mainFrame.equipment.ProcessStatus == ProcessStatus.Idle) { EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : {((Control)sender).Text} Ready"); _mainFrame.equipment.port2Foup.status = SA_LTT.Info.FoupInfo.FoupStatus.Ready; } else { Viewer.MessageBoxPad mbp = new Viewer.MessageBoxPad("Idle 상태에서만 변경 가능 합니다."); mbp.Show(); } } private void cb_RunStop_CheckedChanged(object sender, EventArgs e) { if(cb_RunStop_X.Checked) { EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : {((Control)sender).Text} true"); } else { EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : {((Control)sender).Text} false"); } _mainFrame.equipment.IsRunStop = cb_RunStop_X.Checked; } private void cb_AutoRun_CheckedChanged(object sender, EventArgs e) { if(cb_AutoRun_X.Checked) { EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : {((Control)sender).Text} true"); } else { EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : {((Control)sender).Text} false"); } _mainFrame.equipment.IsAutoRun = cb_AutoRun_X.Checked; } private void EnergyDropCheckViewShow() { if(_mainFrame.energyDropCheckViewer.Visible == false) { _mainFrame.energyDropCheckViewer.Show(); } _mainFrame.energyDropCheckViewer.WindowState = FormWindowState.Normal; _mainFrame.energyDropCheckViewer.TopMost = true; _mainFrame.energyDropCheckViewer.TopMost = false; } private void AttenuatorCalViewShow() { if (_mainFrame.attenuatorCalViewer.Visible == false) { _mainFrame.attenuatorCalViewer.Show(); } _mainFrame.attenuatorCalViewer.WindowState = FormWindowState.Normal; _mainFrame.attenuatorCalViewer.TopMost = true; _mainFrame.attenuatorCalViewer.TopMost = false; } private void SequenceViewShow() { if (_mainFrame.sequenceViewer.Visible == false) { _mainFrame.sequenceViewer.Show(); } _mainFrame.sequenceViewer.WindowState = FormWindowState.Normal; _mainFrame.sequenceViewer.TopMost = true; _mainFrame.sequenceViewer.TopMost = false; } private void btn_EnergyDropCheckView_Click(object sender, EventArgs e) { EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : {((Control)sender).Text}"); EnergyDropCheckViewShow(); } private void btn_AttenuatorCalView_Click(object sender, EventArgs e) { EquipmentLogManager.Instance.WriteButtonLog($"{this.Name} : {((Control)sender).Text}"); AttenuatorCalViewShow(); } private void btn_SequenceView_Click(object sender, EventArgs e) { _mainFrame.sequenceViewer.Show(); _mainFrame.sequenceViewer.WindowState = FormWindowState.Normal; _mainFrame.sequenceViewer.TopMost = true; _mainFrame.sequenceViewer.TopMost = false; } private void elementHost1_ChildChanged(object sender, System.Windows.Forms.Integration.ChildChangedEventArgs e) { } } }