Exemple #1
0
        public Form1()
        {
            InitializeComponent();
            treeListView1.CanExpandGetter = zCanExpandGetter;
            treeListView1.ChildrenGetter  = zChildrenGetter;
            olvColumnLink.AspectGetter    = (obj) => "Hyperlink";

            BrightIdeasSoftware.SimpleDropSink sink = (BrightIdeasSoftware.SimpleDropSink)treeListView1.DropSink;
            sink.CanDropBetween = true;
        }
        public SequenceRecorder()
        {
            InitializeComponent();

            m_Lock                             = new object();
            m_BrowserHelper                    = new WebBrowserHelper(wbRecorder);
            m_AutomationEngine                 = new AutomationEngine(wbRecorder);
            m_ElementsWithHandlers             = new HashSet <HtmlElement>();
            m_ElementSelector                  = new ElementSelector(wbRecorder);
            m_ElementSelector.ElementSelected += m_ElementSelector_ElementSelected;
            m_StepIndex                        = new Dictionary <Step, int>();

            tlvSequence.FormatRow      += tlvSequence_FormatRow;
            tlvSequence.CanExpandGetter = zCanExpandGetter;
            tlvSequence.ChildrenGetter  = zChildrenGetter;
            tlvSequence.HotItemStyle    = new BrightIdeasSoftware.HotItemStyle()
            {
                Decoration = new BrightIdeasSoftware.RowBorderDecoration()
                {
                    BorderPen      = new Pen(Color.Transparent, 2),
                    BoundsPadding  = new Size(1, 1),
                    CornerRounding = 4.0f
                }
            };
            BrightIdeasSoftware.SimpleDropSink sink = (BrightIdeasSoftware.SimpleDropSink)tlvSequence.DropSink;
            sink.CanDropBetween = true;

            olvColumnOrder.AspectGetter       = zOrderAspectGetter;
            olvColumnOrder.ImageGetter        = zOrderImageGetter;
            olvColumnHasCondition.ImageGetter = zHasConditionImageGetter;
            olvColumnIsIteration.ImageGetter  = zIsIterationImageGetter;
            olvColumnEdit.AspectGetter        = (obj) => "Edit...";
            olvColumnDelete.AspectGetter      = (obj) => "Remove";
            olvColumnExecute.AspectGetter     = (obj) => "Go!";

            tlvVariables.CanExpandGetter        = zVariableCanExpandGetter;
            tlvVariables.ChildrenGetter         = zVariableChildrenGetter;
            olvColumnVariableValue.AspectGetter = zVariableValueAspectGetter;

            imageListSequence.Images.AddRange(new Image[]
            {
                Resources.GreenArrow,
                Resources.RedArrow,
                Resources.Document,
                Resources.Iteration
            });

            cbAvailableStepList.DataSource = Step.GetAvailableStepList(false)
                                             .OrderBy(s => s.DisplayName)
                                             .ToList();
        }
Exemple #3
0
        private void Main_Load(object sender, EventArgs e)
        {
            this.MinimumSize = this.Size;
            Main_Resize(null, null);

            filterEvaluator              = new FilterEvaluator(this);
            buttonAdd.Dialog             = new Windows.FilterSelector(this);
            buttonAdd.onDialogCloseEvent = () => filterEvaluator.Evaluate(selectedFilter);

            olvPreview.CellPadding = new Rectangle(
                new Point(2, 0),
                new Size(0, 0)
                );

            //dropDownSort.SelectedIndex = 0;
            Settings.Load();

            profileManager = new ProfileManager(dropDownProfile);
            profileManager.PopulateProfiles();

            naturalSortToolStripMenuItem.Checked = true;
            //olvPreview.Columns[0].

            //Set colors to textBoxFilter
            SetFocusColor(textBoxFilter);

            //Load regex filters
            //RegexFilters.SetData(contextMenuRegex, textBoxFilter, textBoxFilter_TextChanged)
            RegexHelper.SetData(contextMenuRegex, textBoxFilter);

            //objectlistview.sourceforge.net/cs/dragdrop.html
            var dropSink = new BrightIdeasSoftware.SimpleDropSink()
            {
                CanDropOnItem  = false,
                CanDropBetween = true,
                FeedbackColor  = Color.LightGray
            };

            //var dropSink = new BrightIdeasSoftware.RearrangingDropSink(false)
            //{
            //    FeedbackColor = Color.LightGray
            //};

            olvPreview.DropSink = dropSink;
        }