Esempio n. 1
0
        DebuggeeExceptionForm(Process process)
        {
            InitializeComponent();

            this.process = process;

            this.process.Exited  += ProcessHandler;
            this.process.Resumed += ProcessHandler;

            this.FormClosed += FormClosedHandler;

            this.WindowState = DebuggingOptions.Instance.DebuggeeExceptionWindowState;
            FormLocationHelper.Apply(this, "DebuggeeExceptionForm", true);

            this.MinimizeBox = this.MaximizeBox = this.ShowIcon = false;

            this.exceptionView.Font         = WinFormsResourceService.DefaultMonospacedFont;
            this.exceptionView.DoubleClick += ExceptionViewDoubleClick;
            this.exceptionView.WordWrap     = false;

            this.btnBreak.Text    = StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.Break}");
            this.btnStop.Text     = StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.Terminate}");
            this.btnContinue.Text = StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.Continue}");

            this.btnBreak.Image    = WinFormsResourceService.GetBitmap("Icons.16x16.Debug.Break");
            this.btnStop.Image     = WinFormsResourceService.GetBitmap("Icons.16x16.StopProcess");
            this.btnContinue.Image = WinFormsResourceService.GetBitmap("Icons.16x16.Debug.Continue");
        }
Esempio n. 2
0
 void EnsureFloatingWindowsLocations()
 {
     foreach (var window in dockingManager.FloatingWindows)
     {
         var newLocation = FormLocationHelper.Validate(new Rect(window.Left, window.Top, window.Width, window.Height).TransformToDevice(window).ToSystemDrawing()).ToWpf().TransformFromDevice(window);
         window.Left = newLocation.Left;
         window.Top  = newLocation.Top;
     }
 }
        public ChooseExceptionsDialog(IEnumerable <ExceptionFilterEntry> entries)
        {
            InitializeComponent();

            FormLocationHelper.ApplyWindow(this, "Debugger.ChooseExceptionsDialog", true);

            ExceptionFilterList  = new ObservableCollection <ExceptionFilterEntry>(entries);
            dataGrid.ItemsSource = ExceptionFilterList;
        }
        public OpenFromGacDialog()
        {
            InitializeComponent();
            FormLocationHelper.ApplyWindow(this, "ICSharpCode.SharpDevelop.Dom.OpenFromGacDialog.Bounds", true);
            listView.ItemsSource = filteredEntries;
            SortableGridViewColumn.SetCurrentSortColumn(listView, nameColumn);
            SortableGridViewColumn.SetSortDirection(listView, ColumnSortDirection.Ascending);

            new Thread(new ThreadStart(FetchGacContents)).Start();
        }
Esempio n. 5
0
        protected Result result = Result.Break;         // Default

        protected DebuggerEventForm()
        {
            InitializeComponent();
            this.Text            = StringParser.Parse(this.Text);
            buttonBreak.Text     = StringParser.Parse(buttonBreak.Text);
            buttonContinue.Text  = StringParser.Parse(buttonContinue.Text);
            buttonTerminate.Text = StringParser.Parse(buttonTerminate.Text);

            WindowState = DebuggingOptions.Instance.DebuggerEventWindowState;
            FormLocationHelper.Apply(this, "DebuggerEventForm", true);
        }
Esempio n. 6
0
        protected override void OnSourceInitialized(EventArgs e)
        {
            base.OnSourceInitialized(e);
            HwndSource.FromHwnd(this.MainWin32Window.Handle).AddHook(SingleInstanceHelper.WndProc);
            // validate after PresentationSource is initialized
            Rect bounds = new Rect(Left, Top, Width, Height);

            bounds = FormLocationHelper.Validate(bounds.TransformToDevice(this).ToSystemDrawing()).ToWpf().TransformFromDevice(this);
            SetBounds(bounds);
            // Set WindowState after PresentationSource is initialized, because now bounds and location are properly set.
            this.WindowState = lastNonMinimizedWindowState;
        }
        public PlaybackChangedForm(IDevice device)
        {
            InitializeComponent();

            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.DoubleBuffer, true);

            this.Location = FormLocationHelper.GetLocation(mySize);
            SetColors();
            this.labelDevice.Text = device.DeviceName;
        }
Esempio n. 8
0
        public RegExpTkDialog()
        {
            SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.RegExpTkMainForm.xfrm"));

            List <QuickInsert> quickies = new List <QuickInsert>();

            quickies.Add(new QuickInsert("${res:RegExpTk.RegExpMenu.UngreedyStar}", "*?"));
            quickies.Add(new QuickInsert("${res:RegExpTk.RegExpMenu.WordCharacter}", "\\w"));
            quickies.Add(new QuickInsert("${res:RegExpTk.RegExpMenu.NonWordCharacter}", "\\W"));
            quickies.Add(new QuickInsert("${res:RegExpTk.RegExpMenu.WhitespaceCharacter}", "\\s"));
            quickies.Add(new QuickInsert("${res:RegExpTk.RegExpMenu.NonWhitespaceCharacter}", "\\S"));
            quickies.Add(new QuickInsert("${res:RegExpTk.RegExpMenu.DigitCharacter}", "\\d"));
            quickies.Add(new QuickInsert("${res:RegExpTk.RegExpMenu.NonDigitCharacter}", "\\D"));
            quickies.Add(new QuickInsert("${res:RegExpTk.RegExpMenu.WordBorder}", "\\b"));

            foreach (QuickInsert insert in quickies)
            {
                MenuCommand cmd = new MenuCommand(insert.Name, new EventHandler(quickInsert));
                cmd.Tag = insert.Text;
                quickInsertMenu.Items.Add(cmd);
            }

            matchListViewContextMenu.Items.Add(new MenuCommand("${res:RegExpTk.MainDialog.ShowGroups}", new EventHandler(MatchListViewContextMenu_Clicked)));

            ((Button)ControlDictionary["OkButton"]).Click += new EventHandler(OkButton_Click);
            ((CheckBox)ControlDictionary["ReplaceCheckBox"]).CheckedChanged     += new EventHandler(ReplaceCheckBox_CheckedChanged);
            ((ListView)ControlDictionary["GroupListView"]).SelectedIndexChanged += new EventHandler(GroupListView_SelectedIndexChanged);
            ((ListView)ControlDictionary["GroupListView"]).DoubleClick          += new EventHandler(GroupListView_DoubleClick);
            ((ListView)ControlDictionary["GroupListView"]).MouseUp += new MouseEventHandler(GroupListView_MouseUp);
            ((Button)ControlDictionary["ChooseAssemblyFileCompileButton"]).Click += new EventHandler(ChooseAssemblyFileCompileButton_Click);
            ((Button)ControlDictionary["CreateAssemblyFileCompileButton"]).Click += new EventHandler(CreateAssemblyFile);
            ((Button)ControlDictionary["quickInsertButton"]).MouseDown           += new MouseEventHandler(showQuickInsertMenu);
            ((Button)ControlDictionary["quickInsertButton"]).Image  = WinFormsResourceService.GetBitmap("Icons.16x16.PasteIcon");
            ControlDictionary["RegularExpressionTextBox"].KeyPress += delegate(object sender, KeyPressEventArgs e) {
                if (e.KeyChar == '\r')
                {
                    OkButton_Click(null, null); e.Handled = true;
                }
            };
            ((RichTextBox)ControlDictionary["InputTextBox"]).DetectUrls = false;

            ReplaceCheckBox_CheckedChanged((CheckBox)ControlDictionary["ReplaceCheckBox"], null);

            this.Width = Screen.PrimaryScreen.WorkingArea.Width / 2;

            ((TextBox)ControlDictionary["RegularExpressionTextBox"]).TextChanged += new EventHandler(SetRegEx);
            FormLocationHelper.Apply(this, "RegExpTk.WindowBounds", true);
        }
        public SearchAndReplaceFrom(SearchAndReplaceMode searchAndReplaceMode)
        {
            InitializeComponent();

            this.Owner           = WorkbenchSingleton.MainForm;
            this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
            this.ShowInTaskbar   = false;
            this.TopMost         = false;
            this.KeyPreview      = true;

            this.ToolStripButton_Find.Checked    = searchAndReplaceMode == SearchAndReplaceMode.Search;
            this.ToolStripButton_Replace.Checked = searchAndReplaceMode == SearchAndReplaceMode.Replace;

            SetSearchAndReplaceMode();

            FormLocationHelper.Apply(this, "ICSharpCode.SharpDevelop.Gui.SearchAndReplaceDialog.Location", false);
        }
        public SearchAndReplaceDialog(SearchAndReplaceMode searchAndReplaceMode)
        {
            SuspendLayout();
            this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
            this.ShowInTaskbar   = false;
            this.TopMost         = false;
            this.Text            = StringParser.Parse("${res:Dialog.NewProject.SearchReplace.Title}");
            this.KeyPreview      = true;

            searchAndReplacePanel      = new SearchAndReplacePanel();
            searchAndReplacePanel.Dock = DockStyle.Fill;
            Controls.Add(searchAndReplacePanel);

            ToolStrip toolStrip = new ToolStrip();

            toolStrip.Dock      = DockStyle.Top;
            toolStrip.Stretch   = true;
            toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;

            searchButton.Text    = StringParser.Parse("${res:Dialog.NewProject.SearchReplace.FindDialogName}");
            searchButton.Image   = IconService.GetBitmap("Icons.16x16.FindIcon");
            searchButton.Checked = searchAndReplaceMode == SearchAndReplaceMode.Search;
            searchButton.Click  += new EventHandler(SearchButtonClick);
            toolStrip.Items.Add(searchButton);

            replaceButton.Text    = StringParser.Parse("${res:Dialog.NewProject.SearchReplace.ReplaceDialogName}");
            replaceButton.Image   = IconService.GetBitmap("Icons.16x16.ReplaceIcon");
            replaceButton.Checked = searchAndReplaceMode == SearchAndReplaceMode.Replace;
            replaceButton.Click  += new EventHandler(ReplaceButtonClick);
            toolStrip.Items.Add(replaceButton);

            Controls.Add(toolStrip);
            RightToLeftConverter.ConvertRecursive(this);

            this.AutoScaleMode       = AutoScaleMode.Dpi;
            this.AutoScaleDimensions = new SizeF(96, 96);
            ResumeLayout();

            SetSearchAndReplaceMode();
            FormLocationHelper.Apply(this, "ICSharpCode.SharpDevelop.Gui.SearchAndReplaceDialog.Location", false);

            searchKeyboardShortcut  = GetKeyboardShortcut(SearchMenuAddInPath, "Find");
            replaceKeyboardShortcut = GetKeyboardShortcut(SearchMenuAddInPath, "Replace");
        }
Esempio n. 11
0
        public QuickviewForm(PlaybackChangerContext context)
        {
            InitializeComponent();

            buttonUpdate.Tag = new VersionTag(null, string.Empty, Enums.Constants.UpdateType.check);

            _context = context;

            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.DoubleBuffer, true);

            this.Location = FormLocationHelper.GetLocation(mySize);
            buttonSettings.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255);

            SetColors();
            var devices = _context.DeviceController.Devices;

            PopulateDevices(devices);
        }
Esempio n. 12
0
        /// <summary>
        /// The window was activated/gained focus.
        /// Update the colors for they could have changed, repopulated accordingly.
        /// </summary>
        private void View_Activated(object sender, EventArgs e)
        {
            var t = new Timer
            {
                Interval = 250
            };

            t.Tick += delegate
            {
                t.Stop();
                t.Dispose();

                _context.DeviceController.RefreshDevices();
                PopulateDevices(_context.DeviceController.Devices);
            };
            this.StartPosition = FormStartPosition.Manual;
            Point location = FormLocationHelper.GetLocation(mySize);

            this.Location = location;

            SetColors();
            t.Start();
        }