Skip to content

Commit 648d864

Browse files
committed
refactor: fixed compilation messages
1 parent e7763bb commit 648d864

3 files changed

Lines changed: 104 additions & 99 deletions

File tree

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[*.cs]
2+
3+
# IDE1006: Styles d'affectation de noms
4+
dotnet_diagnostic.IDE1006.severity = silent

MainForm.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@ private void MainForm_Load(object sender, EventArgs e)
5959

6060
private void buttonOpen_Click(object sender, EventArgs e)
6161
{
62-
OpenFileDialog openFileDialog1 = new OpenFileDialog();
63-
openFileDialog1.Filter = "Subtitles files|*.srt;*.sub";
64-
openFileDialog1.FileName = "";
62+
OpenFileDialog openFileDialog1 = new OpenFileDialog
63+
{
64+
Filter = "Subtitles files|*.srt;*.sub",
65+
FileName = ""
66+
};
6567

6668
if (openFileDialog1.ShowDialog() == DialogResult.OK)
6769
{
@@ -239,9 +241,7 @@ private void numericupdownSpeedDelay_ValueChanged(object sender, EventArgs e)
239241
private void timepickerPosition_ValueChanged(object sender, EventArgs e)
240242
{
241243
// update speed and delay displayed values
242-
double speed = 1.0;
243-
long delay = 0;
244-
computeSpeedDelayFromPositions(out speed, out delay);
244+
computeSpeedDelayFromPositions(out double speed, out long delay);
245245

246246
bool idle = (speed == 1.0 && delay == 0);
247247

@@ -289,7 +289,7 @@ private void computeSpeedDelayFromPositions(out double speed, out long delay)
289289
string posExp1 = timepickerPosExp1.Value.ToLongTimeString() + "," + numericupdownMilliPosExp1.Value.ToString("000");
290290
string posExp2 = timepickerPosExp2.Value.ToLongTimeString() + "," + numericupdownMilliPosExp2.Value.ToString("000");
291291

292-
Tools.SubtitleType type = Tools.SubtitleType.None; // dummy
292+
Tools.SubtitleType type;
293293
long milliCur1 = Tools.TimeToMilliseconds(posCur1, out type);
294294
long milliCur2 = Tools.TimeToMilliseconds(posCur2, out type);
295295
long milliExp1 = Tools.TimeToMilliseconds(posExp1, out type);

SubtitlesAdjuster.csproj

Lines changed: 93 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,100 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4-
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{17DEF2B2-7BB0-44F3-ACE7-3E61691AB7B5}</ProjectGuid>
8-
<OutputType>WinExe</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>SA</RootNamespace>
11-
<AssemblyName>SubtitlesAdjuster</AssemblyName>
12-
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<TargetFrameworkProfile />
15-
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17-
<PlatformTarget>AnyCPU</PlatformTarget>
18-
<DebugSymbols>true</DebugSymbols>
19-
<DebugType>full</DebugType>
20-
<Optimize>false</Optimize>
21-
<OutputPath>bin\Debug\</OutputPath>
22-
<DefineConstants>DEBUG;TRACE</DefineConstants>
23-
<ErrorReport>prompt</ErrorReport>
24-
<WarningLevel>4</WarningLevel>
25-
<Prefer32Bit>false</Prefer32Bit>
26-
</PropertyGroup>
27-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28-
<PlatformTarget>AnyCPU</PlatformTarget>
29-
<DebugType>pdbonly</DebugType>
30-
<Optimize>true</Optimize>
31-
<OutputPath>bin\Release\</OutputPath>
32-
<DefineConstants>TRACE</DefineConstants>
33-
<ErrorReport>prompt</ErrorReport>
34-
<WarningLevel>4</WarningLevel>
35-
<Prefer32Bit>false</Prefer32Bit>
36-
</PropertyGroup>
37-
<PropertyGroup>
38-
<ApplicationIcon>Vid.ico</ApplicationIcon>
39-
</PropertyGroup>
40-
<ItemGroup>
41-
<Reference Include="System" />
42-
<Reference Include="System.Core" />
43-
<Reference Include="System.Data.DataSetExtensions" />
44-
<Reference Include="Microsoft.CSharp" />
45-
<Reference Include="System.Data" />
46-
<Reference Include="System.Deployment" />
47-
<Reference Include="System.Drawing" />
48-
<Reference Include="System.Windows.Forms" />
49-
</ItemGroup>
50-
<ItemGroup>
51-
<Compile Include="MainForm.cs">
52-
<SubType>Form</SubType>
53-
</Compile>
54-
<Compile Include="MainForm.Designer.cs">
55-
<DependentUpon>MainForm.cs</DependentUpon>
56-
</Compile>
57-
<Compile Include="Program.cs" />
58-
<Compile Include="Properties\AssemblyInfo.cs" />
59-
<Compile Include="Properties\Resources.Designer.cs">
60-
<AutoGen>True</AutoGen>
61-
<DesignTime>True</DesignTime>
62-
<DependentUpon>Resources.resx</DependentUpon>
63-
</Compile>
64-
<Compile Include="Tools.cs" />
65-
<EmbeddedResource Include="MainForm.resx">
66-
<DependentUpon>MainForm.cs</DependentUpon>
67-
</EmbeddedResource>
68-
<EmbeddedResource Include="Properties\Resources.resx">
69-
<Generator>ResXFileCodeGenerator</Generator>
70-
<SubType>Designer</SubType>
71-
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
72-
</EmbeddedResource>
73-
<None Include="app.config" />
74-
<None Include="Properties\Settings.settings">
75-
<Generator>SettingsSingleFileGenerator</Generator>
76-
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
77-
</None>
78-
<Compile Include="Properties\Settings.Designer.cs">
79-
<AutoGen>True</AutoGen>
80-
<DependentUpon>Settings.settings</DependentUpon>
81-
<DesignTimeSharedInput>True</DesignTimeSharedInput>
82-
</Compile>
83-
</ItemGroup>
84-
<ItemGroup>
85-
<Content Include="Vid.ico" />
86-
</ItemGroup>
87-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
88-
<PropertyGroup>
89-
<PostBuildEvent>
90-
</PostBuildEvent>
91-
</PropertyGroup>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{17DEF2B2-7BB0-44F3-ACE7-3E61691AB7B5}</ProjectGuid>
8+
<OutputType>WinExe</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>SA</RootNamespace>
11+
<AssemblyName>SubtitlesAdjuster</AssemblyName>
12+
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<TargetFrameworkProfile />
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<PlatformTarget>AnyCPU</PlatformTarget>
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>bin\Debug\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
<Prefer32Bit>false</Prefer32Bit>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<PlatformTarget>AnyCPU</PlatformTarget>
29+
<DebugType>pdbonly</DebugType>
30+
<Optimize>true</Optimize>
31+
<OutputPath>bin\Release\</OutputPath>
32+
<DefineConstants>TRACE</DefineConstants>
33+
<ErrorReport>prompt</ErrorReport>
34+
<WarningLevel>4</WarningLevel>
35+
<Prefer32Bit>false</Prefer32Bit>
36+
</PropertyGroup>
37+
<PropertyGroup>
38+
<ApplicationIcon>Vid.ico</ApplicationIcon>
39+
</PropertyGroup>
40+
<ItemGroup>
41+
<Reference Include="System" />
42+
<Reference Include="System.Core" />
43+
<Reference Include="System.Data.DataSetExtensions" />
44+
<Reference Include="Microsoft.CSharp" />
45+
<Reference Include="System.Data" />
46+
<Reference Include="System.Deployment" />
47+
<Reference Include="System.Drawing" />
48+
<Reference Include="System.Windows.Forms" />
49+
</ItemGroup>
50+
<ItemGroup>
51+
<Compile Include="MainForm.cs">
52+
<SubType>Form</SubType>
53+
</Compile>
54+
<Compile Include="MainForm.Designer.cs">
55+
<DependentUpon>MainForm.cs</DependentUpon>
56+
</Compile>
57+
<Compile Include="Program.cs" />
58+
<Compile Include="Properties\AssemblyInfo.cs" />
59+
<Compile Include="Properties\Resources.Designer.cs">
60+
<AutoGen>True</AutoGen>
61+
<DesignTime>True</DesignTime>
62+
<DependentUpon>Resources.resx</DependentUpon>
63+
</Compile>
64+
<Compile Include="Tools.cs" />
65+
<EmbeddedResource Include="MainForm.resx">
66+
<DependentUpon>MainForm.cs</DependentUpon>
67+
</EmbeddedResource>
68+
<EmbeddedResource Include="Properties\Resources.resx">
69+
<Generator>ResXFileCodeGenerator</Generator>
70+
<SubType>Designer</SubType>
71+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
72+
</EmbeddedResource>
73+
<None Include=".editorconfig" />
74+
<None Include="app.config" />
75+
<None Include="Properties\Settings.settings">
76+
<Generator>SettingsSingleFileGenerator</Generator>
77+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
78+
</None>
79+
<Compile Include="Properties\Settings.Designer.cs">
80+
<AutoGen>True</AutoGen>
81+
<DependentUpon>Settings.settings</DependentUpon>
82+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
83+
</Compile>
84+
</ItemGroup>
85+
<ItemGroup>
86+
<Content Include="Vid.ico" />
87+
</ItemGroup>
88+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
89+
<PropertyGroup>
90+
<PostBuildEvent>
91+
</PostBuildEvent>
92+
</PropertyGroup>
9293
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
9394
Other similar extension points exist, see Microsoft.Common.targets.
9495
<Target Name="BeforeBuild">
9596
</Target>
9697
<Target Name="AfterBuild">
9798
</Target>
98-
-->
99+
-->
99100
</Project>

0 commit comments

Comments
 (0)