public SiteManageForm(Plugin plugin)
        {
            InitializeComponent();

            editForm = new SiteEditForm(this);
            this.plugin = plugin;
            dbManage = new DbManage();

            initSiteList();
            Plugin.lang.langProcess(this);

            this.statusStrip1.Hide();
        }
示例#2
0
        /// <summary>
        /// 鼠标右键编辑网站信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void onEditClick(object sender, EventArgs e)
        {
            if (siteListView.SelectedItems.Count == 0)
            {
                return;
            }

            ListViewItem selectedItem = siteListView.SelectedItems[0];
            int          index        = selectedItem.Index;

            SiteEditForm editForm = new SiteEditForm(this);

            string[] row         = dbManage.getWebsites()[index].Split('\t');
            string   websiteName = "";

            if (row.Length > 3)
            {
                websiteName = row[3];
            }

            editForm.setEditData(selectedItem.Index, row[0], row[1], row[2], websiteName);

            editForm.ShowDialog();
        }
        /// <summary>
        /// 鼠标右键编辑网站信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void onEditClick(object sender, EventArgs e)
        {
            if (siteListView.SelectedItems.Count == 0) {
                return;
            }

            ListViewItem selectedItem = siteListView.SelectedItems[0];
            int index = selectedItem.Index;

            SiteEditForm editForm = new SiteEditForm(this);
            string[] row = dbManage.getWebsites()[index].Split('\t');
            string websiteName = "";
            if (row.Length > 3)
            {
                websiteName = row[3];
            }

            editForm.setEditData(selectedItem.Index, row[0], row[1], row[2], websiteName);

            editForm.ShowDialog();
        }