Beispiel #1
0
 public static void ExecuteCmd(KonfigurationCmd cmdConf)
 {
     try
     {
         Process          proThis = new Process();
         ProcessStartInfo psiThis = new ProcessStartInfo();
         psiThis.FileName         = cmdConf.cmdCommand;
         psiThis.Arguments        = cmdConf.cmdArguments;
         psiThis.WorkingDirectory = cmdConf.cmdWorkingDir;
         proThis.StartInfo        = psiThis;
         proThis.Start();
         proThis.WaitForExit();
     }
     catch (System.InvalidOperationException e)
     {
         if (e.Source != null)
         {
             MessageBox.Show("Cmd Konfiguration ungültig \n Command: " + cmdConf.cmdCommand +
                             "\n Arguments: " + cmdConf.cmdArguments +
                             "\n WorkingDir: " + cmdConf.cmdWorkingDir,
                             "Execute Cmd", MessageBoxButton.OK, MessageBoxImage.Asterisk);
             Debug.WriteLine("System.InvalidOperationException message: {0}", e.Message);
         }
     }
 }
 public KonfigurationParameter(KonfigurationIx ixConf, KonfigurationOneNote onenoteConf, KonfigurationCmd cmdGitPullAllConf, KonfigurationCmd cmdEloPullUnittestConf, KonfigurationCmd cmdEloPrepareConf, KonfigurationCmd cmdEloPullPackageConf)
 {
     this._ixConf                 = ixConf;
     this._onenoteConf            = onenoteConf;
     this._cmdGitPullAllConf      = cmdGitPullAllConf;
     this._cmdEloPullUnittestConf = cmdEloPullUnittestConf;
     this._cmdEloPrepareConf      = cmdEloPrepareConf;
     this._cmdEloPullPackageConf  = cmdEloPullPackageConf;
 }
 public KonfigurationParameter()
 {
     this._ixConf                 = new KonfigurationIx();
     this._onenoteConf            = new KonfigurationOneNote();
     this._cmdGitPullAllConf      = new KonfigurationCmd();
     this._cmdEloPullUnittestConf = new KonfigurationCmd();
     this._cmdEloPrepareConf      = new KonfigurationCmd();
     this._cmdEloPullPackageConf  = new KonfigurationCmd();
 }
        public KonfigurationParameter(XmlNode profileNode)
        {
            this._ixConf                 = new KonfigurationIx();
            this._onenoteConf            = new KonfigurationOneNote();
            this._cmdGitPullAllConf      = new KonfigurationCmd();
            this._cmdEloPullUnittestConf = new KonfigurationCmd();
            this._cmdEloPrepareConf      = new KonfigurationCmd();
            this._cmdEloPullPackageConf  = new KonfigurationCmd();

            foreach (XmlNode subNode in profileNode.ChildNodes)
            {
                string cmdName = "";

                switch (subNode.Name)
                {
                case "ixConf":
                    _ixConf = new KonfigurationIx(subNode);
                    break;

                case "onenoteConf":
                    _onenoteConf = new KonfigurationOneNote(subNode);
                    break;

                case "cmdConf":
                    foreach (XmlNode subSubNode in subNode.ChildNodes)
                    {
                        if (subSubNode.Name == "#text")
                        {
                            cmdName = subSubNode.InnerText;
                        }
                    }

                    switch (cmdName)
                    {
                    case "gitPullAll":
                        _cmdGitPullAllConf = new KonfigurationCmd(subNode);
                        break;

                    case "eloPullUnittest":
                        _cmdEloPullUnittestConf = new KonfigurationCmd(subNode);
                        break;

                    case "eloPrepare":
                        _cmdEloPrepareConf = new KonfigurationCmd(subNode);
                        break;

                    case "eloPullPackage":
                        _cmdEloPullPackageConf = new KonfigurationCmd(subNode);
                        break;
                    }
                    break;
                }
            }
        }