Manatee.Trello : Empty Label .Name and .Color Properties - manatee.trello

Have been using Trello and the Trello Rest API for past several years. A few days ago I began using Manatee.Trello v1.18.1 with .NET Framework 4.5.2 for development of a command line tool.
I used the following...
private static void displayBoardLabels(Board board)
{
foreach (Label label in board.Labels)
{
Console.WriteLine("Id=[{0}], Name=[{1}], Color=[{2}]", label.Id, label.Name, label.Color);
}
}
...to successfully display the Label Id, Name and Color properties available for a Board, but when I attempted to display the .Name and .Color properties for Labels returned from a Card...
private static void displayCardLabels(Card card)
{
foreach (Label label in card.Labels)
{
// Valid label.Id is shown, but label.Name and label.Color properties are blank.
Console.WriteLine("Id=[{0}], Name=[{1}], Color=[{2}]", label.Id, label.Name, label.Color);
}
}
...the label.Id value was valid, but the .Name and .Color properties were blank.
So my question is, what would cause the .Name and .Color properties for a Label to be blank?

It was a bug in Manatee.Trello. The labels weren't downloading the additional information.
The fix (v1.18.2) is now available.

Related

Unity Editor : How to resize and space value field of an inspector property field?

I am trying to implement my first unity editor code to make a custom array property drawer with indented named entries and indented and dynamicaly resized value fields.
I am using the following simple git solution as base for my code, which allows to set the labels of an array in the inspector : HERE
replacing the example shown in the gitHub solution, I am working with this enum as my array element name container:
[System.Serializable]
public enum HealthNames
{
General,
Head,
Body,
RightArm,
LeftArm,
Rightleg,
leftLeg,
}
and sets it up on a array in a monobehaviour class :
[ LabeledArray( typeof( HealthNames ) ) ]
public int[] m_aHealth = new int[ Enum.GetNames( typeof( HealthNames ) ).Length ];
I have added EditorGUI.indentLevel++; and EditorGUI.indentLevel--; at the start and end of the try statement to indent the label of the array elements, making them stand out from the size property.
Going from there, I have searched ways to add an indent on the elements' value fields or remove it from the size property's value field. but have found no answer using EditorGUI
I also looked to be able to resize all value fields dynamicaly, but there again, no answer came using EditorGUI only. there is no way to use EditorStyle.AnyField.WordWrap = true; on a propertyfield. Passing the PropertyField to an IntField, using a EditorStyles.NumberField and setting having its wrodwrapping set to true beforehand has no effect.
I also have found a small number of EditorGUILayout from a few years ago, but which do not work since the solution is built from the ground with EditorGUI
In hope of your enlightment on the matter
If I understand you correctly you want the labels and the value fields indented.
I think it could be done like e.g.
private const int INDENT = 15;
public override void OnGUI(Rect rect, SerializedProperty property, GUIContent label)
{
EditorGUI.BeginProperty(rect, label, property);
var fieldsRect = new Rect(rect.x + INDENT, rect.y, rect.width - INDENT, rect.height);
try
{
var path = property.propertyPath;
int pos = int.Parse(path.Split('[').LastOrDefault().TrimEnd(']'));
EditorGUI.PropertyField(fieldRect, property, new GUIContent(ObjectNames.NicifyVariableName(((LabeledArrayAttribute)attribute).names[pos])), true);
}
catch
{
EditorGUI.PropertyField(fieldRect, property, label, true);
}
EditorGUI.EndProperty();
}

Enterprise Architect: Hide only "top" labels of connectors programmatically

I want to hide the "top" part of all connector labels of a diagram. For this, I tried to set up a script, but it currently hides ALL labels (also the "bottom" labels which I want to preserve):
// Get a reference to the current diagram
var currentDiagram as EA.Diagram;
currentDiagram = Repository.GetCurrentDiagram();
if (currentDiagram != null)
{
for (var i = 0; i < currentDiagram.DiagramLinks.Count; i++)
{
var currentDiagramLink as EA.DiagramLink;
currentDiagramLink = currentDiagram.DiagramLinks.GetAt(i);
currentDiagramLink.Geometry = currentDiagramLink.Geometry
.replace(/HDN=0/g, "HDN=1")
.replace(/LLT=;/, "LLT=HDN=1;")
.replace(/LRT=;/, "LRT=HDN=1;");
if (!currentDiagramLink.Update())
{
Session.Output(currentDiagramLink.GetLastError());
}
}
}
When I hide only the top labels manually (context menu of a connector/Visibility/Set Label Visibility), the Geometry property of the DiagramLinks remains unchanged, so I guess the detailed label visibility information must be contained somewhere else in the model.
Does anyone know how to change my script?
Thanks in advance!
EDIT:
The dialog for editing the detailed label visibility looks as follows:
My goal is unchecking the "top label" checkboxes programmatically.
In the Geometry attribute you will find a partial string like
LLT=CX=36:CY=13:OX=0:OY=0:HDN=0:BLD=0:ITA=0:UND=0:CLR=-1:ALN=1:DIR=0:ROT=0;
So in between LLT and the next semi-colon you need to locate the HDN=0 and replace that with HDN=1. A simple global change like above wont work. You need a wild card like in the regex LLT=([^;]+); to work correctly.

How can I use a zk-chart on click?

I have a great problem with ZK charts!
I have 2 type of chart: a chart with data of the current day (so this chart is generated automatically) and a chart with data of a clicked date.
The first chart works correctely, the second not!
If I have clicked on a date, I build a graph! But it's impossible to modify the label position or name of label! And I need to modify these things. This is my graph:
<charts width="1700" style="height: 400px" type="line" model="#bind(vm.chart2)" title="">
</charts>
When I clicked I call this method:
#Command
#NotifyChange("chart2")
public ChartsModel viewGraph(#BindingParam("self") Group self){
String a = self.getLabel();//this is for passed a parameter
ServiceImpl usr = new ServiceImpl();
chart2 = usr.viewGraph(a);
return chart2;
}
viewGraph is so built:
#Override
public ChartsModel viewGraph(String data) {
//chart2 = new Charts();
chart2.setModel(LineLabelsData.setCategoryModel2(data));
chart2.getXAxis().getLabels().setRotation(180);
chart2.getYAxis().getTitle().setText("TEXT");
chart2.getTooltip().setEnabled(false);
chart2.getXAxis().getLabels().setRotation(180);
LinePlotOptions linePlotOptions =
chart2.getPlotData().getPlotOptions().getLine();
linePlotOptions.setEnableMouseTracking(false);
linePlotOptions.getDataLabels().setEnabled(true);
return chart2.getModel();
}
If I print something in this method my console view it correctely! The problem is that
chart2.getYAxis().getTitle().setText("TEXT");
does not work like
chart2.getXAxis().getLabels().setRotation(180);
How can I change that values?
To change yAxis title, you can simply call chart2.getYAxis().setTitle("title");
You may want to post your questions in ZK Forum rather than stackoverflow as our community users are experienced in ZK, and can help you quicker.

System.Windows.Forms.ListView Check box is not recognized by UIA verrify

I am quite new to UI Automation and UI Verify tool.
In our application, we are using System.Windows.Forms.ListView with CheckBoxes property set to true.
The CheckBoxes property allows you to display a check box next to each item in the list. This enables your application to display a list of items (and subitems if the View property is set to View.Details)
So far individual row and all values in each row is identified. Only checkbox is not recognized by UI verify.
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent()
listView1.CheckBoxes = true;
listView1.View = View.Details;
listView1.Columns.Add("Automation");
listView1.Columns.Add("result");
listView1.Items.Add(new ListViewItem(new string[] { "1", "Pass" }));
}
}
Output: Both values "1" and "pass" are recognized by UIA verify. However the check box is not recognized.
Has anybody else experience similar behavior? and if so is there any fix for this?
Much appreciated for all the help.
Regards
Hari Hara
From what I can see the whole list item supports the toggle pattern.
So you should be able to use the toggle pattern of the row control itself.
/// <summary>
/// Toggles anything that supports the toggle pattern
/// </summary>
/// <param name="aeElement">Automation element to toggle</param>
public void Toggle(AutomationElement aeElement)
{
TogglePattern tpToggle = (TogglePattern)aeElement.GetCurrentPattern(TogglePattern.Pattern);
tpToggle.Toggle();
}
Are you using "hover" mode? Try checking the pane structure near the checkbox items in the left pane of UIA verifier window.

Calling methods on datasource in displayoption lags screen and prevents records from showing

I have overridden the displayoption method on my forms datasource to display lines in red which don't have enough stock (based on stock position & released production orders) but I think calling several methods on the datasource (which are also used by display fields on my form) has such an impact on the drawing of my form that the lines are red but the data isn't shown:
public void displayOption(Common _record, FormRowDisplayOption _options)
{
ProdBom _prodbomlocal = _record;
if (this.DRS_GetLineAvailable(_prodbomlocal) < 0)
{
_options.backColor(8421631); //Light Red
}
}
For instance when there are a lot of lines for which available stock, released production quantity, etc needs to be queried only one line is shown instead of e.g. 30 lines
I don't know what to do, is there some way I can pre-query the data?
Kind regards,
Mike
Have you tried calling the super()?
Any computation in displayOption should be very fast, or your form will suck.
Do not use color code in decimal, at least use hex 0x8080FF (BGR code).
public void displayOption(Common _record, FormRowDisplayOption _options)
{
ProdBom _prodbomlocal = _record;
if (this.DRS_GetLineAvailable(_prodbomlocal) < 0)
{
_options.backColor(8421631); //Light Red
}
super(_record, _options);
}