예제 #1
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 main directory</param>
        /// <returns>Returns a dictionary containing the paths to the children and their corresponding bumped versions.</returns>
        public Dictionary <string, string> bumpChildrenMajor(string filename)
        {
            Dictionary <string, string> kids = new Dictionary <string, string>();
            myFile        file  = new myFile();
            List <string> files = GetDirectories(filename);

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

            return(kids);
        }
예제 #2
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();
            }
        }