Example #1
0
        private void bmptestBump(object sender, RoutedEventArgs e)
        {
            json = getTools.openJSON((Projects.SelectedItem as User).Name);
            help = getTools.getjsonVersion(json);

            int choice = (int)options.EnumProperty;

            if (choice == 0)
            {
                System.Windows.MessageBox.Show("Trivial Bump");
            }
            else if (choice == 1)
            {
                System.Windows.MessageBox.Show("Minor Bump");
            }
            else if (choice == 2)
            {
                System.Windows.MessageBox.Show("Major Bump");
            }
            else if (choice == 3)
            {
                System.Windows.MessageBox.Show("Rewrite Bump");
            }
            help.toArray();
            help.bumpTrivial();
            help.toString();
            List <string> test = getTools.GetDirectories(selected);

            try { help2 = getTools.bumpChildrenTrivial((Projects.SelectedItem as User).Name); } catch (System.IO.DirectoryNotFoundException) { Console.WriteLine(); }
            getTools.writejsonVersion(help);
            getTools.writechildVersion(help2);
            getTools.writeOtherDep(json, selected);
            //}
            // getTools.verify((Projects.SelectedItem as User).Name);
        }
Example #2
0
        private void allkidsBump(object sender, RoutedEventArgs e)
        {
            json = getTools.openJSON((Projects.SelectedItem as User).Name);
            help = getTools.getjsonVersion(json);
            help.bumpTrivial();

            obj.Name = help.getVersion();
        }
Example #3
0
        /// <summary>
        /// Bumps all of the children contained in a parent directory.  Does not write anything to file.
        /// </summary>
        /// <param name="filename">Path to the parent directory</param>
        /// <returns>Returns a dictionary containing the paths to the children and their corresponding bumped versions.</returns>
        public Dictionary <string, string> bumpChildrenTrivial(string filename)
        {
            Dictionary <string, string> kids = new Dictionary <string, string>();
            List <string> files = GetDirectories(filename);
            myFile        file  = new myFile();

            foreach (string child in files)
            {
                file = openAssemblyInfo(child);
                Version little = getchildVersion(file);
                little.bumpTrivial();
                kids.Add(little.getName(), little.getVersion());
            }

            return(kids);
        }
Example #4
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            int choice = (int)options.EnumProperty;

            json = getTools.openJSON((Projects.SelectedItem as User).Name);
            help = getTools.getjsonVersion(json);
            List <string> direcs  = getTools.GetDirectories(selected);
            StringBuilder message = new StringBuilder(@"Are you sure you would like to bump ");

            message.Append((Projects.SelectedItem as User).Name);
            message.Append(" to version ");


            if (choice == 0)
            {
                help.bumpTrivial(); obj.Name = help.getVersion();
            }
            else if (choice == 1)
            {
                help.bumpMinor(); obj.Name = help.getVersion();
            }
            else if (choice == 2)
            {
                help.bumpMajor(); obj.Name = help.getVersion();
            }
            else if (choice == 3)
            {
                help.bumpRewrite(); obj.Name = help.getVersion();
            }

            message.Append(help.getVersion() + "?");
            MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show(message.ToString(), "Bump Confirmation", System.Windows.MessageBoxButton.YesNo);

            if (messageBoxResult == MessageBoxResult.Yes)
            {
            }
            else
            {
                help = getTools.getjsonVersion(json); obj.Name = help.getVersion();
            }
        }