Exemple #1
0
        void Window_Loaded(object sender, RoutedEventArgs e)
        {
            args = Environment.GetCommandLineArgs();
            gitCommand.DoEvents(this.Dispatcher);
            if (args.Count() > 0)
            {
                this.Title = "Agregando archivos al indice";
                gitCommand       g      = new gitCommand(args[1].ToString());
                RepositoryStatus status = g.getStatus();

                var estados = from y in status
                              where y.State == FileStatus.Untracked
                              select y;

                int total = estados.Count();
                if (total == 0)
                {
                    this.Close();
                }
                else
                {
                    lblEstado.Content += total.ToString();
                }
            }
        }
        void button1_Click(object sender, RoutedEventArgs e)
        {
            gitCommand g = new gitCommand(args[1].ToString());
                RepositoryStatus status =g.getStatus();

                var estados = from y in status
                    where y.State == FileStatus.Untracked
                    select y;

                int total = estados.Count();
                int i=0;

                foreach (var archivo in estados)
                {
                    lblEstado.Content = i.ToString() + " de " +  total.ToString();
                    gitCommand.DoEvents(this.Dispatcher);
                    if(archivo.State == FileStatus.Untracked){
                        g.git_trackFile(archivo.FilePath);
                    }
                    i++;
                }
                this.Close();
        }
Exemple #3
0
        void button1_Click(object sender, RoutedEventArgs e)
        {
            gitCommand       g      = new gitCommand(args[1].ToString());
            RepositoryStatus status = g.getStatus();

            var estados = from y in status
                          where y.State == FileStatus.Untracked
                          select y;

            int total = estados.Count();
            int i     = 0;

            foreach (var archivo in estados)
            {
                lblEstado.Content = i.ToString() + " de " + total.ToString();
                gitCommand.DoEvents(this.Dispatcher);
                if (archivo.State == FileStatus.Untracked)
                {
                    g.git_trackFile(archivo.FilePath);
                }
                i++;
            }
            this.Close();
        }
        void Window_Loaded(object sender, RoutedEventArgs e)
        {
            args=Environment.GetCommandLineArgs();
             gitCommand.DoEvents(this.Dispatcher);
             if(args.Count()>0)
             {
                 this.Title="Agregando archivos al indice";
                 gitCommand g = new gitCommand(args[1].ToString());
                RepositoryStatus status =g.getStatus();

                var estados = from y in status
                    where y.State == FileStatus.Untracked
                    select y;

                int total = estados.Count();
                if(total ==0){
                    this.Close();
                }
                else lblEstado.Content += total.ToString();

             }
        }