public override void ApplyChanges(SmartFeedback feedback, bool execute)
        {
            new ExampleDataGenerator(feedback, execute, _command).CreateExampleData();

#if OFF
            DisplayDatabaseInfo(feedback, execute);
#endif
        }
        public static string ExecuteProcess(SmartFeedback feedback, string exePath, string args, bool execute)
        {
            string result = null;
            if (!File.Exists(exePath))
            {
                feedback.Text("file not found:" + exePath, null, feedback.ErrorColor).LineBreak();
                result = "sln file not found";
            }
            else
            {
                //    const string msBuild = @"c:\windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe";
                //    slnFullName += " /t:rebuild /verbosity:minimal "; // /verbosity:quiet  /verbosity:minimal /verbosity:detailed, 
                //    feedback.LineBreak().Text(msBuild + " " + slnFullName, null, Colors.Gray).LineBreak();
                //    if (execute)
                //    {
                //        var proc = new Process
                //        {
                //            StartInfo = new ProcessStartInfo
                //            {
                //                FileName = msBuild,
                //                Arguments = slnFullName,
                //                UseShellExecute = false,
                //                RedirectStandardOutput = true,
                //                CreateNoWindow = true
                //            }
                //        };
                //        proc.Start();
                //        string all = null;
                //        while (!proc.StandardOutput.EndOfStream)
                //        {
                //            string line = proc.StandardOutput.ReadLine();
                //            all += line + "\n";
                //            feedback.Text(line, null, Colors.Blue).LineBreak();
                //        }
                //        if (all != null && all.Contains(": error M"))
                //        {
                //            buildResult = all;
                //        }
                //        else
                //        {
                //            buildResult = null;
                //        }

                //        proc.WaitForExit();
                //        Thread.Sleep(200);

                //        feedback.Text("BUILD DONE", null, Colors.Black, true).LineBreak();

                //    }
                //    else
                //    {
                //        buildResult = null;
                //    }
            }

            return result;
        }
        public MainWindow()
        {
            MainWindowInstance = this;

            InitializeComponent();
            RegisterNavButtons();

            MyViewModel = new MainWindowViewModel();
            this.DataContext = MyViewModel;
            
            _feedback = new SmartFeedback(flowParagraph, 17, Colors.Blue).SetDefaultFontSize(11).SetDefaultColor(Colors.Black).SetDefaultFontFamily("Consolas");
        }
        public void DoBackup(SmartFeedback feedback, bool execute)
        {

            ProcessStartInfo info = new ProcessStartInfo();
            info.FileName = @"c:\program files\mongoDb 2.6 Standard\bin\mongodump";
            info.Arguments = "-d mysitterhub";

            Process p = new Process();

            p.Start();

        }
        public static void Birth(FileInfo exe, SmartFeedback feedback, bool execute)
        {
            feedback.Text("Start process '" + exe.FullName + "'");
            if (!exe.Exists)
            {
                feedback.Text(" file not found", null, feedback.ErrorColor);
            }
            else
            {
                if (execute)
                {
                    Process.Start(exe.FullName);
                    feedback.Text(" started", null, Colors.Green);
                }
            }

            feedback.LineBreak();
        }
        public static void Kill(SmartFeedback feedback, bool execute, string processName)
        {
            feedback.Text("kill process '" + processName + "'").LineBreak();

            Process p = GetProcessByName(processName);

            if (p != null)
            {
                if (execute)
                {
                    p.Kill();
                    feedback.Text(" killed", null, Colors.Green);
                }
            }
            else
            {
                feedback.Text(" no process by that name", null, Colors.Green);
            }
            feedback.LineBreak();
        }
        public void DisplayDatabaseInfo(SmartFeedback feedback, bool execute)
        {
            const string cnn = "mongodb://localhost";
            const string dataFolder = @"c:\mongodb\data";
            const string logFolder = @"c:\mongodb\log\mongod.log";
            const string mongoConfigFile = @"c:\mongodb\mongod.cfg";

            feedback.LineBreak().LineBreak().LineBreak();
            feedback.Text("STEP - Display MongoDB Info", feedback.HeaderFontSize, feedback.HeaderColor).LineBreak();
            feedback.Text("MongoDB connection:").Text(cnn, null, Colors.Blue).LineBreak();
            feedback.Text("MongoDB data folder:").Text(dataFolder, null, Colors.Blue).LineBreak();
            feedback.Text("MongoDB log folder:").Text(logFolder, null, Colors.Blue).LineBreak();
            feedback.Text("MongoDB config file:").Text(mongoConfigFile, null, Colors.Blue).LineBreak();

            string dbName = "";
            if (execute)
            {
                dbName = MongoCnn.GetDbConnection().Name;
            }
            feedback.Text("MongoDB database:").Text(dbName, null, Colors.Blue).LineBreak();
            feedback.LineBreak();
        }
 public ExampleDataGenerator(SmartFeedback feedback, bool execute, DataCommandType command)
 {
     _feedback = feedback;
     _execute = execute;
     _command = command;
 }
Exemplo n.º 9
0
 public DeployLogic(SmartFeedback feedback, bool execute)
 {
     _feedback = feedback;
     _execute = execute;
 }
Exemplo n.º 10
0
 public QuickFolderCopier(SmartFeedback feedback, bool execute)
 {
     _feedback = feedback;
     _execute = execute;
     Exclusions = new List<string>();
 }
Exemplo n.º 11
0
 public override void ApplyChanges(SmartFeedback feedback, bool execute)
 {
     new DeployLogic(feedback, execute).Deploy(_environment);
 }
Exemplo n.º 12
0
        public override void ApplyChanges(SmartFeedback feedback, bool execute)
        {
            DoBackup(feedback, execute);

        }