Example #1
0
 public void CopySettings(ConsoleSettings outputSettings)//via output
 {
     try
     {
         outputSettings.Name        = Name;
         outputSettings.ColorID     = ColorID;
         outputSettings.NumberID    = NumberID;
         outputSettings.EditEnabled = EditEnabled;
     } catch (Exception e)
     { MessageLogManager.LogMessage(""); }
 }
Example #2
0
 public void CopyFrom(ConsoleProperties inputSettings)
 {
     try
     {
         EndTime          = inputSettings.EndTime;
         PrePaid          = inputSettings.PrePaid;
         PrePaidTime      = inputSettings.PrePaidTime;
         StartTime        = inputSettings.StartTime;
         Status           = inputSettings.Status;
         TimeElapsed      = inputSettings.TimeElapsed;
         TotalConsumption = inputSettings.TotalConsumption;
     } catch (Exception e)
     { MessageLogManager.LogMessage("PBM  - CP ::::> Error copy failed: " + e.Message); }
 }
 private object Load(string fileName)
 {
     try
     {
         using (fs = new FileStream(fileName, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite))
         {
             Stream   stream       = fs;
             FileInfo settingsFile = new FileInfo(fileName);
             if (settingsFile.Exists)
             {
                 return(bf.Deserialize(stream));
             }
         }
     } catch (Exception e)
     {
         MessageLogManager.LogMessage("");
     }
     return(null);
 }