protected virtual void SetupMemoryPanel(Control parent) { MemoryPanel = new MemoryPanel(NumberFormatter); MemoryPanel.OnMemoryDelete += MemoryPanelRemove; MemoryPanel.OnClear += MemoryPanelClear; MemoryPanel.OnMemorySelect += MemoryPanelSelect; MemoryPanel.OnMemoryPlus += MemoryPanelPlus; MemoryPanel.OnMemoryMinus += MemoryPanelMinus; MemoryPanel.OnExtended += MemoryPanelExtended; MemoryPanel.OnShrunken += BackPanelShrunken; PlaceBackPanel((Control)MemoryPanel, parent); }
public void OnEnable() { if (gameManager == null) { gameManager = GameObject.FindObjectOfType <GameManager>().GetComponent <GameManager>(); memoryPanel = gameManager.gameInteraction.memoryPanel; } if (memoryReader == null) { memoryReader = new MemoryReader(); memoryReader.ReadFile(); } currentPage = 0; currentid = 0; gallery.previousLayer = 0; theMemoryPage.gameObject.SetActive(false); frontPage.gameObject.SetActive(true); UpdateMemoryPage(); }
public void AdjustSizeWithActiveBackPanel() { var panel = new MemoryPanel(); var parent = new Panel(); panel.Width = 750; parent.Width = 450; calculatorPanel.SetActiveBackPanel(panel, parent); Assert.IsNotNull(calculatorPanel.TestActiveBackPanel); Assert.AreEqual(750, ((Control)calculatorPanel.TestActiveBackPanel).Width); Assert.AreEqual(450, parent.Width); calculatorPanel.AdjustSize(); Assert.IsNotNull(calculatorPanel.TestActiveBackPanel); Assert.AreEqual(450, ((Control)calculatorPanel.TestActiveBackPanel).Width); Assert.AreEqual(0, ((Control)calculatorPanel.TestActiveBackPanel).Left); Assert.AreEqual(450, parent.Width); }
protected virtual void MemoryPanelExtended(object sender, EventArgs e) { BackPanelActivated = true; ActiveBackPanel = MemoryPanel; MemoryPanel.ShowItems(Calculator.MemoryValues); }
protected virtual void RefreshMemoryPanel() { MemoryPanel.RefreshItems(Calculator.MemoryValues); }
protected virtual void CalculatorMemoryClear(object sender, EventArgs e) { Calculator.MemoryClear(); MemoryPanel.ResetPointer(); }
protected virtual void OpenMemoryPanel() { MemoryPanel.Extend(Keypad.MainAreaHeight); Keypad.LeaveMemoryKeyOn(); }