Пример #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> bumpChildrenMinor(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.bumpMinor();
                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();
            }
        }