Exemple #1
0
 public static void Save()
 {
     if (_xmldoc == null)
     {
         return;
     }
     if (_xmlUserHabits != null)
     {
         _xmlUserHabits.SetAttribute("MainWindow_Width", MainWindow_Width);
         _xmlUserHabits.SetAttribute("MainWindow_Height", MainWindow_Height);
         _xmlUserHabits.SetAttribute("MainWindow_Maximize", MainWindow_Maximize);
         _xmlUserHabits.SetAttribute("Home_IsPaneOpen", Home_IsPaneOpen);
         _xmlUserHabits.SetAttribute("HomeRemoteTreeView_Width", HomeRemoteTreeView_Width);
         _xmlUserHabits.SetAttribute("FinalCheckDateTime", FinalCheckDateTime.ToString("yyyy.MM.dd"));
     }
     if (_xmlGeneral != null)
     {
         _xmlGeneral.SetAttribute("TrayIcon", NotifyIcon);
         _xmlGeneral.SetAttribute("NewAppDataLocation", (int)NewAppDataLocation);
     }
     if (_xmlRemoteTreeView != null)
     {
         _xmlRemoteTreeView.RemoveAll();
         foreach (var item in RemoteTreeExpand)
         {
             XmlElement xmlElement = _xmldoc.CreateElement("ExpandItem");
             xmlElement.SetAttribute("uuid", item);
             _xmlRemoteTreeView.AppendChild(xmlElement);
         }
     }
     _xmldoc?.Save(_xmlFile);
 }
Exemple #2
0
 public static void Save()
 {
     _xmlUserHabits.SetAttribute("MainWindow_Width", MainWindow_Width.ToString());
     _xmlUserHabits.SetAttribute("MainWindow_Height", MainWindow_Height.ToString());
     _xmlUserHabits.SetAttribute("MainWindow_Maximize", MainWindow_Maximize.ToString());
     _xmlUserHabits.SetAttribute("Home_IsPaneOpen", Home_IsPaneOpen.ToString());
     _xmlUserHabits.SetAttribute("HomeRemoteTreeView_Width", HomeRemoteTreeView_Width.ToString());
     _xmlUserHabits.SetAttribute("FinalCheckDateTime", FinalCheckDateTime.ToString("yyyy.MM.dd"));
     _xmlGeneral.SetAttribute("TrayIcon", NotifyIcon.ToString());
     _xmldoc.Save(_dataFile);
 }