當前位置: 首頁>>代碼示例>>C#>>正文


C# System.EventArgs類代碼示例

本文整理匯總了C#中System.EventArgs的典型用法代碼示例。如果您正苦於以下問題:C# EventArgs類的具體用法?C# EventArgs怎麽用?C# EventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


EventArgs類屬於System命名空間,在下文中一共展示了EventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: submitFacility

        protected void submitFacility(Object sender, EventArgs e)
        {
            //If null then this is creating a facility to add
            if (selected_facility == null)
            {
                selected_facility = new facility();
                selected_address = new address();
                selected_address.line_1 = Address1.Text;
                selected_address.line_2 = Address2.Text;
                selected_address.city = CityName.Text;
                selected_address.state = StateName.Text;
                selected_address.zip = ZipName.Text;
                db.addresses.InsertOnSubmit(selected_address);
                db.SubmitChanges();
                selected_facility.user_id = user_id;
                selected_facility.name = FacilityName.Text;
                selected_facility.address_id = selected_address.id;
                selected_facility.add_date = DateTime.Now;
                db.facilities.InsertOnSubmit(selected_facility);
                db.SubmitChanges();

            }
            //If not then we are editing an existing facility
            else
            {
                selected_facility.name = FacilityName.Text;
                selected_address.line_1 = Address1.Text;
                selected_address.line_2 = Address2.Text;
                selected_address.city = CityName.Text;
                selected_address.state = StateName.Text;
                selected_address.zip = ZipName.Text;
                db.SubmitChanges();
            }
            Response.Redirect("~/Pages/Inventory/Facilities.aspx");
        }
開發者ID:bgrantdev,項目名稱:asset-tracker-web,代碼行數:35,代碼來源:AddEditFacility.aspx.cs

示例2: OnLoad

 protected override void OnLoad(EventArgs e)
 {
     ctlEditor.DocumentReady += new EventHandler<EventArgs<MonoSoftware.MonoX.DAL.EntityClasses.DocumentEntity>>(ctlEditor_DocumentReady);
     if (UrlParams.HtmlEditorDocumentContentId.HasValue)
         ctlEditor.ContentId = UrlParams.HtmlEditorDocumentContentId.Value;
     base.OnLoad(e);
 }
開發者ID:swapnilphalak,項目名稱:MonoX-Demo-Pages,代碼行數:7,代碼來源:Content.aspx.cs

示例3: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            // string value = Request.QueryString["pid"];
            string pid=Request.QueryString["pid"];
            pid2 = Convert.ToInt32(pid);
            string addcart = Request.QueryString["addcart"];
            //Item item3 = new Item(pid2);
            //item3.Views+=1
            if (pid==null)
            {
                //System.Threading.Thread.SpinWait(5);
               Response.Redirect("default.aspx");
                //Response.AppendHeader("REFRESH", "5;URL=default.aspx");
            }
            if (addcart == "1")
            {
                ArrayList cartItems = new ArrayList();

                if ((ArrayList)Session["cartItem"] != null)
                {
                    cartItems = (ArrayList)Session["cartItem"];
                }

                item1 = new Item(pid2);
                cartItems.Add(item1);
                Session["cartItem"] = cartItems;
                Response.Redirect("cart.aspx");
            }
        }
開發者ID:jackhac,項目名稱:teamproj,代碼行數:29,代碼來源:item.aspx.cs

示例4: Session_End

 void Session_End(object sender, EventArgs e)
 {
     // Code that runs when a session ends.
     // Note: The Session_End event is raised only when the sessionstate mode
     // is set to InProc in the Web.config file. If session mode is set to StateServer
     // or SQLServer, the event is not raised.
 }
開發者ID:williamyip,項目名稱:ForGoodAspx,代碼行數:7,代碼來源:Global.asax.cs

示例5: btnTouzhu_Click

        private void btnTouzhu_Click(object sender, EventArgs e)
        {
            DataGridViewRow row = dgvTaocan.SelectedRows[0];

            TouzhuTaocan taocan = new TouzhuTaocan();
            string type = row.Cells["Type"].Value.ToString();
            int leixing = 0;
            if (type == "專家推薦套餐")
            {
                leixing = 0;
            }
            else if (type == "數據模型套餐")
            {
                leixing = 1;
            }
            taocan.Touzhuleixing = leixing;
            taocan.Touzhumingcheng = type;
            taocan.Touzhuid = Convert.ToInt32(row.Cells["ID"].Value.ToString()) ;
            int beishu = Convert.ToInt32(txtBeishu.Text);
            double touru = Convert.ToDouble(row.Cells["Touru"].Value);
            double jiangjin = Convert.ToDouble(row.Cells["Jiangjin"].Value);

            taocan.Touzhubeishu = beishu;
            taocan.Touzhujin = beishu*touru;
            taocan.Jiangjin = jiangjin* beishu;
            taocan.Lucky = -1;
            taocan.Touzhuqishu = Convert.ToInt32(row.Cells["Qishu"].Value.ToString());
            taocan.Touzhushijian = Convert.ToDateTime(row.Cells["riqi"].Value);
            taocan.OperateTime = DateTime.Now;
            taocan.Operator = "system";

            new TouzhuTaocanDAL().InsertTouzhutaocan(taocan);
            MessageBox.Show("投注成功!");
        }
開發者ID:xiaobeixin50,項目名稱:test,代碼行數:34,代碼來源:TaocanTouzhuForm.cs

示例6: opeation_Click

 private void opeation_Click(object sender, EventArgs e)
 {
     Button btn = sender as Button;
     firstNumber = double.Parse(display.Text);
     state = State.WaitingForSecondNumber;
     operation = btn.Text;
 }
開發者ID:Beisenbek,項目名稱:PT2016_week5G1,代碼行數:7,代碼來源:Form1.cs

示例7: btnDelete_Click

 private void btnDelete_Click(object sender, EventArgs e)
 {
     DialogResult result = MessageBox.Show("Delete " + customer.Name + "?",
         "Confirm Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
     if (result == DialogResult.Yes)
     {
         try
         {
             if (!CustomerDB.DeleteCustomer(customer))
             {
                 MessageBox.Show("Another user has updated or deleted " +
                     "that customer.", "Database Error");
                 this.GetCustomer(customer.CustomerID);
                 if (customer != null)
                     this.DisplayCustomer();
                 else
                     this.ClearControls();
             }
             else
                 this.ClearControls();
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message, ex.GetType().ToString());
         }
     }
 }
開發者ID:fakeshark,項目名稱:CSharpProjects,代碼行數:27,代碼來源:frmCustomerMaintenance.cs

示例8: OnLoad

 protected override void OnLoad(EventArgs e)
 {
     TextBoxAppender.SetTextBox(txtConsole);
     //HACK to force a write of buffered logs
     LoggingService.Info("Console Initialized"); 
     base.OnLoad(e);
 }
開發者ID:stophun,項目名稱:fdotoolbox,代碼行數:7,代碼來源:ConsolePane.cs

示例9: btnSearch_Click

		protected void btnSearch_Click(object sender, EventArgs e)
		{
			// Get reference to the Search textbox.
			TextBox txtSearch = (TextBox)this.GalleryPage.FindControlRecursive(dgSearch, "txtSearch");

			Util.Redirect(PageId.search, String.Format("aid={0}&search={1}", this.GalleryPage.GetAlbum().Id, Util.UrlEncode(txtSearch.Text)));
		}
開發者ID:haimon74,項目名稱:KanNaim,代碼行數:7,代碼來源:search.ascx.cs

示例10: btImportSelected_Click

 private void btImportSelected_Click(object sender, EventArgs e)
 {
     foreach (string s in lbAvailableProfileList.CheckedItems)
     {
         importer.ImportProfile(s);
     }
 }
開發者ID:faylite,項目名稱:wifi-manager,代碼行數:7,代碼來源:MainWindow.cs

示例11: ArrayList

            ArrayList Dep = new ArrayList(); /**/
            Dep = (ArrayList)newUser.popDept();
            cmbxDep.Items.Clear();
            for (int x = 0; x < Dep.Count; x++)
            {
                cmbxDep.Items.Add(Dep[x].ToString());
            }

            InitializeGrid();
            PopulateCombo();
            setDataSource();
            //InitializeState();

        }

        public int state; //this is to know which use case it is currently being used for

        System.Windows.Forms.DataGridView dtgList;

        RegisteredUser curUser;

        public MainUI main;



        public void InitializeGrid()
        {
            dtgList = this.FindName("gridView") as System.Windows.Forms.DataGridView;
            RegisteredUser.loadDataSet(main.curUser);
            dtgList.ReadOnly = true;
            dtgList.DataSource = RegisteredUser.UserDT;
            dtgList.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(dtgList_CellClick);
            dtgList.Refresh();
            grbList.DataContext = RegisteredUser.UserDT;

        }

        /* private void Start_SelectedDateChanged(object sender, SelectionChangedEventArgs e)
         {

             txtROCEnd.DisplayDateEnd = new DateTime(2200, 1, 1);
             txtROCEnd.DisplayDateStart = txtROCStart.SelectedDate;
         }
         private void End_SelectedDateChanged(object sender, SelectionChangedEventArgs e)
         {
             txtROCStart.DisplayDateStart = new DateTime(1900, 1, 1);
             txtROCStart.DisplayDateEnd = txtROCEnd.SelectedDate;
         }*/


        private void dtgList_CellClick(object sender, EventArgs e)
        {
            try
            {


                int pos = dtgList.CurrentRow.Index;

                if (pos < RegisteredUser.UserDT.Rows.Count)
                {
                    String sysID = dtgList.CurrentRow.Cells[0].Value.ToString();


                    curUser = RegisteredUser.GetUser(sysID);


                    //curJour = Journal.JournalDS[pos]; //this was if i was using a list
                }
                btnUpdate.Visibility = Visibility.Visible;
                setDataSource();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

        }
開發者ID:Ceasius,項目名稱:University,代碼行數:77,代碼來源:MaintainUser.xaml.cs

示例12: AddValue

        protected void AddValue(object sender, EventArgs e)
        {

            CommonDao<Safezhuan> newmgr = new CommonDao<Safezhuan>();
            Safezhuan safezhuan = new Safezhuan();
            safezhuan.ZhuanName = this.TextBoxName.Text.Trim().ToString();


            int count =int.Parse(newmgr.GetTotalCount("zhuanname='"+safezhuan.ZhuanName.ToString()+"'"));
            if (count == 0)
            {

                if (newmgr.Add(safezhuan))
                {


                    Alert("熱點專題添加成功!");
                    BindGridView();
                }
                else
                {
                    Alert("熱點專題添加失敗!請重試。");

                }
            }
            else {

                Alert("熱點專題名稱不能重複。");
            }

        }
開發者ID:huaminglee,項目名稱:Code,代碼行數:31,代碼來源:SafeZhuan.aspx.cs

示例13: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         BindGridView();
     }
 }
開發者ID:huaminglee,項目名稱:Code,代碼行數:7,代碼來源:SafeZhuan.aspx.cs

示例14: OnRemoveFromFavorites

		private void OnRemoveFromFavorites(object sender, EventArgs e)
		{
			if (_menuHitInfo == null) return;
			var imageItem = imageListView.Items[_menuHitInfo.ItemIndex];
			var imageSource = imageItem.Tag as BaseImageSource;
			imageSource?.DeleteFromFavs();
		}
開發者ID:w01f,項目名稱:VolgaTeam.SalesLibrary,代碼行數:7,代碼來源:FavoritesImagesContainer.cs

示例15: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         LoadSystemInf();
     }
 }
開發者ID:ChalmerLin,項目名稱:dnt_v3.6.711,代碼行數:7,代碼來源:systeminf.aspx.cs


注:本文中的System.EventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。