Began designing the third Voile setup page.
This commit is contained in:
parent
8e57233dad
commit
3111168579
@ -83,5 +83,10 @@ namespace Voile.Patchouli.Reflection
|
|||||||
throw new VoileReflectionException(String.Format("Could not figure out plugin type of {0}", t.Name));
|
throw new VoileReflectionException(String.Format("Could not figure out plugin type of {0}", t.Name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IReadOnlyList<VoilePluginInfo> GetDataStorages()
|
||||||
|
{
|
||||||
|
return _knownDataStorages.AsReadOnly();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
27
Voile/FirstRunWizard.Designer.cs
generated
27
Voile/FirstRunWizard.Designer.cs
generated
@ -48,11 +48,14 @@
|
|||||||
buttonNext = new Button();
|
buttonNext = new Button();
|
||||||
buttonBack = new Button();
|
buttonBack = new Button();
|
||||||
openFileDialogCertificate = new OpenFileDialog();
|
openFileDialogCertificate = new OpenFileDialog();
|
||||||
|
tabPage1 = new TabPage();
|
||||||
|
label5 = new Label();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
|
((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
|
||||||
tabControl1.SuspendLayout();
|
tabControl1.SuspendLayout();
|
||||||
tabPageWelcome.SuspendLayout();
|
tabPageWelcome.SuspendLayout();
|
||||||
tabPageLicense.SuspendLayout();
|
tabPageLicense.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureBox2).BeginInit();
|
((System.ComponentModel.ISupportInitialize)pictureBox2).BeginInit();
|
||||||
|
tabPage1.SuspendLayout();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// pictureBox1
|
// pictureBox1
|
||||||
@ -69,6 +72,7 @@
|
|||||||
//
|
//
|
||||||
tabControl1.Controls.Add(tabPageWelcome);
|
tabControl1.Controls.Add(tabPageWelcome);
|
||||||
tabControl1.Controls.Add(tabPageLicense);
|
tabControl1.Controls.Add(tabPageLicense);
|
||||||
|
tabControl1.Controls.Add(tabPage1);
|
||||||
tabControl1.Location = new Point(138, 12);
|
tabControl1.Location = new Point(138, 12);
|
||||||
tabControl1.Name = "tabControl1";
|
tabControl1.Name = "tabControl1";
|
||||||
tabControl1.SelectedIndex = 0;
|
tabControl1.SelectedIndex = 0;
|
||||||
@ -255,6 +259,25 @@
|
|||||||
openFileDialogCertificate.Filter = "X.509 Certificate (*.cer)|*.cer";
|
openFileDialogCertificate.Filter = "X.509 Certificate (*.cer)|*.cer";
|
||||||
openFileDialogCertificate.Title = "Open Voile License File";
|
openFileDialogCertificate.Title = "Open Voile License File";
|
||||||
//
|
//
|
||||||
|
// tabPage1
|
||||||
|
//
|
||||||
|
tabPage1.Controls.Add(label5);
|
||||||
|
tabPage1.Location = new Point(4, 24);
|
||||||
|
tabPage1.Name = "tabPage1";
|
||||||
|
tabPage1.Size = new Size(348, 384);
|
||||||
|
tabPage1.TabIndex = 2;
|
||||||
|
tabPage1.Text = "Pick Data Storage";
|
||||||
|
tabPage1.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// label5
|
||||||
|
//
|
||||||
|
label5.AutoSize = true;
|
||||||
|
label5.Location = new Point(3, 0);
|
||||||
|
label5.Name = "label5";
|
||||||
|
label5.Size = new Size(347, 165);
|
||||||
|
label5.TabIndex = 0;
|
||||||
|
label5.Text = resources.GetString("label5.Text");
|
||||||
|
//
|
||||||
// FirstRunWizard
|
// FirstRunWizard
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
@ -277,6 +300,8 @@
|
|||||||
tabPageLicense.ResumeLayout(false);
|
tabPageLicense.ResumeLayout(false);
|
||||||
tabPageLicense.PerformLayout();
|
tabPageLicense.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureBox2).EndInit();
|
((System.ComponentModel.ISupportInitialize)pictureBox2).EndInit();
|
||||||
|
tabPage1.ResumeLayout(false);
|
||||||
|
tabPage1.PerformLayout();
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,5 +326,7 @@
|
|||||||
private Label label4;
|
private Label label4;
|
||||||
private PictureBox pictureBox2;
|
private PictureBox pictureBox2;
|
||||||
private OpenFileDialog openFileDialogCertificate;
|
private OpenFileDialog openFileDialogCertificate;
|
||||||
|
private TabPage tabPage1;
|
||||||
|
private Label label5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -10,6 +10,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using Voile.Patchouli.Reflection;
|
||||||
using Voile.Properties;
|
using Voile.Properties;
|
||||||
|
|
||||||
namespace Voile
|
namespace Voile
|
||||||
@ -31,6 +32,9 @@ namespace Voile
|
|||||||
private byte[] licenseBuffer;
|
private byte[] licenseBuffer;
|
||||||
private int licenseState;
|
private int licenseState;
|
||||||
private X509Certificate licenseCertificate;
|
private X509Certificate licenseCertificate;
|
||||||
|
private bool sharewareMode;
|
||||||
|
|
||||||
|
private bool dataStorageRadioButtonsGenerated;
|
||||||
|
|
||||||
public void DisplayTabPage(int target, bool isGoingBack = false)
|
public void DisplayTabPage(int target, bool isGoingBack = false)
|
||||||
{
|
{
|
||||||
@ -74,6 +78,7 @@ namespace Voile
|
|||||||
buttonNext.Enabled = radioButtonAmBegginer.Checked || radioButtonAmExpert.Checked;
|
buttonNext.Enabled = radioButtonAmBegginer.Checked || radioButtonAmExpert.Checked;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
//Lizenzstatus validieren.
|
||||||
buttonValidateLicense.Enabled = ((licenceCertificateFileInfo != null) & radioButtonHasLicense.Checked);
|
buttonValidateLicense.Enabled = ((licenceCertificateFileInfo != null) & radioButtonHasLicense.Checked);
|
||||||
buttonLoadLicenseFile.Enabled = radioButtonHasLicense.Checked;
|
buttonLoadLicenseFile.Enabled = radioButtonHasLicense.Checked;
|
||||||
pictureBox2.Visible = radioButtonHasLicense.Checked;
|
pictureBox2.Visible = radioButtonHasLicense.Checked;
|
||||||
@ -102,6 +107,14 @@ namespace Voile
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Können wir weiter machen?
|
||||||
|
sharewareMode = radioButtonNoLicense.Checked;
|
||||||
|
buttonNext.Enabled = (sharewareMode) | (licenseState == 6);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if (!dataStorageRadioButtonsGenerated)
|
||||||
|
GenerateDataStorageRadioButtons();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
MessageBox.Show("Could not find handler for the current tab page.");
|
MessageBox.Show("Could not find handler for the current tab page.");
|
||||||
@ -109,6 +122,13 @@ namespace Voile
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void GenerateDataStorageRadioButtons()
|
||||||
|
{
|
||||||
|
VoilePluginManager pluginManager = VoilePluginManager.GetInstance();
|
||||||
|
IReadOnlyList<VoilePluginInfo> dataStoragePlugins = pluginManager.GetDataStorages();
|
||||||
|
//TODO: Finish generating the radio buttons for the data storage.
|
||||||
|
}
|
||||||
|
|
||||||
private void radioButton3_CheckedChanged(object sender, EventArgs e)
|
private void radioButton3_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
RefreshView();
|
RefreshView();
|
||||||
|
|||||||
@ -117,6 +117,19 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<data name="label5.Text" xml:space="preserve">
|
||||||
|
<value>Great — let’s choose where Voile should store its
|
||||||
|
structured data.
|
||||||
|
|
||||||
|
Blindscan results, DVB table contents, and historical
|
||||||
|
scan information will all be kept in the storage option you select
|
||||||
|
below. Since you’re using Expert Mode, you have full control
|
||||||
|
over the database backend. (In Beginner Mode, Voile would
|
||||||
|
simply use SQLite automatically.)
|
||||||
|
|
||||||
|
Feel free to pick the option that best fits your workflow or
|
||||||
|
existing infrastructure.</value>
|
||||||
|
</data>
|
||||||
<data name="label2.Text" xml:space="preserve">
|
<data name="label2.Text" xml:space="preserve">
|
||||||
<value>Welcome to Voile!
|
<value>Welcome to Voile!
|
||||||
|
|
||||||
|
|||||||
19
Voile/Persistence/DirectoryStorage.cs
Normal file
19
Voile/Persistence/DirectoryStorage.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Voile.Patchouli.Data;
|
||||||
|
|
||||||
|
namespace Voile.Persistence
|
||||||
|
{
|
||||||
|
internal class DirectoryStorage : IVoileObjectStorage, IVoileDataStorage
|
||||||
|
{
|
||||||
|
public DirectoryStorage(DirectoryInfo directory)
|
||||||
|
{
|
||||||
|
Directory = directory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DirectoryInfo Directory { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
47
Voile/Persistence/DirectoryStorageFactory.cs
Normal file
47
Voile/Persistence/DirectoryStorageFactory.cs
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
using skyscraper8.Skyscraper.Scraper.Storage;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Voile.Common.Reflection;
|
||||||
|
using Voile.Patchouli.Data;
|
||||||
|
using Voile.Patchouli.Reflection;
|
||||||
|
|
||||||
|
namespace Voile.Persistence
|
||||||
|
{
|
||||||
|
[VoilePlugin]
|
||||||
|
[VoilePluginId(1)]
|
||||||
|
[Voile.Patchouli.Reflection.DisplayName("File-system folder")]
|
||||||
|
class DirectoryStorageFactory : IVoileDataStorageFactory, IVoileObjectStorageFactory
|
||||||
|
{
|
||||||
|
public override bool Equals(object? obj)
|
||||||
|
{
|
||||||
|
DirectoryStorageFactory dsf = obj as DirectoryStorageFactory
|
||||||
|
if (dsf == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return dsf.Directory.Equals(this.Directory);
|
||||||
|
}
|
||||||
|
|
||||||
|
IVoileDataStorage IVoileDataStorageFactory.CreateDataStorage()
|
||||||
|
{
|
||||||
|
return new DirectoryStorage(Directory);
|
||||||
|
}
|
||||||
|
|
||||||
|
IVoileObjectStorage IVoileObjectStorageFactory.CreateObjectStorage()
|
||||||
|
{
|
||||||
|
return new DirectoryStorage(Directory);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsEquipvalentDataStorageFactory(IVoileDataStorageFactory dataStorageFactory)
|
||||||
|
{
|
||||||
|
return Equals(dataStorageFactory);
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.DisplayName("Path")]
|
||||||
|
[System.ComponentModel.Description("The Path in which data should be stored.")]
|
||||||
|
public DirectoryInfo Directory { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Voile/README.md
Normal file
11
Voile/README.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# DataStorage Ids
|
||||||
|
|
||||||
|
|Id|Name |
|
||||||
|
|--|----------------|
|
||||||
|
|1 |DirectoryStorage|
|
||||||
|
|
||||||
|
# ObjectStorage Ids
|
||||||
|
|
||||||
|
|Id|Name |
|
||||||
|
|--|----------------|
|
||||||
|
|1 |DirectoryStorage|
|
||||||
@ -22,6 +22,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\skyscraper8\skyscraper8\skyscraper8.csproj" />
|
<ProjectReference Include="..\..\skyscraper8\skyscraper8\skyscraper8.csproj" />
|
||||||
<ProjectReference Include="..\Sophia.Net.DRM\Sophia.Net.DRM.csproj" />
|
<ProjectReference Include="..\Sophia.Net.DRM\Sophia.Net.DRM.csproj" />
|
||||||
|
<ProjectReference Include="..\Voile.Patchouli\Voile.Patchouli.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user