public void ClickityClackety() { List <string> games = new DatabaseInterfacer().ListSavedGames(); for (int i = 0; i < games.Count; i++) { GameObject butt = GameObject.Instantiate(button); RectTransform transform = butt.GetComponent <RectTransform>(); transform.parent = button_start; transform.localPosition = new Vector3(0, -(i * 30), 0); foreach (Transform child in transform) { Text text = child.GetComponent <Text>(); if (text != null) { text.text = games[i]; } } LoadButton loader = butt.GetComponent <LoadButton>(); loader.canvas = canvas; loader.manager = manager; loader.world_name = games[i]; } }
// Åbner dialogbox til indlæsning af data private void LoadButton_Click(object sender, EventArgs e) { FolderBrowserDialog fbd = new FolderBrowserDialog(); DialogResult dr = fbd.ShowDialog(); if (dr == DialogResult.OK) { string[] CPPath = Directory.GetFiles(fbd.SelectedPath, "*utm"); string[] RunnersPath = Directory.GetFiles(fbd.SelectedPath, "*.gpx"); if (CPPath.Count() > 0 && RunnersPath.Count() > 0) { LoadControlPoints(CPPath.First()); LoadRunners(RunnersPath); LoadLegs(); Put_Data(MainLeg); LoadButton.Hide(); ResetButton.Show(); player.StartUp(); } else if (CPPath.Count() == 0) { MessageBox.Show("Controlpoints not found in selected folder"); } else if (RunnersPath.Count() == 0) { MessageBox.Show("GPX Files not found in selected folder"); } } }
void ReleaseDesignerOutlets() { if (FilterTextField != null) { FilterTextField.Dispose(); FilterTextField = null; } if (LoadButton != null) { LoadButton.Dispose(); LoadButton = null; } if (LoadMapButton != null) { LoadMapButton.Dispose(); LoadMapButton = null; } if (WifiHotspotsTable != null) { WifiHotspotsTable.Dispose(); WifiHotspotsTable = null; } }
void ReleaseDesignerOutlets() { if (DateText != null) { DateText.Dispose(); DateText = null; } if (LoadButton != null) { LoadButton.Dispose(); LoadButton = null; } if (MemoText != null) { MemoText.Dispose(); MemoText = null; } if (SaveButton != null) { SaveButton.Dispose(); SaveButton = null; } if (SubjectText != null) { SubjectText.Dispose(); SubjectText = null; } }
private void BatchTextBox_KeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { LoadButton.PerformClick(); UserAmountTextBox.Focus(); } }
public void Update(GameTime gameTime) { if (PreviewedGrid != null) { PreviewedGrid.Update(gameTime); } PreviewLabel.Update(gameTime); LoadButton.Update(gameTime); DeleteButton.Update(gameTime); }
// Reseter programmet som det var ved opstart private void ResetButton_Click(object sender, EventArgs e) { Runners.Clear(); player.Second = 0; PlayTimer.Stop(); Map1.Refresh(); ResetButton.Hide(); LoadButton.Show(); player.ShutDown(); RunnersCheckBox.Items.Clear(); }
public void Draw(GameTime gameTime, SpriteBatch spriteBatch) { spriteBatch.Draw(Texture, Area, BackgroundColor); if (PreviewedGrid != null) { PreviewedGrid.Draw(gameTime, spriteBatch); } PreviewLabel.Draw(gameTime, spriteBatch); LoadButton.Draw(gameTime, spriteBatch); DeleteButton.Draw(gameTime, spriteBatch); }
private void TextBox_KeyUp(object sender, KeyEventArgs e) { TextBox textBox = sender as TextBox; if (e.Key == Key.Enter) { LoadButton.Focus(); } else if (e.Key == Key.Escape) { textBox.IsReadOnly = true; textBox.Cursor = Cursors.Hand; } }
private void Start() { StartButton = StartButton.GetComponent <Button>(); OptionsButton = OptionsButton.GetComponent <Button>(); LoadButton = LoadButton.GetComponent <Button>(); QuitButton = QuitButton.GetComponent <Button>(); StartButton.onClick.AddListener(StartClick); OptionsButton.onClick.AddListener(OptionsClick); LoadButton.onClick.AddListener(LoadClick); QuitButton.onClick.AddListener(QuitClick); Screen.SetResolution(1440, 900, false); }
public void LoadButtonTest() { MainViewModel main = new MainViewModel(); LoadButton load = new LoadButton(main); Assert.IsNull(main.List); Assert.IsNull(main.Employees); Assert.IsNull(main.Names); load.Load.Execute(null); Assert.IsNotNull(main.List); Assert.IsNotNull(main.Employees); Assert.IsNotNull(main.Names); }
public void SetScene(string sceneName) { if (!newGameButton || !continueButton) { newGameButton = GetComponentInChildren <StartLevelButton>(); continueButton = GetComponentInChildren <LoadButton>(); } newGameButton.relatedSceneName = sceneName; continueButton.relatedSceneName = sceneName; var newGameUIButton = newGameButton.GetComponent <Button>(); newGameUIButton.Select(); }
public Form1() { InitializeComponent(); _Loadsize = new LoadSize(); _LoadImageOrignal = new LoadImageOriginal(); _LoadButton = new LoadButton(); _LoadCropImage = new LoadCropImage(); _MovePlay = new MovePlay(); _RandomPlay = new RandomPlay(); Winner = new YourNameWinner(); Score = new ScorePlaylist(); cbimage.DataSource = _LoadImageOrignal.getImageOriginal(); }
private void LoadListOfLoadButtons() { if (listOfButtons == null) { listOfButtons = new List <GameObject>(); } foreach (string loadText in dataSerialization.GetListOfSaves()) { GameObject newButton = GameObject.Instantiate(loadButtonPrefab, uiParentOfLoadButtons.transform); listOfButtons.Add(newButton); LoadButton temp = newButton.GetComponent <LoadButton>(); temp.loadButtonText.text = loadText; temp.buttonComponent.onClick.AddListener(delegate { dataSerialization.LoadData(temp.loadButtonText); }); temp.buttonComponent.onClick.AddListener(delegate { this.HideView(); }); } }
private void AddFileControls() { var loadButton = new LoadButton(); AddComponent(loadButton); AddControl(loadButton); var saveButton = new SaveButton(); AddComponent(saveButton); AddControl(saveButton); var fileNameEditor = new FileNameEditor(); AddComponent(fileNameEditor); AddTextControl(fileNameEditor); }
protected void Start() { var gs = Game.Instance.GameState; if (gs != null) { started = true; guiprovider = new GUIProvider(gs.Data); SaveButton.SetActive(gs.Data.isShowSaveLoad()); LoadButton.SetActive(gs.Data.isShowSaveLoad()); ResetButton.SetActive(gs.Data.isShowReset()); if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer) { this.GetComponent <UnityEngine.UI.CanvasScaler>().referenceResolution = new Vector2(600, 400); } } }
protected void Start() { var gs = Game.Instance.GameState; if (gs != null) { started = true; guiprovider = new GUIProvider(gs.Data); SaveButton.SetActive(gs.Data.isShowSaveLoad()); LoadButton.SetActive(gs.Data.isShowSaveLoad()); ResetButton.SetActive(gs.Data.isShowReset()); if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer) { this.GetComponent <UnityEngine.UI.CanvasScaler>().referenceResolution = new Vector2(600, 400); } /*Game.Instance.OnShowText += (finished, line, text, x, y, textColor, textOutlineColor, baseColor, outlineColor, id) => * { * if (!finished) * { * if (line != null) * { * Talk(line); * } * else if (textColor == Game.NoColor && textOutlineColor == Game.NoColor) * { * Talk(text, x, y, Color.white, Color.black); * } * else if(baseColor == Game.NoColor && outlineColor == Game.NoColor) * { * Talk(text, x, y, textColor, textOutlineColor); * } * else * { * Talk(text, x, y, textColor, textOutlineColor, baseColor, outlineColor); * } * } * };*/ } }
void ReleaseDesignerOutlets() { if (InstructionsTableView != null) { InstructionsTableView.Dispose(); InstructionsTableView = null; } if (LoadButton != null) { LoadButton.Dispose(); LoadButton = null; } if (SaveButton != null) { SaveButton.Dispose(); SaveButton = null; } }
/// <summary> /// EjectButtonEvent /// </summary> private void EjectButton_OnClick(object sender, RoutedEventArgs e) { MainWindow.BodyInformation = null; _loopTimerPlay.Enabled = false; EjectButton.Visibility = Visibility.Hidden; LoadButton.Visibility = Visibility.Visible; PauseButton.Visibility = Visibility.Hidden; PlayButton.Visibility = Visibility.Visible; TextBlockInfo.Text = "Please load a file."; ScrollBarFrame.Minimum = 0; ScrollBarFrame.Maximum = 0; ScrollBarFrame.Value = 0; MainWindow.MinX = 100; MainWindow.MaxX = -100; MainWindow.MinY = 100; MainWindow.MaxY = -100; MainWindow.MinZ = 100; MainWindow.MaxZ = -100; MainWindow.FrameId = 0; LoadButton.CaptureMouse(); LoadButton.ReleaseMouseCapture(); }
void ReleaseDesignerOutlets() { if (ImageView != null) { ImageView.Dispose(); ImageView = null; } if (LoadButton != null) { LoadButton.Dispose(); LoadButton = null; } if (RotateLeft != null) { RotateLeft.Dispose(); RotateLeft = null; } if (RotateRight != null) { RotateRight.Dispose(); RotateRight = null; } if (SaveButton != null) { SaveButton.Dispose(); SaveButton = null; } if (SettingsButton != null) { SettingsButton.Dispose(); SettingsButton = null; } }
void ReleaseDesignerOutlets() { if (BannerButton != null) { BannerButton.Dispose(); BannerButton = null; } if (InterstitialButton != null) { InterstitialButton.Dispose(); InterstitialButton = null; } if (LoadButton != null) { LoadButton.Dispose(); LoadButton = null; } if (VideoButton != null) { VideoButton.Dispose(); VideoButton = null; } }
private void MenuForm_Load(object sender, EventArgs e) { LoadButton.Focus(); }
public void Start() { newGameButton = GetComponentInChildren <StartLevelButton>(); continueButton = GetComponentInChildren <LoadButton>(); }