-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Daniel Otykier
committed
Jun 19, 2020
1 parent
f0f4dfb
commit 4cb0e50
Showing
6 changed files
with
341 additions
and
6 deletions.
There are no files selected for viewing
282 changes: 282 additions & 0 deletions
282
TOMWrapper/PropertyGridUI/Converters/ColumnDataCategoryConverter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,282 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace TabularEditor.PropertyGridUI.Converters | ||
{ | ||
internal class ColumnDataCategoryConverter: StringConverter | ||
{ | ||
public override bool GetStandardValuesSupported(ITypeDescriptorContext context) | ||
{ | ||
return true; | ||
} | ||
|
||
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) | ||
{ | ||
return false; | ||
} | ||
|
||
private static readonly string[] categories = Enum.GetNames(typeof(ColumnDataCategory)).OrderBy(s => s).ToArray(); | ||
|
||
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) | ||
{ | ||
return new StandardValuesCollection(categories); | ||
} | ||
} | ||
|
||
public enum ColumnDataCategory | ||
{ | ||
Invalid = -1, | ||
All = 1, | ||
Regular = 2, | ||
Image = 3, | ||
ImageBMP = 4, | ||
ImageGIF = 5, | ||
ImageJPG = 6, | ||
ImagePNG = 7, | ||
ImageTIFF = 8, | ||
ImageURL = 9, | ||
Id = 10, | ||
RelationToParent = 11, | ||
Sequence = 12, | ||
OrgTitle = 13, | ||
Caption = 14, | ||
ShortCaption = 15, | ||
CaptionDescription = 16, | ||
CaptionAbbreviation = 17, | ||
WebURL = 18, | ||
WebHTML = 19, | ||
WebXMLOrXSL = 20, | ||
WebmailAlias = 21, | ||
Address = 22, | ||
AddressStreet = 23, | ||
AddressHouse = 24, | ||
AddressCity = 25, | ||
AddressStateOrProvince = 26, | ||
AddressZIP = 27, | ||
AddressQuarter = 28, | ||
AddressCountry = 29, | ||
AddressBuilding = 30, | ||
AddressRoom = 31, | ||
AddressFloor = 32, | ||
AddressFax = 33, | ||
AddressPhone = 34, | ||
GeoCentroidX = 35, | ||
GeoCentroidY = 36, | ||
GeoCentroidZ = 37, | ||
GeoBoundaryTop = 38, | ||
GeoBoundaryLeft = 39, | ||
GeoBoundaryBottom = 40, | ||
GeoBoundaryRight = 41, | ||
GeoBoundaryFront = 42, | ||
GeoBoundaryRear = 43, | ||
GeoBoundaryPolygon = 44, | ||
PhysicalSize = 45, | ||
PhysicalColor = 46, | ||
PhysicalWeight = 47, | ||
PhysicalHeight = 48, | ||
PhysicalWidth = 49, | ||
PhysicalDepth = 50, | ||
PhysicalVolume = 51, | ||
PhysicalDensity = 52, | ||
PersonFullName = 53, | ||
PersonFirstName = 54, | ||
PersonLastName = 55, | ||
PersonMiddleName = 56, | ||
PersonDemographic = 57, | ||
PersonContact = 58, | ||
QtyRangeLow = 59, | ||
QtyRangeHigh = 60, | ||
FormattingColor = 61, | ||
FormattingOrder = 62, | ||
FormattingFont = 63, | ||
FormattingFontEffects = 64, | ||
FormattingFontSize = 65, | ||
FormattingSubtotal = 66, | ||
Date = 67, | ||
DateStart = 68, | ||
DateEnded = 69, | ||
DateCanceled = 70, | ||
DateModified = 71, | ||
DateDuration = 72, | ||
Version = 73, | ||
Years = 74, | ||
Quarters = 75, | ||
Months = 76, | ||
Weeks = 77, | ||
Days = 78, | ||
Hours = 79, | ||
Minutes = 80, | ||
Seconds = 81, | ||
UndefinedTime = 82, | ||
OrganizationalUnit = 83, | ||
BomResource = 84, | ||
Quantitative = 85, | ||
Account = 86, | ||
Customers = 87, | ||
CustomerGroup = 88, | ||
CustomerHousehold = 89, | ||
Product = 90, | ||
ProductGroup = 91, | ||
Scenario = 92, | ||
Utility = 93, | ||
Person = 94, | ||
Company = 95, | ||
CurrencySource = 96, | ||
CurrencyDestination = 97, | ||
Channel = 98, | ||
Representative = 99, | ||
Promotion = 100, | ||
Continent = 101, | ||
Region = 102, | ||
Country = 103, | ||
StateOrProvince = 104, | ||
County = 105, | ||
City = 106, | ||
PostalCode = 107, | ||
Point = 108, | ||
AccountType = 109, | ||
AccountName = 110, | ||
AccountNumber = 111, | ||
ProjectName = 112, | ||
ProjectCode = 113, | ||
ProjectStartDate = 114, | ||
ProjectEndDate = 115, | ||
ProjectCompletion = 116, | ||
CurrencyName = 117, | ||
CurrencyIsOCode = 118, | ||
PercentOwnership = 119, | ||
PercentVoteright = 120, | ||
Project = 121, | ||
RateType = 122, | ||
Rate = 123, | ||
ProductSKU = 124, | ||
ProductCategory = 125, | ||
ProductBrand = 126, | ||
DeletedFlag = 127, | ||
ScdStatus = 128, | ||
ScdEndDate = 129, | ||
ScdOriginalID = 130, | ||
ScdStartDate = 131, | ||
DayOfMonthOrPeriod = 132, | ||
WeekOfQuarter = 133, | ||
WeekOfMonthOrPeriod = 134, | ||
MonthOrPeriodOfQuarter = 135, | ||
MonthOrPeriodOfYear = 136, | ||
Trimesters = 137, | ||
Halfyears = 138, | ||
Tendays = 139, | ||
DayOfWeek = 140, | ||
DayOfTendays = 141, | ||
DayOfMonth = 142, | ||
DayOfQuarter = 143, | ||
DayOfTrimester = 144, | ||
DayOfHalfyear = 145, | ||
DayOfYear = 146, | ||
WeekOfYear = 147, | ||
TendayOfMonth = 148, | ||
TendayOfQuarter = 149, | ||
TendayOfTrimester = 150, | ||
TendayOfHalfyear = 151, | ||
TendayOfYear = 152, | ||
MonthOfTrimester = 153, | ||
MonthOfQuarter = 154, | ||
MonthOfHalfyear = 155, | ||
MonthOfYear = 156, | ||
TrimesterOfYear = 157, | ||
QuarterOfHalfyear = 158, | ||
QuarterOfYear = 159, | ||
HalfyearOfYear = 160, | ||
FiscalDate = 161, | ||
FiscalDayOfWeek = 162, | ||
FiscalDayOfMonth = 163, | ||
FiscalDayOfQuarter = 164, | ||
FiscalDayOfTrimester = 165, | ||
FiscalDayOfHalfyear = 166, | ||
FiscalDayOfYear = 167, | ||
FiscalWeeks = 168, | ||
FiscalWeekOfYear = 169, | ||
FiscalWeekOfHalfyear = 170, | ||
FiscalWeekOfQuarter = 171, | ||
FiscalWeekOfTrimester = 172, | ||
FiscalWeekOfMonth = 173, | ||
FiscalMonths = 174, | ||
FiscalMonthOfTrimester = 175, | ||
FiscalMonthOfQuarter = 176, | ||
FiscalMonthOfHalfyear = 177, | ||
FiscalMonthOfYear = 178, | ||
FiscalTrimesters = 179, | ||
FiscalTrimesterOfYear = 180, | ||
FiscalQuarters = 181, | ||
FiscalQuarterOfYear = 182, | ||
FiscalQuarterOfHalfyear = 183, | ||
FiscalHalfyears = 184, | ||
FiscalHalfyearOfYear = 185, | ||
FiscalYears = 186, | ||
ReportingDate = 187, | ||
ReportingDayOfWeek = 188, | ||
ReportingDayOfMonth = 189, | ||
ReportingDayOfQuarter = 190, | ||
ReportingDayOfTrimester = 191, | ||
ReportingDayOfHalfyear = 192, | ||
ReportingDayOfYear = 193, | ||
ReportingWeeks = 194, | ||
ReportingWeekOfYear = 195, | ||
ReportingWeekOfHalfyear = 196, | ||
ReportingWeekOfQuarter = 197, | ||
ReportingWeekOfTrimester = 198, | ||
ReportingWeekOfMonth = 199, | ||
ReportingMonths = 200, | ||
ReportingMonthOfTrimester = 201, | ||
ReportingMonthOfQuarter = 202, | ||
ReportingMonthOfHalfyear = 203, | ||
ReportingMonthOfYear = 204, | ||
ReportingTrimesters = 205, | ||
ReportingTrimesterOfYear = 206, | ||
ReportingQuarters = 207, | ||
ReportingQuarterOfYear = 208, | ||
ReportingQuarterOfHalfyear = 209, | ||
ReportingHalfyears = 210, | ||
ReportingHalfyearOfYear = 211, | ||
ReportingYears = 212, | ||
ManufacturingDate = 213, | ||
ManufacturingDayOfWeek = 214, | ||
ManufacturingDayOfMonth = 215, | ||
ManufacturingDayOfQuarter = 216, | ||
ManufacturingDayOfHalfyear = 217, | ||
ManufacturingDayOfYear = 218, | ||
ManufacturingWeeks = 219, | ||
ManufacturingWeekOfYear = 220, | ||
ManufacturingWeekOfHalfyear = 221, | ||
ManufacturingWeekOfQuarter = 222, | ||
ManufacturingWeekOfMonth = 223, | ||
ManufacturingMonths = 224, | ||
ManufacturingMonthOfQuarter = 225, | ||
ManufacturingMonthOfHalfyear = 226, | ||
ManufacturingMonthOfYear = 227, | ||
ManufacturingTrimesters = 228, | ||
ManufacturingTrimesterOfYear = 229, | ||
ManufacturingQuarters = 230, | ||
ManufacturingQuarterOfYear = 231, | ||
ManufacturingQuarterOfHalfyear = 232, | ||
ManufacturingHalfyears = 233, | ||
ManufacturingHalfyearOfYear = 234, | ||
ManufacturingYears = 235, | ||
WinterSummerSeason = 236, | ||
IsHoliday = 237, | ||
IsWeekday = 238, | ||
IsWorkingDay = 239, | ||
IsPeakDay = 240, | ||
ISO8601Date = 241, | ||
ISO8601DayOfWeek = 242, | ||
ISO8601DayOfYear = 243, | ||
ISO8601Weeks = 244, | ||
ISO8601WeekOfYear = 245, | ||
ISO8601Years = 246, | ||
RowNumber = 247, | ||
ExtendedType = 248 | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
TOMWrapper/PropertyGridUI/Converters/TableDataCategoryConverter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace TabularEditor.PropertyGridUI.Converters | ||
{ | ||
internal class TableDataCategoryConverter: StringConverter | ||
{ | ||
public override bool GetStandardValuesSupported(ITypeDescriptorContext context) | ||
{ | ||
return true; | ||
} | ||
|
||
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) | ||
{ | ||
return false; | ||
} | ||
|
||
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) | ||
{ | ||
return new StandardValuesCollection(Enum.GetNames(typeof(TableDataCategory))); | ||
} | ||
} | ||
|
||
|
||
public enum TableDataCategory | ||
{ | ||
Unknown = 0, | ||
Regular = 1, | ||
Time = 2, | ||
Geography = 3, | ||
Organization = 4, | ||
BillOfMaterials = 5, | ||
Accounts = 6, | ||
Customers = 7, | ||
Products = 8, | ||
Scenario = 9, | ||
Quantitative = 10, | ||
Utility = 11, | ||
Currency = 12, | ||
Rates = 13, | ||
Channel = 14, | ||
Promotion = 15 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters