Click here to Skip to main content
15,895,256 members
Articles / Programming Languages / C#

SVN Shelve

Rate me:
Please Sign up or sign in to vote.
3.53/5 (9 votes)
23 Sep 2008CPOL5 min read 55.7K   423   25  
A simple utility to shelve your projects under SVN.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using SvnShelve.Model;

namespace SvnShelve.Forms
{
    public partial class LoginForm : Form
    {
        public LoginForm()
        {
            InitializeComponent();
        }

        private void _cancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void _ok_Click(object sender, EventArgs e)
        {
            try
            {
                if (_userName.Text.Trim().Length == 0 || _password.Text.Trim().Length == 0)
                {
                    throw new Exception("Invalid format for user name or password");
                }

                SVN.UserName = _userName.Text.Trim();
                SVN.Password = _password.Text.Trim();
                Properties.Settings.Default.Save();
                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        private void LoginForm_Load(object sender, EventArgs e)
        {
            _userName.Text = SVN.UserName;
            _password.Text = SVN.Password;
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) VORLAN Group, Inc.
United States United States
writing code for the past 20 years, and now decided to share some thoughts. Smile | :)
Also known as Oleg Vorkunov.

Comments and Discussions