Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 83 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,92 @@
# ignore everything in the root except the "wp-content" directory.
!wp-content/
# Build Outputs
bin/
obj/
out/

# ignore everything in the "wp-content" directory, except:
# "mu-plugins", "plugins", "themes" directory
wp-content/*
!wp-content/mu-plugins/
!wp-content/plugins/
!wp-content/themes/
# Visual Studio
.vs/
*.suo
*.user
*.userosscache
*.sln.docstates

# ignore these plugins
wp-content/plugins/hello.php
# Visual Studio Code
.vscode/
*.code-workspace

# ignore specific themes
wp-content/themes/twenty*/
# User-specific files
*.rsuser
*.userprefs

# ignore node dependency directories
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/

# NuGet Packages
*.nupkg
*.snupkg
packages/
.nuget/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/

# Rider
.idea/

# Temporary files
*.tmp
*.temp
*~

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Package restore
**/packages/*
!**/packages/build/
*.nuget.props
*.nuget.targets

# Backup & report files
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak

# SQL Server files
*.mdf
*.ldf
*.ndf

# Node modules (if any)
node_modules/

# ignore log files and databases
# Log files
*.log
*.sql
*.sqlite
84 changes: 84 additions & 0 deletions App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<Application x:Class="KGC.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<!-- Golden Theme Resources -->
<SolidColorBrush x:Key="PrimaryGoldBrush" Color="#FFD700"/>
<SolidColorBrush x:Key="SecondaryGoldBrush" Color="#FFA500"/>
<SolidColorBrush x:Key="DarkGoldBrush" Color="#B8860B"/>
<SolidColorBrush x:Key="LightGoldBrush" Color="#FFFACD"/>
<SolidColorBrush x:Key="AccentBrush" Color="#8B4513"/>
<SolidColorBrush x:Key="TextBrush" Color="#2F4F4F"/>
<SolidColorBrush x:Key="BackgroundBrush" Color="#FFFEF7"/>
<SolidColorBrush x:Key="BorderBrush" Color="#DAA520"/>

<!-- Button Style -->
<Style x:Key="GoldenButtonStyle" TargetType="Button">
<Setter Property="Background" Value="{StaticResource PrimaryGoldBrush}"/>
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="BorderBrush" Value="{StaticResource DarkGoldBrush}"/>
<Setter Property="BorderThickness" Value="2"/>
<Setter Property="Padding" Value="10,5"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="3">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="{TemplateBinding Padding}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource SecondaryGoldBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{StaticResource DarkGoldBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<!-- TextBox Style -->
<Style x:Key="GoldenTextBoxStyle" TargetType="TextBox">
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Background" Value="White"/>
</Style>

<!-- ComboBox Style -->
<Style x:Key="GoldenComboBoxStyle" TargetType="ComboBox">
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Background" Value="White"/>
</Style>

<!-- Label Style -->
<Style x:Key="GoldenLabelStyle" TargetType="Label">
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="FontSize" Value="12"/>
</Style>

<!-- GroupBox Style -->
<Style x:Key="GoldenGroupBoxStyle" TargetType="GroupBox">
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="2"/>
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Margin" Value="5"/>
<Setter Property="Padding" Value="10"/>
</Style>
</Application.Resources>
</Application>
12 changes: 12 additions & 0 deletions App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System.Windows;

namespace KGC
{
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
}
}
}
124 changes: 124 additions & 0 deletions Documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# KGC - Krupa Gold Company Testing Application

## Overview
A comprehensive WPF application for professional gold and jewelry testing with advanced print functionality. Built with a golden theme and designed for professional use in jewelry testing laboratories.

## Features

### Main Window (MainWindow.xaml)
- **Company Header**: Professional branding with logo placeholder and company information
- **Test Information Section**:
- Party Name dropdown (cmbPartyName) with common jewelry stores
- Item Name dropdown (cmbItemName) with various jewelry types
- Date and time tracking
- Remarks text area
- **Program Type Selection**: Radio buttons for different testing programs:
- Krupa Gold
- Fine Gold
- Silver Ornament
- Other Metal
- **Main Results**: Primary test measurements
- Purity percentage (txtMain_1)
- Weight in grams (txtMain_2)
- Amount in INR (txtMain_3)
- **Detailed Measurements**: 12 metric fields (txtMetric1-txtMetric12)
- **Action Buttons**: Clear, Save, and Print functionality

### Print Window (PrintWindow.xaml)
- **A4 Print Layout**: Professional report design optimized for printing
- **Company Header**: Logo area and complete company information
- **Test Information Display**: All data from main window formatted professionally
- **Main Results Highlight**: Key findings prominently displayed
- **Detailed Measurements Table**: Organized metric display
- **Professional Footer**: Signature areas for technician and lab director
- **Print Controls**: Print preview, print, and close buttons

## Technical Implementation

### Data Model
- `TestData` class for structured data transfer between windows
- Comprehensive validation and error handling
- Proper data formatting for currency and measurements

### Print Functionality
- Native WPF PrintDialog integration
- A4 paper size optimization
- Print preview capability
- Professional document formatting
- Error handling for print operations

### Styling
- Golden theme throughout the application
- Professional color scheme (#FFD700, #FFA500, #B8860B)
- Consistent styling with custom button, textbox, and layout styles
- Print-friendly black and white formatting

## File Structure
```
KGC/
├── KGC.csproj # Project configuration
├── App.xaml # Application resources and golden theme
├── App.xaml.cs # Application startup logic
├── MainWindow.xaml # Main testing interface
├── MainWindow.xaml.cs # Main window logic and data handling
├── PrintWindow.xaml # Print report layout
├── PrintWindow.xaml.cs # Print functionality implementation
├── Resources/ # Resources folder for assets
└── README.md # This documentation
```

## Usage

### Running the Application
1. Open in Visual Studio on Windows
2. Build and run the solution
3. The main window will appear with sample data

### Testing Workflow
1. Enter party and item information
2. Select appropriate program type
3. Enter main results (purity, weight, amount)
4. Add detailed measurements as needed
5. Add remarks if necessary
6. Click "Print Report" to generate professional test report

### Print Workflow
1. Validation ensures required fields are filled
2. Print window opens with formatted report
3. Use "Print Preview" to review before printing
4. Use "Print" to send to printer
5. Professional A4 report is generated

## Design Highlights

### Professional Appearance
- Golden color scheme reflecting jewelry industry
- Professional typography and spacing
- Company branding integration
- Clean, organized layout

### Print Quality
- A4 paper optimization
- Professional header with company details
- Clear sections for all test information
- Signature areas for authentication
- Print-friendly formatting

### User Experience
- Intuitive interface design
- Comprehensive validation
- Clear error messages
- Responsive layout
- Easy data entry workflow

## Requirements Met
✅ Print.xaml Window with professional layout
✅ Print Preview functionality
✅ Print Button Integration in MainWindow
✅ Complete Report Content including all specified fields
✅ Professional Layout with company header, results table, footer
✅ Full Print Functionality with preview and actual printing
✅ Comprehensive Data Handling for all program types
✅ Golden Theme UI Design Consistency

This implementation provides a complete, professional-grade testing application suitable for use in jewelry testing laboratories with comprehensive print functionality for generating official test reports.
23 changes: 23 additions & 0 deletions KGC.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<ApplicationIcon>Resources\icon.ico</ApplicationIcon>
<AssemblyTitle>KGC - Krupa Gold Company Testing Application</AssemblyTitle>
<AssemblyDescription>Professional gold and jewelry testing application with comprehensive print functionality</AssemblyDescription>
<AssemblyCompany>Krupa Gold Company</AssemblyCompany>
<AssemblyProduct>KGC Testing System</AssemblyProduct>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<Nullable>enable</Nullable>
<WarningsAsErrors />
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>

</Project>
Loading