public DotNetStandard() { Sources = new List <BuildItem> (); OtherBuildItems = new List <BuildItem> (); SetProperty(CommonProperties, "DebugType", "full"); ItemGroupList.Add(Sources); }
public XamarinAndroidBindingProject(string debugConfigurationName = "Debug", string releaseConfigurationName = "Release") : base(debugConfigurationName, releaseConfigurationName) { SetProperty("MonoAndroidJavaPrefix", "Java"); SetProperty("MonoAndroidTransformPrefix", "Transforms"); Jars = new List <BuildItem> (); Transforms = new List <BuildItem> (); ItemGroupList.Add(Jars); ItemGroupList.Add(Transforms); EnumFields = EnumMethods = MetadataXml = "<metadata/>"; Transforms.Add(new AndroidItem.TransformFile("Transforms\\EnumFields.xml") { TextContent = () => EnumFields }); Transforms.Add(new AndroidItem.TransformFile("Transforms\\EnumMethods.xml") { TextContent = () => EnumMethods }); Transforms.Add(new AndroidItem.TransformFile("Transforms\\Metadata.xml") { TextContent = () => MetadataXml }); }
public XamarinAndroidBindingProject() { SetProperty("MonoAndroidJavaPrefix", "Java"); SetProperty("MonoAndroidTransformPrefix", "Transforms"); Jars = new List <BuildItem> (); Transforms = new List <BuildItem> (); ItemGroupList.Add(Jars); ItemGroupList.Add(Transforms); EnumFields = EnumMethods = MetadataXml = "<metadata/>"; Transforms.Add(new AndroidItem.TransformFile("Transforms\\EnumFields.xml") { TextContent = () => EnumFields }); Transforms.Add(new AndroidItem.TransformFile("Transforms\\EnumMethods.xml") { TextContent = () => EnumMethods }); Transforms.Add(new AndroidItem.TransformFile("Transforms\\Metadata.xml") { TextContent = () => MetadataXml }); }
protected XamarinAndroidCommonProject(string debugConfigurationName = "Debug", string releaseConfigurationName = "Release") : base(debugConfigurationName, releaseConfigurationName) { AndroidResources = new List <BuildItem> (); ItemGroupList.Add(AndroidResources); resourceDesigner = new BuildItem.Source(() => "Resources\\Resource.designer" + Language.DefaultDesignerExtension) { TextContent = () => string.Empty }; Sources.Add(resourceDesigner); AndroidResources.Add(new AndroidItem.AndroidResource("Resources\\drawable-mdpi\\Icon.png") { BinaryContent = () => icon_binary_mdpi }); AndroidResources.Add(new AndroidItem.AndroidResource("Resources\\drawable-hdpi\\Icon.png") { BinaryContent = () => icon_binary_hdpi }); AndroidResources.Add(new AndroidItem.AndroidResource("Resources\\drawable-xhdpi\\Icon.png") { BinaryContent = () => icon_binary_xhdpi }); AndroidResources.Add(new AndroidItem.AndroidResource("Resources\\drawable-xxhdpi\\Icon.png") { BinaryContent = () => icon_binary_xxhdpi }); AndroidResources.Add(new AndroidItem.AndroidResource("Resources\\drawable-xxxhdpi\\Icon.png") { BinaryContent = () => icon_binary_xxxhdpi }); //AndroidResources.Add (new AndroidItem.AndroidResource ("Resources\\drawable-nodpi\\Icon.png") { BinaryContent = () => icon_binary }); }
protected XamarinAndroidCommonProject() { AndroidResources = new List <BuildItem> (); ItemGroupList.Add(AndroidResources); Sources.Add(new BuildItem.Source(() => "Resources\\Resource.designer" + Language.DefaultExtension) { TextContent = () => string.Empty }); AndroidResources.Add(new AndroidItem.AndroidResource("Resources\\drawable-mdpi\\Icon.png") { BinaryContent = () => icon_binary_mdpi }); AndroidResources.Add(new AndroidItem.AndroidResource("Resources\\drawable-hdpi\\Icon.png") { BinaryContent = () => icon_binary_hdpi }); AndroidResources.Add(new AndroidItem.AndroidResource("Resources\\drawable-xhdpi\\Icon.png") { BinaryContent = () => icon_binary_xhdpi }); AndroidResources.Add(new AndroidItem.AndroidResource("Resources\\drawable-xxhdpi\\Icon.png") { BinaryContent = () => icon_binary_xxhdpi }); AndroidResources.Add(new AndroidItem.AndroidResource("Resources\\drawable-xxxhdpi\\Icon.png") { BinaryContent = () => icon_binary_xxxhdpi }); //AndroidResources.Add (new AndroidItem.AndroidResource ("Resources\\drawable-nodpi\\Icon.png") { BinaryContent = () => icon_binary }); }
public DotNetStandard() { Sources = new List <BuildItem> (); OtherBuildItems = new List <BuildItem> (); SetProperty(CommonProperties, "DebugType", "full"); ItemGroupList.Add(Sources); Language = XamarinAndroidProjectLanguage.CSharp; }
public DotNetStandard() { ProjectName = "UnnamedProject"; Sources = new List <BuildItem> (); OtherBuildItems = new List <BuildItem> (); ItemGroupList.Add(Sources); ItemGroupList.Add(OtherBuildItems); Language = XamarinAndroidProjectLanguage.CSharp; }
protected DotNetXamarinProject(string debugConfigurationName = "Debug", string releaseConfigurationName = "Release") : base(debugConfigurationName, releaseConfigurationName) { ProjectName = "UnnamedProject"; Sources = new List <BuildItem> (); OtherBuildItems = new List <BuildItem> (); ItemGroupList.Add(References); ItemGroupList.Add(OtherBuildItems); ItemGroupList.Add(Sources); SetProperty(KnownProperties.Configuration, debugConfigurationName, "'$(Configuration)' == ''"); SetProperty("RootNamespace", () => RootNamespace ?? ProjectName); SetProperty("AssemblyName", () => AssemblyName ?? ProjectName); if (Builder.UseDotNet) { SetProperty("TargetFramework", "net5.0"); SetProperty("EnableDefaultItems", "false"); SetProperty("AppendTargetFrameworkToOutputPath", "false"); SetProperty("AppendRuntimeIdentifierToOutputPath", "false"); } else { AddReferences("System"); // default SetProperty("Platform", "AnyCPU", "'$(Platform)' == ''"); SetProperty("ErrorReport", "prompt"); SetProperty("WarningLevel", "4"); SetProperty("ConsolePause", "false"); SetProperty("BaseIntermediateOutputPath", "obj\\", " '$(BaseIntermediateOutputPath)' == '' "); SetProperty(DebugProperties, "DebugSymbols", "true"); SetProperty(DebugProperties, "DebugType", "full"); SetProperty(DebugProperties, "Optimize", "false"); SetProperty(DebugProperties, "DefineConstants", "DEBUG;"); SetProperty(ReleaseProperties, "Optimize", "true"); SetProperty(ReleaseProperties, "ErrorReport", "prompt"); SetProperty(ReleaseProperties, "WarningLevel", "4"); SetProperty(ReleaseProperties, "ConsolePause", "false"); } // These are always set, so the OutputPath and IntermediateOutputPath properties work SetProperty(DebugProperties, KnownProperties.OutputPath, Path.Combine("bin", debugConfigurationName)); SetProperty(DebugProperties, KnownProperties.IntermediateOutputPath, Path.Combine("obj", debugConfigurationName)); SetProperty(ReleaseProperties, KnownProperties.OutputPath, Path.Combine("bin", releaseConfigurationName)); SetProperty(ReleaseProperties, KnownProperties.IntermediateOutputPath, Path.Combine("obj", releaseConfigurationName)); Sources.Add(new BuildItem.Source(() => "Properties\\AssemblyInfo" + Language.DefaultExtension) { TextContent = () => ProcessSourceTemplate(AssemblyInfo ?? Language.DefaultAssemblyInfo) }); }
public virtual List <ProjectResource> Save(bool saveProject = true) { var list = new List <ProjectResource> (); if (saveProject) { var contents = SaveProject(); var timestamp = contents != project_file_contents ? default(DateTimeOffset?) : ItemGroupList.SelectMany(ig => ig).Where(i => i.Timestamp != null).Select(i => (DateTimeOffset)i.Timestamp).Max(); list.Add(new ProjectResource() { Timestamp = timestamp, Path = ProjectFilePath, Content = project_file_contents = contents, Encoding = System.Text.Encoding.UTF8, }); } if (Packages.Any()) { list.Add(new ProjectResource() { Path = "packages.config", Content = "<packages>\n" + string.Concat(Packages.Select(p => string.Format(" <package id='{0}' version='{1}' targetFramework='{2}' />\n", p.Id, p.Version, p.TargetFramework))) + "</packages>" }); } foreach (var ig in ItemGroupList) { list.AddRange(ig.Select(s => new ProjectResource() { Timestamp = s.Timestamp, Path = s.Include(), Content = s.TextContent == null ? null : s.TextContent(), BinaryContent = s.BinaryContent == null ? null : s.BinaryContent(), Encoding = s.Encoding, Deleted = s.Deleted, Attributes = s.Attributes, })); } foreach (var import in Imports) { list.Add(new ProjectResource() { Path = import.Project(), Content = import.TextContent == null ? null : import.TextContent(), Encoding = System.Text.Encoding.UTF8, }); } return(list); }
protected DotNetXamarinProject(string debugConfigurationName = "Debug", string releaseConfigurationName = "Release") : base(debugConfigurationName, releaseConfigurationName) { ProjectName = "UnnamedProject"; Sources = new List <BuildItem> (); OtherBuildItems = new List <BuildItem> (); ItemGroupList.Add(References); ItemGroupList.Add(OtherBuildItems); ItemGroupList.Add(Sources); AddReferences("System"); // default SetProperty(KnownProperties.Configuration, debugConfigurationName, "'$(Configuration)' == ''"); SetProperty("Platform", "AnyCPU", "'$(Platform)' == ''"); SetProperty("ErrorReport", "prompt"); SetProperty("WarningLevel", "4"); SetProperty("ConsolePause", "false"); SetProperty("RootNamespace", () => RootNamespace ?? ProjectName); SetProperty("AssemblyName", () => AssemblyName ?? ProjectName); SetProperty("BuildingInsideVisualStudio", "True"); SetProperty("BaseIntermediateOutputPath", "obj\\", " '$(BaseIntermediateOutputPath)' == '' "); SetProperty(DebugProperties, "DebugSymbols", "true"); SetProperty(DebugProperties, "DebugType", "full"); SetProperty(DebugProperties, "Optimize", "false"); SetProperty(DebugProperties, KnownProperties.OutputPath, Path.Combine("bin", debugConfigurationName)); SetProperty(DebugProperties, "DefineConstants", "DEBUG;"); SetProperty(DebugProperties, KnownProperties.IntermediateOutputPath, Path.Combine("obj", debugConfigurationName)); SetProperty(ReleaseProperties, "Optimize", "true"); SetProperty(ReleaseProperties, "ErrorReport", "prompt"); SetProperty(ReleaseProperties, "WarningLevel", "4"); SetProperty(ReleaseProperties, "ConsolePause", "false"); SetProperty(ReleaseProperties, KnownProperties.OutputPath, Path.Combine("bin", releaseConfigurationName)); SetProperty(ReleaseProperties, KnownProperties.IntermediateOutputPath, Path.Combine("obj", releaseConfigurationName)); Sources.Add(new BuildItem.Source(() => "Properties\\AssemblyInfo" + Language.DefaultExtension) { TextContent = () => ProcessSourceTemplate(AssemblyInfo ?? Language.DefaultAssemblyInfo) }); }
public BuildItem GetItem(string include) { return(ItemGroupList.SelectMany(g => g).FirstOrDefault(i => i.Include().Equals(include, StringComparison.OrdinalIgnoreCase))); }
public static void InitListPostfix(ItemGroupList __instance) => InitItemListPostfix(__instance);
public InventPostingViewModel() { if (!IsDesignTime) { GetItemPermissions(PermissionItemName.InventPosting.ToString()); Glclient = new GlServiceClient(); MainRowList = new SortableCollectionView <TblInventPostingViewModel>(); SelectedMainRow = new TblInventPostingViewModel(); Glclient.GetGlItemGroupAsync(LoggedUserInfo.DatabasEname); Glclient.GetGlItemGroupCompleted += (s, sv) => { ItemGroupList = sv.Result; }; Glclient.GetTblInventPostingTypeAsync(LoggedUserInfo.DatabasEname); Glclient.GetTblInventPostingTypeCompleted += (s, sv) => { InventPostingTypeList = sv.Result; Items = new ObservableCollection <TblInventAccountType>(InventPostingTypeList.Where(x => x.TabName == "SalesOrder")); }; Glclient.GetTblInventPostingCompleted += (s, sv) => { foreach (var row in sv.Result) { var newrow = new TblInventPostingViewModel { AccountPerRow = row.TblAccount1, ItemGroupPerRow = ItemGroupList.FirstOrDefault(x => x.Iserial == row.ItemScopeRelation) }; newrow.InjectFrom(row); newrow.JournalAccountTypePerRow = JournalAccountTypePerRow; if (sv.entityList != null && sv.entityList.Any(x => x.scope == row.SupCustScope && x.Iserial == row.SupCustRelation)) { newrow.EntityAccountPerRow = sv.entityList.First(x => x.scope == row.SupCustScope && x.Iserial == row.SupCustRelation); } MainRowList.Add(newrow); } Loading = false; if (MainRowList.Any() && (SelectedMainRow == null)) { SelectedMainRow = MainRowList.FirstOrDefault(); } if (MainRowList.Count == 0) { AddNewMainRow(false); } }; Glclient.UpdateOrInsertTblInventPostingsCompleted += (s, ev) => { if (ev.Error != null) { MessageBox.Show(ev.Error.Message); } try { MainRowList.ElementAt(ev.outindex).InjectFrom(ev.Result); } // ReSharper disable once EmptyGeneralCatchClause catch { } }; Glclient.DeleteTblInventPostingCompleted += (s, ev) => { if (ev.Error != null) { MessageBox.Show(ev.Error.Message); } var oldrow = MainRowList.FirstOrDefault(x => x.Iserial == ev.Result); if (oldrow != null) { MainRowList.Remove(oldrow); } if (!MainRowList.Any()) { AddNewMainRow(false); } }; } }