public void Failed() { ResultPanel resultPanel = UIManager.Instance.ShowUIForms <ResultPanel>(); resultPanel.SetFailed(); GameStateManager.Instance.SetState(GameState.ESC); }
private void ResultPanel_DragDrop(object sender, DragEventArgs e) { DragDropWaveArgs args = (DragDropWaveArgs)e.Data.GetData("Voice.Visual.DragDropWaveArgs"); ResultPic.AddWavePart(args.bytes, (ResultPanel.PointToClient(Control.MousePosition)).X < ResultPic.Left ? 0 : -1); //if() //MessageBox.Show(e.Data.ToString() + "olala"); }
void Start() { SetState(State.Idle); currentPieces = Pieces.Cross; ai = FindObjectOfType <AIController>(); scoreManager = FindObjectOfType <ScoreManager>(); resPan = FindObjectOfType <ResultPanel>(); }
// Use this for initialization void Start() { LoadingPanel.SetActive(false); ResultPanel.SetActive(false); Time.timeScale = 0f; LapPanel.SetActive(true); PausePanel.SetActive(false); }
// Update is called once per frame void Update() { HPText.text = "HP : " + HPPoint; if (HPPoint <= 0) { ResultPanel.SetActive(true); Fade.SetActive(false); } }
//ตอนกดรับของ void ShowResultPanel(Dictionary <string, int> rewardList, StringBuilder questLog, StringBuilder detailLog) { //เอาสคริปมา ResultPanel resultPanel = GameManager.FindInActiveObjectByName("ResultPanel").GetComponent <ResultPanel>(); //ใส่ค่าให้ตัวแปรต่างๆ resultPanel.gameObject.SetActive(true); resultPanel.QuestLog = questLog.ToString(); resultPanel.DetailQuestLog = detailLog.ToString(); resultPanel.ShowResultPanel(rewardList); }
internal override void Enter() { base.Enter (); _resultPanel = (ResultPanel)JEngine.Instance.uiManager.GetPanel ("ResultPanel"); LoadLevel ("Level " + JEngine.Instance.gameManager.currentLevelID); if(JEngine.Instance.gameManager.currentLevelID >= 6) { _resultPanel.SetScore("Bravo, tu as finis le jeu en étant mort " + JEngine.Instance.gameManager.deathNb.ToString() + " fois !"); } _resultPanel.SetDeathText (JEngine.Instance.gameManager.deathNb.ToString()); Time.timeScale = 1f; }
// Update is called once per frame void Update() { timeCount++; if (timeCount % 60 == 0) { timer--; } timerText.text = "Time : " + timer; if (timer <= 0) { ResultPanel.SetActive(true); Fade.SetActive(false); } }
// Update is called once per frame void Update() { if (winorloose.LapsDone >= LapstoPlay) { ResultPanel.SetActive(true); if (winorloose.opponentLaps >= winorloose.LapsDone) { result.text = "Sorry You Lost!"; } else { result.text = "Great Driving! You won."; } StartCoroutine(WinorLose()); } }
// Start is called before the first frame update void Start() { materialpanel = GameObject.Find("ShopStateSave").GetComponent <ShopStatesReference>().materialPanel; mainCamera = GameObject.Find("Main_ThirdPersonCamera"); CraftCamera = GameObject.Find("Crafting_Cam"); inventoryUI = GameObject.Find("InventoryCanvas"); CraftCamera.SetActive(false); defImage = ResultPanel.GetComponent <Image>().sprite; itemDetails = GameObject.Find("InventoryCanvas").GetComponent <DisplayItemDetails>(); }
public void setResult() { if (playerHP <= 0) { ResultPanel.SetActive(true); Gameresult.text = "던전 클리어 실패!!"; Drop.text = "던전 클리어 실패로 " + "\n" + "아무것도 얻지 못하였습니다."; } else if (monsterHP <= 0) { ResultPanel.SetActive(true); Gameresult.text = "던전 클리어 성공!!"; Drop.text = "던전클리어 성공으로" + "\n" + "경험치 1을 획득 하셨습니다"; } }
void GetResult() { string resID = ""; resID = SortItemString(); foreach (Recipe R in recipes.recipes) { if (R.RecipeCode == resID) { result = R.result; correctrecipe = R; } } foreach (Recipe k in knownRecipes.recipes) { if (k == correctrecipe) { match = true; break; } else { match = false; } } if (result != null) { if (match) { ResultPanel.GetComponent <Image>().sprite = result.icon; } else { ResultPanel.GetComponent <Image>().sprite = unknown; } } else { ResultPanel.GetComponent <Image>().sprite = defImage; } }
void Awake() { UIType.InitUIType( false, false, false, UIFormTypes.Normal, UIFormShowModes.Normal, UIFormLucencyTypes.Penetrable); RegretButton.onClick.AddListener(LevelManager.Instance.RetractStep); GiveUpButton.onClick.AddListener(() => { LevelManager.Instance.Failed(); ResultPanel rp = UIManager.Instance.GetBaseUIForm <ResultPanel>(); rp.SetGiveUp(); }); }
protected override void IntroEnter() { base.IntroEnter(); if (_playPanel == null) { _playPanel = UIManager.Instance.GetPanel("PlayPanel") as PlayPanel; } _playPanel.Show(); if (_resultPanel == null) { _resultPanel = UIManager.Instance.GetPanel("ResultPanel") as ResultPanel; } if (gameplayCamera != null) { gameplayCamera.enabled = true; } ResetLevel(); }
public MainWindow() { Controller = new AppController(); Controller.ReportException = this.ReportException; InitializeComponent(); this.Icon = Extensions.LoadIconFromName("GPdotNet.Wnd.Dll.Images.gpdotnet.ico"); #region additional initialization this.expPanel1 = new ExperimentPanel(); this.funPanel1 = new FunctionPanel(); this.parPanel1 = new ParametersPanel(); this.runPanel1 = new RunPanel(); this.resPanel1 = new ResultPanel(); this.testPanel1 = new TestPanel(); this.infoPanel1 = new InfoPanel(); // // expPanel1 // this.expPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.expPanel1.Location = new System.Drawing.Point(3, 3); this.expPanel1.Name = "expPanel1"; this.expPanel1.Size = new System.Drawing.Size(463, 222); this.expPanel1.TabIndex = 0; // // runPanel1 // this.infoPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.infoPanel1.Location = new System.Drawing.Point(3, 3); this.infoPanel1.Name = "runPanel1"; this.infoPanel1.Size = new System.Drawing.Size(463, 222); this.infoPanel1.TabIndex = 1; // // funPanel1 // this.funPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.funPanel1.Location = new System.Drawing.Point(3, 3); this.funPanel1.Name = "funPanel1"; this.funPanel1.Size = new System.Drawing.Size(463, 222); this.funPanel1.TabIndex = 0; // // parPanel1 // this.parPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.parPanel1.Location = new System.Drawing.Point(3, 3); this.parPanel1.Name = "parPanel1"; this.parPanel1.Size = new System.Drawing.Size(463, 222); this.parPanel1.TabIndex = 0; // // runPanel1 // this.runPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.runPanel1.Location = new System.Drawing.Point(3, 3); this.runPanel1.Name = "runPanel1"; this.runPanel1.Size = new System.Drawing.Size(463, 222); this.runPanel1.TabIndex = 0; // // resPanel1 // this.resPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.resPanel1.Location = new System.Drawing.Point(3, 3); this.resPanel1.Name = "resPanel1"; this.resPanel1.Size = new System.Drawing.Size(463, 222); this.resPanel1.TabIndex = 0; // // testPanel1 // this.testPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.testPanel1.Location = new System.Drawing.Point(3, 3); this.testPanel1.Name = "testPanel1"; this.testPanel1.Size = new System.Drawing.Size(463, 222); this.testPanel1.TabIndex = 0; // this.tabPage3.Controls.Add(funPanel1); this.tabPage4.Controls.Add(parPanel1); this.tabPage5.Controls.Add(runPanel1); this.tabPage6.Controls.Add(resPanel1); this.tabPage7.Controls.Add(testPanel1); this.tabPage1.Controls.Add(expPanel1); this.tabPage2.Controls.Add(infoPanel1); #endregion treeView1.LabelEdit = true; this.Load += MainWindow_Load; this.FormClosing += MainWindow_FormClosing; this.ribbonTab1.Text = AboutGPdotNET.AssemblyTitle; SetStopMode(""); }
public ResultPanelMediator(ResultPanel resultPanel) : base(NAME) { m_viewComponent = resultPanel; }
/// <summary> /// Check if the current state of project is different from the persisted version /// Also Update ActualData Vie with values from GUI /// </summary> /// <param name="exp"></param> /// <param name="funPanel1"></param> /// <param name="parPanel1"></param> /// <param name="runPanel1"></param> /// <param name="resPanel1"></param> /// <param name="testPanel1"></param> /// <returns></returns> public bool IsModified(ProjectController exp, FunctionPanel funPanel1, ParametersPanel parPanel1, RunPanel runPanel1, ResultPanel resPanel1, TestPanel testPanel1) { var models = exp.Models; if (exp.Project.IsDirty) { return(true); } // foreach (var m in models) { //active model can contains unsaved data if (ActiveView is ModelController) { var mm = (ModelController)ActiveView; if (mm.Model.Guid == m.Model.Guid) { m.getCurrentValues(funPanel1, parPanel1, runPanel1, resPanel1, testPanel1); } } //check for modification if (m.IsModified()) { return(true); } } return(false); }
/// <summary> /// /// </summary> /// <param name="model"></param> void LoadModelWizard(GPModelType model) { _GPModel = model; switch (_GPModel) { case GPModelType.SR: { _dataPanel = new DataPanel(); loadGPPanelInMainWindow(this, _dataPanel, "Load Data"); _dataPanel.SetProblemType(_GPModel); _funPanel = new FunctionPanel(); loadGPPanelInMainWindow(this, _funPanel, "Functions"); _setPanel = new SettingsPanel(); loadGPPanelInMainWindow(this, _setPanel, "Settings"); _runPanel = new RunPanel(); loadGPPanelInMainWindow(this, _runPanel, "Run"); _resultPanel = new ResultPanel(); loadGPPanelInMainWindow(this, _resultPanel, "Result"); _infoPanel = new InfoPanel(); loadGPPanelInMainWindow(this, _infoPanel, "Info"); this._mainGPFactory = new GPFactory(); this._mainGPFactory.ReportEvolution += new EvolutionHandler(gpFactory_ReportEvolution); //set base run panel on _runPAnel _baseRunPanel = _runPanel; } break; case GPModelType.SRO: { _dataPanel = new DataPanel(); loadGPPanelInMainWindow(this, _dataPanel, "Load Data"); _dataPanel.SetProblemType(_GPModel); _funPanel = new FunctionPanel(); loadGPPanelInMainWindow(this, _funPanel, "Functions"); _setPanel = new SettingsPanel(); loadGPPanelInMainWindow(this, _setPanel, "Settings"); _runPanel = new RunPanel(); loadGPPanelInMainWindow(this, _runPanel, "Run"); _optimizePanel = new OptimizePanel(); loadGPPanelInMainWindow(this, _optimizePanel, "Optimize Model"); _resultPanel = new ResultPanel(); loadGPPanelInMainWindow(this, _resultPanel, "Result"); _infoPanel = new InfoPanel(); loadGPPanelInMainWindow(this, _infoPanel, "Info"); this._mainGPFactory = new GPFactory(); this._mainGPFactory.ReportEvolution += new EvolutionHandler(gpFactory_ReportEvolution); this._secondFactory = new GPFactory(); this._secondFactory.ReportEvolution += new EvolutionHandler(gpFactory_ReportEvolution); //set base run panel on _runPAnel _baseRunPanel = _runPanel; } break; case GPModelType.TS: { _dataPanel = new DataPanel(); loadGPPanelInMainWindow(this, _dataPanel, "Load Data"); _dataPanel.SetProblemType(_GPModel); _funPanel = new FunctionPanel(); loadGPPanelInMainWindow(this, _funPanel, "Functions"); _setPanel = new SettingsPanel(); loadGPPanelInMainWindow(this, _setPanel, "Settings"); _setPanel.SetNumOfConstance(0); _runPanel = new RunPanel(); loadGPPanelInMainWindow(this, _runPanel, "Run"); _resultPanel = new ResultPanel(); loadGPPanelInMainWindow(this, _resultPanel, "Result"); _infoPanel = new InfoPanel(); loadGPPanelInMainWindow(this, _infoPanel, "Info"); this._mainGPFactory = new GPFactory(); this._mainGPFactory.ReportEvolution += new EvolutionHandler(gpFactory_ReportEvolution); //set base run panel on _runPAnel _baseRunPanel = _runPanel; } break; case GPModelType.AO: { _funDefinit = new AnaliticFunctionDef(); loadGPPanelInMainWindow(this, _funDefinit, "Analytic function"); _funPanel = new FunctionPanel(); loadGPPanelInMainWindow(this, _funPanel, "Functions"); _setPanel = new SettingsPanel(); loadGPPanelInMainWindow(this, _setPanel, "Settings"); _setPanel.ShowGAParams(); _optimizePanel = new OptimizePanel(); loadGPPanelInMainWindow(this, _optimizePanel, "Optimize Model"); //initi pages after creation // _funDefinit.LoadFuns(_funPanel.GPFunctions); tabControl1.TabPages.RemoveAt(1); this._secondFactory = new GPFactory(); this._secondFactory.ReportEvolution += new EvolutionHandler(gpFactory_ReportEvolution); //set base run panel on _optimizePanel _baseRunPanel = _optimizePanel; } break; case GPModelType.TSP: { _dataPanel = new DataPanel(); loadGPPanelInMainWindow(this, _dataPanel, "Load Data"); _dataPanel.SetProblemType(_GPModel); _setPanel = new SettingsPanel(); loadGPPanelInMainWindow(this, _setPanel, "Settings"); _setPanel.ShowGAParams(); var p = _setPanel.GetParameters(); p.popSize = 2500; p.eselectionMethod = GPSelectionMethod.SkrgicSelection; p.SelParam1 = 2.5f; _setPanel.SetParameters(p); _tspPanel = new TSPRunPanel(); loadGPPanelInMainWindow(this, _tspPanel, "Simulation"); this._mainGPFactory = new GPFactory(); this._mainGPFactory.ReportEvolution += new EvolutionHandler(gpFactory_ReportEvolution); _infoPanel = new InfoPanel(); loadGPPanelInMainWindow(this, _infoPanel, "Info"); //set base run panel on _TSPPanel _baseRunPanel = _tspPanel; } break; case GPModelType.AP: { _dataPanel = new DataPanel(); loadGPPanelInMainWindow(this, _dataPanel, "Load Data"); _dataPanel.SetProblemType(_GPModel); _setPanel = new SettingsPanel(); loadGPPanelInMainWindow(this, _setPanel, "Settings"); _setPanel.ShowGAParams(); var p = _setPanel.GetParameters(); p.popSize = 2500; p.eselectionMethod = GPSelectionMethod.SkrgicSelection; p.SelParam1 = 2.5f; _setPanel.SetParameters(p); _alocPanel = new ALOCRunPanel(); loadGPPanelInMainWindow(this, _alocPanel, "Simulation"); this._mainGPFactory = new GPFactory(); this._mainGPFactory.ReportEvolution += new EvolutionHandler(gpFactory_ReportEvolution); _infoPanel = new InfoPanel(); loadGPPanelInMainWindow(this, _infoPanel, "Info"); //set base run panel on _TSPPanel _baseRunPanel = _alocPanel; } break; case GPModelType.TP: { _dataPanel = new DataPanel(); loadGPPanelInMainWindow(this, _dataPanel, "Load Data"); _dataPanel.SetProblemType(_GPModel); _setPanel = new SettingsPanel(); loadGPPanelInMainWindow(this, _setPanel, "Settings"); _setPanel.ShowGAParams(); var p = _setPanel.GetParameters(); p.popSize = 2500; p.eselectionMethod = GPSelectionMethod.SkrgicSelection; p.SelParam1 = 2.5f; _setPanel.SetParameters(p); _alocPanel = new ALOCRunPanel(); loadGPPanelInMainWindow(this, _alocPanel, "Simulation"); this._mainGPFactory = new GPFactory(); this._mainGPFactory.ReportEvolution += new EvolutionHandler(gpFactory_ReportEvolution); _infoPanel = new InfoPanel(); loadGPPanelInMainWindow(this, _infoPanel, "Info"); //set base run panel on _TSPPanel _baseRunPanel = _alocPanel; } break; case GPModelType.ANNMODEL: case GPModelType.GPMODEL: { _experimentPanel = new ExperimentPanel(); loadGPPanelInMainWindow(this, _experimentPanel, "Load Experiment"); _experimentPanel.SetProblemType(_GPModel); //factory creating moved on place when the experimental data is created and prepared //this._mainANNFactory = new ANNFactory(); //this._mainANNFactory.ReportIteration += new EvolutionHandler(annFactory_ReportIteration); } break; default: break; } //Events from datapanel about loading dat if (_dataPanel != null) { _dataPanel.DataLoaded += _dataPanel_DataLoaded; } if (_dataPanel != null) { _dataPanel.DataPredictionLoaded += _dataPanel_DataPredictionLoaded; } //Events from experiment panel about loading dat if (_experimentPanel != null) { _experimentPanel.DataLoaded += _experimentPanel_DataLoaded; } if (_experimentPanel != null) { _experimentPanel.DataPredictionLoaded += _experimentalPanel_DataPredictionLoaded; } if (_funDefinit != null) { _funDefinit.btnFinishAnalFun.Click += btnFinishAnalFun_Click; } if (_setPanel != null) { _setPanel.ResetSolution += _setPanel_ResetSolution; } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void _experimentPanel_DataLoaded(object sender, EventArgs e) { //Depending on experimental type of output data (numerical or categorical or boolean) // prepare the panels for parameters and type of the factory. if (_GPModel == GPModelType.ANNMODEL) { //create facotry based on column data type if (_experimentPanel.IsCategoricalOutput) { this._mainANNFactory = new PSOFactory(); } else { this._mainANNFactory = new BPFactory(); } // if (_setANNPanel == null) { _setANNPanel = new ANNSettingsPanel(); loadGPPanelInMainWindow(this, _setANNPanel, "Settings"); //lock some parameters based on type of output variable if (_experimentPanel.Experiment.GetOutputColumnType() == Core.Experiment.ColumnDataType.Binary || _experimentPanel.Experiment.GetOutputColumnType() == Core.Experiment.ColumnDataType.Categorical ) { _setANNPanel.SetLearnigAlgorithm(1); } else { _setANNPanel.SetLearnigAlgorithm(0); } _setANNPanel.LockLearningAlgoritm(); } if (_runANNPanel == null) { _runANNPanel = new ANNRunPanel(); loadGPPanelInMainWindow(this, _runANNPanel, "Modeling"); } if (_infoPanel == null) { _infoPanel = new InfoPanel(); loadGPPanelInMainWindow(this, _infoPanel, "Info"); } if (_runANNPanel != null) { this._mainANNFactory.ReportIteration += new EvolutionHandler(annFactory_ReportIteration); _runANNPanel.UpdateChartDataPoint(_experimentPanel.GetOutputValues(), false); _isFileDirty = true; } } else//Preparing GP for modelling nd prediction { //create facotry based on column data type if (_experimentPanel.IsBinarylOutput || _experimentPanel.IsCategoricalOutput) { this._mainGPFactory = new GPFactoryClass(); } else if (_experimentPanel.GetOutputColumnType() == Core.Experiment.ColumnDataType.Numeric) { this._mainGPFactory = new GPFactory(); } else { throw new Exception("Unknown output value type!"); } if (_funPanel == null) { _funPanel = new FunctionPanel(); loadGPPanelInMainWindow(this, _funPanel, "Functions"); } if (_setPanel == null) { _setPanel = new SettingsPanel(); loadGPPanelInMainWindow(this, _setPanel, "Settings"); } //set problem type _setPanel.SetParamForClassification(_experimentPanel.GetOutputColumnType()); if (_runPanel == null) { _runPanel = new RunPanel(); loadGPPanelInMainWindow(this, _runPanel, "Run"); } if (_resultPanel == null) { _resultPanel = new ResultPanel(); loadGPPanelInMainWindow(this, _resultPanel, "Result"); } if (_infoPanel == null) { _infoPanel = new InfoPanel(); loadGPPanelInMainWindow(this, _infoPanel, "Info"); } //set base run panel on _runPAnel _baseRunPanel = _runPanel; if (_runPanel != null) { this._mainGPFactory.ReportEvolution += new EvolutionHandler(gpFactory_ReportEvolution); _runPanel.ResetSolution(); _runPanel.UpdateChartDataPoint(_experimentPanel.GetOutputValues(), false); _isFileDirty = true; } if (_funDefinit != null) { _funDefinit.btnFinishAnalFun.Click += btnFinishAnalFun_Click; } if (_setPanel != null) { _setPanel.ResetSolution += _setPanel_ResetSolution; } } }
public void OnSubmitClicked() { ResultPanel.SetActive(true); }
void ResultPicture_MouseEnter(object sender, EventArgs e) { ResultPanel.Focus(); }
private void Awake() { instance = this; Hide(); }