Ejemplo n.º 1
0
        public void Load(MoonlightProject project)
        {
            this.validateXamlCheck.Active    = project.ValidateXaml;
            this.throwXamlErrorsCheck.Active = project.ThrowErrorsInValidation;

            //TODO: enable after implementing xaml validation
//			this.throwXamlErrorsCheck.Sensitive = this.validateXamlCheck.Active;
            this.xamlAlignment.Sensitive = false;

            this.applicationOptionsBox.Visible = project.SilverlightApplication;

            if (!project.SilverlightApplication)
            {
                return;
            }

            this.xapFilenameEntry.Text = project.XapFilename ?? "";

            this.generateManifestCheck.Active            = project.GenerateSilverlightManifest;
            this.manifestTemplateFilenameEntry.Text      = project.SilverlightManifestTemplate ?? "";
            this.manifestTemplateFilenameEntry.Sensitive = this.generateManifestCheck.Active;

            this.generateTestPageCheck.Active    = project.CreateTestPage;
            this.testPageFilenameEntry.Text      = project.TestPageFileName ?? "";
            this.testPageFilenameEntry.Sensitive = this.generateTestPageCheck.Active;

            this.entryPointCombo.Entry.Text = project.SilverlightAppEntry;
            classListStore             = new Gtk.ListStore(typeof(string));
            entryPointCombo.Model      = classListStore;
            entryPointCombo.TextColumn = 0;

            FillClasses(project);
        }
		public void Load (MoonlightProject project)
		{
			
			this.validateXamlCheck.Active = project.ValidateXaml;
			this.throwXamlErrorsCheck.Active = project.ThrowErrorsInValidation;
			
			//TODO: enable after implementing xaml validation
//			this.throwXamlErrorsCheck.Sensitive = this.validateXamlCheck.Active;
			this.xamlAlignment.Sensitive = false;
			
			this.applicationOptionsBox.Visible = project.SilverlightApplication;
			
			if (!project.SilverlightApplication)
				return;
			
			this.xapFilenameEntry.Text = project.XapFilename ?? "";
			
			this.generateManifestCheck.Active = project.GenerateSilverlightManifest;
			this.manifestTemplateFilenameEntry.Text = project.SilverlightManifestTemplate ?? "";
			this.manifestTemplateFilenameEntry.Sensitive = this.generateManifestCheck.Active;
			
			this.generateTestPageCheck.Active = project.CreateTestPage;
			this.testPageFilenameEntry.Text = project.TestPageFileName ?? "";
			this.testPageFilenameEntry.Sensitive = this.generateTestPageCheck.Active;
			
			this.entryPointCombo.Entry.Text = project.SilverlightAppEntry;
			classListStore = new Gtk.ListStore (typeof(string));
			entryPointCombo.Model = classListStore;
			entryPointCombo.TextColumn = 0;
			
			FillClasses (project);
		}
Ejemplo n.º 3
0
 void FillClasses(MoonlightProject project)
 {
     if (classesFilled)
     {
         return;
     }
     classesFilled = true;
     try {
         var   dom     = TypeSystemService.GetCompilation(project);
         IType appType = dom.LookupType("System.Windows", "Application");
         if (appType == null)
         {
             return;
         }
         foreach (IType type in appType.GetAllBaseTypes())
         {
             classListStore.AppendValues(type.FullName);
         }
     } catch (InvalidOperationException) {
         // Project not found in parser database
     }
 }
 void FillClasses(MoonlightProject project)
 {
     if (classesFilled)
     {
         return;
     }
     classesFilled = true;
     try {
         ProjectDom dom     = ProjectDomService.GetProjectDom(project);
         IType      appType = dom.GetType("System.Windows.Application", true);
         if (appType == null)
         {
             return;
         }
         foreach (IType type in dom.GetSubclasses(appType, false))
         {
             classListStore.AppendValues(type.FullName);
         }
     } catch (InvalidOperationException) {
         // Project not found in parser database
     }
 }
Ejemplo n.º 5
0
        public void Store(MoonlightProject project)
        {
            project.ValidateXaml            = this.throwXamlErrorsCheck.Active;
            project.ThrowErrorsInValidation = this.throwXamlErrorsCheck.Active;

            if (!project.SilverlightApplication)
            {
                return;
            }

            if (!string.IsNullOrEmpty(this.xapFilenameEntry.Text))
            {
                project.XapFilename = this.xapFilenameEntry.Text;
            }

            project.GenerateSilverlightManifest = this.generateManifestCheck.Active;
            project.SilverlightManifestTemplate = this.manifestTemplateFilenameEntry.Text;

            project.CreateTestPage   = this.generateTestPageCheck.Active;
            project.TestPageFileName = this.testPageFilenameEntry.Text;

            project.SilverlightAppEntry = this.entryPointCombo.Entry.Text;
        }
		void FillClasses (MoonlightProject project)
		{
			if (classesFilled)
				return;
			classesFilled = true;
			try {
				ProjectDom dom = ProjectDomService.GetProjectDom (project);
				IType appType = dom.GetType ("System.Windows.Application", true);
				if (appType == null)
					return;
				foreach (IType type in dom.GetSubclasses (appType, false))
					classListStore.AppendValues (type.FullName);
			} catch (InvalidOperationException) {
				// Project not found in parser database
			}
		}
		public void Store (MoonlightProject project)
		{
			project.ValidateXaml = this.throwXamlErrorsCheck.Active;
			project.ThrowErrorsInValidation = this.throwXamlErrorsCheck.Active;
			
			if (!project.SilverlightApplication)
				return;
			
			if (!string.IsNullOrEmpty (this.xapFilenameEntry.Text))
				project.XapFilename = this.xapFilenameEntry.Text;
			
			project.GenerateSilverlightManifest = this.generateManifestCheck.Active;
			project.SilverlightManifestTemplate = this.manifestTemplateFilenameEntry.Text;
			
			project.CreateTestPage = this.generateTestPageCheck.Active;
			project.TestPageFileName = this.testPageFilenameEntry.Text;
			
			project.SilverlightAppEntry = this.entryPointCombo.Entry.Text;
		}
		void FillClasses (MoonlightProject project)
		{
			if (classesFilled)
				return;
			classesFilled = true;
			try {
				var dom = TypeSystemService.GetCompilation (project);
				IType appType = dom.LookupType ("System.Windows", "Application");
				if (appType == null)
					return;
				foreach (IType type in appType.GetAllBaseTypes ())
					classListStore.AppendValues (type.FullName);
			} catch (InvalidOperationException) {
				// Project not found in parser database
			}
		}