private void Awake() { if (Instance) { Destroy(gameObject); } else { Instance = this; } }
private void ButtonWeatherForecast_Click(object sender, EventArgs e) { ActivateButton(sender, RGBColors.color6); if (!PanelDisplay.Contains(DisplayWF.WFDisplay)) { PanelDisplay.Controls.Add(DisplayWF.WFDisplay); DisplayWF.WFDisplay.Dock = DockStyle.Fill; DisplayWF.WFDisplay.BringToFront(); } else { DisplayWF.WFDisplay.BringToFront(); } }
private void buttonCountDay_Click(object sender, EventArgs e) { ActivateButton(sender, RGBColors.color5); if (!PanelDisplay.Contains(DisplayCountDay.CountDayDisplay)) { PanelDisplay.Controls.Add(DisplayCountDay.CountDayDisplay); DisplayCountDay.CountDayDisplay.Dock = DockStyle.Fill; DisplayCountDay.CountDayDisplay.BringToFront(); } else { DisplayCountDay.CountDayDisplay.BringToFront(); } }
private void buttonHDSD_Click(object sender, EventArgs e) { ActivateButton(sender, RGBColors.color10); if (!PanelDisplay.Contains(DisplayTutorial.Tutorial)) { PanelDisplay.Controls.Add(DisplayTutorial.Tutorial); DisplayTutorial.Tutorial.Dock = DockStyle.Fill; DisplayTutorial.Tutorial.BringToFront(); } else { DisplayTutorial.Tutorial.BringToFront(); } }
private void ButtonHistory_Click(object sender, EventArgs e) { ActivateButton(sender, RGBColors.color4); if (!PanelDisplay.Contains(DisplayDetailEvent.DetailEventDisplay)) { PanelDisplay.Controls.Add(DisplayDetailEvent.DetailEventDisplay); DisplayDetailEvent.DetailEventDisplay.Dock = DockStyle.Fill; DisplayDetailEvent.DetailEventDisplay.BringToFront(); } else { DisplayDetailEvent.DetailEventDisplay.BringToFront(); } }
public MainForm(string[] args) { IsAdmin = Win32.IsUserAnAdmin(); InitializeComponent(); panelDisplaying = new PanelDisplay(mainPanel.Width, mainPanel.Height); panelDisplaying.Dock = DockStyle.Fill; panelDisplaying.BackColor = this.BackColor; mainPanel.Controls.Add(panelDisplaying); mainPanel.Width = ClientRectangle.Width; update.ServerFileSites.Add("http://web.cecs.pdx.edu/~chances/animatum/animatum.update"); animatumLocation = Path.Combine(baseDirectory, "Animatum.exe"); if (File.Exists(animatumLocation)) { update.InstalledVersion = FileVersionInfo.GetVersionInfo(animatumLocation).FileVersion; } else { update.InstalledVersion = "0.0.0.0"; } panelDisplaying.UpdateItems[1].Text = "Installing dependencies"; panelDisplaying.UpdateItems[2].Text = "Backing up and updating files"; //process commandline argument Arguments commands = new Arguments(args); ProcessArguments(commands); //sets up Next & Cancel buttons SetButtonText(); if (isAutoUpdateMode) { } startStep = UpdateStepOn.Checking; }