예제 #1
0
        private void AddItem_Click(object sender, EventArgs e)
        {
            NewItem A = new NewItem();

            A.StartPosition = FormStartPosition.CenterScreen;
            A.ShowDialog();
        }
        public override void Add()
        {
            var newItem = new NewItem("新建工程");

            newItem.ShowDialog();
            if (newItem.DialogResult == false)
            {
                return;
            }
            Directory.CreateDirectory($"{GetPath()}\\{newItem.Result}");
            Children.Add(new ProjectViewModel()
            {
                Parent = this, Name = newItem.Result
            });
        }
예제 #3
0
파일: MainPage.cs 프로젝트: Snsubuga/mine
 private void btnNewItems_Click_1(object sender, EventArgs e)
 {
     NewItem itempage = new NewItem();
     itempage.ShowDialog();
     PrepareGridForStock();
 }
예제 #4
0
파일: MainPage.cs 프로젝트: Snsubuga/mine
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            string type = dataGridView1.Columns[0].Name;

            if(type == "ItemId")
            {
                NewItem itemfrm = new NewItem();
                itemfrm.Text = "Edit Item";

                itemfrm.ShowDialog();
                PrepareGridForStock();
            }
            if(type == "UserId")
            {
                EditUser editfrm = new EditUser();
                editfrm.User = UserMapper.GetInstance().GetUserById(dataGridView1.CurrentRow.Cells[0].Value.ToString());
                editfrm.ShowDialog();
                PrepareGridForUsers();
            }
        }