示例#1
0
        private void OpenBtn_Click(object sender, EventArgs e)
        {
            CompSpreadSheet spch = new CompSpreadSheet();
            int             pos  = PrimaryLibList.SelectedIndex;

            if (pos != -1)
            {
                KicadLibComponent selComp = FindComponentPrimary(PrimaryLibList.Items[pos].ToString());
                spch.Component = selComp;
                if (spch.ShowMyDalog(1) == DialogResult.OK)
                {
                    SaveBtn.Enabled = true;
                }
            }
        }
示例#2
0
        private void NewComponent_Click(object sender, EventArgs e)
        {
            //if (primaryLIb.Components.Count != 0)
            {
                CompSpreadSheet spch = new CompSpreadSheet();
                if (spch.ShowMyDalog(0) == DialogResult.OK)
                {
                    primaryLIb.Components.Add(spch.Component);
                    RefreshPrimaryList();
                    SaveBtn.Enabled = true;
                }
            }

            /*else
             * {
             *  MessageBox.Show("Component can be only added to opened libray.");
             * }*/
        }