Beispiel #1
0
 private void LoadPackageData()
 {
     if (File.Exists(SoftwareDataFile))
     {
         _softwareData = GinSerializer.Deserialize <SoftwareData>(SoftwareDataFile);
         foreach (var item in _softwareData.InstallationParameters)
         {
             _context.SaveResult(item.Name, item.Value, true);
         }
         _context.Log.AddLogInformation("Загружен SoftwareData");
     }
     if (String.IsNullOrEmpty(PackageDataFile) || !File.Exists(PackageDataFile))
     {
         return;
     }
     _context.Log.AddLogInformation("PackageData ожидается в '" + PackageDataFile + "'");
     _packageData     = GinSerializer.Deserialize <PackageData>(PackageDataFile);
     _alreadyExecuted = true;
     _context.Log.AddLogInformation("Загружен PackageData");
 }
Beispiel #2
0
        private void SaveCurrentPackageData()
        {
            string userName = "******";

            if (WindowsIdentity.GetCurrent() != null)
            {
                userName = WindowsIdentity.GetCurrent().Name;
            }
            var         instParameters = _context.GetInstallationParameters();
            PackageData data           = new PackageData()
            {
                InstallationDate       = DateTime.Now,
                InstallationUserName   = userName,
                InstallationParameters = instParameters
            };

            GinSerializer.Serialize(data, PackageDataFile);
            SoftwareData dataSoftware = new SoftwareData()
            {
                InstallationParameters = instParameters
            };

            GinSerializer.Serialize(dataSoftware, SoftwareDataFile);
        }
Beispiel #3
0
        private void SaveCurrentPackageData()
        {
            string userName = "******";
            if (WindowsIdentity.GetCurrent() != null)
            {
                userName = WindowsIdentity.GetCurrent().Name;
            }
            var instParameters = _context.GetInstallationParameters();
            PackageData data = new PackageData()
            {
                InstallationDate = DateTime.Now,
                InstallationUserName = userName,
                InstallationParameters = instParameters
            };
            GinSerializer.Serialize(data, PackageDataFile);
            SoftwareData dataSoftware = new SoftwareData()
            {
                InstallationParameters = instParameters
            };

            GinSerializer.Serialize(dataSoftware, SoftwareDataFile);
        }
Beispiel #4
0
 private void LoadPackageData()
 {
     if (File.Exists(SoftwareDataFile))
     {
         _softwareData = GinSerializer.Deserialize<SoftwareData>(SoftwareDataFile);
         foreach (var item in _softwareData.InstallationParameters)
         {
             _context.SaveResult(item.Name, item.Value, true);
         }
         _context.Log.AddLogInformation("Загружен SoftwareData");
     }
     if (String.IsNullOrEmpty(PackageDataFile) || !File.Exists(PackageDataFile))
     {
         return;
     }
     _context.Log.AddLogInformation("PackageData ожидается в '" + PackageDataFile + "'");
     _packageData = GinSerializer.Deserialize<PackageData>(PackageDataFile);
     _alreadyExecuted = true;
     _context.Log.AddLogInformation("Загружен PackageData");
 }