Как сохранить профиль с переменными на C#

Serjio Leone

Client
Joined
Sep 20, 2017
Messages
115
Reaction score
84
Points
28
Доброго времени! Подскажите как сохранить профиль и чтоб сохранились переменные проекта тоже?

В документации написано:
void Save(
string path,
bool saveProxy,
bool savePlugins,
bool saveLocalStorage,
bool saveTimezone,
bool saveGeoposition,
bool saveSuperCookie,
bool saveFonts,
bool saveWebRtc,
bool saveIndexedDb,
string[] saveVariables
)

не пойму как и в каком формате записывать сюда string[] saveVariables

У меня идет вот такой код:
// сохраняем профиль
string PathProfile = project.Directory+ @"\Profile\"+ project.Variables["Name"].Value+ ".zpprofile";
project.Profile.Save(PathProfile, true, true, true, true, true, true, false, true, true,???);

 
  • Thank you
Reactions: artur23

artur23

Client
Joined
Apr 14, 2014
Messages
202
Reaction score
15
Points
18
Согласен - будет хорошо, если на C# это сделать. Кто-нибудь в курсе как?
 

artur23

Client
Joined
Apr 14, 2014
Messages
202
Reaction score
15
Points
18
Доброго времени! Подскажите как сохранить профиль и чтоб сохранились переменные проекта тоже?

В документации написано:
void Save(
string path,
bool saveProxy,
bool savePlugins,
bool saveLocalStorage,
bool saveTimezone,
bool saveGeoposition,
bool saveSuperCookie,
bool saveFonts,
bool saveWebRtc,
bool saveIndexedDb,
string[] saveVariables
)

не пойму как и в каком формате записывать сюда string[] saveVariables

У меня идет вот такой код:
// сохраняем профиль
string PathProfile = project.Directory+ @"\Profile\"+ project.Variables["Name"].Value+ ".zpprofile";
project.Profile.Save(PathProfile, true, true, true, true, true, true, false, true, true,???);
https://artstroy.net/s-operacii-s-profilem/ - нашел решение тут.
 
  • Thank you
Reactions: Serjio Leone

zarufakis

Client
Joined
Mar 22, 2019
Messages
2,037
Reaction score
1,460
Points
113
Доброго времени! Подскажите как сохранить профиль и чтоб сохранились переменные проекта тоже?
На форуме есть решение. главное воспользоваться поиском. Я делаю так:

C#:
string path = Path.Combine(project.Variables["profile"].Value); // Путь
project.Profile.Save(path, false, true, false, false, false, true, true, true, true, saveVariables: new[]{"email_login", "email_pass", "login", "vopros"}); // Сохранить
 

Users Who Are Viewing This Thread (Total: 1, Members: 0, Guests: 1)