protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (SpecificWindowMode) { this.Size = BackgroundImage.Size; mhook = new MouseListener(); mhook.Click += (sender, loc) => { if (loc.X > Location.X && loc.X < Location.X + Size.Width && loc.Y > Location.Y && loc.Y < Location.Y + Size.Height) { return; } DialogResult = DialogResult.Abort; SystemSounds.Beep.Play(); this.Close(); mhook.Stop(); }; mhook.Start(); return; } //full screen mode: MultiScreenSize m_MultiScreenSize = FindMultiScreenSize(); this.Size = new Size(m_MultiScreenSize.maxRight - m_MultiScreenSize.minX, m_MultiScreenSize.maxBottom - m_MultiScreenSize.minY); Graph.CopyFromScreen(m_MultiScreenSize.minX, m_MultiScreenSize.minY, 0, 0, BitmapSize); }
// Use this for initialization public void Start() { //loads main menu MyScreen1.Start(); DataController.Start(); Application.targetFrameRate = 60; //ProfilerHere(); ClassContainer = General.Create(Root.classesContainer); BuildsContainer = General.Create(Root.classesContainer, name: "BuildsContainer"); PersonObjectContainer = General.Create(Root.classesContainer, name: "PersonObjectsContainer"); MeshBatchContainer = General.Create(Root.classesContainer, name: "MeshBatchContainer"); if (Application.loadedLevelName == "Lobby") { //Settings.PlayMusic(); } else { if (gameScene == null) { gameScene = (GameScene)General.Create(Root.gameScene, container: ClassContainer.transform); InputMain = (InputMain)General.Create(Root.inputMain, container: ClassContainer.transform); } } MouseListener.Start(); ManagerReport.Start(); AudioCollector.RedoGame(); }
public MainViewModel() { int waitTimeMS = 10; _mouseListener = new MouseListener(waitTimeMS); _coordsClient = new CoordsClient() { OnNextEvent = UpdateGraphController }; _coordsClient.Subscribe(_mouseListener); GraphController = new GraphController(waitTimeMS); _watch = new Stopwatch(); _watch.Start(); _mouseListener.Start(); }
private void Load1() { Debug.Log("first load"); //loads main menu MyScreen1.Start(); DataController.Start(); Application.targetFrameRate = 60; //ProfilerHere(); ManagerReport.Start(); MouseListener.Start(); if (//Camera.main != null && _audioPlayer == null && !audioWas) { audioWas = true; //bz camera needs to be initiated already _audioPlayer = new AudioPlayer(); } //AudioCollector.RedoGame(); }