예제 #1
0
        void ExecuteCommand(object param)
        {
            Command bindedCmd = currentState;
            bool    strValid  = true;

            if (string.IsNullOrEmpty(PathExe))
            {
                MessageBox.Show("Error.Path to instarm.exe is empty!");
                strValid = false;
            }
            if (string.IsNullOrEmpty(PathExe))
            {
                MessageBox.Show("Error.Path to instagram.db is empty!");
                strValid = false;
            }
            if (strValid)
            {
                string workPath = PathDb.Replace(@"\instagram.db", "");
                foreach (var obj in ProfilesList)
                {
                    if (obj.IsSelected)
                    {
                        Process p = new Process();
                        p.StartInfo.FileName         = PathExe;
                        p.StartInfo.Arguments        = GenerateCmd(bindedCmd, obj.name);
                        p.StartInfo.WorkingDirectory = workPath;
                        p.Start();
                    }
                }
            }
        }
 public void Cleanup(PathDb dbHelper)
 {
     dbHelper.Db.Dispose();
     File.Delete(dbHelper.Path);
 }