Exemplo n.º 1
0
    public static void ResetConfiguration()
    {
        string currentSettingsFile = Application.StartupPath + "\\Plugins\\Settings\\" + Name + ".xml";
        var    currentSetting      = new MyPluginSettings();

        currentSetting.ToForm();
        currentSetting.Save(currentSettingsFile);
    }
Exemplo n.º 2
0
    // ****************************************************************************************************************************************
    // Bouton de reset des configurations du pluggin
    public static void ResetConfiguration()
    {
        // Affecte le fichier de config XML à la variable
        string currentSettingsFile = Application.StartupPath + "\\Plugins\\Settings\\" + Name + "_" + ObjectManager.Me.Name + ".xml";
        var    currentSetting      = new MyPluginSettings();

        // Reset les champs
        currentSetting.ToForm();
        // Sauvegarde la config
        currentSetting.Save(currentSettingsFile);
    }
Exemplo n.º 3
0
    public static void ShowConfiguration()
    {
        string currentSettingsFile = Application.StartupPath + "\\Plugins\\Settings\\" + Name + ".xml";
        var    currentSetting      = new MyPluginSettings();

        if (File.Exists(currentSettingsFile))
        {
            currentSetting = Settings.Load <MyPluginSettings>(currentSettingsFile);
        }
        currentSetting.ToForm();
        currentSetting.Save(currentSettingsFile);
    }
Exemplo n.º 4
0
    // Bouton afficher la configuration du pluggin
    public static void ShowConfiguration()
    {
        // Affecte le fichier de config XML à la variable
        string currentSettingsFile = Application.StartupPath + "\\Plugins\\Settings\\" + Name + "_" + ObjectManager.Me.Name + ".xml";
        var    currentSetting      = new MyPluginSettings();

        // Si le fichier existe
        if (File.Exists(currentSettingsFile))
        {
            // Charge les paramètres
            currentSetting = Settings.Load <MyPluginSettings>(currentSettingsFile);
        }
        currentSetting.ToForm();
        // Sauvegarde la config
        currentSetting.Save(currentSettingsFile);
    }