当前位置: 首页>>代码示例>>C#>>正文


C# Data.ToString方法代码示例

本文整理汇总了C#中Data.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Data.ToString方法的具体用法?C# Data.ToString怎么用?C# Data.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Data的用法示例。


在下文中一共展示了Data.ToString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CheckoutVersion

 public override void CheckoutVersion(EngineRequest request, Data.VersionId version)
 {
     CheckInitialization();
     Logger.Storage.Debug("Checking out the version '" + version.ToString() + "'");
     EngineMethods.CheckoutVersion act = new EngineMethods.CheckoutVersion(request, version);
     act.Execute();
 }
开发者ID:274706834,项目名称:opendms-dot-net,代码行数:7,代码来源:Engine.cs

示例2: RemoteServerNode

 public RemoteServerNode(ServersTreeView treeView, Data.RemoteServer _serverData)
     : base(treeView, "/", _serverData, _serverData.ToString())
 {
     this.ServerData = _serverData;
     this.ImageIndex = ServersTreeView.RemoteServerIcon;
     this.SelectedImageIndex = this.ImageIndex;
 }
开发者ID:kubixlol2,项目名称:MinecraftServerManager,代码行数:7,代码来源:RemoteServerNode.cs

示例3: GetInfo

 private string GetInfo(Data key)
 {
     const string format = "{0,-10} {1, 5}";
     string ret = key.ToString() + ":";
     switch (key)
     {
         case Data.Time:
             return String.Format(format, ret, Clock.TotalFrameTime) + " (ms)";
         case Data.Frame:
             return String.Format(format, ret, Clock.TotalFrameCount);
         case Data.FPS:
             return String.Format(format, ret, Clock.FPS);
         case Data.MinFPS:
             return String.Format(format, ret, Clock.MinFPS);
         case Data.AvgFPS:
             return String.Format(format, ret, Clock.AverageFPS);
         case Data.MaxFPS:
             return String.Format(format, ret, Clock.MaxFPS);
         case Data.Delta:
             return String.Format(format, ret, Clock.LastFrameTime) + " (ms)";
         case Data.MinDelta:
             return String.Format(format, ret, Clock.MinFrameTime) + " (ms)";
         case Data.AvgDelta:
             return String.Format(format, ret, Clock.AverageFrameTime) + " (ms)";
         case Data.MaxDelta:
             return String.Format(format, ret, Clock.MaxFrameTime + " (ms)");
         default:
             return "invalid key";
     }
 }
开发者ID:gitter-badger,项目名称:Flare.Framework,代码行数:30,代码来源:ClockDisplay.cs

示例4: ServerNode

 public ServerNode(ServersTreeView treeView, DirectoryInfo directoryInfo, Data.Server _serverData)
     : base(treeView, directoryInfo, _serverData.ToString())
 {
     this.serverData = _serverData;
     this.directory = directoryInfo;
     this.ImageIndex = ServersTreeView.LocalServerIcon;
     this.SelectedImageIndex = this.ImageIndex;
 }
开发者ID:almaddy95,项目名称:MinecraftServerManager,代码行数:8,代码来源:ServerNode.cs

示例5: Decrypt

 public static string Decrypt(String strEncText, string strKey24)
 {
     var sym = new Symmetric(Symmetric.Provider.TripleDES, true);
     var key = new Data(strKey24);
     var encryptedData = new Data();
     encryptedData.Base64 = strEncText;
     var decryptedData = new Data();
     decryptedData = sym.Decrypt(encryptedData, key);
     return decryptedData.ToString();
 }
开发者ID:vincentzh,项目名称:BeautySalonManagement,代码行数:10,代码来源:EncryptionUtil.cs

示例6: ServerNode

 public ServerNode(ServersTreeView treeView, DirectoryInfo directoryInfo, Data.Server _serverData)
     : base(treeView, directoryInfo, _serverData.ToString())
 {
     IgnoredFiles.Add("ServerManagerData.xml");
     IgnoredFiles.Add("eula.txt");
     IgnoredFiles.Add("server.jar");
     serverData = _serverData;
     directory = directoryInfo;
     ImageIndex = ServersTreeView.LocalServerIcon;
     SelectedImageIndex = ImageIndex;
 }
开发者ID:Libter,项目名称:MinecraftServerManager,代码行数:11,代码来源:ServerNode.cs

示例7: FxGroupMenuItem

      public FxGroupMenuItem(CheckedListBox box_, Data.FXGroup group_)
      {
        m_listBox = box_;
        m_group = group_;

        Text = group_.ToString();
      }
开发者ID:heimanhon,项目名称:researchwork,代码行数:7,代码来源:BuilderControl.cs

示例8: ResourceRequest

 public ResourceRequest(string user, Data.ResourceId id, GlobalPermission globalPermissions, ResourcePermission resourcePermissions)
     : base(user, id.ToString(), globalPermissions, resourcePermissions)
 {
 }
开发者ID:274706834,项目名称:opendms-dot-net,代码行数:4,代码来源:ResourceRequest.cs

示例9: KeeperException

 /// <summary>
 /// new
 /// </summary>
 /// <param name="path"></param>
 /// <param name="error"></param>
 public KeeperException(string path, Data.ZoookError error)
     : base(string.Concat("path:{", path ?? string.Empty, "}, error:{", error.ToString(), "}"))
 {
     this.Path = path;
     this.Error = error;
 }
开发者ID:RANENTONG,项目名称:Zookeeper.Net,代码行数:11,代码来源:KeeperException.cs

示例10: Build

 public static Uri Build(IDatabase db, Data.VersionId versionId)
 {
     return new Uri(db.Uri.ToString() + versionId.ToString());
 }
开发者ID:274706834,项目名称:opendms-dot-net,代码行数:4,代码来源:UriBuilder.cs

示例11: SetTableStructure

                public void SetTableStructure(Data.TableStructure newTableDef)
                {
                        Data.TableStructure CurrentTableDef = this.GetTableStructure(newTableDef.Name, false);
                        bool TablaCreada = false;
                        if (CurrentTableDef.Columns.Count == 0) {
                                // Crear la tabla
                                string Sql = newTableDef.ToString();
                                this.ExecuteSql(this.CustomizeSql(Sql));
                                TablaCreada = true;
                        } else {
                                // Modificar tabla existente

                                // Primero dropeo las que ya no son claves primarias
                                foreach (Data.ColumnDefinition NewFieldDef in newTableDef.Columns.Values) {
                                        if (CurrentTableDef.Columns.ContainsKey(NewFieldDef.Name)) {
                                                Data.ColumnDefinition CurrentFieldDef = CurrentTableDef.Columns[NewFieldDef.Name];
                                                if (CurrentFieldDef.PrimaryKey == true && NewFieldDef.PrimaryKey == false) {
                                                        DropPrimaryKey(newTableDef.Name);
                                                        break;
                                                }
                                        }
                                }

                                // Luego hago las modificaciones pertinentes
                                string LastColName = null;
                                List<string> Alterations = new List<string>();
                                foreach (Data.ColumnDefinition NewFieldDef in newTableDef.Columns.Values) {
                                        if (CurrentTableDef.Columns.ContainsKey(NewFieldDef.Name) == false) {
                                                //Agregar campo a una tabla existente
                                                string Sql = "ADD COLUMN \"" + NewFieldDef.Name + "\" " + NewFieldDef.SqlDefinition(true);
                                                if (this.SqlMode == qGen.SqlModes.MySql) {
                                                        if (LastColName == null)
                                                                Sql += " FIRST";
                                                        else
                                                                Sql += " AFTER \"" + LastColName + "\"";
                                                }
                                                Alterations.Add(Sql);
                                        } else {
                                                Data.ColumnDefinition CurrentFieldDef = CurrentTableDef.Columns[NewFieldDef.Name];
                                                if (CurrentFieldDef != NewFieldDef) {
                                                        //Existe el campo, pero no es igual... hay que modificarlo
                                                        if (this.AccessMode == AccessModes.Npgsql) {
                                                                if (CurrentFieldDef.FieldType != NewFieldDef.FieldType || CurrentFieldDef.Lenght != NewFieldDef.Lenght || CurrentFieldDef.Precision != NewFieldDef.Precision)
                                                                        Alterations.Add("ALTER COLUMN \"" + NewFieldDef.Name + "\" TYPE " + NewFieldDef.SqlType());
                                                                if (CurrentFieldDef.Nullable != NewFieldDef.Nullable) {
                                                                        if (NewFieldDef.Nullable)
                                                                                Alterations.Add("ALTER COLUMN \"" + NewFieldDef.Name + "\" DROP NOT NULL");
                                                                        else
                                                                                Alterations.Add("ALTER COLUMN \"" + NewFieldDef.Name + "\" SET NOT NULL");
                                                                }
                                                                if (CurrentFieldDef.DefaultValue != NewFieldDef.DefaultValue && NewFieldDef.FieldType != DbTypes.Serial) {
                                                                        //Cambio de default value (salvo en Serial, que en PostgreSQL es siempre 0)
                                                                        switch (NewFieldDef.FieldType) {
                                                                                case DbTypes.VarChar:
                                                                                case DbTypes.Text:
                                                                                        if (NewFieldDef.DefaultValue == null)
                                                                                                Alterations.Add("ALTER COLUMN \"" + NewFieldDef.Name + "\" SET DEFAULT ''");
                                                                                        else if (NewFieldDef.DefaultValue == "NULL")
                                                                                                Alterations.Add("ALTER COLUMN \"" + NewFieldDef.Name + "\" SET DEFAULT NULL");
                                                                                        else
                                                                                                Alterations.Add("ALTER COLUMN \"" + NewFieldDef.Name + "\" SET DEFAULT '" + NewFieldDef.DefaultValue + "'");
                                                                                        break;
                                                                                default:
                                                                                        if (NewFieldDef.DefaultValue != null && NewFieldDef.DefaultValue.Length > 0)
                                                                                                Alterations.Add("ALTER COLUMN \"" + NewFieldDef.Name + "\" SET DEFAULT " + NewFieldDef.DefaultValue);
                                                                                        else
                                                                                                Alterations.Add("ALTER COLUMN \"" + NewFieldDef.Name + "\" DROP DEFAULT");
                                                                                        break;
                                                                        }
                                                                }
                                                        } else {
                                                                string Alter = "MODIFY COLUMN \"" + NewFieldDef.Name + "\" " + NewFieldDef.SqlDefinition(false);
                                                                if (this.SqlMode == qGen.SqlModes.MySql) {
                                                                        if (LastColName == null)
                                                                                Alter += " FIRST";
                                                                        else
                                                                                Alter += " AFTER \"" + LastColName + "\"";
                                                                }
                                                                Alterations.Add(Alter);
                                                        }
                                                }
                                        }
                                        LastColName = NewFieldDef.Name;
                                }

                                foreach (Data.ColumnDefinition FieldDef in CurrentTableDef.Columns.Values) {
                                        if (newTableDef.Columns.ContainsKey(FieldDef.Name) == false) {
                                                // TODO: que marque la columna para eliminarla en el futuro
                                                // Alterations.Add("DROP COLUMN \"" + FieldDef.Name + "\"");
                                        }
                                }

                                // Ejecuto todas las alteraciones juntas
                                if (Alterations.Count > 0) {
                                        string Sql = "ALTER TABLE \"" + newTableDef.Name + "\" " + string.Join("," + System.Environment.NewLine, Alterations.ToArray());
                                        this.ExecuteSql(this.CustomizeSql(Sql));
                                }
                        }

                        //Crear y modificar indices
//.........这里部分代码省略.........
开发者ID:solutema,项目名称:ultralight,代码行数:101,代码来源:Connection.cs

示例12: GetItemDefinition

        public override Data.ItemDefinition GetItemDefinition(Data.ID itemId, CallContext context)
        {
            Log.Debug("start GetItemDefinition(..) with itemId " + itemId.ToString() + ", database: " + this.Database.Name);
            XPathNavigator element = null;

            if (courseCache.ContainsKey(itemId))
            {
                context.Abort();
                element = (XPathNavigator)courseCache[itemId];
            }
            else
            {
                element = CourseData.SelectSingleNode(string.Format("//course[@id='{0}']", itemId.ToString()));
                if (element != null)
                {
                    context.Abort();
                    string itemName = element.SelectSingleNode("./name").Value;
                    ItemDefinition definition = new ItemDefinition(itemId, itemName, TemplateID, ID.Null);
                    courseCache.Add(itemId, element, 0L);
                    return definition;
                }
            }

            return base.GetItemDefinition(itemId, context);
        }
开发者ID:nleSitecore,项目名称:Roadshow,代码行数:25,代码来源:CourseDataProvider.cs

示例13: showFXRegion

    private void showFXRegion(Data.FXGroup group_)
    {
      ReturnsEval.DataSeriesEvaluator eval = new ReturnsEval.DataSeriesEvaluator(group_.ToString(), m_evaluator.DataType);

      foreach (ReturnsEval.DataSeriesEvaluator innerEval in m_evaluator.InnerSeries)
      {
        Data.Currency ccy = Singleton<Data.FXIDs>.Instance[innerEval.Name];

        if (ccy == null)
          continue;

        if (ccy.IsGroup(group_))
          eval.AddInnerEvaluator(innerEval);
      }

      eval.Evaluate(eval.All.MinDate, eval.All.MaxDate);

      ReturnsDisplay rd = new ReturnsDisplay();
      rd.Bind(eval);
      SI.Controls.ShowForm.Show(rd, FormBorderStyle.Sizable, null, FindForm().Text + " - " + group_.ToString());
    }
开发者ID:heimanhon,项目名称:researchwork,代码行数:21,代码来源:ReturnsDisplay.cs

示例14: GoogleMapMarker

    public GoogleMapMarker(Data.ResourceNames r)
    {
        size = GoogleMapMarkerSize.Mid;
        locations = new GoogleMapLocation[0];


        icon = "http://ro4m3r.servebeer.com:1337/pictures/SocialGaming/" + r.ToString() + ".png";
        Debug.Log(icon);


        //if (r == Data.ResourceNames.WOOD)
        //    icon = "http://images2.wikia.nocookie.net/farmville/images/thumb/c/c4/Wood_Pile-icon.png/35px-Wood_Pile-icon.png";
        //else if (r == Data.ResourceNames.ORE)
        //    icon = "http://www.top1gaming.com/images/wonderlandonline//iron_ore.png";
        //else if (r == Data.ResourceNames.CLAY)
        //    icon = "http://premierreclaimedbricks.co.uk/wp-content/uploads/2011/09/brick-icon4.png";
    }
开发者ID:Ozelotl,项目名称:Portfolio,代码行数:17,代码来源:GoogleMap.cs

示例15: DeleteResource

 public override void DeleteResource(EngineRequest request, Data.ResourceId resource)
 {
     CheckInitialization();
     Logger.Storage.Debug("Deleting resource '" + resource.ToString() + "'...");
     EngineMethods.DeleteResource act = new EngineMethods.DeleteResource(request, resource);
     act.Execute();
 }
开发者ID:274706834,项目名称:opendms-dot-net,代码行数:7,代码来源:Engine.cs


注:本文中的Data.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。