private void setWindowFollow(bool isFollowing) { this.MoveBothWindows = isFollowing; if (OwnedWindows.Count <= 0) { return; } EditRoomsWindow roomsWindow = (EditRoomsWindow)OwnedWindows[0]; roomsWindow.MoveBothWindows = this.MoveBothWindows; }
private void Window_LocationChanged(object sender, System.EventArgs e) { if (OwnedWindows.Count <= 0) { return; } if (!MoveBothWindows) { return; } EditRoomsWindow roomsWindow = (EditRoomsWindow)OwnedWindows[0]; roomsWindow.MoveBothWindows = false; roomsWindow.Top = this.Top + this.Height; roomsWindow.Left = this.Left; roomsWindow.MoveBothWindows = true; }
private void Application_Startup(object sender, StartupEventArgs e) { bool skipExeCheck = e.Args.Length > 0 && e.Args[0].Equals("skip-exe-check"); if ((!skipExeCheck && IsMonHunEXEMissing()) || IsReqdFilesMissing()) { return; } LoadNPCList(); MainWindow mainWindow = new MainWindow(npcList); EditRoomsWindow editRoomsWindow = new EditRoomsWindow(npcList); mainWindow.Show(); editRoomsWindow.Owner = mainWindow; editRoomsWindow.Top = mainWindow.Top + mainWindow.Height; editRoomsWindow.Left = mainWindow.Left; editRoomsWindow.Show(); }