예제 #1
0
 public static ConfigFileProcessor GetInstance(string filepath)
 {
     if (_instance == null)
     {
         _instance = new ConfigFileProcessor(filepath);
     }
     return(_instance);
 }
 public void RunCommand(string cmd)
 {
     if (cmd.StartsWith("Wait"))
     {
         Log("You cannot run: " + cmd);
     }
     else
     {
         Log("Executing user's command: " + cmd);
         ConfigFileProcessor.GetInstance(null).ParseCommand(cmd);
     }
 }
 public void SetupStepByStep(Form form, Delegate toUpdateUi, Delegate toDisableStepByStep,
                             Delegate toPreparePBar, Delegate toIncrementProgBar, string configFilePath = @"config.config")
 {
     if (!_loggerOnline)
     {
         _logger = new Log(form, toUpdateUi);
         RemotingServices.Marshal(_logger, "Log", typeof(ILogUpdate));
         _loggerOnline = true;
     }
     ConfigFileProcessor.GetInstance(configFilePath)
     .ExecuteStepByStep(form, toUpdateUi, toDisableStepByStep, toPreparePBar, toIncrementProgBar);
 }