MemberInfo miDest = getMemberInfoWithReflexion (dest, destMember);
if (miDest == null) {
- Debug.WriteLine ("Reverse template binding error: " + destMember + " not found in " + dest);
+ Console.WriteLine ("Reverse template binding error: " + destMember + " not found in " + dest);
return;
}
}
}
} catch (Exception ex) {
- Debug.WriteLine (ex.ToString ());
+ Console.WriteLine (ex.ToString ());
return;
}
FieldInfo fiEvt = getEventHandlerField (t, eventName);
if (fiEvt == null) {
#if DEBUG_BINDING
- Debug.WriteLine ("RemoveHandlerByName: Event '" + eventName + "' not found in " + instance);
+ Console.WriteLine ("RemoveHandlerByName: Event '" + eventName + "' not found in " + instance);
#endif
return;
}
if (d.Method.Name == delegateName) {
eiEvt.RemoveEventHandler (instance, d);
#if DEBUG_BINDING
- Debug.WriteLine ("\t{0} handler removed in {1} for: {2}", d.Method.Name,instance, eventName);
+ Console.WriteLine ("\t{0} handler removed in {1} for: {2}", d.Method.Name,instance, eventName);
#endif
}
}
if (d.Target == target) {
eiEvt.RemoveEventHandler (instance, d);
#if DEBUG_BINDING
- Debug.WriteLine ("\t{0} handler removed in {1} for: {2}", d.Method.Name,instance, eventName);
+ Console.WriteLine ("\t{0} handler removed in {1} for: {2}", d.Method.Name,instance, eventName);
#endif
}
}
Type t = instance.GetType ();
MethodInfo mi = t.GetMethod (method, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
if (mi == null) {
- Debug.WriteLine ("Handler Method '{0}' not found in '{1}'", method, t);
+ Console.WriteLine ("Handler Method '{0}' not found in '{1}'", method, t);
return null;
}
return Delegate.CreateDelegate (eventType, instance, mi);
internal static Delegate compileDynEventHandler(EventInfo sourceEvent, string expression, NodeAddress currentNode = null){
#if DEBUG_BINDING
- Debug.WriteLine ("\tCompile Event {0}: {1}", sourceEvent.Name, expression);
+ Console.WriteLine ("\tCompile Event {0}: {1}", sourceEvent.Name, expression);
#endif
Type lopType = null;
try {
return GetIsExpandable == null ? true : GetIsExpandable (this);
} catch (Exception ex) {
- System.Diagnostics.Debug.WriteLine ("Not Expandable error: " + ex.ToString ());
+ Console.WriteLine ("Not Expandable error: " + ex.ToString ());
return false;
}
}
public override void OnChildLayoutChanges (object sender, LayoutingEventArgs arg)
{
GraphicObject go = sender as GraphicObject;
- //Debug.WriteLine ("child layout change: " + go.LastSlots.ToString() + " => " + go.Slot.ToString());
+ //Console.WriteLine ("child layout change: " + go.LastSlots.ToString() + " => " + go.Slot.ToString());
switch (arg.LayoutType) {
case LayoutingType.Width:
if (Orientation == Orientation.Horizontal) {
stretchedGO.Slot.Width = newW;
stretchedGO.IsDirty = true;
#if DEBUG_LAYOUTING
- Debug.WriteLine ("\tAdjusting Width of " + stretchedGO.ToString());
+ Console.WriteLine ("\tAdjusting Width of " + stretchedGO.ToString());
#endif
stretchedGO.LayoutChanged -= OnChildLayoutChanges;
stretchedGO.OnLayoutChanges (LayoutingType.Width);
stretchedGO.Slot.Height = newH;
stretchedGO.IsDirty = true;
#if DEBUG_LAYOUTING
- Debug.WriteLine ("\tAdjusting Height of " + stretchedGO.ToString());
+ Console.WriteLine ("\tAdjusting Height of " + stretchedGO.ToString());
#endif
stretchedGO.LayoutChanged -= OnChildLayoutChanges;
stretchedGO.OnLayoutChanges (LayoutingType.Height);
protected virtual void Dispose(bool disposing){
if (disposed){
#if DEBUG_DISPOSE
- Debug.WriteLine ("Trying to dispose already disposed obj: {0}", this.ToString());
+ Console.WriteLine ("Trying to dispose already disposed obj: {0}", this.ToString());
#endif
return;
}
if (disposing) {
#if DEBUG_DISPOSE
- Debug.WriteLine ("Disposing: {0}", this.ToString());
+ Console.WriteLine ("Disposing: {0}", this.ToString());
if (IsQueueForRedraw)
throw new Exception("Trying to dispose an object queued for Redraw: " + this.ToString());
#endif
DataSource = null;
parent = null;
} else
- Debug.WriteLine ("!!! Finalized by GC: {0}", this.ToString ());
+ Console.WriteLine ("!!! Finalized by GC: {0}", this.ToString ());
Clipping?.Dispose ();
bmp?.Dispose ();
disposed = true;
public event EventHandler<ValueChangeEventArgs> ValueChanged;
public virtual void NotifyValueChanged(string MemberName, object _value)
{
- //Debug.WriteLine ("Value changed: {0}->{1} = {2}", this, MemberName, _value);
+ //Console.WriteLine ("Value changed: {0}->{1} = {2}", this, MemberName, _value);
ValueChanged.Raise(this, new ValueChangeEventArgs(MemberName, _value));
}
#endregion
public virtual void OnDataSourceChanged(object sender, DataSourceChangeEventArgs e){
DataSourceChanged.Raise (this, e);
#if DEBUG_BINDING
- Debug.WriteLine("New DataSource for => {0} \n\t{1}=>{2}", this.ToString(),e.OldDataSource,e.NewDataSource);
+ Console.WriteLine("New DataSource for => {0} \n\t{1}=>{2}", this.ToString(),e.OldDataSource,e.NewDataSource);
#endif
}
public void loadDefaultValues()
{
#if DEBUG_LOAD
- Debug.WriteLine ("LoadDefValues for " + this.ToString ());
+ Console.WriteLine ("LoadDefValues for " + this.ToString ());
#endif
Type thisType = this.GetType ();
il.Emit (OpCodes.Castclass, ei.EventHandlerType);
il.Emit (OpCodes.Callvirt, ei.AddMethod);
}else
- Debug.WriteLine("error in styling, event not handled : " + trimed);
+ Console.WriteLine("error in styling, event not handled : " + trimed);
}
}
/// </summary>
public virtual void ClippingRegistration(){
#if DEBUG_UPDATE
- Debug.WriteLine (string.Format("ClippingRegistration -> {0}", this.ToString ()));
+ Console.WriteLine (string.Format("ClippingRegistration -> {0}", this.ToString ()));
#endif
IsQueueForRedraw = false;
if (Parent == null)
/// <param name="clip">Clip rectangle</param>
public virtual void RegisterClip(Rectangle clip){
#if DEBUG_UPDATE
- Debug.WriteLine (string.Format("RegisterClip -> {1}:{0}", clip, this.ToString ()));
+ Console.WriteLine (string.Format("RegisterClip -> {1}:{0}", clip, this.ToString ()));
#endif
Rectangle r = clip + ClientRectangle.Position;
if (CacheEnabled && !IsDirty)
public void RegisterForGraphicUpdate ()
{
#if DEBUG_UPDATE
- Debug.WriteLine (string.Format("RegisterForGraphicUpdate (IsDirty set)-> {0}", this.ToString ()));
+ Console.WriteLine (string.Format("RegisterForGraphicUpdate (IsDirty set)-> {0}", this.ToString ()));
#endif
IsDirty = true;
if (Width.IsFit || Height.IsFit)
public void RegisterForRedraw ()
{
#if DEBUG_UPDATE
- Debug.WriteLine (string.Format("RegisterForRedraw (IsDirty set)-> {0}", this.ToString ()));
+ Console.WriteLine (string.Format("RegisterForRedraw (IsDirty set)-> {0}", this.ToString ()));
#endif
IsDirty = true;
if (RegisteredLayoutings == LayoutingType.None)
#if DEBUG_LAYOUTING
CurrentInterface.currentLQI.Slot = LastSlots;
CurrentInterface.currentLQI.NewSlot = Slot;
- Debug.WriteLine ("\t\t{0} => {1}",LastSlots,Slot);
+ Console.WriteLine ("\t\t{0} => {1}",LastSlots,Slot);
#endif
switch (layoutType) {
public virtual bool UpdateLayout (LayoutingType layoutType)
{
#if DEBUG_UPDATE
- Debug.WriteLine (string.Format("UpdateLayout ({1})-> {0}", this.ToString (), layoutType));
+ Console.WriteLine (string.Format("UpdateLayout ({1})-> {0}", this.ToString (), layoutType));
#endif
//unset bit, it would be reset if LQI is re-queued
registeredLayoutings &= (~layoutType);
protected virtual void onDraw(Context gr)
{
#if DEBUG_UPDATE
- Debug.WriteLine (string.Format("OnDraw -> {0}", this.ToString ()));
+ Console.WriteLine (string.Format("OnDraw -> {0}", this.ToString ()));
#endif
Rectangle rBack = new Rectangle (Slot.Size);
protected virtual void RecreateCache ()
{
#if DEBUG_UPDATE
- Debug.WriteLine (string.Format("RecreateCache -> {0}", this.ToString ()));
+ Console.WriteLine (string.Format("RecreateCache -> {0}", this.ToString ()));
#endif
IsDirty = false;
if (bmp != null)
}
protected virtual void UpdateCache(Context ctx){
#if DEBUG_UPDATE
- Debug.WriteLine (string.Format("UpdateCache -> {0}", this.ToString ()));
+ Console.WriteLine (string.Format("UpdateCache -> {0}", this.ToString ()));
#endif
Rectangle rb = Slot + Parent.ClientRectangle.Position;
if (clearBackground) {
public virtual void Paint (ref Context ctx)
{
#if DEBUG_UPDATE
- Debug.WriteLine (string.Format("Paint -> {0}", this.ToString ()));
+ Console.WriteLine (string.Format("Paint -> {0}", this.ToString ()));
#endif
//TODO:this test should not be necessary
if (Slot.Height < 0 || Slot.Width < 0 || parent == null)
public virtual void onMouseEnter(object sender, MouseMoveEventArgs e)
{
#if DEBUG_FOCUS
- Debug.WriteLine("MouseEnter => " + this.ToString());
+ Console.WriteLine("MouseEnter => " + this.ToString());
#endif
MouseEnter.Raise (this, e);
}
public virtual void onMouseLeave(object sender, MouseMoveEventArgs e)
{
#if DEBUG_FOCUS
- Debug.WriteLine("MouseLeave => " + this.ToString());
+ Console.WriteLine("MouseLeave => " + this.ToString());
#endif
MouseLeave.Raise (this, e);
}
protected virtual void onFocused(object sender, EventArgs e){
#if DEBUG_FOCUS
- Debug.WriteLine("Focused => " + this.ToString());
+ Console.WriteLine("Focused => " + this.ToString());
#endif
Focused.Raise (this, e);
}
protected virtual void onUnfocused(object sender, EventArgs e){
#if DEBUG_FOCUS
- Debug.WriteLine("UnFocused => " + this.ToString());
+ Console.WriteLine("UnFocused => " + this.ToString());
#endif
Unfocused.Raise (this, e);
}
}
internal void ClearTemplateBinding(){
#if DEBUG_UPDATE
- Debug.WriteLine (string.Format("ClearTemplateBinding: {0}", this.ToString()));
+ Console.WriteLine (string.Format("ClearTemplateBinding: {0}", this.ToString()));
#endif
if (ValueChanged == null)
return;
if (d.Method.Name == "dyn_tmpValueChanged") {
eiEvt.RemoveEventHandler (this, d);
#if DEBUG_BINDING
- Debug.WriteLine ("\t{0} template binding handler removed in {1} for: {2}", d.Method.Name, this, "ValueChanged");
+ Console.WriteLine ("\t{0} template binding handler removed in {1} for: {2}", d.Method.Name, this, "ValueChanged");
#endif
}
}
}
void searchLargestChild(){
#if DEBUG_LAYOUTING
- Debug.WriteLine("\tSearch largest child");
+ Console.WriteLine("\tSearch largest child");
#endif
largestChild = null;
contentSize.Width = 0;
}
void searchTallestChild(){
#if DEBUG_LAYOUTING
- Debug.WriteLine("\tSearch tallest child");
+ Console.WriteLine("\tSearch tallest child");
#endif
tallestChild = null;
contentSize.Height = 0;
}
}
} catch (Exception ex) {
- Debug.WriteLine (ex.Message);
+ Console.WriteLine (ex.Message);
_pic = null;
}
NotifyValueChanged ("Path", Path);
}
void OnChildLayoutChanges (object sender, LayoutingEventArgs arg)
{
- //Debug.WriteLine ("scroller childLayoutChanges");
+ //Console.WriteLine ("scroller childLayoutChanges");
int maxScroll = MaximumScroll;
- //Debug.WriteLine ("maxscroll={0}", maxScroll);
+ //Console.WriteLine ("maxscroll={0}", maxScroll);
if (_verticalScrolling) {
if (arg.LayoutType == LayoutingType.Height) {
if (maxScroll < ScrollY) {
- //Debug.WriteLine ("scrolly={0} maxscroll={1}", ScrollY, maxScroll);
+ //Console.WriteLine ("scrolly={0} maxscroll={1}", ScrollY, maxScroll);
ScrollY = maxScroll;
}
NotifyValueChanged("MaximumScroll", maxScroll);
}
} else if (arg.LayoutType == LayoutingType.Width) {
if (maxScroll < ScrollX) {
- //Debug.WriteLine ("scrolly={0} maxscroll={1}", ScrollY, maxScroll);
+ //Console.WriteLine ("scrolly={0} maxscroll={1}", ScrollY, maxScroll);
ScrollX = maxScroll;
}
NotifyValueChanged("MaximumScroll", maxScroll);
if (value == _selBegin)
return;
_selBegin = value;
- System.Diagnostics.Debug.WriteLine ("SelBegin=" + _selBegin);
+ Console.WriteLine ("SelBegin=" + _selBegin);
NotifyValueChanged ("SelBegin", _selBegin);
NotifyValueChanged ("SelectedText", SelectedText);
}
rLineY = cb.Y + i * fe.Height,
rLineW = lstr.Length * fe.MaxXAdvance;
- System.Diagnostics.Debug.WriteLine ("sel start: " + selectionStart + " sel end: " + selectionEnd);
+ Console.WriteLine ("sel start: " + selectionStart + " sel end: " + selectionEnd);
if (curL == selectionStart.Y) {
rLineX += (selectionStart.X - ScrollX) * fe.MaxXAdvance;
rLineW -= selectionStart.X * fe.MaxXAdvance;
visibleLines = (int)Math.Floor ((double)ClientRectangle.Height / fe.Height);
MaxScrollY = Math.Max (0, lines.Count - visibleLines);
- System.Diagnostics.Debug.WriteLine ("update visible lines: " + visibleLines);
- System.Diagnostics.Debug.WriteLine ("update MaxScrollY: " + MaxScrollY);
+ Console.WriteLine ("update visible lines: " + visibleLines);
+ Console.WriteLine ("update MaxScrollY: " + MaxScrollY);
}
#if DEBUG_LOAD
loadingTime.Stop ();
- Debug.WriteLine("Listbox {2} Loading: {0} ticks \t, {1} ms",
+ Console.WriteLine("Listbox {2} Loading: {0} ticks \t, {1} ms",
loadingTime.ElapsedTicks,
loadingTime.ElapsedMilliseconds, this.ToString());
#endif
// protected void _list_LayoutChanged (object sender, LayoutingEventArgs e)
// {
// #if DEBUG_LAYOUTING
-// Debug.WriteLine("list_LayoutChanged");
+// Console.WriteLine("list_LayoutChanged");
// #endif
// if (_gsList.Orientation == Orientation.Horizontal) {
// if (e.LayoutType == LayoutingType.Width)
{
//children can't stretch in a wrapper
GraphicObject go = sender as GraphicObject;
- //System.Diagnostics.Debug.WriteLine ("wrapper child layout change: " + go.LastSlots.ToString() + " => " + go.Slot.ToString());
+ //Console.WriteLine ("wrapper child layout change: " + go.LastSlots.ToString() + " => " + go.Slot.ToString());
switch (arg.LayoutType) {
case LayoutingType.Width:
if (Orientation == Orientation.Horizontal && go.Width.Units == Unit.Percent){
try {
ResolveName (bd);
} catch (Exception ex) {
- System.Diagnostics.Debug.WriteLine (ex.ToString ());
+ Console.WriteLine (ex.ToString ());
continue;
}
}
Array.Copy (target, nodeIdx, dest, 0, destLength);
} catch (Exception ex) {
- System.Diagnostics.Debug.WriteLine (ex.ToString ());
+ System.Diagnostics.Console.WriteLine (ex.ToString ());
}
}
#if DEBUG_LOAD
loadingTime.Stop ();
- Debug.WriteLine ("IML Instantiator creation '{2}' : {0} ticks, {1} ms",
+ Console.WriteLine ("IML Instantiator creation '{2}' : {0} ticks, {1} ms",
loadingTime.ElapsedTicks, loadingTime.ElapsedMilliseconds, imlPath);
#endif
}
BindingDefinition bindingDef = sourceNA.GetBindingDef (sourceMember, expression);
#if DEBUG_BINDING
- Debug.WriteLine("Property Binding: " + bindingDef.ToString());
+ Console.WriteLine("Property Binding: " + bindingDef.ToString());
#endif
if (bindingDef.IsDataSourceBinding)//bind on data source
BindingDefinition bindingDef = currentNode.GetBindingDef (sourceEvent.Name, expression);
#if DEBUG_BINDING
- Debug.WriteLine("Event Binding: " + bindingDef.ToString());
+ Console.WriteLine("Event Binding: " + bindingDef.ToString());
#endif
if (bindingDef.IsTemplateBinding | bindingDef.IsDataSourceBinding) {
ctx.emitCachedDelegateHandlerAddition (dmIdx, CompilerServices.eiValueChange, origine);
#if DEBUG_BINDING
- Debug.WriteLine("\tCrow property binding: " + dm.Name);
+ Console.WriteLine("\tCrow property binding: " + dm.Name);
#endif
}
foreach (MemberAddress ma in bindingCase.Value) {
if (ma.Address.Count == 0){
- Debug.WriteLine("\t\tBUG: reverse template binding in normal template binding");
+ Console.WriteLine("\t\tBUG: reverse template binding in normal template binding");
continue;//template binding
}
//first we try to get memberInfo of new parent, if it doesn't exist, it's a propery less binding
ctx.emitCachedDelegateHandlerAddition(delDSIndex, CompilerServices.eiDSChange);
#if DEBUG_BINDING
- Debug.WriteLine("\tDataSource ValueChanged: " + delName);
- Debug.WriteLine("\tDataSource Changed: " + dm.Name);
+ Console.WriteLine("\tDataSource ValueChanged: " + delName);
+ Console.WriteLine("\tDataSource Changed: " + dm.Name);
#endif
}
/// <summary>
PropertyInfo piDest = tDest.GetProperty (destMember);
if (piDest == null) {
- Debug.WriteLine ("Member '{0}' not found in new DataSource '{1}' of '{2}'", destMember, dest, orig);
+ Console.WriteLine ("Member '{0}' not found in new DataSource '{1}' of '{2}'", destMember, dest, orig);
return;
}
#if DEBUG_BINDING
- Debug.WriteLine ("DS Reverse binding: Member '{0}' found in new DS '{1}' of '{2}'", destMember, dest, orig);
+ Console.WriteLine ("DS Reverse binding: Member '{0}' found in new DS '{1}' of '{2}'", destMember, dest, orig);
#endif
#region ValueChanged emit
/// - Keyboard and Mouse logic
/// - the resulting bitmap of the interface
/// </summary>
- public class Interface : ILayoutable
+ public class Interface : ILayoutable, IValueChange
{
+ #region IValueChange implementation
+ public event EventHandler<ValueChangeEventArgs> ValueChanged;
+ public void NotifyValueChanged(string MemberName, object _value)
+ {
+ //Console.WriteLine ("Value changed: {0}->{1} = {2}", this, MemberName, _value);
+ ValueChanged.Raise(this, new ValueChangeEventArgs(MemberName, _value));
+ }
+ #endregion
+
[MethodImplAttribute(MethodImplOptions.InternalCall)][System.Security.SecuritySafeCriticalAttribute]
internal static extern void crow_mono_update(IntPtr region, byte[] bitmap);
FontRenderingOptions = new FontOptions ();
FontRenderingOptions.Antialias = Antialias.Subpixel;
FontRenderingOptions.HintMetrics = HintMetrics.On;
- FontRenderingOptions.HintStyle = HintStyle.Medium;
- FontRenderingOptions.SubpixelOrder = SubpixelOrder.Rgb;
+ FontRenderingOptions.HintStyle = HintStyle.Full;
+ //FontRenderingOptions.SubpixelOrder = SubpixelOrder.Rgb;
}
public Interface(){
CurrentInterface = this;
lock (UpdateMutex) {
GraphicObject tmp = Load (path);
AddWidget (tmp);
-
+ tmp.DataSource = this;
return tmp;
}
}
{
_activeWidget.IsActive = true;
#if DEBUG_FOCUS
- Debug.WriteLine("Active => " + _activeWidget.ToString());
+ Console.WriteLine("Active => " + _activeWidget.ToString());
}else
- Debug.WriteLine("Active => null");
+ Console.WriteLine("Active => null");
#else
}
#endif
_hoverWidget = value;
#if DEBUG_FOCUS
if (_hoverWidget != null)
- Debug.WriteLine("Hover => " + _hoverWidget.ToString());
+ Console.WriteLine("Hover => " + _hoverWidget.ToString());
else
- Debug.WriteLine("Hover => null");
+ Console.WriteLine("Hover => null");
#endif
}
}
public void EnqueueForRepaint(GraphicObject g)
{
#if DEBUG_UPDATE
- Debug.WriteLine (string.Format("\tEnqueueForRepaint -> {0}", g?.ToString ()));
+ Console.WriteLine (string.Format("\tEnqueueForRepaint -> {0}", g?.ToString ()));
#endif
lock (DrawingQueue) {
if (g.IsQueueForRedraw)
/// - Drawing
/// Result: the Interface bitmap is drawn in memory (byte[] bmp) and a dirtyRect and bitmap are available
/// </summary>
- public void Update(){
- if (mouseRepeatCount > 0) {
+ public void Update(){
+ if (mouseRepeatCount > 0) {
int mc = mouseRepeatCount;
mouseRepeatCount -= mc;
if (_focusedWidget != null) {
- for (int i = 0; i < mc; i++) {
+ for (int i = 0; i < mc; i++) {
_focusedWidget.onMouseClick (this, new MouseButtonEventArgs (Mouse.X, Mouse.Y, MouseButton.Left, true));
}
}
if (Monitor.TryEnter (LayoutMutex)) {
DiscardQueue = new Queue<LayoutingQueueItem> ();
- //Debug.WriteLine ("======= Layouting queue start =======");
+ //Console.WriteLine ("======= Layouting queue start =======");
LayoutingQueueItem lqi;
while (LayoutingQueue.Count > 0) {
lqi = LayoutingQueue.Dequeue ();
KeyboardKeyEventArgs lastKeyDownEvt;
void mouseRepeatThreadFunc()
{
+
mouseRepeatOn = true;
Thread.Sleep (Interface.DeviceRepeatDelay);
while (mouseRepeatOn) {
}
}
if (dataType == null) {
- Debug.WriteLine ("ItemTemplate error: DataType not found: {0}.", strDataType);
+ Console.WriteLine ("ItemTemplate error: DataType not found: {0}.", strDataType);
return;
}
Type tmpGrpType = typeof(TemplatedGroup);
LQITime = new Stopwatch();
Slot = Rectangle.Empty;
NewSlot = Rectangle.Empty;
- Debug.WriteLine ("\tRegister => " + this.ToString ());
+ Console.WriteLine ("\tRegister => " + this.ToString ());
#endif
}
#endregion
//cancel layouting for object without parent, maybe some were in queue when
//removed from a listbox
#if DEBUG_UPDATE || DEBUG_LAYOUTING
- Debug.WriteLine ("ERROR: processLayouting, no parent for: " + this.ToString ());
+ Console.WriteLine ("ERROR: processLayouting, no parent for: " + this.ToString ());
#endif
return;
}
#if DEBUG_LAYOUTING
LQITime.Start();
- Debug.WriteLine ("=> " + this.ToString ());
+ Console.WriteLine ("=> " + this.ToString ());
#endif
LayoutingTries++;
if (!Layoutable.UpdateLayout (LayoutType)) {
#if DEBUG_LAYOUTING
- Debug.WriteLine ("\t\tRequeued");
+ Console.WriteLine ("\t\tRequeued");
#endif
if (LayoutingTries < Interface.MaxLayoutingTries) {
Layoutable.RegisteredLayoutings |= LayoutType;
(Layoutable as GraphicObject).CurrentInterface.LayoutingQueue.Enqueue (this);
} else if (DiscardCount < Interface.MaxDiscardCount) {
#if DEBUG_LAYOUTING
- Debug.WriteLine ("\t\tDiscarded");
+ Console.WriteLine ("\t\tDiscarded");
#endif
LayoutingTries = 0;
DiscardCount++;
}
#if DEBUG_LAYOUTING
else
- Debug.WriteLine ("\tDELETED => " + this.ToString ());
+ Console.WriteLine ("\tDELETED => " + this.ToString ());
#endif
}
#if DEBUG_LAYOUTING
else{
if (LayoutingTries > 2 || DiscardCount > 0)
- Debug.WriteLine (this.ToString ());
+ Console.WriteLine (this.ToString ());
}
LQITime.Stop();
#endif
maximum = timer.ElapsedTicks;
}
void ResetStats(){
- Debug.WriteLine("reset measure cpt:{0}",cptMeasures);
+ Console.WriteLine("reset measure cpt:{0}",cptMeasures);
cptMeasures = total = current = maximum = 0;
minimum = long.MaxValue;
}
byte[] data;
//magic: CARD32 ’Xcur’ (0x58, 0x63, 0x75, 0x72)
if (new string (sr.ReadChars (4)) != "Xcur") {
- Debug.WriteLine ("XCursor Load error: Wrong magic");
+ Console.WriteLine ("XCursor Load error: Wrong magic");
return null;
}
//header: CARD32 bytes in this header