Changed a lot LOL
This commit is contained in:
9
PartSource.Backoffice/App.xaml
Normal file
9
PartSource.Backoffice/App.xaml
Normal file
@@ -0,0 +1,9 @@
|
||||
<Application x:Class="PartSource.Backoffice.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:PartSource.Backoffice"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
17
PartSource.Backoffice/App.xaml.cs
Normal file
17
PartSource.Backoffice/App.xaml.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace PartSource.Backoffice
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
||||
10
PartSource.Backoffice/AssemblyInfo.cs
Normal file
10
PartSource.Backoffice/AssemblyInfo.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System.Windows;
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
15
PartSource.Backoffice/Components/MenuBar.xaml
Normal file
15
PartSource.Backoffice/Components/MenuBar.xaml
Normal file
@@ -0,0 +1,15 @@
|
||||
<UserControl x:Class="PartSource.Backoffice.Components.MenuBar"
|
||||
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:PartSource.Backoffice.Components"
|
||||
mc:Ignorable="d" >
|
||||
|
||||
|
||||
<StackPanel>
|
||||
<Button FontFamily="Segoe MDL2 Assets" FontSize="32" Background="#0000" BorderThickness="0" Foreground="#FFF">
|
||||

|
||||
</Button>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
33
PartSource.Backoffice/Components/MenuBar.xaml.cs
Normal file
33
PartSource.Backoffice/Components/MenuBar.xaml.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
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 PartSource.Backoffice.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MenuBar.xaml
|
||||
/// </summary>
|
||||
public partial class MenuBar : UserControl
|
||||
{
|
||||
public MenuBar()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void MenuItem_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// TODO: Check if any tasks are running
|
||||
|
||||
Application.Current.MainWindow.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
20
PartSource.Backoffice/Components/ProgressDisplay.xaml
Normal file
20
PartSource.Backoffice/Components/ProgressDisplay.xaml
Normal file
@@ -0,0 +1,20 @@
|
||||
<UserControl x:Class="PartSource.Backoffice.Components.ProgressDisplay"
|
||||
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:PartSource.Backoffice.Components"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
Padding="10">
|
||||
|
||||
|
||||
<StackPanel>
|
||||
<WrapPanel>
|
||||
<TextBlock>Current Operation:</TextBlock>
|
||||
<Label x:Name="OperationNameDisplay">None</Label>
|
||||
</WrapPanel>
|
||||
<ProgressBar Height="32" Background="#444" BorderThickness="0" />
|
||||
</StackPanel>
|
||||
|
||||
</UserControl>
|
||||
26
PartSource.Backoffice/Components/ProgressDisplay.xaml.cs
Normal file
26
PartSource.Backoffice/Components/ProgressDisplay.xaml.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
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 PartSource.Backoffice.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for StatusBars.xaml
|
||||
/// </summary>
|
||||
public partial class ProgressDisplay : UserControl
|
||||
{
|
||||
public ProgressDisplay()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
16
PartSource.Backoffice/Components/TaskSetup.xaml
Normal file
16
PartSource.Backoffice/Components/TaskSetup.xaml
Normal file
@@ -0,0 +1,16 @@
|
||||
<UserControl x:Class="PartSource.Backoffice.Components.TaskSetup"
|
||||
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:PartSource.Backoffice.Components"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
Padding="10">
|
||||
|
||||
<StackPanel>
|
||||
<TextBlock>Metafield Groups:</TextBlock>
|
||||
<CheckBox Content="Fitment" />
|
||||
<CheckBox Content="Product Feed" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
26
PartSource.Backoffice/Components/TaskSetup.xaml.cs
Normal file
26
PartSource.Backoffice/Components/TaskSetup.xaml.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
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 PartSource.Backoffice.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for TaskSetup.xaml
|
||||
/// </summary>
|
||||
public partial class TaskSetup : UserControl
|
||||
{
|
||||
public TaskSetup()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
PartSource.Backoffice/MainWindow.xaml
Normal file
40
PartSource.Backoffice/MainWindow.xaml
Normal file
@@ -0,0 +1,40 @@
|
||||
<Window xmlns:Components="clr-namespace:PartSource.Backoffice.Components"
|
||||
x:Class="PartSource.Backoffice.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:PartSource.Backoffice"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="262" Width="520" Background="#222" WindowStartupLocation="CenterScreen" ResizeMode="NoResize">
|
||||
|
||||
<Window.Resources>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="Foreground" Value="#FFF" />
|
||||
<Setter Property="FontWeight" Value="DemiBold"/>
|
||||
<Setter Property="Margin" Value="0,0,10,10" />
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Label">
|
||||
<Setter Property="Foreground" Value="#CCC" />
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="CheckBox">
|
||||
<Setter Property="Foreground" Value="#FFF"/>
|
||||
<Setter Property="Margin" Value="0,0,0,5"/>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="Margin" Value="10, 20"/>
|
||||
<Setter Property="Padding" Value="25, 5" />
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
|
||||
<StackPanel>
|
||||
<Components:TaskSetup />
|
||||
<Components:ProgressDisplay />
|
||||
<Button x:Name="Update" Content="Start" HorizontalAlignment="left" Click="Update_Click" />
|
||||
</StackPanel>
|
||||
</Window>
|
||||
33
PartSource.Backoffice/MainWindow.xaml.cs
Normal file
33
PartSource.Backoffice/MainWindow.xaml.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
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 PartSource.Backoffice
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Update_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
9
PartSource.Backoffice/PartSource.Backoffice.csproj
Normal file
9
PartSource.Backoffice/PartSource.Backoffice.csproj
Normal file
@@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
23
PartSource.Backoffice/Services/FtpService.cs
Normal file
23
PartSource.Backoffice/Services/FtpService.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
|
||||
namespace PartSource.Automation.Services
|
||||
{
|
||||
public class FtpService
|
||||
{
|
||||
|
||||
public void Download(string filename)
|
||||
{
|
||||
//FtpWebRequest request = (FtpWebRequest)WebRequest.Create($"{_ftpConfiguration.Url}/{filename}");
|
||||
//request.Credentials = new NetworkCredential(_ftpConfiguration.Username, _ftpConfiguration.Password);
|
||||
//request.Method = WebRequestMethods.Ftp.DownloadFile;
|
||||
|
||||
//using FtpWebResponse response = (FtpWebResponse)request.GetResponse();
|
||||
//using Stream responseStream = response.GetResponseStream();
|
||||
//using FileStream fileStream = new FileStream($"%APPDATALOCAL%\\{filename}", FileMode.Create);
|
||||
|
||||
//responseStream.CopyTo(fileStream);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user