The Backoffice project was a nice *idea*
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
<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>
|
||||
@@ -1,17 +0,0 @@
|
||||
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
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
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)
|
||||
)]
|
||||
@@ -1,15 +0,0 @@
|
||||
<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>
|
||||
@@ -1,33 +0,0 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<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>
|
||||
@@ -1,26 +0,0 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<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 x:Name="ContentPanel">
|
||||
<TextBlock>Metafield Groups:</TextBlock>
|
||||
<CheckBox x:Name="Fitment" Content="Fitment" />
|
||||
<CheckBox x:Name="ProductFeed" Content="Product Feed" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -1,50 +0,0 @@
|
||||
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 IList<string> SelectedTasks
|
||||
{
|
||||
get
|
||||
{
|
||||
IList<string> selectedTasks = new List<string>();
|
||||
|
||||
foreach (object control in ContentPanel.Children)
|
||||
{
|
||||
switch (control)
|
||||
{
|
||||
case CheckBox checkbox:
|
||||
if (checkbox.IsChecked.GetValueOrDefault())
|
||||
{
|
||||
selectedTasks.Add(checkbox.Name);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return selectedTasks;
|
||||
}
|
||||
}
|
||||
|
||||
public TaskSetup()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
<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 x:Name="TaskSetup" />
|
||||
<Components:ProgressDisplay />
|
||||
<Button x:Name="Update" Content="Start" HorizontalAlignment="left" Click="Update_Click" />
|
||||
</StackPanel>
|
||||
</Window>
|
||||
@@ -1,41 +0,0 @@
|
||||
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)
|
||||
{
|
||||
if (TaskSetup.SelectedTasks.Count > 0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Select one or more metafield groups to continue.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,22 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
|
||||
namespace PartSource.Backoffice.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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
|
||||
namespace PartSource.Backoffice.Services
|
||||
{
|
||||
|
||||
public class GZipService
|
||||
{
|
||||
public static void Decompress(string path)
|
||||
{
|
||||
FileInfo fileToDecompress = new FileInfo(path);
|
||||
|
||||
using (FileStream originalFileStream = fileToDecompress.OpenRead())
|
||||
{
|
||||
string currentFileName = fileToDecompress.FullName;
|
||||
string newFileName = currentFileName.Remove(currentFileName.Length - fileToDecompress.Extension.Length);
|
||||
|
||||
using (FileStream decompressedFileStream = File.Create(newFileName))
|
||||
{
|
||||
using (GZipStream decompressionStream = new GZipStream(originalFileStream, CompressionMode.Decompress))
|
||||
{
|
||||
decompressionStream.CopyTo(decompressedFileStream);
|
||||
Console.WriteLine($"Decompressed: {fileToDecompress.Name}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace PartSource.Backoffice.Services
|
||||
{
|
||||
public class TaskService
|
||||
{
|
||||
private readonly FtpService _ftpService;
|
||||
private readonly GZipService _gzipService;
|
||||
|
||||
public TaskService()
|
||||
{
|
||||
_ftpService = new FtpService();
|
||||
_gzipService = new GZipService();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,8 +18,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
||||
.editorconfig = .editorconfig
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PartSource.Backoffice", "PartSource.Backoffice\PartSource.Backoffice.csproj", "{AFC51C34-2E44-4A8A-8311-F98DB7DDA15E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Also Debug|Any CPU = Also Debug|Any CPU
|
||||
@@ -123,24 +121,6 @@ Global
|
||||
{FDC22085-4C5A-4CCD-B0DB-9D31F90ECE90}.Release|x64.Build.0 = Release|Any CPU
|
||||
{FDC22085-4C5A-4CCD-B0DB-9D31F90ECE90}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{FDC22085-4C5A-4CCD-B0DB-9D31F90ECE90}.Release|x86.Build.0 = Release|Any CPU
|
||||
{AFC51C34-2E44-4A8A-8311-F98DB7DDA15E}.Also Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AFC51C34-2E44-4A8A-8311-F98DB7DDA15E}.Also Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AFC51C34-2E44-4A8A-8311-F98DB7DDA15E}.Also Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{AFC51C34-2E44-4A8A-8311-F98DB7DDA15E}.Also Debug|x64.Build.0 = Debug|Any CPU
|
||||
{AFC51C34-2E44-4A8A-8311-F98DB7DDA15E}.Also Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{AFC51C34-2E44-4A8A-8311-F98DB7DDA15E}.Also Debug|x86.Build.0 = Debug|Any CPU
|
||||
{AFC51C34-2E44-4A8A-8311-F98DB7DDA15E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AFC51C34-2E44-4A8A-8311-F98DB7DDA15E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AFC51C34-2E44-4A8A-8311-F98DB7DDA15E}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{AFC51C34-2E44-4A8A-8311-F98DB7DDA15E}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{AFC51C34-2E44-4A8A-8311-F98DB7DDA15E}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{AFC51C34-2E44-4A8A-8311-F98DB7DDA15E}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{AFC51C34-2E44-4A8A-8311-F98DB7DDA15E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AFC51C34-2E44-4A8A-8311-F98DB7DDA15E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AFC51C34-2E44-4A8A-8311-F98DB7DDA15E}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{AFC51C34-2E44-4A8A-8311-F98DB7DDA15E}.Release|x64.Build.0 = Release|Any CPU
|
||||
{AFC51C34-2E44-4A8A-8311-F98DB7DDA15E}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{AFC51C34-2E44-4A8A-8311-F98DB7DDA15E}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
Reference in New Issue
Block a user