Ejemplo n.º 1
0
        public MainForm(string file)
        {
            loadfileonstartup = file;
            InitializeComponent();
            Text = "SvclogViewer v" + AppVersion.GetVersion();
            AppVersion.CheckForUpdateAsync();
            Shown       += HandleMainFormShown;
            FormClosing += HandleMainFormClosing;
            DisableInput();
            lblStatus.Text                      = "starting...";
            lblFilename.Text                    = "";
            indexer.Progress                   += HandleIndexerProgress;
            progressBar.Minimum                 = 0;
            progressBar.Maximum                 = 100;
            progressBar.Step                    = 1;
            checkAutoFormat.CheckedChanged     += HandleAutoFormatCheckedChanged;
            checkAutoFormat.Checked             = Configuration.Instance.AutoXmlFormatEnabled;
            checkSyntaxColoring.CheckedChanged += HandleSyntaxColoringCheckedChanged;
            checkSyntaxColoring.Checked         = Configuration.Instance.UseSyntaxColoring;
            cbAutoUrlDecode.CheckedChanged     += HandleAutoUrlDecodeChanged;
            cbAutoUrlDecode.Checked             = Configuration.Instance.UseAutoUrlDecode;
            cbAutoHtmlDecode.CheckedChanged    += HandleAutoHtmlDecodeChanged;
            cbAutoHtmlDecode.Checked            = Configuration.Instance.UseAutoHtmlDecode;
            cmbSouce.Items.Add("Any");
            cmbSouce.SelectedIndex = 0;
            HandleSplitResize(this, new SplitterEventArgs(0, 0, 0, 0));

            typeof(DataGridView).InvokeMember(
                "DoubleBuffered",
                BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.SetProperty,
                null,
                dataGridView1,
                new object[] { true });
        }
Ejemplo n.º 2
0
        public MainForm(string filename = null)
        {
            InitializeComponent();
            Text = AppVersion.AppName + " " + Version;
            dataGridView1.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableWithAutoHeaderText;
            dataGridView1.MultiSelect       = true;
            dataGridView1.CellDoubleClick  += HandleCellDoubleClick;
            typeof(DataGridView).InvokeMember(
                "DoubleBuffered",
                BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.SetProperty,
                null,
                dataGridView1,
                new object[] { true });

            // Filter textbox
            filterTextBox.GotFocus  += HandleFilterGotFocus;
            filterTextBox.LostFocus += HandleFilterLostFocus;
            filterTextBox.KeyUp     += HandleFilterKeyup;
            HandleFilterLostFocus(this, EventArgs.Empty);

            delayedFilterTextChangedTimer          = new Timer();
            delayedFilterTextChangedTimer.Interval = 500;
            delayedFilterTextChangedTimer.Tick    += DelayedFilterTextChangedTimerTick;

            // New version check
            AppVersion.CheckForUpdateAsync();

            // File?
            _initialFilename = filename;
        }
Ejemplo n.º 3
0
        private void HandleMainformShown(object sender, EventArgs e)
        {
            LogMethodEntry();
            AppVersion.CheckForUpdateAsync();
            tabControl1.TabPages.Clear();
            var deploy = new DeployControl(this, TabCounter.ToString());

            deploy.Dock = DockStyle.Fill;
            var page = new TabPage("#" + TabCounter++);

            page.Controls.Add(deploy);
            tabControl1.TabPages.Add(page);
            tabControl1.TabPages.Add(new TabPage("+"));
            UpdatePresetsMRU();
            HandleAuthenticateClicked(this, EventArgs.Empty);
        }
Ejemplo n.º 4
0
        public MainForm()
        {
            InitializeComponent();
            Text += " " + Version;
            DateTime from = DateTime.UtcNow;

            fromDate.Value         = new DateTime(from.Year, from.Month, from.Day);
            toDate.Value           = fromDate.Value.AddDays(1);
            fromDate.ValueChanged += (o, e) =>
            {
                if (toDate.Value < fromDate.Value)
                {
                    toDate.Value = fromDate.Value.AddDays(1);
                }
            };
            llPresets.Click += (o, e) =>
            {
                ctxPresets.Show(llPresets, llPresets.PointToClient(Control.MousePosition));
            };
            dataGridView1.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableWithAutoHeaderText;
            dataGridView1.MultiSelect       = true;
            dataGridView1.CellDoubleClick  += HandleCellDoubleClick;
            typeof(DataGridView).InvokeMember(
                "DoubleBuffered",
                BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.SetProperty,
                null,
                dataGridView1,
                new object[] { true });
            UpdateAccountSelection();

            // OrderBy vullen
            foreach (var enumname in Enum.GetNames(typeof(OrderBy)))
            {
                orderByCombo.Items.Add(enumname);
            }
            orderByCombo.SelectedIndex = 0;

            // Filter textbox
            filterTextBox.GotFocus  += HandleFilterGotFocus;
            filterTextBox.LostFocus += HandleFilterLostFocus;
            filterTextBox.KeyUp     += HandleFilterKeyup;
            HandleFilterLostFocus(this, EventArgs.Empty);

            // Extra opties
            useOptimizedQueriesForWADTablesToolStripMenuItem.Checked = Configuration.Instance.UseWADPerformanceOptimization;
            useOptimizedQueriesForWADTablesToolStripMenuItem.Click  += (src, evt) =>
            {
                Configuration.Instance.UseWADPerformanceOptimization     = !Configuration.Instance.UseWADPerformanceOptimization;
                useOptimizedQueriesForWADTablesToolStripMenuItem.Checked = Configuration.Instance.UseWADPerformanceOptimization;
                Configuration.Instance.Save();
            };
            convertEventTickCountColumnToReadableFormatToolStripMenuItem.Checked = Configuration.Instance.ConvertEventTickCount;
            convertEventTickCountColumnToReadableFormatToolStripMenuItem.Click  += (src, evt) =>
            {
                Configuration.Instance.ConvertEventTickCount = !Configuration.Instance.ConvertEventTickCount;
                convertEventTickCountColumnToReadableFormatToolStripMenuItem.Checked = Configuration.Instance.ConvertEventTickCount;
                Configuration.Instance.Save();
            };
            showPerfCountersAsChartMenuItem.Checked = Configuration.Instance.ShowPerformanceCountersAsChart;
            showPerfCountersAsChartMenuItem.Click  += (src, evt) =>
            {
                Configuration.Instance.ShowPerformanceCountersAsChart = !Configuration.Instance.ShowPerformanceCountersAsChart;
                showPerfCountersAsChartMenuItem.Checked = Configuration.Instance.ShowPerformanceCountersAsChart;
                Configuration.Instance.Save();
            };
            useKarellPartitionKey.Checked = Configuration.Instance.UseKarellPartitionKey;
            useKarellRowKey.Checked       = Configuration.Instance.UseKarellRowKey;

            delayedFilterTextChangedTimer          = new Timer();
            delayedFilterTextChangedTimer.Interval = 500;
            delayedFilterTextChangedTimer.Tick    += DelayedFilterTextChangedTimerTick;

            // New version check
            AppVersion.CheckForUpdateAsync();
        }