コード例 #1
0
ファイル: test.cs プロジェクト: zjw0358/wtgw
        public static void Main(string[] rgs)
        {
            UAEngine        xa    = new UAEngine();
            UAUserInterface form1 = new UAUserInterface(xa);

            Application.Run(form1);
        }
コード例 #2
0
    public UAUserInterface(UAEngine xa)
    {
        InitializeComponent();

        //When xa is loaded settings are loaded..
        this.xa = xa;

        //SetState sets up the different check boxes based on the settings.
        SetState();

        //Setting the textbox with the default value.
        this.tbCanary.Text = xa.Settings.canary;

        //Setup the databinding for results view
        this.matches = new SortableBindingList <ResponseResult>();
        this.view    = new BindingListView <ResponseResult>(this.matches);
        this.ResultsDataGridView.DataSource = this.view;

        //Some other defaults
        this.lbDomainFilters.DataSource       = xa.Settings.domainFilters;
        this.dgUnicodeTestMappings.DataSource = xa.Settings.UnicodeTestMappings.GetAll();

        //Add the default items to the filter ComboBox.
        this.cbFilter.Items.Add("All");
        this.cbFilter.Items.Add("Transformable");
        this.cbFilter.Items.Add("Traditional");
        this.cbFilter.Items.Add("Overlong");
        this.cbFilter.SelectedItem = "Traditional";

        // Initialize the throttle UI values
        this.tbBatchSize.Text   = String.Format("{0}", this.xa.Settings.throttleBatchSize);
        this.tbDelayPeriod.Text = String.Format("{0}", this.xa.Settings.throttleDelayPeriod);

        //Delegate method to ensure when adding data to the datasource it origanates from the creating thread.
        ar = new AddRow(AddRowMethod);

        //Set columns to sortable
        this.scas = new SetColumnAutoSort(setColumnAutoSort);
        this.Dock = DockStyle.Fill;
    }