private static void Main(string[] args)
		{
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);
			Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException);
			redmine = new RedmineSettings();						
			mainForm = new MainForm();
			if (args.Length > 0)
			{
				mainForm.setFilesource(args[0]);
			}
            Application.Run(mainForm);
		}
		private void createCustomField(RedmineSettings.CustomFieldDefinition definition, int index) {
			//Window
			this.Size = new System.Drawing.Size(this.Size.Width, this.Size.Height + customFieldHeight);
			
			//New Issues
			this.issueDescription.Size = new System.Drawing.Size(this.issueDescription.Size.Width, this.issueDescription.Size.Height - customFieldHeight );
			Label newIssueLabel = new System.Windows.Forms.Label();
			newIssueLabel.AutoSize = true;
			newIssueLabel.Location = new System.Drawing.Point(8, currentCustomFieldPositionNewIssue);
			newIssueLabel.Size = new System.Drawing.Size(52, 13);
			newIssueLabel.Anchor = 
					((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))));
			newIssueLabel.Text = string.Concat(definition.name, ":");
			this.tabPage1.Controls.Add(newIssueLabel);
			
			if (definition.fieldtype == RedmineSettings.CustomFieldDefinition.Fieldtype.FieldTypeList) {
				ComboBox newInputElement = new System.Windows.Forms.ComboBox();
				newInputElement.Anchor = 
					((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
				newInputElement.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
				newInputElement.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
				newInputElement.FormattingEnabled = true;
				newInputElement.Location = new System.Drawing.Point(65, currentCustomFieldPositionNewIssue);
				newInputElement.Size = new System.Drawing.Size(479, 21);
				newInputElement.Items.AddRange(definition.values);
				
				if (!definition.defaultValue.Equals("")) {
					newInputElement.SelectedIndex = newInputElement.FindStringExact(definition.defaultValue);
				}
				
				this.tabPage1.Controls.Add(newInputElement);
				customFieldsNew[index] = newInputElement;
			} else {
				TextBox newInputElement = new System.Windows.Forms.TextBox();
				newInputElement.Anchor = 
					((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
				newInputElement.Location = new System.Drawing.Point(65, currentCustomFieldPositionNewIssue);
				newInputElement.Size = new System.Drawing.Size(479, 20);
				
				newInputElement.Text = definition.defaultValue;
				this.tabPage1.Controls.Add(newInputElement);
				customFieldsNew[index] = newInputElement;
			}
			
			currentCustomFieldPositionNewIssue += customFieldHeight;
			
			
			//Update Issues
			this.issueNote.Size = new System.Drawing.Size(this.issueNote.Size.Width, this.issueNote.Size.Height - customFieldHeight );
			Label updateIssueLabel = new System.Windows.Forms.Label();
			updateIssueLabel.AutoSize = true;
			updateIssueLabel.Location = new System.Drawing.Point(8, currentCustomFieldPositionUpdateIssue);
			updateIssueLabel.Size = new System.Drawing.Size(52, 13);
			updateIssueLabel.Anchor = 
					((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))));
			updateIssueLabel.Text = string.Concat(definition.name, ":");
			this.tabPage2.Controls.Add(updateIssueLabel);
			
			if (definition.fieldtype == RedmineSettings.CustomFieldDefinition.Fieldtype.FieldTypeList) {
				ComboBox updateInputElement = new System.Windows.Forms.ComboBox();
				updateInputElement.Anchor = 
					((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
				updateInputElement.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
				updateInputElement.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
				updateInputElement.FormattingEnabled = true;
				updateInputElement.Location = new System.Drawing.Point(65, currentCustomFieldPositionUpdateIssue);
				updateInputElement.Size = new System.Drawing.Size(479, 21);
				updateInputElement.Items.AddRange(definition.values);
				this.tabPage2.Controls.Add(updateInputElement);
				customFieldsUpdate[index] = updateInputElement;
			} else {
				TextBox updateInputElement = new System.Windows.Forms.TextBox();
				updateInputElement.Anchor = 
					((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
				updateInputElement.Location = new System.Drawing.Point(65, currentCustomFieldPositionUpdateIssue);
				updateInputElement.Size = new System.Drawing.Size(479, 20);
				this.tabPage2.Controls.Add(updateInputElement);
				customFieldsUpdate[index] = updateInputElement;
			}
			
			currentCustomFieldPositionUpdateIssue += customFieldHeight;
			/*
			
			this.issueNote = new System.Windows.Forms.TextBox();
			// 
			// issueNote
			// 
			this.issueNote.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
			| System.Windows.Forms.AnchorStyles.Left) 
			| System.Windows.Forms.AnchorStyles.Right)));
			this.issueNote.Location = new System.Drawing.Point(9, 238);
			this.issueNote.Multiline = true;
			this.issueNote.Name = "issueNote";
			this.issueNote.Size = new System.Drawing.Size(526, 65);
			this.issueNote.TabIndex = 15;
			this.tabPage2.Controls.Add(this.issueNote);
			;*/
		}