Skip to content

Commit

Permalink
Merge pull request #4 from AlaricGilbert/dev
Browse files Browse the repository at this point in the history
0.2.1.0
  • Loading branch information
AlaricGilbert authored Feb 2, 2019
2 parents e9092ed + 8a43ed3 commit de9e8f6
Show file tree
Hide file tree
Showing 16 changed files with 144 additions and 16 deletions.
19 changes: 19 additions & 0 deletions BiliCommenter.Console/BiliCommenter.Console.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<AssemblyVersion>0.1.0.0</AssemblyVersion>
<FileVersion>0.1.0.0</FileVersion>
<Version>0.1.0</Version>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BiliCore\BiliCore.csproj" />
</ItemGroup>

</Project>
27 changes: 27 additions & 0 deletions BiliCommenter.Console/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using BiliCommenter.Core;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.IO;

namespace BiliCommenter.Console
{
class Program
{
static void Main(string[] args)
{
if (!File.Exists("tasks.json"))
return;
var tasks = JsonConvert.DeserializeObject<List<CommentTask>>(File.ReadAllText("tasks.json"));
foreach (var task in tasks)
{
task.Callback = new CommentTask.CommentTaskFinishedCallback((taskid) =>
{
tasks.Remove(task);
if (tasks.Count == 0)
return;
});
task.Start();
}
}
}
}
6 changes: 6 additions & 0 deletions BiliCommenter.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BiliCommenter", "BiliCommen
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BiliCore", "BiliCore\BiliCore.csproj", "{366D01A5-B07E-4D58-8AAA-8136601D2736}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BiliCommenter.Console", "BiliCommenter.Console\BiliCommenter.Console.csproj", "{41756562-650B-4A92-B8BD-7FDB267C70D7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -21,6 +23,10 @@ Global
{366D01A5-B07E-4D58-8AAA-8136601D2736}.Debug|Any CPU.Build.0 = Debug|Any CPU
{366D01A5-B07E-4D58-8AAA-8136601D2736}.Release|Any CPU.ActiveCfg = Release|Any CPU
{366D01A5-B07E-4D58-8AAA-8136601D2736}.Release|Any CPU.Build.0 = Release|Any CPU
{41756562-650B-4A92-B8BD-7FDB267C70D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{41756562-650B-4A92-B8BD-7FDB267C70D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41756562-650B-4A92-B8BD-7FDB267C70D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{41756562-650B-4A92-B8BD-7FDB267C70D7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
9 changes: 8 additions & 1 deletion BiliCommenter/BiliCommenter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
Expand All @@ -27,7 +28,6 @@
<AutorunEnabled>true</AutorunEnabled>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
Expand All @@ -41,6 +41,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>default</LangVersion>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -51,6 +52,9 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>logo.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Crypto, Version=1.8.4.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
<HintPath>..\packages\BouncyCastle.1.8.4\lib\BouncyCastle.Crypto.dll</HintPath>
Expand Down Expand Up @@ -151,5 +155,8 @@
<Name>BiliCore</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Resource Include="logo.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
25 changes: 16 additions & 9 deletions BiliCommenter/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,13 @@ private void LoginButton_Click(object sender, RoutedEventArgs e)
}
Thread loginThread = new Thread(async () =>
{
// we should handle the exceptions that made it fail to login in the future version.
await Auth.LoginV3(username, password);
if (Settings.Default.IsSaveAccessKey)
{
Settings.Default.AccessKey = Account.AccessKey;
Settings.Default.Save();
}
await this.Invoke(async () => {
await FreshUserInfo();
LoginFlyout.IsOpen = false;
Expand Down Expand Up @@ -288,15 +292,7 @@ private void AddOrUpdate(object sender, RoutedEventArgs e)
TaskList.Count,
Bangumis[BangumiListBox.SelectedIndex],
MessageTextBox.Text,
new CommentTask.CommentTaskFinishedCallback((taskid) => {
this.Invoke(() =>
{
var title = TaskList[taskid].BangumiInfo.Title;
TaskList.RemoveAt(taskid);
TaskPair.Remove(title);
TaskListBox.Items.Remove(title);
});
})
TaskCallback
);
TaskList.Add(task);
TaskPair.Add(BangumiListBox.SelectedItem as string, task);
Expand All @@ -305,6 +301,16 @@ private void AddOrUpdate(object sender, RoutedEventArgs e)
}
SaveCurrentTasks();
}
private void TaskCallback(int taskid)
{
this.Invoke(() =>
{
var title = TaskList[taskid].BangumiInfo.Title;
TaskList.RemoveAt(taskid);
TaskPair.Remove(title);
TaskListBox.Items.Remove(title);
});
}
private void Remove(object sender, RoutedEventArgs e)
{
ReadTasks();
Expand Down Expand Up @@ -338,6 +344,7 @@ private void ReadTasks()
task.TaskId = TaskListBox.Items.Count;
TaskListBox.Items.Add(task.BangumiInfo.Title);
TaskPair.Add(task.BangumiInfo.Title, task);
task.Callback = TaskCallback;
task.Start();
}
}
Expand Down
4 changes: 2 additions & 2 deletions BiliCommenter/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.2.0.0")]
[assembly: AssemblyFileVersion("0.2.0.0")]
[assembly: AssemblyVersion("0.2.1.0")]
[assembly: AssemblyFileVersion("0.2.1.0")]
Binary file added BiliCommenter/logo.ico
Binary file not shown.
1 change: 1 addition & 0 deletions BiliCore/BiliCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyVersion>0.2.0.0</AssemblyVersion>
<FileVersion>0.2.0.0</FileVersion>
<Version>0.2.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,44 @@
# BiliCommenter
## Intro

![](logo.png)

A tool that helps you grab the front row in new animates.

哔哩哔哩新番抢楼机。

Coding: @AlaricGilbert

Logo Design: @ManiaciaChao

## To-do list

In upcoming version 0.3.x, we're going to add those functions and redirect our way to "Grab the front row in all the reply areas":

在0.3.x版本中加入下列功能,并将目标指向更改为“哔哩哔哩评论区前排助手”:

* [ ] Specified floor grabbing./抢指定楼层。
* [ ] Dynamics floor grabbing./动态抢楼。
* [ ] Exceptions handle./异常处理。

In further version 0.4.x, we're going to add those functions:

在0.4.x版本中加入下列功能:

* [ ] Master ball./在关注的动态中,对指定的人物投出“大师球”。
* [ ] Themes (optional)./主题。
* [ ] Login with CAPTCHA requirement./需要验证码的登陆处理。

1.0.0:

* [ ] iOS/Android Support。(咕咕咕咕咕咕咕~)

## Previews

![](imgs/main.png)

![](imgs/emoji.png)

![](imgs/settings.png)

![](imgs/login.png)
27 changes: 23 additions & 4 deletions What's new.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,26 @@

## 0.2.x - currently mainly supporting version

### 0.2.0.0 - lots of new functions!!
### 0.2.1.0

Changes:

```
1.We're goting to stop submitting the file changes to this file.
2.Some changes to README.md.
```

New features:

```
#1 Console (cross-platform, .NET Core) version of this application that can read the tasks.json file and execute the tasks, although it's hard to use.
#2 @ManiaciaChao designed a logo for BC/WPF project.
```

Fixed some bugs in 0.2.0.0

### 0.2.0.0 [Buggy]

New features:
```
#1 What's new document.
Expand All @@ -29,7 +48,7 @@ Changes to be committed:

## 0.1.x - indev versions - updating abandoned.

### 0.1.0.2 - for release package.
### 0.1.0.2 - for release package. [Usable]

Release package will working now.

Expand All @@ -39,7 +58,7 @@ Changes to be committed:
modified: BiliCommenter/BiliCommenter.csproj
modified: BiliCommenter/Properties/AssemblyInfo.cs
```
### 0.1.0.1
### 0.1.0.1 [Debug package usable]

Bug fixxed:
```
Expand All @@ -52,7 +71,7 @@ Changes to be committed:
modified: BiliCommenter/MainWindow.xaml.cs
modified: BiliCommenter/Properties/AssemblyInfo.cs
```
### 0.1.0.0 -Initial release.
### 0.1.0.0 -Initial release. [Buggy]

The initial version.

Expand Down
Binary file added imgs/emoji.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added logo.ico
Binary file not shown.
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit de9e8f6

Please sign in to comment.