Пример #1
0
		public Project(string path)
		{
			this.path = path;

			movieOptions = new MovieOptions();
			classpaths = new PathCollection();
			compileTargets = new PathCollection();
			libraryAssets = new AssetCollection(this);
			compilerOptions = new CompilerOptions();
			hiddenPaths = new HiddenPathCollection();

			InputPath = "";
			OutputPath = "";
			PreBuildEvent = "";
			PostBuildEvent = "";
		}
Пример #2
0
		private void CopyCompilerOptions(CompilerOptions source, CompilerOptions dest)
		{
			dest.UseMX = source.UseMX;
			dest.Infer = source.Infer;
			dest.Strict = source.Strict;
			dest.TraceMode = source.TraceMode;
			dest.TraceFunction = source.TraceFunction;
			dest.UseMain = source.UseMain;
			dest.Verbose = source.Verbose;
			dest.WarnUnusedImports = source.WarnUnusedImports;
			dest.LibraryPrefix = source.LibraryPrefix;
			dest.IncludePackages = new string[source.IncludePackages.Length];
			dest.ExcludeFile = source.ExcludeFile;
			dest.GroupClasses = source.GroupClasses;
			dest.Frame = source.Frame;
			dest.Keep = source.Keep;
			Array.Copy(source.IncludePackages, dest.IncludePackages, source.IncludePackages.Length);
		}
Пример #3
0
		private void BuildDisplay()
		{
			this.Text = project.Name + " Properties";
			this.propertyGrid.HelpVisible = true;

			MovieOptions options = project.MovieOptions;

			outputSwfBox.Text = project.OutputPath;
			widthTextBox.Text = options.Width.ToString();
			heightTextBox.Text = options.Height.ToString();
			
			// bugfix -- direct color assignment doesn't work (copies by ref?)
			colorLabel.BackColor = Color.FromArgb(255,options.BackgroundColor);

			colorTextBox.Text = options.Background;
			fpsTextBox.Text = options.Fps.ToString();
			versionCombo.SelectedIndex = options.Version - 6; // trickery!

			if (options.TestMovieBehavior == TestMovieBehavior.NewTab)
				testMovieCombo.SelectedIndex = 0;
			else if (options.TestMovieBehavior == TestMovieBehavior.NewWindow)
				testMovieCombo.SelectedIndex = 1;
			else
				testMovieCombo.SelectedIndex = 2;

			classpathControl.Changed += new EventHandler(classpathControl_Changed);
			classpathControl.Project = project;
			classpathControl.Classpaths = project.Classpaths.ToArray();

			preBuildBox.Text = project.PreBuildEvent;
			postBuildBox.Text = project.PostBuildEvent;
			alwaysExecuteCheckBox.Checked = project.AlwaysRunPostBuild;

			injectionCheckBox.Checked = project.UsesInjection;
			inputSwfBox.Text = project.InputPath;

			// clone the compiler options object because the PropertyGrid modifies its
			// object directly
			CompilerOptions optionsCopy = new CompilerOptions();
			CopyCompilerOptions(project.CompilerOptions, optionsCopy);
			propertyGrid.SelectedObject = optionsCopy;
			
			propertiesChanged = false;
			classpathsChanged = false;
			assetsChanged = false;
			btnApply.Enabled = false;
		}