Ejemplo n.º 1
0
 private void BtnDeletePlat_Click(object sender, EventArgs e)
 {
     if (LBPlatforms.SelectedItem == null)
     {
         MessageBox.Show("请先选择一个平台", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         LBPlatforms.BeginUpdate();
         LBPlatforms.Items.Remove(LBPlatforms.SelectedItem.ToString());
         LBPlatforms.EndUpdate();
     }
 }
Ejemplo n.º 2
0
        private void BtnAddPlat_Click(object sender, EventArgs e)
        {
            string platformpath = TbPlatform.Text.Trim();

            if (Directory.Exists(platformpath))
            {
                if (!LBPlatforms.Items.Contains(platformpath))
                {
                    LBPlatforms.BeginUpdate();
                    LBPlatforms.Items.Add(platformpath);
                    LBPlatforms.EndUpdate();
                }
            }
            else
            {
                MessageBox.Show(platformpath + "不是有效文件夹", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Ejemplo n.º 3
0
        public void LoadConfig()
        {
            string content = ConfigData.GetStringForKey(ConfigData.KEY_RELEASEPATH, "请选择发布目录");

            TbRelease.Text = content;

            content         = ConfigData.GetStringForKey(ConfigData.KEY_PLATFORMPATH, "请选择平台目录");
            TbPlatform.Text = content;

            content      = ConfigData.GetStringForKey(ConfigData.KEY_FRAMEPATH, "请选择框架目录");
            TbFrame.Text = content;

            content = ConfigData.GetStringForKey(ConfigData.KEY_PLATFORMLIST, "");
            string[] split = content.Split(new Char[] { '|' });
            LBPlatforms.BeginUpdate();
            foreach (string item in split)
            {
                if (item.Trim() != "" && !LBPlatforms.Items.Contains(item))
                {
                    LBPlatforms.Items.Add(item);
                }
            }
            LBPlatforms.EndUpdate();
        }