SharpDevelop and DebugBreak (F12 key) - sharpdevelop

In Delphi I got used to pressing F12 whenever my program becomes irresponsive to see what the Main thread is doing, mainly for stack trace but sometimes also local vars.
Now I am playing around with SharpDevelop and can't see anything quite like that. Is it possible at all?

There is not pre-defined keyboard shortcut in SharpDevelop for debug break. It is available from the Debug menu by selecting Debug - Break. You can also press the pause button in the main toolbar.
If you want a keyboard shortcut then you would need to edit the ICSharpCode.SharpDevelop.addin file and add a shortcut to the Break menu. Below shows the Break menu item, without a keyboard shortcut, and the Continue menu item which has F5 as its shortcut.
<Condition name="DebuggerSupports" debuggersupports = "ExecutionControl">
<MenuItem id = "ExecutionControlSeparator" type = "Separator" />
<Condition name="IsProcessRunning" isprocessrunning = "True" isdebugging = "True" action = "Disable">
<MenuItem id = "Break"
label = "${res:XML.MainMenu.DebugMenu.Break}"
icon = "Icons.16x16.Debug.Break"
class = "ICSharpCode.SharpDevelop.Project.Commands.BreakDebuggingCommand"/>
</Condition>
<Condition name="IsProcessRunning" isprocessrunning = "False" isdebugging = "True" action = "Disable">
<MenuItem id = "Continue"
label = "${res:XML.MainMenu.DebugMenu.Continue}"
icon = "Icons.16x16.Debug.Continue"
shortcut = "F5"
class = "ICSharpCode.SharpDevelop.Project.Commands.ContinueDebuggingCommand"/>
</Condition>
</Condition>
So you can add a new shortcut attribute for the Break menu item if you want to by editing the ICSharpCode.SharpDevelop.addin file.

Related

Excel Custom UI Addin Resets Quick Access Toolbar

I recently created an AddIn to make the lives of my co-workers easier, and to make it as easy as possible for them I made a custom UI to add a tab and buttons for the macros. It works great and everyone is mostly happy. A problem has cropped up on some of their computers where the quick access tool bar gets reset every time they open Excel. Mine also reset the first time, but it's held on to changes I've made since. Other's gets reset every time they open it and I can't figure out why. I built my customUI from scratch and did not use any third party software to do it.
There isn't any code within the AddIn that affects the UI, the only code I put in was a Case statement to run specific macros for specific buttons. Below is my custom UI xml file. Anyone have any ideas why the quick access toolbar keeps resetting?
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon>
<tabs>
<tab id = "CRC" label = "CRC Macros" insertAfterMso = "TabHome">
<group id = "MPS" label = "Schedule">
<button id = "KTC_button" label = "KTC MPS" image = "ktc_icon" size = "large" onAction = "ProcessRibbon"/>
<button id = "KTS_button" label = "KTS MPS" image = "kts_icon" size = "large" onAction = "ProcessRibbon"/>
<button id = "KTV_button" label = "KTV MPS" image = "ktv_icon" size = "large" onAction = "ProcessRibbon"/>
<button id = "split_button" label = "Split Schedule" image = "split_icon" size = "large" onAction = "ProcessRibbon"/>
</group>
<group id = "CTB" label = "Shortage Reports">
<button id = "QD_button" label = "Quick CTB" image = "qd_icon" size = "large" onAction = "ProcessRibbon"/>
<button id = "PL_button" label = "Product Line or CSV" image = "pl_icon" size = "large" onAction = "ProcessRibbon"/>
</group>
<group id = "OTH" label = "Other">
<button id = "STG_button" label = "Shipments-To-Go" image = "stg_icon" size = "large" onAction = "ProcessRibbon"/>
<button id = "peg_button" label = "Format Pegged" image = "peg_icon" size = "large" onAction = "ProcessRibbon"/>
<button id = "MRP_button" label = "MRP Summary" image = "MRP_icon" size = "large" onAction = "ProcessRibbon"/>
<button id = "MPS_Sum_button" label = "MPS Summary" image = "MPS_Sum_icon" size = "large" onAction = "ProcessRibbon"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
Your ribbon XML markup looks good. It cannot be related to resetting the QAT in Office applications (Excel in your case) from the first sight.
First of all, you need to check out the list of Office add-ins. There can be any conflicts between extensions and your customizations.
Second, make sure there are no UI errors in Excel. By default, if an add-in (or any other kind of ribbon customizations) attempts to manipulate the Microsoft Office user interface (UI) and fails, no error message is displayed. However, you can configure Microsoft Office applications to display messages for errors that relate to the UI. You can use these messages to help determine why a custom ribbon does not appear, or why a ribbon appears but no controls appear. See How to: Show Add-in user interface errors for more information.
Third, it is not clear what your callbacks do. But ribbon is a static thing from its birth, so QAT can't be customized at runtime without loading a custom ribbon XML. So, only users or add-ins could do resets.

Why Entry on Xamarin.Forms on Windows shows empty even if it contains text until I click it?

I create an Entry on Xamarin.Forms using the following code
Entry txtMeasures = new Entry { WidthRequest = 100, Text = "32", TextColor = Color.Black };
The text that should appear is "32" but the entry appears empty on UWP app until I click the entry,
this happen only on Windows, on Mac, Android, iOs, the entry shows the text normally since it appears.
Entry Before Clicking
Entry After Clicking
I add Entry by code behind, but I don't have any issue in Android and UWP.
Firstly, set current cpntentpage stacklayout name as stacklayout1.
<StackLayout x:Name="stacklayout1">
<!-- Place new controls here -->
<Label Text="Welcome to Xamarin.Forms!"
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand" />
</StackLayout>
Then add Entry in Stacklayout.
Entry txtMeasures = new Entry { WidthRequest = 100, Text = "32", TextColor = Color.Black };
stacklayout1.Children.Add(txtMeasures);
Seems to be a known issue with Entries on UWP:
Text is not visible on Entry element after animation finished #8503
Entry text initially invisible on UWP #8787
Fix 8503, 8787 - text in Entry not immediately visible, or visible after IsVisible set to true #8536
There are a couple of work arounds (set request height on the entry or where its wrapped in a scrollview have that wrap a ContentPresenter). I'm having this issue related to a scrollView but can't get either workaround to work 🤷‍♂️

How to click one of the options listed in the drop down menu in hand coded UI testing?

UITestControl uiLinkAboutus = new UITestControl(_bw);
uiLinkAboutus.TechnologyName = "Web";
uiLinkAboutus.SearchProperties.Add("ControlType", "Image");
uiLinkAboutus.SearchProperties.Add("TagName", "IMG");
uiLinkAboutus.SearchProperties.Add("Alt", "Open Menu");
Mouse.Click(uiLinkAboutus);
/* Upon execution, the drop down button is clicked but the option listed below is not clicked. How to solve this problem?
In stead of searching for an image, search for the list or dropdown control using a wpfCombobox, winCombobox or HtmlComboBox control. There you set the selectedItem property to the value you want. that is the most robust way of selecting an item in the UI. so e.g. :
ApplicationUnderTest aut = ApplicationUnderTest.Launch(#"yourapp.exe");  
WpfComboBox cbBox = new WpfComboBox(aut);
cbBox.SearchProperties.Add(WpfComboBox.PropertyNames.AutomationId,"cmbCountries");//AutomationId == xName roperty
cbBox.SelectedItem = "your value";

How to verify whether a blinking cursor is currently inside of a text box through TestComplete

I am trying to verify that the text box gets the focus (the blinking cursor gets placed inside of it) after a certain action. I tried to use the Focused property, but it does not seem to work, or the object doesnt have this property. This is on a Web application. Here is the code
reportPage = Aliases.iexplore.IESA;
saveWindow = reportPage.Find("ObjectIdentifier", "MainContent_saveFilterSetDialog_saveDialog", 50, true);
saveWindowNameTextBox = saveWindow.Find("ObjectIdentifier", "*MainContent_*_sfsName", 25, true);
if(saveWindowNameTextBox.Focused == true)
Log.Message("The blinking cursor is inside of the name text box")
else
Log.Error("The blinking cursor is not inside of the name text box")
The logging window says "Waiting for Focused", then it fails and the log says "Unable to find the object with the specified properties"
NOTE: When I inspect this text box object in the object inspector window, "Focused" is not listed in the list of properties.
Is there another way to accomplish this?
I was able to accomplish this using an HTML DOM property activeElement
var actualFocusedElement = Sys.Browser().Page("*BC/Report*").contentDocument.activeElement.id
if(aqString.Contains(actualElement, "saveDialog_tmpl_sfsName", 0, true))
Log.Message("The blinking cursor is inside of the name text box")
else
Log.Error("The blinking cursor is not inside of the name text box")

Sharepoint Toolpart Event Not Firing

I have created a Sharepoint WebPart, and I have given it a custom ToolPart that includes a Grid (a Telerik RadGrid, to be exact, though that is rather irrelevant). I have populated the grid, and created a GridButtonColumn object to add to the grid:
protected override void CreateChildControls()
{
GridButtonColumn c = new GridButtonColumn();
c.ConfirmText = "Really Delete?";
c.ConfirmDialogType = GridConfirmDialogType.RadWindow;
c.ConfirmTitle = "Delete";
c.ButtonType = GridButtonColumnType.LinkButton;
c.Text = "Delete";
c.UniqueName = "DeleteColumn";
grid.Columns.Add(c);
// ...
grid.DeleteCommand += new GridCommandEventHandler(Grid_DeleteCommand);
}
The grid renders correctly - populated with data and with the delete button present.
Now, when I click any of the delete button, the Grid_DeleteCommand() event does not get triggered. However, when I add a random button outside of the grid, it's click event gets triggered:
Button b = new Button();
b.Text = "Hello World";
b.Click += new EventHandler(Button_Click);
I'm not able to debug on this installation of Sharepoint (or maybe I can, but attaching to the process hasn't allowed me to do so yet), so the method of both of those events is simply a redirection to Google. That is how I check to see if the events fire:
string AbsoluteUri ="http://www.google.com";
Page.Response.Redirect(AbsoluteUri);
The only difference I can see between the two is that, with the 'Delete' button, it is nested inside of a Grid control, whereas with the 'Hello World' button, there is no nesting.
How would I be able to have the Grid_DeleteCommand fire when I click the button in the grid?
Using the Telerik Grid control, you should specify button's CommandName in your code.
Adding this line should solve the problem:
c.CommandName = "Delete";

Resources