Ejemplo n.º 1
0
        private void btnEditEditExt_Click(object sender, EventArgs e)
        {
            if (lvImageEditing.CheckedItems.Count == 0)
            {
                return;
            }

            //Get select Association item
            var assoc = GlobalSetting.GetImageEditingAssociationFromList(lvImageEditing.CheckedItems[0].Text);

            if (assoc == null)
            {
                return;
            }

            frmEditEditingAssocisation f = new frmEditEditingAssocisation()
            {
                FileExtension = assoc.Extension,
                AppName       = assoc.AppName,
                AppPath       = assoc.AppPath,
                AppArguments  = assoc.AppArguments,
                TopMost       = this.TopMost
            };

            if (f.ShowDialog() == DialogResult.OK)
            {
                assoc.AppName      = f.AppName;
                assoc.AppPath      = f.AppPath;
                assoc.AppArguments = f.AppArguments;

                LoadImageEditingAssociationList();
            }

            f.Dispose();
        }
Ejemplo n.º 2
0
        private void btnEditEditAllExt_Click(object sender, EventArgs e)
        {
            frmEditEditingAssocisation f = new frmEditEditingAssocisation()
            {
                FileExtension = $"<{string.Format(GlobalSetting.LangPack.Items["frmSetting._allExtensions"])}>",
                TopMost       = this.TopMost
            };

            if (f.ShowDialog() == DialogResult.OK)
            {
                foreach (var assoc in GlobalSetting.ImageEditingAssociationList)
                {
                    assoc.AppName      = f.AppName;
                    assoc.AppPath      = f.AppPath;
                    assoc.AppArguments = f.AppArguments;
                }

                LoadImageEditingAssociationList();
            }

            f.Dispose();
        }