i have used @Droidz profile Setting backup.cs
using System;
using System.IO;
using robotManager.Helpful;
using wManager;
using wManager.Plugin;
using System.Drawing;
using System.Windows.Forms;
public class Main : IPlugin
{
private bool _isLaunched;
public void Initialize()
{}
public void Dispose()
{}
public void Settings()
{
var f = new FormSettingsBackup();
f.ShowDialog();
}
}
public class FormSettingsBackup : Form
{
public FormSettingsBackup()
{
InitializeComponent();
Directory.CreateDirectory(PathFolder);
}
string PathFolder { get { return Application.StartupPath + @"\Plugins\Settings Backup\"; } }
private void ButtonLoadClick(object sender, EventArgs e)
{
var file = Others.DialogBoxOpenFile(PathFolder, "General Settings file (*.xml)|*.xml");
if (!string.IsNullOrWhiteSpace(file))
{
if (File.Exists(file) && File.ReadAllText(file).Contains("</wManagerSetting>"))
{
var s = XmlSerializer.Deserialize<wManagerSetting>(file);
if (s != null)
{
wManagerSetting.CurrentSetting = s;
wManagerSetting.CurrentSetting.Save();
Logging.Write("[SettingsBackup] New setting loaded: " + file);
}
else
{
MessageBox.Show("Cannot load selected file.");
Logging.WriteError("[SettingsBackup] Cannot load selected file: " + file);
}
}
else
{
MessageBox.Show("Selected file is not valid.");
Logging.WriteError("[SettingsBackup] Selected file is not valid: " + file);
}
}
}
private void ButtonSaveClick(object sender, EventArgs e)
{
var file = Others.DialogBoxSaveFile(PathFolder, "General Settings file (*.xml)|*.xml");
if (!string.IsNullOrWhiteSpace(file))
{
var s = XmlSerializer.Serialize(file, wManagerSetting.CurrentSetting);
if (s)
{
Logging.Write("Setting saved: " + file);
}
else
{
MessageBox.Show("Cannot save setting.");
Logging.WriteError("[SettingsBackup] Cannot save setting: " + file);
}
}
}
#region FORM
private void InitializeComponent()
{
SuspendLayout();
//
// buttonLoad
//
var buttonLoad = new Button
{
Location = new Point(12, 12),
Size = new Size(151, 23),
Text = "Load settings",
UseVisualStyleBackColor = true
};
buttonLoad.Click += ButtonLoadClick;
//
// buttonSave
//
var buttonSave = new Button
{
Location = new Point(12, 41),
Size = new Size(151, 23),
Text = "Save settings",
UseVisualStyleBackColor = true
};
buttonSave.Click += ButtonSaveClick;
//
// Form
//
AutoScaleDimensions = new SizeF(6F, 13F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(175, 76);
Controls.Add(buttonSave);
Controls.Add(buttonLoad);
FormBorderStyle = FormBorderStyle.FixedToolWindow;
Name = "Form1";
ShowIcon = false;
Text = "Settings Backup";
TopMost = true;
ResumeLayout(false);
}
#endregion FORM
}
but this plugin not back up the other settings like HMP. @Matenia
everytime when i create a new character i have to set the HMP once. its really anonying.
so is there a way to edite this profile to make it save the HMP default setting too?
then i just need to click a button then all set.
thanks for advance.
the settings about HMP profile name: CustomPlugin-Master-xxx.Nethergarde.xml
<?xml version="1.0" encoding="utf-8"?>
<PluginSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<TransactionId>123456789</TransactionId>
<AutoEquipBlacklist>
<int>7005</int>
<int>7005</int>
<int>7005</int>
<int>7005</int>
</AutoEquipBlacklist>
<FirstAid>false</FirstAid>
<TrainFirstAid>false</TrainFirstAid>
<Food>false</Food>
<Drink>false</Drink>
<BlackListIds />
<Looting>false</Looting>
<Skinning>false</Skinning>
<TrainingLevels />
<TrainerBlacklist />
<EscapeElite>true</EscapeElite>
<EscapePercentMana>0</EscapePercentMana>
<EscapePercentManaEnemies>0</EscapePercentManaEnemies>
<SmartPulls>false</SmartPulls>
</PluginSettings>