Exemple #1
0
        public KeyFileDialog(QWidget aParent = null,
                          string aCaption = "",
                          string aDirectory = "",
                          string aFilter = "")
            : base(aParent, aCaption, aDirectory, aFilter)
        {
            SetOption (QFileDialog.Option.DontUseNativeDialog, true);

              SetNameFilter (Tr ("All Files (*)") + ";;" +
            Tr ("PuTTY Private Key Files (*.ppk)")
              );
              fileMode = QFileDialog.FileMode.ExistingFiles;

               mConfirmWidget = new ConfirmConstraintWidget();
               mLifetimeWidget = new LifetimeConstraintWidget();

              // can't get layout as QGridLayout, so we are forced to add to bottom
              // and add extra widgets to take up space
              Layout.AddWidget (new QLabel(Tr ("Constraints:")));
              Layout.AddWidget (mConfirmWidget);
              Layout.AddWidget (new QWidget());
              Layout.AddWidget (new QWidget());
              Layout.AddWidget (mLifetimeWidget);
        }
        public KeyFileDialog(QWidget aParent   = null,
                             string aCaption   = "",
                             string aDirectory = "",
                             string aFilter    = "") :
            base(aParent, aCaption, aDirectory, aFilter)
        {
            SetOption(QFileDialog.Option.DontUseNativeDialog, true);

            SetNameFilter(Tr("All Files (*)") + ";;" +
                          Tr("PuTTY Private Key Files (*.ppk)")
                          );
            fileMode = QFileDialog.FileMode.ExistingFiles;

            mConfirmWidget  = new ConfirmConstraintWidget();
            mLifetimeWidget = new LifetimeConstraintWidget();

            // can't get layout as QGridLayout, so we are forced to add to bottom
            // and add extra widgets to take up space
            Layout.AddWidget(new QLabel(Tr("Constraints:")));
            Layout.AddWidget(mConfirmWidget);
            Layout.AddWidget(new QWidget());
            Layout.AddWidget(new QWidget());
            Layout.AddWidget(mLifetimeWidget);
        }