Example #1
0
		/// <summary>
		/// Allows editing of xml definitions, using the vsix editor form.
		/// </summary>
		private void  EditXml ( TextBox  input, TextBox  output )
		   {
			string				text		=  input. Text ;
			DialogResult			status ;
			WutheringCommentsEditor		editor		=  new WutheringCommentsEditor ( text ) ;

			status	=  editor. ShowDialog ( ) ;
			MessageBox.Show ( status.ToString ( ) ) ;

			editor. Dispose ( ) ;
		    }
		/// <summary>
		/// Edits the comments definitions file.
		/// </summary>
		private void  EditButton_Click  ( object  sender, EventArgs  e )
		   {
			if  ( String. IsNullOrWhiteSpace ( FilenameTextbox. Text ) )
			   {
				if  ( MessageBox. Show ( "You can only edit comment definitions coming from an external file " +
							 "but none has been specified so far; do you want to generate one from embedded definitions ?", 
							 "Question",
							 MessageBoxButtons. YesNo )  ==  DialogResult. No )
					return ;

					GenerateButton_Click ( null, null ) ;
			    }

			WutheringCommentsEditor		editor		=  new WutheringCommentsEditor ( FilenameTextbox. Text ) ;

			editor. ShowDialog ( ) ;
			LoadDefinitions ( ) ;
		    }