Changed a lot LOL

This commit is contained in:
2020-11-04 17:08:13 -05:00
parent d06925204d
commit 3f6faacab8
21 changed files with 489 additions and 64 deletions

View 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>

View 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
{
}
}

View 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)
)]

View 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">
&#xE713;
</Button>
</StackPanel>
</UserControl>

View 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();
}
}
}

View 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>

View 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();
}
}
}

View 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>

View 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();
}
}
}

View 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>

View 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)
{
}
}
}

View File

@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UseWPF>true</UseWPF>
</PropertyGroup>
</Project>

View 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);
}
}
}