private void btnAdd_Click(object sender, EventArgs e) { // //TODO: add new item // myCmd.CurItem = new AppInfoBase(); myCmd.CurItem.type = cbType.Text; myCmd.CurItem.catalog = lstCatalog.SelectedItem.ToString(); AddItemForm addForm = new AddItemForm(myCmd); addForm.ShowDialog(); if (addForm.DialogResult != DialogResult.Cancel) { myCmd.AppDB.Add(myCmd.CurItem); UpdateAppList(); } }
private void btnEdit_Click(object sender, EventArgs e) { // //TODO: Edit current item // if (lvApp.SelectedItems.Count == 0) { return; } myCmd.CurItem = (AppInfoBase)myCmd.AppDB.Items[(int)lvApp.SelectedItems[0].Tag]; AddItemForm edtForm = new AddItemForm(myCmd); edtForm.ShowDialog(); if (edtForm.DialogResult != DialogResult.Cancel) { myCmd.AppDB.Items[(int)lvApp.SelectedItems[0].Tag] = myCmd.CurItem; UpdateAppList(); } }
private void Open_Form_Todolist(object sender, EventArgs e) { // Get screen info var mainDisplayInfo = DeviceDisplay.MainDisplayInfo; // Annimation Action <double> callback = input => AddTodolistForm.HeightRequest = input; double startHeight = 0; double endHeight = 120;//mainDisplayInfo.Height / 20; uint rate = 32; uint length = 500; Easing easing = Easing.SinOut; AddItemForm.Animate("anim", callback, startHeight, endHeight, rate, length, easing); // Close the other side bar if this one is opened if (AddItemForm.Height > 0) { HideBottomSlideBar(); } }
private void OpenAddForm(int id) { selectedId = id; Form addForm = this.ParentForm.OwnedForms.FirstOrDefault(a => a.Name == "AddItemForm"); if (addForm == null) { AddItemForm form = new AddItemForm(); form.AutoPartId = id; form.Owner = this.ParentForm; form.AutoPartUpdated += new AutoPartUpdatedEventHandler(form_AutoPartUpdated); form.Show(); } else { AddItemForm openedForm = (AddItemForm)addForm; openedForm.AutoPartId = id; openedForm.LoadPartDetails(); openedForm.Focus(); } }
public void addAuctionItem(object sender, EventArgs evt) { //creats a new "AddItemForm" and displays it. AddItemForm newItemForm = new AddItemForm(this); newItemForm.Show(); }
private void addNewITEMToolStripMenuItem_Click(object sender, EventArgs e) { AddItemForm aIForm = new AddItemForm(); aIForm.ShowDialog(); }