Ejemplo n.º 1
0
        //Prompt for new extension and create it if it does not exist
        private void addExtension_Click(object sender, EventArgs e)
        {
            NewExtensionDialog dialog = new NewExtensionDialog();

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                FileAssociationInfo fai = new FileAssociationInfo(dialog.Extension);

                if (fai.Exists)
                {
                    MessageBox.Show("Specified extension already exists and will not be added");
                }
                else
                {
                    fai.Create();
                }

                refreshExtensionsButton_Click(null, null);
            }
        }
Ejemplo n.º 2
0
      //Prompt for new extension and create it if it does not exist
      private void addExtension_Click(object sender, EventArgs e)
      {
         NewExtensionDialog dialog = new NewExtensionDialog();

         if (dialog.ShowDialog() == DialogResult.OK)
         {
            FileAssociationInfo fai = new FileAssociationInfo(dialog.Extension);

            if (fai.Exists)
            {
               MessageBox.Show("Specified extension already exists and will not be added");
            }
            else
            {
               fai.Create();
            }
            
            refreshExtensionsButton_Click(null, null);
         }

      }