• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Data类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: AbilityEntry

 public AbilityEntry(Data.AbilityEntry Entry)
 {
     this.Index = Entry.Index;
     this.Note = Entry.Note;
     this.Pokemon = Entry.Pokemon.Name;
     this.Ability = Entry.Ability.Name;
 }
开发者ID:Dezzles,项目名称:DexComplete,代码行数:7,代码来源:AbilityEntry.cs


示例2: Entered

        /*
         * Corey Paxton     - 4/5/2014 - Initial Version
         */
        public override void Entered(StateControl from, Data.User user, Data.User returnUser)
        {
            base.Entered(from, user, returnUser);
            this.txt_currentName.Text = user.Name;
            this.txt_newName.Text = user.Name;
            ddl_groups.DataSource = Data.GroupList.Instance;

            if (this.CurrentUser.Status == Data.User.UserType.Teacher)
            {
                // Hide group stuff, but display the password stuff
                lbl_group.Visible = false;
                ddl_groups.Visible = false;
                lbl_newPassword.Visible = true;
                lbl_newPasswordConfirm.Visible = true;
                txt_newPassword.Visible = true;
                txt_newPasswordConfirm.Visible = true;
            }
            else if (this.CurrentUser.Status == Data.User.UserType.Student)
            {
                // Display group stuff, hide password
                lbl_group.Visible = true;
                ddl_groups.Visible = true;
                lbl_newPassword.Visible = false;
                lbl_newPasswordConfirm.Visible = false;
                txt_newPassword.Visible = false;
                txt_newPasswordConfirm.Visible = false;
                if(this.CurrentUser.GroupName != null)
                    ddl_groups.SelectedItem = Data.GroupList.Instance.GetByName(this.CurrentUser.GroupName);

            }
        }
开发者ID:jeffreyrack,项目名称:hodor,代码行数:34,代码来源:UpdateUser.cs


示例3: AddMethod

 public void AddMethod(MethodParamResult inMethod,Data.Inputs.Interfaces.IEventInput input)
 {
     MethodParamPair pair = new MethodParamPair(inMethod, input);
     _methods.AddLast(pair);
     if (_current == null)
         _current = _methods.First;
 }
开发者ID:soljakwinever,项目名称:ElegyOfDisharmony,代码行数:7,代码来源:ActionList.cs


示例4: InitGPIO

        static void InitGPIO(this MainPage page, Data data)
        {
            GpioController gpio = GpioController.GetDefault();
            page.GpioPinInfo.Text = "Led pin: " + Data.LED_PIN.ToString();

            // Show an error if there is no GPIO controller
            if (gpio == null)
            {
                data.pin = null;
                page.GpioStatus.Text = "There is no GPIO controller on this device.";
                return;
            }

            data.pin = gpio.OpenPin(Data.LED_PIN);
            GpioPin pin = data.pin;

            data.pinValue = GpioPinValue.High;
            pin.Write(data.pinValue);
            pin.SetDriveMode(GpioPinDriveMode.Output);

            page.GpioStatus.Text = "GPIO pin initialized correctly.";

            var timer = data.Timer;
            if (pin != null)
            {
                timer.Start();
            }
        }
开发者ID:akrisiun,项目名称:iot-lib,代码行数:28,代码来源:GPIOBlinker.cs


示例5: DeleteEventAction

    protected void DeleteEventAction(object sender, EventArgs e)
    {
        HttpCookie cookie = Request.Cookies["BrowserDate"];
        Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));

        if (Request.QueryString["O"] != null)
        {
            if (Request.QueryString["U"] != null)
            {
                dat.Execute("DELETE FROM User_GroupEvent_Calendar WHERE UserID=" + Session["User"].ToString() +
               " AND GroupEventID=" + Request.QueryString["ID"].ToString() + " AND ReoccurrID=" +
               Request.QueryString["O"].ToString());
            }
            else
            {
                dat.Execute("DELETE FROM GroupEvent_Members WHERE UserID=" + Session["User"].ToString() +
               " AND GroupEventID=" + Request.QueryString["ID"].ToString() + " AND ReoccurrID=" +
               Request.QueryString["O"].ToString());
            }
        }
        else
        {
            dat.Execute("DELETE FROM User_Calendar WHERE UserID=" + Session["User"].ToString() +
           " AND EventID=" + Request.QueryString["ID"].ToString());
        }

        RemovePanel.Visible = false;
        ThankYouPanel.Visible = true;
    }
开发者ID:aleksczajka,项目名称:Hippo-Code---OLD,代码行数:29,代码来源:DeleteEvent.aspx.cs


示例6: UploadContent

 public UploadContent(IDatabase db, Data.Version version,
     int sendTimeout, int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _db = db;
     _version = version;
 }
开发者ID:274706834,项目名称:opendms-dot-net,代码行数:7,代码来源:UploadContent.cs


示例7: OpenquantDataLoader

        /// <summary>
        ///     the data loader for openquant.
        /// </summary>
        /// <param name="instrument">The instrument.</param>
        /// <param name="dtfrom">The dtfrom.</param>
        /// <param name="dtto">The dtto.</param>
        /// <param name="barsize">The barsize.</param>
        /// <returns></returns>
        public static LoaderTypes OpenquantDataLoader(string instrument, DateTime dtfrom, DateTime dtto,
                                                      Data.Data.BarType bartype, long barsize)
        {
            var BarSerie = new DataArray();
            Console.WriteLine("Initialized the Openquant-Encog Loader");
            try
            {
                //	BarSerie = this.GetHistoricalBars(dtfrom, dtto, BarType.Time, barsize);
                //	BarSerie = this.GetHistoricalBars(this.MarketDataProvider,Instrument,dtfrom,dtto,(int)barsize);
                // BarSerie = DataManager.GetHistoricalBars(instrument, Data.Data.BarType.Time, 3600);

                var typeLoaded = new LoaderTypes(instrument, dtfrom, dtto, bartype, barsize);
                Console.WriteLine("Loaded Types instrument:" + typeLoaded.Instrument);
                return typeLoaded;
            }
            catch (Exception ex)
            {
                var er = new EncogError(ex);
                Console.WriteLine("Error :" + ex.Message);
                Console.WriteLine("Error :" + ex.StackTrace);
                Console.WriteLine("Error:" + ex.InnerException);
                Console.WriteLine("Full message:" + ex);
                return null;
            }
        }
开发者ID:jongh0,项目名称:MTree,代码行数:33,代码来源:OpenQuantLoader.cs


示例8: CheckAgencyPropertyExists

        private static bool CheckAgencyPropertyExists(Property agencyProperty, Data.Models.Property databasePropertyDto)
        {
            IPropertyMatcherFactory factory = new PropertyMatcherFactory();
            IPropertyMatcher propertyMatcher = factory.GetPropertyMatcher(agencyProperty.AgencyCode);

            return propertyMatcher.IsMatch(agencyProperty, Mapper.Map<Property>(databasePropertyDto));
        }
开发者ID:mercurysn,项目名称:PropertyImporter,代码行数:7,代码来源:PropertyImportController.cs


示例9: Fire

    protected override void Fire(object sender, EventArgs e)
    {
        if (!UserInfo.isDoctor(Session))
        {
            alertAndGoback("you are not a doctor. Please login");
            return;
        }

        String today = DateTime.Now.Date.ToString().Substring(0, 10);
        DOS.Text = today;
        UserID.Text = Param.getString("pId");
        Data result = new Data();
        DBC dbc = new DBC();

        Data data = new Data();
        /*dbc.open();
        data.add("pID", Param.get("pId"));
        result = dbc.select("SELECT * FROM Users WHERE UserID = @pId", data);
        dbc.close();*/
        SurgeryBiz biz = new SurgeryBiz();
        biz.view(data);
        userNameLabel.Text = Param.getString("pId");
        type.DataSource = biz.getType(data).Source;
        type.DataBind();
    }
开发者ID:hyori7,项目名称:Hospital,代码行数:25,代码来源:create.aspx.cs


示例10: Board

		// Used to populate the board in a networked game
		public Board(Data data)
		{
			Width = data.Width;
			Height = data.Height;
			SetColors(data.Colors);
			floodFiller = new FloodFiller(colors);
		}
开发者ID:whztt07,项目名称:DeltaEngine,代码行数:8,代码来源:Board.cs


示例11: Deserialize

 public object Deserialize(IStorage storage, Data.Node data, object result)
 {
     return data is Data.DateTime ? (data as Data.DateTime).Value :
         data is Data.Binary ? new System.DateTime(BitConverter.ToInt64((data as Data.Binary).Value, 0)) :
         data is Data.String ? System.DateTime.Parse((data as Data.String).Value) :
         new System.DateTime();
 }
开发者ID:imintsystems,项目名称:Kean,代码行数:7,代码来源:DateTime.cs


示例12: GenerateGraphBody

        public string GenerateGraphBody(string id, Data[] data, string[] tick_label)
        {
            string ret = "";


            ret += "<div id=\"" + id + "\"></div>\n";
            ret += "<script>\n";

            ret += "(function basic_radar(container) {\n";

            for (int x = 0; x < data.GetLength(0); x++)
            {
                ret += "var s" + x + " = { label : '" + data[x].label + "', data : [";
                for (int y = 0; y < data[x].data.GetLength(0); y++)
                {
                    if (y != 0)
                    {
                        ret += ",";
                    }
                    ret += "[" + y + "," + data[x].data[y] + "]";
                }
                ret += "]};";
            }

            ret += "var ticks = [\n";
            for (int i = 0; i < tick_label.Length; i++)
            {
                if (i != 0)
                {
                    ret += ","; 
                }
                ret += "[" + i + ", \"" + tick_label[i] + "\"]\n"; 
            }
            ret += "]\n"; 

            ret += "graph = Flotr.draw(container,[";
            for (int x = 0; x < data.GetLength(0); x++)
            {
                if (x != 0)
                {
                    ret += ","; 
                }
                ret += "s" + x; 
            }
            ret += "], {\n";

            ret += "radar : { show : true}, \n"; 
            ret += "grid  : { circular : true, minorHorizontalLines : true}, \n"; 
            ret += "yaxis : { min : " + m_min + ", max : " + m_max + ", minorTickFreq : 2}, \n";
            ret += "xaxis : { ticks : ticks},\n"; 
            ret += "mouse : { track : true}\n"; 

            ret += "});\n";
            ret += "})(document.getElementById(\"" + id + "\"));\n";

            ret += "</script>\n";

            return ret;

        }
开发者ID:azarashin,项目名称:CSFlotr2,代码行数:60,代码来源:RadarChart.cs


示例13: Deserialize

        public object Deserialize(IStorage storage, Data.Node data, object result)
        {
            Kean.Collection.IList<Data.Node> nodes;
            Reflect.Type type;
            Reflect.Type elementType;
            type = data.Type;
            elementType = this.GetElementType(type);
            if (data is Data.Collection)
                nodes = (data as Data.Collection).Nodes;
            else
            { // only one element so it was impossible to know it was a collection
                nodes = new Kean.Collection.List<Data.Node>(data);
                data.Type = data.OriginalType ?? elementType;
                Uri.Locator locator = data.Locator.Copy();
                locator.Fragment += "0";
                data.Locator = locator;
            }

            if (result.IsNull())
                result = this.Create(type, elementType, nodes.Count);
            int i = 0;
            foreach (Data.Node child in nodes)
            {
                int c = i++; // ensure c is unique in every closure of lambda function below
                storage.Deserialize(child, elementType, d => this.Set(result, d, c));
            }
            return result;
        }
开发者ID:imintsystems,项目名称:Kean,代码行数:28,代码来源:Collection.cs


示例14: Entered

 public override void Entered(StateControl from, Data.User user, Data.User returnUser)
 {
     base.Entered(from, user, returnUser);
     txt_newName.Text = string.Empty;
     txt_oldName.Text = string.Empty;
     dtg_ungrouped_users.DataSource = Data.UserList.Instance.ApplyGroupFilter("Ungrouped Users");
 }
开发者ID:jeffreyrack,项目名称:hodor,代码行数:7,代码来源:UpdateGroup.cs


示例15: Download

 public void Download(Data.RemoteServer _data, string _localFile, string _remoteFile)
 {
     this.data = _data;
     this.remoteFile = _remoteFile;
     this.localFile = _localFile;
     string[] files = Utils.Ftp.directoryListDetailed(data, remoteFile.Substring(0, remoteFile.LastIndexOf("/")) + "/");
     foreach(string elem in files)
     {
         string[] splitted = elem.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
         if (splitted.Length >= 9)
         {
             string name = "";
             for (int i = 8; i < splitted.Length; i++)
             {
                 name += splitted[i] + " ";
             }
             name = Utils.Strings.CutLastChars(name, 1);
             if (name == Path.GetFileName(remoteFile))
                 this.fileSize = long.Parse(splitted[4]);
         }
     }
     if (this.fileSize > 65536)
     {
         worker.RunWorkerAsync();
         this.ShowDialog();
     }
     else
     {
         worker_DoWork(null, null);
     }
 }
开发者ID:almaddy95,项目名称:MinecraftServerManager,代码行数:31,代码来源:FtpDownloader.cs


示例16: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        HttpCookie cookie = Request.Cookies["BrowserDate"];
        if (cookie == null)
        {
            cookie = new HttpCookie("BrowserDate");
            cookie.Value = DateTime.Now.ToString();
            cookie.Expires = DateTime.Now.AddDays(22);
            Response.Cookies.Add(cookie);
        }
        Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));
        if (Session["User"] == null)
        {
            Response.Redirect("~/Home.aspx");

        }

        if (Request.QueryString["ID"] == null)
            Response.Redirect("Home.aspx");

        if (dat.HasEventPassed(Request.QueryString["ID"].ToString()))
        {
            DataView dvName = dat.GetDataDV("SELECT * FROM Events WHERE ID="+
                Request.QueryString["ID"].ToString());
            Response.Redirect(dat.MakeNiceName(dvName[0]["Header"].ToString()) + "_" +
                Request.QueryString["ID"].ToString() + "_Event");
        }
    }
开发者ID:aleksczajka,项目名称:Hippo-Code---OLD,代码行数:28,代码来源:EditEvent.aspx.cs


示例17: SendIt

    public int SendIt(string msgText, string userName, string userID, string eventName, 
        string[] idArray, string msgBody)
    {
        HttpCookie cookie = Request.Cookies["BrowserDate"];
        Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));
        DataSet dsUser;
        for (int i = 0; i < idArray.Length; i++)
        {
            SqlConnection conn = dat.GET_CONNECTED;
            SqlCommand cmd = new SqlCommand("INSERT INTO UserMessages (MessageContent, MessageSubject, From_UserID, To_UserID, Date, [Read], Mode)"
                + " VALUES(@content, @subject, @fromID, @toID, @date, 'False', 0)", conn);
            cmd.Parameters.Add("@content", SqlDbType.Text).Value = msgText + "<br/><br/>"+msgBody;
            cmd.Parameters.Add("@subject", SqlDbType.NVarChar).Value = userName + " wants you to check out event " + eventName;
            cmd.Parameters.Add("@toID", SqlDbType.Int).Value = int.Parse(idArray[i]);
            cmd.Parameters.Add("@fromID", SqlDbType.Int).Value = int.Parse(userID);
            cmd.Parameters.Add("@date", SqlDbType.DateTime).Value = DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":"));
            cmd.ExecuteNonQuery();
            conn.Close();

            dsUser = dat.GetData("SELECT * FROM Users WHERE User_ID=" + idArray[i]);
            dat.SendEmail(System.Configuration.ConfigurationManager.AppSettings["emailemail"].ToString(),
                System.Configuration.ConfigurationManager.AppSettings["emailName"].ToString(),
                dsUser.Tables[0].Rows[0]["Email"].ToString(),
                "<div><br/>A new email arrived at your inbox on Hippo Happenings. <br/><br/> Email Contents:<br/><br/>Subject: " +
                  userName + " wants you to check out event " + eventName + "<br/><br/>Message Body: " +
                  msgText + "<br/><br/>" + msgBody +
                  "<br/><br/> To view the message, <a href=\"HippoHappenings.com/login\">" +
                "log into Hippo Happenings</a></div>", "You have a new email at Hippo Happenings!");

            MessageLabel2.Text = "Your message has been sent.";
            ThankYouPanel.Visible = true;
            MessagePanel.Visible = false;
        }
        return 0;
    }
开发者ID:aleksczajka,项目名称:Hippo-Code---OLD,代码行数:35,代码来源:MessageAlert.aspx.cs


示例18: Process

        //Chris Han add DeviceId to Json
        public async Task<DataSet> Process(DataSet dataset, CancellationToken ct, string DeviceId)
        {
#if AggravatedSerialization
            //Serialize the whole dataset as single json string
            var json = await Task.Factory.StartNew(
                new Func<object, string>(JsonConvert.SerializeObject),
                dataset,
                ct);

            var data = new Data();
            data.Add("stringContent", json);

            var output = new DataSet();
            output.Add(data);
            return output;

#else
            //Serialize each data as one json string
            foreach (var data in dataset)
            {
                data["DeviceId"] = DeviceId;//Chris han add DeviceId to Json
                var json = await Task.Factory.StartNew(
                    new Func<object, string>(JsonConvert.SerializeObject),
                    data,
                    ct);

                data.Add("stringContent", json);
            }

            return dataset;
#endif
        }
开发者ID:chris-han,项目名称:MTC-Beijing-Azure-IoT-Workshop,代码行数:33,代码来源:JsonSerializer.cs


示例19: IsEmailUsed

        public static Boolean IsEmailUsed(String email, Data.Model.User user = null)
        {
            using (UpsilabEntities context = new UpsilabEntities())
            {
                if (user != null)
                {
                    var existingUser = context.User.Where(u => u.UserEmail == email && !u.IsDeleted).FirstOrDefault();

                    if (existingUser != null)
                    {
                        if (user.idUser == existingUser.idUser)
                            return false;
                        else return true;
                    }
                    else return false;
                }
                else
                {
                    var existingUser = context.User.Where(u => u.UserEmail == email && !u.IsDeleted).FirstOrDefault();

                    if (existingUser != null)
                        return true;
                    else return false;
                }
            }
        }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:26,代码来源:UserBL_.cs


示例20: CreateBitmapContexts

            private void CreateBitmapContexts(Data data)
            {
                m_bitmapContexts = new BitmapContext[data.bitmaps.Length];
                for (int i = 0; i < data.bitmaps.Length; ++i) {
                Format.Bitmap bitmap = data.bitmaps[i];
                // Ignore null texture
                if (bitmap.textureFragmentId == -1)
                continue;
                int bitmapExId = -i - 1;
                Format.BitmapEx bitmapEx = new Format.BitmapEx();
                bitmapEx.matrixId = bitmap.matrixId;
                bitmapEx.textureFragmentId = bitmap.textureFragmentId;
                bitmapEx.u = 0;
                bitmapEx.v = 0;
                bitmapEx.w = 1;
                bitmapEx.h = 1;
                m_bitmapContexts[i] =
                new BitmapContext(this, data, bitmapEx, bitmapExId);
                }

                m_bitmapExContexts = new BitmapContext[data.bitmapExs.Length];
                for (int i = 0; i < data.bitmapExs.Length; ++i) {
                Format.BitmapEx bitmapEx = data.bitmapExs[i];
                // Ignore null texture
                if (bitmapEx.textureFragmentId == -1)
                continue;
                m_bitmapExContexts[i] = new BitmapContext(this, data, bitmapEx, i);
                }
            }
开发者ID:BenoitLafont,项目名称:lwf-demo,代码行数:29,代码来源:lwf_drawmesh_bitmap.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DataAccess类代码示例发布时间:2022-05-24
下一篇:
C# DashboardHelper类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap