コード例 #1
0
 protected void ToString(List <string> toStringOutput)
 {
     toStringOutput.Add($"Name = {(Name == null ? "null" : Name == string.Empty ? "" : Name)}");
     toStringOutput.Add($"Ordinal = {(Ordinal == null ? "null" : Ordinal.ToString())}");
     toStringOutput.Add($"SelectionType = {(SelectionType == null ? "null" : SelectionType.ToString())}");
     toStringOutput.Add($"Modifiers = {(Modifiers == null ? "null" : $"[{ string.Join(", ", Modifiers)} ]")}");
 }
コード例 #2
0
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (var tabpage in frm.MainTabEventCollectionTypes.TabPages.Cast <TabPage>().Where(tabpage => tabpage != frm.tabEventCollectionPurge))
            {
                frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionPurge))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionPurge);
            }

            if (StartTime != null || EndTime != null)
            {
                frm.lblPurgeTime.Text     = $"{StartTime} - {EndTime}";
                frm.lblPurgeDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblPurgeTime.Text     = "";
                frm.lblPurgeDuration.Text = "";
            }
            frm.lblPurgeOrdinal.Text   = Ordinal.ToString();
            frm.lblPurgeSite.Data      = Site;
            frm.lblPurgeAdjective.Text = Adjective;

            frm.lstPurgeEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstPurgeEvents.Items.AddRange(Event.ToArray());
            }

            SelectTab(frm);
        }
コード例 #3
0
 protected void ToString(List <string> toStringOutput)
 {
     toStringOutput.Add($"Name = {(Name == null ? "null" : Name == string.Empty ? "" : Name)}");
     toStringOutput.Add($"PriceMoney = {(PriceMoney == null ? "null" : PriceMoney.ToString())}");
     toStringOutput.Add($"Ordinal = {(Ordinal == null ? "null" : Ordinal.ToString())}");
     toStringOutput.Add($"ModifierListId = {(ModifierListId == null ? "null" : ModifierListId == string.Empty ? "" : ModifierListId)}");
 }
コード例 #4
0
        protected override Task <ICollection <ResultProperty> > GetPropertiesAsync(CancellationToken token)
        {
            var props = new Collection <ResultProperty>()
            {
                new ResultProperty("Ordinal", Ordinal.ToString()),
                new ResultProperty("Species", Species)
            };

            return(Task.FromResult <ICollection <ResultProperty> >(props));
        }
コード例 #5
0
ファイル: ImageSymbolImport.cs プロジェクト: xuhaoa/WinPIT
        public override string ToString()
        {
            var prefix = Module == null ? string.Empty : Module.Name + "!";

            if (IsImportByOrdinal)
            {
                return(prefix + '#' + Ordinal.ToString("X"));
            }
            return(prefix + HintName.Name);
        }
コード例 #6
0
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (var tabpage in frm.MainTabEventCollectionTypes.TabPages.Cast <TabPage>().Where(tabpage => tabpage != frm.tabEventCollectionAbduction))
            {
                frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionAbduction))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionAbduction);
            }

            frm.lblAbductionRegion.Data   = Subregion;
            frm.lblAbductionSite.Data     = Site;
            frm.lblAbductionCoords.Data   = new Coordinate(Coords);
            frm.lblAbductionAttacker.Data = AttackingEn;
            frm.lblAbductionDefender.Data = DefendingEn;
            frm.lblAbductionParent.Data   = ParentEventCol;
            if (StartTime != null || EndTime != null)
            {
                frm.lblAbductionTime.Text     = string.Format("{0} - {1}", StartTime, EndTime);
                frm.lblAbductionDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblAbductionTime.Text     = "";
                frm.lblAbductionDuration.Text = "";
            }
            frm.lblAbductionOrdinal.Text = Ordinal.ToString();

            frm.lstAbductionEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstAbductionEvents.Items.AddRange(Event.ToArray());
            }

            frm.grpAbductionEvents.Visible = frm.lstAbductionEvents.Items.Count > 0;

            if (frm.lstAbductionEvents.Items.Count > 0)
            {
                frm.lstAbductionEvents.SelectedIndex = 0;
            }

            frm.lstAbductionEventCols.Items.Clear();
            if (EventCol != null)
            {
                frm.lstAbductionEventCols.Items.AddRange(EventCol.ToArray());
            }

            frm.grpAbductionEventCols.Visible = frm.lstAbductionEventCols.Items.Count > 0;

            SelectTab(frm);
        }
コード例 #7
0
        public void OrdinalTypeNameMatchesPropertyName()
        {
            var properties = typeof(CloudEventAttributeType)
                             .GetProperties(BindingFlags.Public | BindingFlags.Static)
                             .Where(prop => prop.PropertyType == typeof(CloudEventAttributeType));

            foreach (var property in properties)
            {
                var type = (CloudEventAttributeType)property.GetValue(null) !;
                Assert.Equal(property.Name, type !.Ordinal.ToString());
            }
        }
コード例 #8
0
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (var tabpage in frm.MainTabEventCollectionTypes.TabPages.Cast <TabPage>().Where(tabpage => tabpage != frm.tabEventCollectionTheft))
            {
                frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionTheft))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionTheft);
            }

            frm.lblTheftSite.Data     = Site;
            frm.lblTheftCoords.Data   = Site != null ? new Coordinate(Site.Coords) : null;
            frm.lblTheftAttacker.Data = AttackingEn;
            frm.lblTheftDefender.Data = DefendingEn;
            frm.lblTheftWar.Data      = WarEventCol;
            if (StartTime != null || EndTime != null)
            {
                frm.lblTheftTime.Text     = $"{StartTime} - {EndTime}";
                frm.lblTheftDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblTheftTime.Text     = "";
                frm.lblTheftDuration.Text = "";
            }
            frm.lblTheftOrdinal.Text = Ordinal.ToString();

            frm.lstTheftEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstTheftEvents.Items.AddRange(Event.ToArray());
            }

            frm.grpTheftEvents.Visible = frm.lstTheftEvents.Items.Count > 0;

            if (frm.lstTheftEvents.Items.Count > 0)
            {
                frm.lstTheftEvents.SelectedIndex = 0;
            }

            frm.lstTheftEventCols.Items.Clear();
            if (EventCol != null)
            {
                frm.lstTheftEventCols.Items.AddRange(EventCol.ToArray());
            }

            frm.grpTheftEventCols.Visible = frm.lstTheftEventCols.Items.Count > 0;

            SelectTab(frm);
        }
コード例 #9
0
ファイル: EC_BeastAttack.cs プロジェクト: tier6tank/DFWV
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (TabPage tabpage in frm.MainTabEventCollectionTypes.TabPages)
            {
                if (tabpage != frm.tabEventCollectionBeastAttack)
                {
                    frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
                }
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionBeastAttack))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionBeastAttack);
            }

            frm.lblBeastAttackRegion.Data   = Subregion;
            frm.lblBeastAttackSite.Data     = Site;
            frm.lblBeastAttackCoords.Data   = new Coordinate(Coords);
            frm.lblBeastAttackDefender.Data = DefendingEn;
            frm.lblBeastAttackParent.Data   = ParentEventCol;
            frm.lblBeastAttackBeast.Data    = BeastHF;

            if (StartTime != null || EndTime != null)
            {
                frm.lblBeastAttackTime.Text     = StartTime.ToString() + " - " + EndTime.ToString();
                frm.lblBeastAttackDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblBeastAttackTime.Text     = "";
                frm.lblBeastAttackDuration.Text = "";
            }
            frm.lblBeastAttackOrdinal.Text = Ordinal.ToString();

            frm.lstBeastAttackEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstBeastAttackEvents.Items.AddRange(Event.ToArray());
            }

            frm.grpBeastAttackEvents.Visible = frm.lstBeastAttackEvents.Items.Count > 0;

            if (frm.lstBeastAttackEvents.Items.Count > 0)
            {
                frm.lstBeastAttackEvents.SelectedIndex = 0;
            }

            base.SelectTab(frm);
        }
コード例 #10
0
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (var tabpage in frm.MainTabEventCollectionTypes.TabPages.Cast <TabPage>().Where(tabpage => tabpage != frm.tabEventCollectionInsurrection))
            {
                frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionInsurrection))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionInsurrection);
            }


            frm.lblInsurrectionSite.Data   = Site;
            frm.lblInsurrectionParent.Data = ParentEventCol;

            frm.lblInsurrectionCoords.Data = new Coordinate(Site != null ? Site.Location : Point.Empty);

            if (StartTime != null || EndTime != null)
            {
                frm.lblInsurrectionTime.Text     = string.Format("{0} - {1}", StartTime, EndTime);
                frm.lblInsurrectionDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblInsurrectionTime.Text     = "";
                frm.lblInsurrectionDuration.Text = "";
            }
            frm.lblInsurrectionTargetEnt.Data = TargetEnt;

            frm.lblInsurrectionOutcome.Text = Outcome;

            frm.lblInsurrectionOrdinal.Text = Ordinal.ToString();

            frm.lstInsurrectionEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstInsurrectionEvents.Items.AddRange(Event.ToArray());
            }

            frm.grpInsurrectionEvents.Visible = frm.lstInsurrectionEvents.Items.Count > 0;

            if (frm.lstInsurrectionEvents.Items.Count > 0)
            {
                frm.lstInsurrectionEvents.SelectedIndex = 0;
            }

            SelectTab(frm);
        }
コード例 #11
0
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (TabPage tabpage in frm.MainTabEventCollectionTypes.TabPages)
            {
                if (tabpage != frm.tabEventCollectionDuel)
                {
                    frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
                }
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionDuel))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionDuel);
            }

            frm.lblDuelRegion.Data   = Subregion;
            frm.lblDuelSite.Data     = Site;
            frm.lblDuelCoords.Data   = new Coordinate(Coords);
            frm.lblDuelAttacker.Data = AttackingHF != null ? AttackingHF[0] : null;
            frm.lblDuelDefender.Data = DefendingHF != null ? DefendingHF[0] : null;
            frm.lblDuelParent.Data   = ParentEventCol;
            if (StartTime != null || EndTime != null)
            {
                frm.lblDuelTime.Text     = StartTime.ToString() + " - " + EndTime.ToString();
                frm.lblDuelDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblDuelTime.Text     = "";
                frm.lblDuelDuration.Text = "";
            }
            frm.lblDuelOrdinal.Text = Ordinal.ToString();

            frm.lstDuelEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstDuelEvents.Items.AddRange(Event.ToArray());
            }

            frm.grpDuelEvents.Visible = frm.lstDuelEvents.Items.Count > 0;

            if (frm.lstDuelEvents.Items.Count > 0)
            {
                frm.lstDuelEvents.SelectedIndex = 0;
            }

            base.SelectTab(frm);
        }
コード例 #12
0
ファイル: EC_Occasion.cs プロジェクト: tier6tank/DFWV
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (var tabpage in frm.MainTabEventCollectionTypes.TabPages.Cast <TabPage>().Where(tabpage => tabpage != frm.tabEventCollectionOccasion))
            {
                frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionOccasion))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionOccasion);
            }

            if (StartTime != null || EndTime != null)
            {
                frm.lblOccasionTime.Text     = $"{StartTime} - {EndTime}";
                frm.lblOccasionDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblOccasionTime.Text     = "";
                frm.lblOccasionDuration.Text = "";
            }
            frm.lblOccasionOrdinal.Text = Ordinal.ToString();
            frm.lblOccasionCiv.Data     = Civ;

            frm.lstOccasionEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstOccasionEvents.Items.AddRange(Event.ToArray());
            }

            frm.grpOccasionEvents.Visible = frm.lstOccasionEvents.Items.Count > 0;

            if (frm.lstOccasionEvents.Items.Count > 0)
            {
                frm.lstOccasionEvents.SelectedIndex = 0;
            }

            frm.lstOccasionEventCols.Items.Clear();
            if (EventCol != null)
            {
                frm.lstOccasionEventCols.Items.AddRange(EventCol.ToArray());
            }

            frm.grpOccasionEventCols.Visible = frm.lstOccasionEventCols.Items.Count > 0;

            SelectTab(frm);
        }
コード例 #13
0
ファイル: EC_SiteConquered.cs プロジェクト: tier6tank/DFWV
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (TabPage tabpage in frm.MainTabEventCollectionTypes.TabPages)
            {
                if (tabpage != frm.tabEventCollectionSiteConquered)
                {
                    frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
                }
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionSiteConquered))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionSiteConquered);
            }

            frm.lblSiteConqueredSite.Data     = Site;
            frm.lblSiteConqueredCoords.Data   = Site != null ? new Coordinate(Site.Coords) : null;
            frm.lblSiteConqueredAttacker.Data = AttackingEn;
            frm.lblSiteConqueredDefender.Data = DefendingEn;
            frm.lblSiteConqueredWar.Data      = WarEventCol;
            if (StartTime != null || EndTime != null)
            {
                frm.lblSiteConqueredTime.Text     = StartTime.ToString() + " - " + EndTime.ToString();
                frm.lblSiteConqueredDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblSiteConqueredTime.Text     = "";
                frm.lblSiteConqueredDuration.Text = "";
            }
            frm.lblSiteConqueredOrdinal.Text = Ordinal.ToString();

            frm.lstSiteConqueredEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstSiteConqueredEvents.Items.AddRange(Event.ToArray());
            }

            frm.grpSiteConqueredEvents.Visible = frm.lstSiteConqueredEvents.Items.Count > 0;

            if (frm.lstSiteConqueredEvents.Items.Count > 0)
            {
                frm.lstSiteConqueredEvents.SelectedIndex = 0;
            }

            base.SelectTab(frm);
        }
コード例 #14
0
ファイル: EC_Journey.cs プロジェクト: tier6tank/DFWV
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (TabPage tabpage in frm.MainTabEventCollectionTypes.TabPages)
            {
                if (tabpage != frm.tabEventCollectionJourney)
                {
                    frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
                }
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionJourney))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionJourney);
            }

            if (StartTime != null || EndTime != null)
            {
                frm.lblJourneyTime.Text     = StartTime.ToString() + " - " + EndTime.ToString();
                frm.lblJourneyDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblJourneyTime.Text     = "";
                frm.lblJourneyDuration.Text = "";
            }
            frm.lblJourneyOrdinal.Text = Ordinal.ToString();

            frm.lstJourneyEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstJourneyEvents.Items.AddRange(Event.ToArray());
            }

            frm.grpJourneyEvents.Visible = frm.lstJourneyEvents.Items.Count > 0;

            if (frm.lstJourneyEvents.Items.Count > 0)
            {
                frm.lstJourneyEvents.SelectedIndex = 0;
            }

            base.SelectTab(frm);
        }
コード例 #15
0
        internal void ToSettings(string indexName, Dictionary <string, string> settings, bool isSubField)
        {
            var category = "Index-" + indexName.ToLower() + "-Fields-" + this.Name.ToLower();

            Lib.AddSettingAsNeeded(settings, category, "IsSubField", isSubField.ToString(), true);

            Lib.AddSettingAsNeeded(settings, category, "Name", this.Name, true);

            Lib.AddSettingAsNeeded(settings, category, "Ordinal", Ordinal.ToString(), true);


            Lib.AddSettingAsNeeded(settings, category, "Value", ("" + Value).ToString(), true);

            Lib.AddSettingAsNeeded(settings, category, "IsPrimaryKey", IsPrimaryKey.ToString(), true);

            Lib.AddSettingAsNeeded(settings, category, "StoredInIndex", StoredInIndex.ToString(), true);

            Lib.AddSettingAsNeeded(settings, category, "Searchable", Searchable.ToString(), true);

            Lib.AddSettingAsNeeded(settings, category, "Format", Format.ToString(), true);

            Lib.AddSettingAsNeeded(settings, category, "Type", DataType.ToString(), true);

            Lib.AddSettingAsNeeded(settings, category, "IsBoolean", IsBoolean.ToString(), true);

            Lib.AddSettingAsNeeded(settings, category, "TrueValue", TrueValue.ToString(), true);

            Lib.AddSettingAsNeeded(settings, category, "IsCreatedDate", IsCreatedDate.ToString(), true);

            Lib.AddSettingAsNeeded(settings, category, "IsModifiedDate", IsModifiedDate.ToString(), true);

            Lib.AddSettingAsNeeded(settings, category, "ForeignKeyTable", ForeignKeyTable.ToString(), true);

            Lib.AddSettingAsNeeded(settings, category, "ForeignKeyField", ForeignKeyField.ToString(), true);


            Lib.AddSettingAsNeeded(settings, category, "Calculation", Calculation.ToString(), true);
            foreach (Field sf in this.SubFields)
            {
                sf.ToSettings(indexName, settings, true);
            }
        }
コード例 #16
0
 protected void ToString(List <string> toStringOutput)
 {
     toStringOutput.Add($"ItemId = {(ItemId == null ? "null" : ItemId == string.Empty ? "" : ItemId)}");
     toStringOutput.Add($"Name = {(Name == null ? "null" : Name == string.Empty ? "" : Name)}");
     toStringOutput.Add($"Sku = {(Sku == null ? "null" : Sku == string.Empty ? "" : Sku)}");
     toStringOutput.Add($"Upc = {(Upc == null ? "null" : Upc == string.Empty ? "" : Upc)}");
     toStringOutput.Add($"Ordinal = {(Ordinal == null ? "null" : Ordinal.ToString())}");
     toStringOutput.Add($"PricingType = {(PricingType == null ? "null" : PricingType.ToString())}");
     toStringOutput.Add($"PriceMoney = {(PriceMoney == null ? "null" : PriceMoney.ToString())}");
     toStringOutput.Add($"LocationOverrides = {(LocationOverrides == null ? "null" : $"[{ string.Join(", ", LocationOverrides)} ]")}");
     toStringOutput.Add($"TrackInventory = {(TrackInventory == null ? "null" : TrackInventory.ToString())}");
     toStringOutput.Add($"InventoryAlertType = {(InventoryAlertType == null ? "null" : InventoryAlertType.ToString())}");
     toStringOutput.Add($"InventoryAlertThreshold = {(InventoryAlertThreshold == null ? "null" : InventoryAlertThreshold.ToString())}");
     toStringOutput.Add($"UserData = {(UserData == null ? "null" : UserData == string.Empty ? "" : UserData)}");
     toStringOutput.Add($"ServiceDuration = {(ServiceDuration == null ? "null" : ServiceDuration.ToString())}");
     toStringOutput.Add($"AvailableForBooking = {(AvailableForBooking == null ? "null" : AvailableForBooking.ToString())}");
     toStringOutput.Add($"ItemOptionValues = {(ItemOptionValues == null ? "null" : $"[{ string.Join(", ", ItemOptionValues)} ]")}");
     toStringOutput.Add($"MeasurementUnitId = {(MeasurementUnitId == null ? "null" : MeasurementUnitId == string.Empty ? "" : MeasurementUnitId)}");
     toStringOutput.Add($"TeamMemberIds = {(TeamMemberIds == null ? "null" : $"[{ string.Join(", ", TeamMemberIds)} ]")}");
 }
コード例 #17
0
        internal Node ToXmlNode()
        {
            Node nd = new Node("Field");

            nd.Attributes.SetValue("Ordinal", Ordinal.ToString());
            nd.Attributes.SetValue("Name", Name);
            if (Value != null)
            {
                nd.Attributes.SetValue("Value", Value.ToString());
            }
            nd.Attributes.SetValue("IsPrimaryKey", IsPrimaryKey.ToString());
            nd.Attributes.SetValue("StoredInIndex", StoredInIndex.ToString());
            nd.Attributes.SetValue("Searchable", Searchable.ToString());
            nd.Attributes.SetValue("Format", Format);
            if (DataType != null)
            {
                nd.Attributes.SetValue("Type", DataType.ToString());
            }

            nd.Attributes.SetValue("IsBoolean", IsBoolean.ToString());
            nd.Attributes.SetValue("TrueValue", TrueValue);

            nd.Attributes.SetValue("IsCreatedDate", IsCreatedDate.ToString());
            nd.Attributes.SetValue("IsModifedDate", IsModifiedDate.ToString());

            nd.Attributes.SetValue("ForeignKeyTable", ForeignKeyTable);
            nd.Attributes.SetValue("ForeignKeyField", ForeignKeyField);


            nd.Attributes.SetValue("Calculation", Calculation);
            foreach (Field sf in this.SubFields)
            {
                nd.Nodes.Add(sf.ToXmlNode());
            }

            return(nd);
        }
コード例 #18
0
        internal void FillDataSet(DataSet ds, string indexName, bool isSubField)
        {
            var dtField = ds.Tables["index_field"];

            var drFields = dtField.Select("index_name = '" + indexName + "' and field_name = '" + Name + "'");
            var drField  = dtField.NewRow();

            if (drFields.Length == 0)
            {
                dtField.Rows.Add(drField);
            }
            else
            {
                drField = drFields[0];
            }


            drField["index_name"] = indexName;
            drField["field_name"] = Name.ToString();
            drField["ordinal"]    = Ordinal.ToString();
            //drField["value"] = ("" + Value).ToString();
            drField["is_primary_key"]     = IsPrimaryKey.ToString();
            drField["is_stored_in_index"] = StoredInIndex.ToString();
            drField["is_searchable"]      = Searchable.ToString();
            drField["format"]             = Format.ToString();
            drField["type"]              = DataType.ToString();
            drField["is_boolean"]        = IsBoolean.ToString();
            drField["true_value"]        = TrueValue.ToString();
            drField["foreign_key_table"] = ForeignKeyTable.ToString();
            drField["foreign_key_field"] = ForeignKeyField.ToString();
            drField["calculation"]       = Calculation.ToString();

            foreach (Field sf in this.SubFields)
            {
                sf.FillDataSet(ds, indexName, true);
            }
        }
コード例 #19
0
 string IConvertible.ToString(IFormatProvider provider)
 {
     return(Ordinal.ToString(provider));
 }
コード例 #20
0
ファイル: TypeRef.cs プロジェクト: tamirdresher/reaqtor
 /// <summary>
 /// Gets the JSON representation of the type reference.
 /// </summary>
 /// <returns>JSON representation of the type reference.</returns>
 public Json.Expression ToJson()
 {
     return(Json.Expression.Number(Ordinal.ToString(CultureInfo.InvariantCulture)));
 }
コード例 #21
0
 public string GetSummaryHeader()
 {
     return(string.Format("==================================\n[{0}] '{1}' ({2}):\n", Ordinal.ToString().PadLeft(2), Name, s_typeNames[Type]));
 }