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


C# Data类代码示例

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


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


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