ssg: WeblogConfigurationWizardPanelStaticSiteConfig: implement IAccountBasicInfoProvider, return a Credentials with site configuration
This commit is contained in:
parent
7323cc6e9e
commit
75bbefe40d
|
@ -18,12 +18,14 @@ using OpenLiveWriter.Localization;
|
||||||
using OpenLiveWriter.Localization.Bidi;
|
using OpenLiveWriter.Localization.Bidi;
|
||||||
using OpenLiveWriter.PostEditor.BlogProviderButtons;
|
using OpenLiveWriter.PostEditor.BlogProviderButtons;
|
||||||
|
|
||||||
|
using StaticSiteClient = OpenLiveWriter.BlogClient.Clients.StaticSiteClient;
|
||||||
|
|
||||||
namespace OpenLiveWriter.PostEditor.Configuration.Wizard
|
namespace OpenLiveWriter.PostEditor.Configuration.Wizard
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Summary description for WelcomeToBlogControl.
|
/// Summary description for WelcomeToBlogControl.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class WeblogConfigurationWizardPanelStaticSiteConfig : WeblogConfigurationWizardPanel
|
internal class WeblogConfigurationWizardPanelStaticSiteConfig : WeblogConfigurationWizardPanel, IAccountBasicInfoProvider
|
||||||
{
|
{
|
||||||
private System.Windows.Forms.Label labelLocalSitePath;
|
private System.Windows.Forms.Label labelLocalSitePath;
|
||||||
private System.Windows.Forms.Label labelPostsPath;
|
private System.Windows.Forms.Label labelPostsPath;
|
||||||
|
@ -141,6 +143,10 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard
|
||||||
set { textBoxPublishCmd.Text = value; }
|
set { textBoxPublishCmd.Text = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string HomepageUrl { get; set; } = "http://localhost";
|
||||||
|
|
||||||
|
public bool SavePassword { get; set; }
|
||||||
|
|
||||||
public bool BuildEnabled
|
public bool BuildEnabled
|
||||||
{
|
{
|
||||||
get => checkBoxEnableBuilding.Checked;
|
get => checkBoxEnableBuilding.Checked;
|
||||||
|
@ -157,18 +163,30 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
// TODO
|
// Create the blog creds for entered data
|
||||||
return new TemporaryBlogCredentials();
|
// FIXME Doesn't exactly make sense to store the config into the credentials, should it be stored somewhere else?
|
||||||
|
var creds = new TemporaryBlogCredentials();
|
||||||
|
// Set username to Local Site Path
|
||||||
|
creds.Username = LocalSitePath;
|
||||||
|
creds.SetCustomValue(StaticSiteClient.CONFIG_POSTS_PATH, PostsPath);
|
||||||
|
creds.SetCustomValue(StaticSiteClient.CONFIG_PAGES_PATH, PagesPath);
|
||||||
|
creds.SetCustomValue(StaticSiteClient.CONFIG_BUILD_COMMAND, BuildCmd);
|
||||||
|
creds.SetCustomValue(StaticSiteClient.CONFIG_PUBLISH_COMMAND, PublishCmd);
|
||||||
|
return creds;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
// TODO
|
LocalSitePath = value.Username;
|
||||||
|
PostsPath = value.GetCustomValue(StaticSiteClient.CONFIG_POSTS_PATH);
|
||||||
|
PagesPath = value.GetCustomValue(StaticSiteClient.CONFIG_PAGES_PATH);
|
||||||
|
BuildCmd = value.GetCustomValue(StaticSiteClient.CONFIG_BUILD_COMMAND);
|
||||||
|
PublishCmd = value.GetCustomValue(StaticSiteClient.CONFIG_PUBLISH_COMMAND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsDirty(TemporaryBlogSettings settings)
|
public bool IsDirty(TemporaryBlogSettings settings)
|
||||||
{
|
{
|
||||||
return true; // TODO
|
return false; // TODO
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -392,5 +410,7 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard
|
||||||
textBoxLocalSitePath.Text = folderBrowserDialog.SelectedPath;
|
textBoxLocalSitePath.Text = folderBrowserDialog.SelectedPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue