コード例 #1
0
        private SimulatorConfigurationForm()
        {
            InitializeComponent();

            UserInterfaceStyler.Configure(this, FormStyle.FixedDialog);
            documentSelectionControl.ShowDocumentQueryControl = false;
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AssetSelectionForm" /> class.
        /// </summary>
        private AssetSelectionForm()
        {
            InitializeComponent();

            UserInterfaceStyler.Configure(this, FormStyle.SizeableDialog);
            UserInterfaceStyler.Configure(assets_GridView, GridViewStyle.ReadOnly);
        }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AssetSelectionControl" /> class.
        /// </summary>
        public AssetSelectionControl()
        {
            InitializeComponent();

            UserInterfaceStyler.Configure(asset_GridView, GridViewStyle.Display);
            asset_GridView.DataSource = _assetRows;
        }
コード例 #4
0
        public XmlDisplayDialog(XDocument xmlData)
        {
            if (xmlData == null)
            {
                throw new ArgumentNullException(nameof(xmlData));
            }

            InitializeComponent();
            UserInterfaceStyler.Configure(this, FormStyle.SizeableDialog);

            _xmlData = xmlData.ToString();

            string tempFile    = Path.GetTempFileName();
            string tempXmlFile = Path.ChangeExtension(tempFile, "xml");

            File.Move(tempFile, tempXmlFile);
            File.WriteAllText(tempXmlFile, _xmlData);

            xmlWebBrowser.DocumentCompleted += (s, e) =>
            {
                try
                {
                    File.Delete(tempXmlFile);
                }
                catch
                {
                    // Ignore errors.
                }
            };

            xmlWebBrowser.Navigate(tempXmlFile);
        }
コード例 #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TextDisplayDialog" /> class.
        /// </summary>
        /// <param name="data">The data to display in the dialog.</param>
        public TextDisplayDialog(string data)
        {
            InitializeComponent();
            UserInterfaceStyler.Configure(this, FormStyle.SizeableDialog);

            display_TextBox.Text = data;
        }
コード例 #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DocumentPreviewForm" /> class.
        /// </summary>
        private DocumentPreviewForm()
        {
            InitializeComponent();

            UserInterfaceStyler.Configure(this, FormStyle.SizeableDialog);
            UserInterfaceStyler.Configure(documents_GridView, GridViewStyle.ReadOnly);
        }
コード例 #7
0
        private DynamicLocalPrintQueueForm()
        {
            InitializeComponent();

            UserInterfaceStyler.Configure(this, FormStyle.FixedDialog);

            portType_ComboBox.Items.Add(PrinterPortProtocol.Raw);
            portType_ComboBox.Items.Add(PrinterPortProtocol.Lpr);
            portType_ComboBox.SelectedIndex = 0;

            fieldValidator.RequireCustom(printDevices_TextBox, () => _selectedPrintDevices.Any(), "A print device must be selected.");
            fieldValidator.RequireCustom(printDriverSelectionControl, () => printDriverSelectionControl.HasSelection, "A print driver must be selected.");
            fieldValidator.RequireValue(queueName_TextBox, queueName_Label, ValidationCondition.IfEnabled);
        }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AssetQuickEntryForm" /> class.
 /// </summary>
 private AssetQuickEntryForm()
 {
     InitializeComponent();
     UserInterfaceStyler.Configure(this, FormStyle.FixedDialog);
 }