Skip to content

Latest commit

Β 

History

History
260 lines (201 loc) Β· 6.73 KB

File metadata and controls

260 lines (201 loc) Β· 6.73 KB

πŸ‘‹ Hey Leon! Quick Start Guide

πŸš€ Getting Started

1. Clone the Repository

git clone https://github.com/scros18/vera-optimizer.git
cd vera-optimizer

2. Open in Visual Studio

  • Open ModernOptimizer.csproj in Visual Studio 2022
  • Or open the folder in VS Code with C# extension

3. Restore Packages

dotnet restore

4. Build the Project

dotnet build

5. Run the Application

dotnet run

Or press F5 in Visual Studio


πŸ“ Project Structure

vera-optimizer/
β”œβ”€β”€ MainWindow.xaml          # Main UI layout
β”œβ”€β”€ MainWindow.xaml.cs       # Main logic & event handlers
β”œβ”€β”€ App.xaml                 # Application startup
β”œβ”€β”€ AboutWindow.xaml         # About dialog
β”œβ”€β”€ ModernOptimizer.csproj   # Project configuration
β”œβ”€β”€ app.manifest             # Admin privileges config
β”‚
β”œβ”€β”€ Helpers/
β”‚   β”œβ”€β”€ AudioHelper.cs       # Sound system
β”‚   β”œβ”€β”€ ScriptRunner.cs      # PowerShell script execution
β”‚   β”œβ”€β”€ StartupManager.cs    # Startup programs management
β”‚   β”œβ”€β”€ SystemCleaner.cs     # Disk cleanup functionality
β”‚   β”œβ”€β”€ OptimizationHelper.cs # System optimizations
β”‚   β”œβ”€β”€ Settings.cs          # Settings model
β”‚   └── SoundGenerator.cs    # WAV audio generation
β”‚
β”œβ”€β”€ Models/
β”‚   └── StartupItem.cs       # Startup program data model
β”‚
β”œβ”€β”€ Themes/
β”‚   └── GlassMorphismTheme.xaml # UI styling (buttons, cards)
β”‚
β”œβ”€β”€ Assets/
β”‚   β”œβ”€β”€ background.jpg       # Background image
β”‚   β”œβ”€β”€ click.wav           # UI sound effect
β”‚   └── logo.svg            # Branding
β”‚
β”œβ”€β”€ Published/              # Release build output
β”‚   β”œβ”€β”€ Vera Optimizer.exe  # Compiled executable
β”‚   β”œβ”€β”€ Scripts/           # 100+ optimization scripts
β”‚   └── GameConfigs/       # Game-specific configs
β”‚
└── Scripts/               # Development scripts folder
    β”œβ”€β”€ 1 Check/          # System diagnostics
    β”œβ”€β”€ 2 Refresh/        # System refresh tools
    β”œβ”€β”€ 3 Setup/          # Initial setup scripts
    β”œβ”€β”€ 4 Installers/     # App installers
    β”œβ”€β”€ 5 Graphics/       # Graphics optimization
    β”œβ”€β”€ 6 Windows/        # Windows tweaks
    β”œβ”€β”€ 7 Hardware/       # Hardware optimization
    └── 8 Advanced/       # Advanced tweaks

🎯 Key Files to Know

Main UI Logic

  • MainWindow.xaml.cs - All button clicks, tab navigation, script execution
  • MainWindow.xaml - UI layout with 10 tabs

Script Execution

  • Helpers/ScriptRunner.cs - Handles PowerShell script execution
  • RunScript_Click() method in MainWindow.xaml.cs - 1-click script runner

Advanced Scripts Tab

  • Dynamically loads scripts in LoadAdvancedScripts() method
  • Creates script cards with Run buttons
  • Line 54-180 in MainWindow.xaml.cs

Theme & Styling

  • Themes/GlassMorphismTheme.xaml - Glass button style, card style, colors

πŸ”§ What I Changed Recently

1. Fixed Stats Icon

  • File: MainWindow.xaml
  • Line: ~418
  • Changed broken icon to πŸ“Š emoji

2. Advanced Scripts Tab - Complete Redesign

  • File: MainWindow.xaml (lines 1471-1520)
  • Changed from folder buttons to dynamic script listing
  • Added ScriptsContainer StackPanel

3. Added 1-Click Script Execution

  • File: MainWindow.xaml.cs
  • Method: RunScript_Click() (lines 315-410)
  • Method: LoadAdvancedScripts() (lines 67-180)
  • Scripts run silently with admin rights
  • Output shows in Activity Log

4. Obfuscation Settings

  • File: ModernOptimizer.csproj
  • Self-contained, ReadyToRun, Single-file, Compressed

πŸ› οΈ Development Tips

Build Release Version

dotnet publish -c Release -o ".\Published"

Run Automated Build Script

.\RELEASE_BUILD.ps1

Enable PowerShell Script Execution (if needed)

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Debug Script Execution

  • Set breakpoints in RunScript_Click() method
  • Check Activity Log tab for script output
  • Scripts run as admin - may need to run VS as admin

πŸ“ Common Tasks

Add a New Tab

  1. Edit MainWindow.xaml
  2. Add new <TabItem> in the <TabControl>
  3. Add navigation button in sidebar
  4. Add click handler in MainWindow.xaml.cs

Add a New Optimization Toggle

  1. Add toggle in Optimizations tab (MainWindow.xaml)
  2. Add property to Settings.cs
  3. Add logic in OptimizationHelper.cs
  4. Save setting in SaveSettings()

Modify Script Execution

  • Edit RunScript_Click() in MainWindow.xaml.cs
  • Modify PowerShell arguments
  • Change output handling

Change UI Theme

  • Edit Themes/GlassMorphismTheme.xaml
  • Modify colors, gradients, effects
  • Changes apply to all buttons/cards

πŸ› Debugging

Application Won't Start

  • Check .NET 8 is installed: dotnet --version
  • Run dotnet restore
  • Clean build: dotnet clean && dotnet build

Scripts Not Running

  • Check Scripts folder exists: .\Scripts\
  • Run VS as Administrator
  • Check Activity Log for errors

UI Not Updating

  • Check Dispatcher.Invoke() calls for UI updates from background threads
  • Verify XAML names match code-behind (x:Name="...")

πŸ“š Helpful Documentation

  • DEVELOPMENT.md - Detailed development guide
  • BUILD.md - Build and deployment instructions
  • XAML_GUIDELINES.md - UI development standards
  • CONTRIBUTING.md - Contribution guidelines
  • GITHUB_SETUP.md - Git workflow

🎨 UI Customization

Colors

Main theme colors defined in GlassMorphismTheme.xaml:

  • Primary: #00FFF0 (Cyan)
  • Secondary: #4FACFE (Blue)
  • Accent: #FF6B9D (Pink)
  • Background: #0A0B0F (Dark)

Adding New Button Styles

  1. Open Themes/GlassMorphismTheme.xaml
  2. Copy existing button style
  3. Modify colors, borders, effects
  4. Reference in XAML: Style="{StaticResource YourStyleName}"

πŸš€ Ready to Build?

  1. Make your changes
  2. Test locally: dotnet run
  3. Build release: dotnet publish -c Release -o ".\Published"
  4. Commit: git add . && git commit -m "Your message"
  5. Push: git push

πŸ’‘ Need Help?

  • Check existing code comments
  • Look at similar implementations in the codebase
  • Test frequently - scripts modify system settings!
  • Use Activity Log tab to debug script execution

🎯 Future Ideas

Some things you might want to work on:

  • Add more script categories
  • Implement script scheduling
  • Add FPS monitoring overlay
  • Create game profile presets
  • Multi-language support
  • Auto-update system
  • Settings import/export

Happy Coding! πŸŽ‰

Built with ❀️ by Vera RP | verarp.co.uk