Exemple #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");
 }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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");
 }