Ejemplo n.º 1
0
 public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     PropertyGridDlg dlg = new PropertyGridDlg(value);
     if (dlg.ShowDialog() == DialogResult.OK)
     {
         value = dlg.Object;
     }
     return value;
 }
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            PropertyGridDlg dlg = new PropertyGridDlg(value);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                value = dlg.Object;
            }
            return(value);
        }
Ejemplo n.º 3
0
        private void rebuildToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SaveFileDialog sfd = new SaveFileDialog();

            sfd.Filter = "Assembly files (*.exe; *.dll)|*.exe;*.dll";
            if (sfd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                try
                {
                    PropertyGridDlg dlg = new PropertyGridDlg(new WritingParameters());
                    if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        GetCurrentAssembly().Rebuild(sfd.FileName, dlg.Object as WritingParameters);
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Ejemplo n.º 4
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Filter = "Assembly files (*.exe; *.dll)|*.exe;*.dll";
            if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                if (((ToolStripMenuItem)sender).Name == openToolStripMenuItem.Name)
                {
                    OpenFile(ofd.FileName);
                }
                else
                {
                    PropertyGridDlg rdlg = new PropertyGridDlg(new ReadingParameters());
                    if (rdlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        OpenFile(ofd.FileName, rdlg.Object as ReadingParameters);
                    }
                }
            }
        }
Ejemplo n.º 5
0
 private void rebuildToolStripMenuItem_Click(object sender, EventArgs e)
 {
     SaveFileDialog sfd = new SaveFileDialog();
     sfd.Filter = "Assembly files (*.exe; *.dll)|*.exe;*.dll";
     if (sfd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         try
         {
             PropertyGridDlg dlg = new PropertyGridDlg(new WritingParameters());
             if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                 GetCurrentAssembly().Rebuild(sfd.FileName, dlg.Object as WritingParameters);
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
Ejemplo n.º 6
0
 private void openToolStripMenuItem_Click(object sender, EventArgs e)
 {
     OpenFileDialog ofd = new OpenFileDialog();
     ofd.Filter = "Assembly files (*.exe; *.dll)|*.exe;*.dll";
     if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         if (((ToolStripMenuItem)sender).Name == openToolStripMenuItem.Name)
             OpenFile(ofd.FileName);
         else
         {
             PropertyGridDlg rdlg = new PropertyGridDlg(new ReadingParameters());
             if (rdlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                 OpenFile(ofd.FileName, rdlg.Object as ReadingParameters);
         }
     }
 }