Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
Project preparing for 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FrediKats committed Jan 14, 2019
1 parent c01d566 commit 6f95b81
Show file tree
Hide file tree
Showing 25 changed files with 36 additions and 53 deletions.
2 changes: 1 addition & 1 deletion LimpParse.ConsoleApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace LimpParse.ConsoleApp
{
internal static class Program
{
private static void Main(string[] args)
private static void Main()
{
StudyGroup group = DataGenerator.GenerateTemplateGroup();
MultiThreadParser.LoadProfiles(group);
Expand Down
2 changes: 1 addition & 1 deletion LimpParse.TelegramBot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace LimpParse.TelegramBot
{
internal static class Program
{
private static void Main(string[] args)
private static void Main()
{
StudyGroup group = DataGenerator.GenerateTemplateGroup();
var bot = new SummerSchoolBot(group);
Expand Down
1 change: 0 additions & 1 deletion LimpStats.Client/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
x:Class="LimpStats.Client.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:LimpStats.Client"
StartupUri="MainWindow.xaml">
<Application.Resources >
<ResourceDictionary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
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:LimpStats.Client.CustomControls.Blocks"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="298">
<Canvas Margin="0,0,-315,0">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<UserControl
x:Class="LimpStats.Client.CustomControls.ProblemTaskPreview"
x:Class="LimpStats.Client.CustomControls.ForProblemTasks.ProblemTaskPreview"
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:local="clr-namespace:LimpStats.Client.CustomControls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Width="500"
Height="50"
Expand All @@ -20,7 +19,7 @@
Content="A"
Foreground="AliceBlue" />
<TextBox
x:Name="textbox"
x:Name="TaskNumberInput"
Width="65"
Height="30"
Margin="5"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
using System;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using LimpStats.Client.Tools;
using LimpStats.Core.Parsers;

namespace LimpStats.Client.CustomControls
namespace LimpStats.Client.CustomControls.ForProblemTasks
{
public partial class ProblemTaskPreview : UserControl
{
Expand All @@ -19,7 +17,7 @@ public ProblemTaskPreview(ProblemPackWindow problemPackWindow, string number)
NumberTask.Content = number;
_problemPackWindow = problemPackWindow;
_problemPackWindow.PanelViewer.ScrollToEnd();
textbox.Focus();
TaskNumberInput.Focus();
}


Expand All @@ -32,7 +30,7 @@ private void FilePath_OnKeyDown(object sender, KeyEventArgs e)
_problemPackWindow.Panel.Children.Add(new ProblemTaskPreview(_problemPackWindow, num));
try
{
var n = int.Parse(textbox.Text);
int n = int.Parse(TaskNumberInput.Text);
TaskName.Content = Parser.GetTitleTask(n);
}
catch (Exception exception)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<Window
x:Class="LimpStats.Client.ProblemPackWindow"
x:Class="LimpStats.Client.CustomControls.ForProblemTasks.ProblemPackWindow"
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:local="clr-namespace:LimpStats.Client"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="ProblemPackWindow"
Width="500"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
using System.Collections.Generic;
using System.Linq;
using System.Linq;
using System.Windows;
using LimpStats.Client.CustomControls;
using LimpStats.Client.CustomControls.Blocks;
using LimpStats.Client.CustomControls.ForProblemTasks;
using LimpStats.Client.Tools;
using LimpStats.Database;
using LimpStats.Model;

namespace LimpStats.Client
namespace LimpStats.Client.CustomControls.ForProblemTasks
{
public partial class ProblemPackWindow : Window
{
Expand Down Expand Up @@ -37,8 +34,8 @@ private void ButtonAddPack(object sender, RoutedEventArgs e)
var taskList = Panel
.Children
.OfType<ProblemTaskPreview>()
.Where(text => text.textbox.Text != "")
.Select(task => int.Parse(task.textbox.Text))
.Where(text => text.TaskNumberInput.Text != "")
.Select(task => int.Parse(task.TaskNumberInput.Text))
.ToList();


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<Setter Property="TextElement.Foreground" Value="White"></Setter>
<Setter Property="TextElement.FontFamily" Value="Century Gothic"></Setter>
</Style>
<Style x:Key="packtitlestyle" TargetType="{x:Type Button}">
<Style x:Key="PackTitleStyle" TargetType="{x:Type Button}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
Expand Down Expand Up @@ -127,7 +127,7 @@
Height="33"
Background="#FF993333"
Click="CardTitle_OnClick"
DataContext="PackTitle" Foreground="#FFE8E8E8" Style="{DynamicResource packtitlestyle}" FontFamily="Century Gothic" />
DataContext="PackTitle" Foreground="#FFE8E8E8" Style="{DynamicResource PackTitleStyle}" FontFamily="Century Gothic" />
<ListBox
Name="StudentList"
SelectionChanged="LimpUserStatistic"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using LimpStats.Client.Models;
using LimpStats.Client.Tools;
using LimpStats.Core.Parsers;
using LimpStats.Database;
using LimpStats.Model;

namespace LimpStats.Client.CustomControls.ForProblemTasks
Expand All @@ -26,7 +25,7 @@ public ProblemTasksPreview(StudentPackBlock studentPackBlock, StudyGroup users,

_studentPackBlock = studentPackBlock;
_group = users;
this.packTitle = packTitle;
PackTitle = packTitle;
CardTitle.DataContext = packTitle;
//if (_group == null)
//{
Expand All @@ -35,7 +34,7 @@ public ProblemTasksPreview(StudentPackBlock studentPackBlock, StudyGroup users,
// UserList = new List<LimpUser>(),
// ProblemPackList = new List<ProblemPackInfo>
// {
// new ProblemPackInfo(packTitle, TaskPackStorage.TasksAGroup)
// new ProblemPackInfo(PackTitle, TaskPackStorage.TasksAGroup)
// }
// };
//}
Expand All @@ -44,7 +43,7 @@ public ProblemTasksPreview(StudentPackBlock studentPackBlock, StudyGroup users,

}

public string packTitle { get; }
public string PackTitle { get; }

private void ButtonClick_Update(object sender, RoutedEventArgs e)
{
Expand All @@ -65,7 +64,7 @@ public void Update()
MultiThreadParser.LoadProfiles(_group);
IEnumerable<ProfilePreviewData> studentsData = new List<ProfilePreviewData>();

studentsData = ProfilePreviewData.GetProfilePackPreview(_group, packTitle);
studentsData = ProfilePreviewData.GetProfilePackPreview(_group, PackTitle);

ThreadingTools.ExecuteUiThread(() => StudentList.ItemsSource = studentsData);
ThreadingTools.ExecuteUiThread(() => UpdateButton.IsEnabled = true);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<UserControl
x:Class="LimpStats.Client.CustomControls.StudentGroupInitializationBlock"
x:Class="LimpStats.Client.CustomControls.ForStudents.StudentGroupInitializationBlock"
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:local="clr-namespace:LimpStats.Client.CustomControls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Width="200"
Height="24.75"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Windows;
using System.Windows.Controls;

namespace LimpStats.Client.CustomControls
namespace LimpStats.Client.CustomControls.ForStudents
{
public partial class StudentGroupInitializationBlock : UserControl
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<Style x:Key="REFRESH" TargetType="{x:Type Button}">
<Style x:Key="Refresh" TargetType="{x:Type Button}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
Expand Down Expand Up @@ -172,7 +172,7 @@
FontFamily="Century Gothic"
Foreground="#FF879993"
BorderBrush="{x:Null}"
Style="{DynamicResource REFRESH}" />
Style="{DynamicResource Refresh}" />
</StackPanel>

<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
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:local="clr-namespace:LimpStats.Client"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="Добавление пользователя"
Width="300"
Expand Down
1 change: 0 additions & 1 deletion LimpStats.Client/CustomControls/LoadWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
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:LimpStats.Client.CustomControls"
mc:Ignorable="d"
Title="LoadWindow" Height="450" Width="800">
<Grid>
Expand Down
6 changes: 3 additions & 3 deletions LimpStats.Client/LimpStats.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>2</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.2.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
Expand Down Expand Up @@ -239,7 +239,7 @@
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.7.1">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.7.1 %28x86 и x64%29</ProductName>
<ProductName>Microsoft .NET Framework 4.7.1 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
Expand Down
1 change: 0 additions & 1 deletion LimpStats.Client/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public void RemoveButton(NavigateButton button)
{
MainWindowContent.Visibility = Visibility.Hidden;
}
//TODO: implement closing content window
}

public void AddToViewList(string viewTitle, UserControl view)
Expand Down
4 changes: 2 additions & 2 deletions LimpStats.Client/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.2.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]
3 changes: 1 addition & 2 deletions LimpStats.Client/Tools/IViewNavigateService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls;
using LimpStats.Client.CustomControls;

namespace LimpStats.Client.Tools
Expand Down
1 change: 1 addition & 0 deletions LimpStats.Core/LimpStats.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>2.0</OldToolsVersion>
<Version>1.2.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="HtmlAgilityPack" Version="1.8.6" />
Expand Down
4 changes: 2 additions & 2 deletions LimpStats.Core/Parsers/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ private static int TaskIdFromLink(string link)
public static string GetTitleTask(int number)
{
string url = $"https://www.e-olymp.com/ru/problems/{number}";
var Webget = new HtmlWeb();
HtmlDocument doc = Webget.Load(url);
var web = new HtmlWeb();
HtmlDocument doc = web.Load(url);

foreach (HtmlNode node in doc.DocumentNode.SelectNodes("//*[contains(@class,'eo-title__header')]"))
{
Expand Down
9 changes: 2 additions & 7 deletions LimpStats.Core/Tools/Tools.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Net;
using System.Text;
using System.Net;

namespace LimpStats.Core.Tools
{
Expand All @@ -21,11 +18,9 @@ public static class Tools
// return res;
//}

//TODO: fix
public static string GenerateNextNumber(string number)
{
//Todo: работает, но если есть варик попроще надо его юзать
//TODO: Вынести в .Core? создать там папку /Tools

var n = number.ToCharArray();
n[number.Length - 1]++;
string s = "";
Expand Down
1 change: 1 addition & 0 deletions LimpStats.Database/LimpStats.Database.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>2.0</OldToolsVersion>
<Version>1.2.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Dapper.Contrib" Version="1.50.5" />
Expand Down
2 changes: 2 additions & 0 deletions LimpStats.Model/LimpStats.Model.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>2.0</OldToolsVersion>
<Version>1.2.0</Version>
<AssemblyVersion>1.2.0.0</AssemblyVersion>
</PropertyGroup>
</Project>
1 change: 0 additions & 1 deletion LimpStats.Model/StudyGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public StudyGroup(List<LimpUser> userList)
ProblemPackList = new List<ProblemPackInfo>();
}

//TODO: remove?
public string GroupTitle { get; set; }
public List<LimpUser> UserList { get; set; }
public List<ProblemPackInfo> ProblemPackList { get; set; }
Expand Down

0 comments on commit 6f95b81

Please sign in to comment.