School Commit Init

This commit is contained in:
2024-08-31 12:07:21 +03:00
commit 0b130ee18c
2801 changed files with 4720552 additions and 0 deletions
@@ -0,0 +1,346 @@
<UserControl x:Class="District_3_App.ProfileInfo_GUI.EditProfileInfo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:District_3_App.ProfileInfo_GUI"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid Background="White">
<StackPanel x:Name="EditProfileInfoStackPanel" Orientation="Horizontal" Width="1000">
<Border BorderThickness="0,0,0,0" BorderBrush="Black">
<StackPanel Orientation="Vertical" Margin="0,15,-290,0" VerticalAlignment="Top">
<StackPanel Orientation="Horizontal">
<TextBlock
Text="Email"
FontSize="12"
FontWeight="Bold"
Margin="5"
VerticalAlignment="Center"
/>
<TextBox
x:Name="EmailTextBox"
Text="name@gmail.com"
Width="157"
Height="25"
Margin="5,0,0,0"
FontSize="9"
/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Text="Phone number"
FontSize="12"
FontWeight="Bold"
Margin="5"
VerticalAlignment="Center"
/>
<TextBox
x:Name="PhoneNumberTextBox"
Text="073177151"
Width="157"
Height="25"
Margin="5,0,0,0"
FontSize="9"
/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Text="Date of Birth"
FontSize="12"
FontWeight="Bold"
Margin="5"
VerticalAlignment="Center"
/>
<DatePicker x:Name="DatePickerBirthDate" Width="159" Height="27">
<DatePicker.Resources>
<Style TargetType="{x:Type DatePickerTextBox}">
<Setter Property="FontSize" Value="12"/>
</Style>
</DatePicker.Resources>
</DatePicker>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Text="Username"
FontSize="12"
FontWeight="Bold"
Margin="5"
VerticalAlignment="Center"
/>
<TextBox
x:Name="UsernameTextBox"
Text="name.lastName"
Width="157"
Height="25"
Margin="5,0,0,0"
FontSize="9"
/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Text="Name"
FontSize="12"
FontWeight="Bold"
Margin="5"
VerticalAlignment="Center"
/>
<TextBox
x:Name="NameTextBox"
Text="Stoica Patricia"
Width="157"
Height="25"
Margin="5,0,0,0"
FontSize="9"
/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Text="Work"
FontSize="12"
FontWeight="Bold"
Margin="5"
VerticalAlignment="Center"
/>
<TextBox
x:Name="WorkTextBox"
Text="Tesla"
Width="157"
Height="25"
Margin="5,0,0,0"
FontSize="9"
/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="15,13,0,0">
<TextBlock
Text="Position"
FontSize="10"
FontWeight="Bold"
VerticalAlignment="Center"
/>
<TextBox
x:Name="PositionTextBox"
Text="Tesla"
Width="157"
Height="25"
Margin="8,0,0,0"
FontSize="13"
/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="15,13,0,0">
<TextBlock
Text="Start date"
FontSize="10"
FontWeight="Bold"
VerticalAlignment="Center"
/>
<DatePicker x:Name="DatePickerWorkStartDate" Width="200" Height="25" Margin="5,0,0,0">
<DatePicker.Resources>
<Style TargetType="DatePickerTextBox">
<Setter Property="FontSize" Value="12"/>
</Style>
</DatePicker.Resources>
</DatePicker>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="15,13,0,0">
<TextBlock
Text="End date"
FontSize="10"
FontWeight="Bold"
VerticalAlignment="Center"
/>
<DatePicker x:Name="DatePickerWorkEndDate" Width="200" Height="25" Margin="5,0,0,0">
<DatePicker.Resources>
<Style TargetType="DatePickerTextBox">
<Setter Property="FontSize" Value="12"/>
</Style>
</DatePicker.Resources>
</DatePicker>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="15,13,0,0">
<TextBlock
Text="Location"
FontSize="10"
FontWeight="Bold"
VerticalAlignment="Center"
/>
<ComboBox x:Name="WorkLocationComboBox" Width="200" Height="27" Margin="7,0,0,0" SelectedIndex="0">
<ComboBoxItem IsSelected="True">Choose Location</ComboBoxItem>
<ComboBoxItem Content="Option 1"/>
<ComboBoxItem Content="Option 2"/>
<ComboBoxItem Content="Option 3"/>
</ComboBox>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="15,13,0,0">
<TextBlock
Text="Description"
FontSize="10"
FontWeight="Bold"
VerticalAlignment="Center"
/>
<TextBox
x:Name="DescriptionTextBox"
Text=""
Width="183"
Height="28"
Margin="8,0,0,0"
FontSize="10"
/>
</StackPanel>
</StackPanel>
</Border>
<StackPanel Orientation="Vertical" Margin="300,15,0,0" VerticalAlignment="Top" Width="407">
<StackPanel Orientation="Horizontal">
<TextBlock
Text="Education"
FontSize="12"
FontWeight="Bold"
VerticalAlignment="Center"
/>
<ComboBox x:Name="EducationComboBox" Width="185" Height="27" Margin="7,0,0,0" SelectedIndex="0">
<ComboBoxItem IsSelected="True">Choose Education</ComboBoxItem>
<ComboBoxItem Content="Option 1"/>
<ComboBoxItem Content="Option 2"/>
<ComboBoxItem Content="Option 3"/>
</ComboBox>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Text="Education level"
FontSize="12"
FontWeight="Bold"
Margin="0"
VerticalAlignment="Center"
/>
<TextBox
x:Name="EducationLevelTextBox"
Text=""
Width="154"
Height="30"
Margin="5,0,0,0"
FontSize="8"
/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="15,13,0,0">
<TextBlock
Text="Start date"
FontSize="10"
FontWeight="Bold"
VerticalAlignment="Center"
/>
<DatePicker x:Name="DatePickerEducationStartDate" Width="181" Height="27" Margin="5,0,0,0">
<DatePicker.Resources>
<Style TargetType="DatePickerTextBox">
<Setter Property="FontSize" Value="12"/>
</Style>
</DatePicker.Resources>
</DatePicker>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="15,13,0,0">
<TextBlock
Text="End date"
FontSize="10"
FontWeight="Bold"
VerticalAlignment="Center"
/>
<DatePicker x:Name="DatePickerEducationEndDate" Width="184" Height="25" Margin="5,0,0,0">
<DatePicker.Resources>
<Style TargetType="DatePickerTextBox">
<Setter Property="FontSize" Value="12"/>
</Style>
</DatePicker.Resources>
</DatePicker>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="15,13,0,0">
<TextBlock
Text="Location"
FontSize="10"
FontWeight="Bold"
VerticalAlignment="Center"
/>
<ComboBox x:Name="EducationLocationComboBox" Width="200" Height="27" Margin="7,0,0,0" SelectedIndex="0">
<ComboBoxItem IsSelected="True">Choose Location</ComboBoxItem>
<ComboBoxItem Content="Option 1"/>
<ComboBoxItem Content="Option 2"/>
<ComboBoxItem Content="Option 3"/>
</ComboBox>
</StackPanel>
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Vertical" Margin="15,13,0,0" HorizontalAlignment="Left">
<TextBlock
Text="Hobbies"
FontSize="12"
FontWeight="Bold"
VerticalAlignment="Center"
HorizontalAlignment="Center"
/>
<TextBox
x:Name="HobbiesTextBox"
Text=""
Margin="0,10,0,0"
Width="108"
Height="114"
FontSize="10" RenderTransformOrigin="0.315,0.891"
/>
</StackPanel>
<StackPanel Orientation="Vertical" Margin="15,13,0,0" HorizontalAlignment="Left">
<TextBlock
Text="Music"
FontSize="12"
FontWeight="Bold"
VerticalAlignment="Center"
HorizontalAlignment="Center"
/>
<TextBox
x:Name="MusicTextBox"
Text=""
Margin="0,10,0,0"
Width="114"
Height="114"
FontSize="9" RenderTransformOrigin="0.315,0.891"
/>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,20,0,0">
<TextBlock
Text="Places"
FontSize="12"
FontWeight="Bold"
VerticalAlignment="Center"
/>
<ComboBox x:Name="PlacesComboBox" Width="206" Height="27" Margin="7,0,0,0" SelectedIndex="0">
<ComboBoxItem IsSelected="True">Choose Location</ComboBoxItem>
<ComboBoxItem Content="Option 1"/>
<ComboBoxItem Content="Option 2"/>
<ComboBoxItem Content="Option 3"/>
</ComboBox>
</StackPanel>
<StackPanel Orientation="Horizontal" Width="376" Margin="27,25,0,0">
<Button Content="Save changes" Width="100" Height="25" Background="Gray" Click="SaveChanges_Button"/>
<Button Content="Cancel" Width="100" Height="25" Margin="5" Background="Gray" Click="Cancel_Button"/>
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
</UserControl>
@@ -0,0 +1,116 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Xml.Linq;
namespace District_3_App.ProfileInfo_GUI
{
/// <summary>
/// Interaction logic for EditProfileInfo.xaml
/// </summary>
public partial class EditProfileInfo : UserControl
{
private ProfileInfoDisplay profileInfoDisplay;
/*public EditProfileInfo()
{
InitializeComponent();
}*/
public EditProfileInfo(ProfileInfoDisplay profileInfoDisplay)
{
InitializeComponent();
this.profileInfoDisplay = profileInfoDisplay;
EmailTextBox.Text = profileInfoDisplay.TextBlockEmail.Text;
PhoneNumberTextBox.Text = profileInfoDisplay.TextBlockPhoneNumber.Text;
DatePickerBirthDate.SelectedDate = DateTime.ParseExact(profileInfoDisplay.TextBlockDateOfBirth.Text, "dd.MM.yyyy", CultureInfo.InvariantCulture);
UsernameTextBox.Text = profileInfoDisplay.TextBlockUsername.Text;
NameTextBox.Text = profileInfoDisplay.TextBlockName.Text;
WorkTextBox.Text = profileInfoDisplay.TextBlockWork.Text;
PositionTextBox.Text = profileInfoDisplay.TextBlockWorkPosition.Text;
DatePickerWorkStartDate.SelectedDate = DateTime.ParseExact(profileInfoDisplay.TextBlockWorkStartDate.Text, "dd.MM.yyyy", CultureInfo.InvariantCulture);
DatePickerWorkEndDate.SelectedDate = DateTime.ParseExact(profileInfoDisplay.TextBlockWorkEndDate.Text, "dd.MM.yyyy", CultureInfo.InvariantCulture);
WorkLocationComboBox.SelectedItem = WorkLocationComboBox.Items.OfType<ComboBoxItem>().FirstOrDefault(item => item.Content.ToString() == profileInfoDisplay.TextBlockWorkLocation.Text);
DescriptionTextBox.Text = profileInfoDisplay.TextBlockDescription.Text;
EducationComboBox.SelectedItem = EducationComboBox.Items.OfType<ComboBoxItem>().FirstOrDefault(item => item.Content.ToString() == profileInfoDisplay.TextBlockEducation.Text);
EducationLevelTextBox.Text = profileInfoDisplay.TextBlockEducationLevel.Text;
DatePickerEducationStartDate.SelectedDate = DateTime.ParseExact(profileInfoDisplay.TextBlockEducationStartDate.Text, "dd.MM.yyyy", CultureInfo.InvariantCulture);
DatePickerEducationEndDate.SelectedDate = DateTime.ParseExact(profileInfoDisplay.TextBlockEducationEndDate.Text, "dd.MM.yyyy", CultureInfo.InvariantCulture);
EducationLocationComboBox.SelectedItem = EducationLocationComboBox.Items.OfType<ComboBoxItem>().FirstOrDefault(item => item.Content.ToString() == profileInfoDisplay.TextBlockEducationLocation.Text);
HobbiesTextBox.Text = profileInfoDisplay.TextBlockHobbies.Text;
MusicTextBox.Text = profileInfoDisplay.TextBlockMusic.Text;
PlacesComboBox.SelectedItem = PlacesComboBox.Items.OfType<ComboBoxItem>().FirstOrDefault(item => item.Content.ToString() == profileInfoDisplay.TextBlockPlaces.Text);
}
private void SaveChanges_Button(object sender, RoutedEventArgs e)
{
string email = EmailTextBox.Text;
string phoneNumber = PhoneNumberTextBox.Text;
string dateOfBirth = DatePickerBirthDate.SelectedDate?.ToString("dd.MM.yyyy");
string username = UsernameTextBox.Text;
string name = NameTextBox.Text;
string work = WorkTextBox.Text;
string position = PositionTextBox.Text;
string workStartDate = DatePickerWorkStartDate.SelectedDate?.ToString("dd.MM.yyyy");
string workEndDate = DatePickerWorkEndDate.SelectedDate?.ToString("dd.MM.yyyy");
string workLocation = (WorkLocationComboBox.SelectedItem as ComboBoxItem)?.Content.ToString();
string description = DescriptionTextBox.Text;
string education = (EducationComboBox.SelectedItem as ComboBoxItem)?.Content.ToString();
string educationLevel = EducationLevelTextBox.Text;
string educationStartDate = DatePickerEducationStartDate.SelectedDate?.ToString("dd.MM.yyyy");
string educationEndDate = DatePickerEducationEndDate.SelectedDate?.ToString("dd.MM.yyyy");
string educationLocation = (EducationLocationComboBox.SelectedItem as ComboBoxItem)?.Content.ToString();
string hobbies = HobbiesTextBox.Text;
string music = MusicTextBox.Text;
string places = (PlacesComboBox.SelectedItem as ComboBoxItem)?.Content.ToString();
// Redirect to ProfileInfoDisplay page
// Clear the EditProfileInfoStackPanel
EditProfileInfoStackPanel.Children.Clear();
// Add a new ProfileInfoDisplay instance to display the updated profile information
var newProfileInfoDisplay = new ProfileInfoDisplay();
newProfileInfoDisplay.UpdateProfileInfo(
email, phoneNumber, dateOfBirth, name,
username, education, educationLevel,
educationStartDate, educationEndDate,
educationLocation, hobbies, music, places,
work, position, workStartDate,
workEndDate, workLocation, description);
var newMainWindow = new MainWindow();
newMainWindow.UpdateAboutYou(
email, phoneNumber, dateOfBirth, name,
education, educationLevel,
educationStartDate, educationEndDate,
educationLocation, hobbies, music, places,
work, position, workStartDate,
workEndDate, workLocation, description);
EditProfileInfoStackPanel.Children.Add(newProfileInfoDisplay);
}
private void Cancel_Button(object sender, RoutedEventArgs e)
{
var newContent = new ProfileInfoDisplay();
EditProfileInfoStackPanel.Children.Clear();
EditProfileInfoStackPanel.Children.Add(newContent);
}
}
}
@@ -0,0 +1,151 @@
<UserControl x:Class="District_3_App.ProfileInfo_GUI.ProfileInfoDisplay"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d" d:DesignWidth="709" Height="453">
<Grid x:Name="ProfileInfoGrid" Background="White" HorizontalAlignment="Center" Width="709" Height="454">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="220.573"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel x:Name="ProfileInfoStackPanel" Grid.Column="1" Orientation="Horizontal" Margin="0,0,-152,0">
<StackPanel Grid.Column="1" Orientation="Horizontal" Width="293">
<StackPanel Margin="0,10,141,0" Width="251">
<TextBlock Text="Profile Info"
FontWeight="Bold"
FontSize="18"
Foreground="Black"
Margin="4,0,0,0"/>
<StackPanel Orientation="Horizontal" Margin="20,15,0,0" Width="740" Height="17">
<Image Source="/images/mail.png" Width="14" Height="14"/>
<TextBlock
Text="Email"
FontSize="8"
Margin="5"
FontWeight="Bold"
VerticalAlignment="Center"/>
<TextBlock
x:Name="TextBlockEmail"
Text="patristoica@gmail.com"
FontSize="8"
Margin="5"
VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="20,0,0,0" Width="740" Height="17">
<Image Source="/images/phone.png" Width="14" Height="14"/>
<TextBlock Text="Phone number" FontSize="8" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
<TextBlock x:Name="TextBlockPhoneNumber" Text="743177151" FontSize="8" Margin="5" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="20,0,0,0" Width="740" Height="18">
<Image Source="/images/calendar.png" Width="14" Height="14"/>
<TextBlock Text="Date of birth" FontSize="8" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
<TextBlock x:Name="TextBlockDateOfBirth" Text="06.06.2003" FontSize="8" Margin="5" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="20,0,0,0" Width="740" Height="18">
<Image Source="/images/profile-icon.png" Width="14" Height="14"/>
<TextBlock Text="Name" FontSize="8" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
<TextBlock x:Name="TextBlockName" Text="Patricia" FontSize="8" Margin="5" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="20,0,0,0" Width="740" Height="18">
<Image Source="/images/Username.png" Width="14" Height="14"/>
<TextBlock Text="Username" FontSize="8" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
<TextBlock x:Name="TextBlockUsername" Text="patri.stoica" FontSize="8" Margin="5" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="20,0,0,0" Width="740" Height="17">
<Image Source="/images/studies-icon.png" Width="14" Height="14"/>
<TextBlock Text="Education" FontSize="8" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
<TextBlock x:Name="TextBlockEducation" Text="UBB Facultatea de matematica si informatica" FontSize="8" Margin="5" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="38,0,0,0" Width="740" Height="16">
<TextBlock Text="Level" FontSize="7" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
<TextBlock x:Name="TextBlockEducationLevel" Text="Student" FontSize="7" Margin="0" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="38,0,0,0" Width="740" Height="16">
<TextBlock Text="Start Date" FontSize="7" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
<TextBlock x:Name="TextBlockEducationStartDate" Text="06.06.2003" FontSize="7" Margin="0" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="38,0,0,0" Width="740" Height="16">
<TextBlock Text="End Date" FontSize="7" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
<TextBlock x:Name="TextBlockEducationEndDate" Text="06.06.2003" FontSize="7" Margin="0" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="38,0,0,0" Width="740" Height="16">
<TextBlock Text="Location" FontSize="7" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
<TextBlock x:Name="TextBlockEducationLocation" Text="Cluj-Napoca" FontSize="7" Margin="0" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="20,0,0,0" Width="740" Height="17">
<Image Source="/images/hobbies-icon.png" Width="14" Height="14"/>
<TextBlock Text="Hobbies" FontSize="8" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
<TextBlock x:Name="TextBlockHobbies" Text="ski" FontSize="8" Margin="5" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="20,0,0,0" Width="740" Height="17">
<Image Source="/images/music-icon.png" Width="14" Height="14"/>
<TextBlock Text="Music" FontSize="8" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
<TextBlock x:Name="TextBlockMusic" Text="clssical" FontSize="8" Margin="5" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="20,0,0,0" Width="740" Height="17">
<Image Source="/images/places-icon.png" Width="14" Height="14"/>
<TextBlock Text="Places" FontSize="8" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
<TextBlock x:Name="TextBlockPlaces" Text="Cluj-Napoca" FontSize="8" Margin="5" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="20,0,0,0" Width="740" Height="17">
<Image Source="/images/work-icon.png" Width="14" Height="14"/>
<TextBlock Text="Work" FontSize="8" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
<TextBlock x:Name="TextBlockWork" Text="Tesla" FontSize="8" Margin="5" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="38,0,0,0" Width="740" Height="16">
<TextBlock Text="Position" FontSize="7" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
<TextBlock x:Name="TextBlockWorkPosition" Text="software developer" FontSize="7" Margin="0" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="38,0,0,0" Width="740" Height="16">
<TextBlock Text="Start date" FontSize="7" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
<TextBlock x:Name="TextBlockWorkStartDate" Text="06.06.2003" FontSize="7" Margin="0" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="38,0,0,0" Width="740" Height="16">
<TextBlock Text="End date" FontSize="7" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
<TextBlock x:Name="TextBlockWorkEndDate" Text="06.06.2003" FontSize="7" Margin="0" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="38,0,0,0" Width="740" Height="16">
<TextBlock Text="Description" FontSize="7" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
<TextBlock x:Name="TextBlockDescription" Text="working on embedded systems" FontSize="7" Margin="0" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="38,0,0,0" Width="740" Height="16">
<TextBlock Text="Location" FontSize="7" FontWeight="Bold" Margin="5" VerticalAlignment="Center"/>
<TextBlock x:Name="TextBlockWorkLocation" Text="Cluj-Napoca" FontSize="7" Margin="0" VerticalAlignment="Center"/>
</StackPanel>
<Button Margin="20,2,0,0" Background="Transparent" BorderThickness="0" Cursor="Hand" HorizontalAlignment="Left" Click="EditInfoButton_Click">
<TextBlock Text="Edit info" FontSize="9" FontWeight="Bold"/>
</Button>
<TextBlock Margin="21,1,0,0" Text="Description" FontSize="9" FontWeight="Bold"/>
<StackPanel Orientation="Horizontal" Margin="22,4,0,0" Width="740" Height="47">
<TextBlock Text="vdbvievbiws" TextWrapping="Wrap" VerticalAlignment="Top" Width="116" FontSize="10"/>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
</UserControl>
@@ -0,0 +1,77 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace District_3_App.ProfileInfo_GUI
{
/// <summary>
/// Interaction logic for ProfileInfoDisplay.xaml
/// </summary>
public partial class ProfileInfoDisplay : UserControl
{
public ProfileInfoDisplay()
{
InitializeComponent();
}
public void UpdateProfileInfo(
string email, string phoneNumber, string dateOfBirth, string name,
string username, string education, string educationLevel,
string educationStartDate, string educationEndDate,
string educationLocation, string hobbies, string music, string places,
string work, string position, string workStartDate,
string workEndDate, string workLocation, string description)
{
// Update TextBlocks with edited profile info
TextBlockEmail.Text = email;
TextBlockPhoneNumber.Text = phoneNumber;
TextBlockDateOfBirth.Text = dateOfBirth;
TextBlockName.Text = name;
TextBlockUsername.Text = username;
TextBlockEducation.Text = education;
TextBlockEducationLevel.Text = educationLevel;
TextBlockEducationStartDate.Text = educationStartDate;
TextBlockEducationEndDate.Text = educationEndDate;
TextBlockEducationLocation.Text = educationLocation;
TextBlockHobbies.Text = hobbies;
TextBlockMusic.Text = music;
TextBlockPlaces.Text = places;
TextBlockWork.Text = work;
TextBlockWorkPosition.Text = position;
TextBlockWorkStartDate.Text = workStartDate;
TextBlockWorkEndDate.Text = workEndDate;
TextBlockWorkLocation.Text = workLocation;
TextBlockDescription.Text = description;
}
private void EditInfoButton_Click(object sender, RoutedEventArgs e)
{
var newContent = new EditProfileInfo(this);
ProfileInfoStackPanel.Children.Clear();
ProfileInfoStackPanel.Children.Add(newContent);
}
private void MainProfileButton_Click(object sender, RoutedEventArgs e)
{
var newContent = new MainWindow();
ProfileInfoStackPanel.Children.Clear();
ProfileInfoStackPanel.Children.Add(newContent);
}
private void Save_Button(object sender, RoutedEventArgs e)
{
// do something
}
}
}