Author: everaldo
Date: 2007-06-25 13:59:37 -0400 (Mon, 25 Jun 2007)
New Revision: 80706

Removed:
   trunk/moon/desklet/novell.clock/images/
Modified:
   trunk/moon/desklet/novell.clock/ChangeLog
   trunk/moon/desklet/novell.clock/Makefile
   trunk/moon/desklet/novell.clock/clock.cs
   trunk/moon/desklet/novell.clock/default.xaml
Log:
        * Makefile: Add clean target and add -t to laucher options.
        * image/*: Remove background images, we dont need it.

2007-06-25  Everaldo Canuto  <[EMAIL PROTECTED]>



Modified: trunk/moon/desklet/novell.clock/ChangeLog
===================================================================
--- trunk/moon/desklet/novell.clock/ChangeLog   2007-06-25 17:56:16 UTC (rev 
80705)
+++ trunk/moon/desklet/novell.clock/ChangeLog   2007-06-25 17:59:37 UTC (rev 
80706)
@@ -1,5 +1,10 @@
 2007-06-25  Everaldo Canuto  <[EMAIL PROTECTED]>
 
+       * Makefile: Add clean target and add -t to laucher options.
+       * image/*: Remove background images, we dont need it.
+
+2007-06-25  Everaldo Canuto  <[EMAIL PROTECTED]>
+
        * Makefile: Add generic makefile.
        * default.xaml: Remove /bin from assembly path.
 

Modified: trunk/moon/desklet/novell.clock/Makefile
===================================================================
--- trunk/moon/desklet/novell.clock/Makefile    2007-06-25 17:56:16 UTC (rev 
80705)
+++ trunk/moon/desklet/novell.clock/Makefile    2007-06-25 17:59:37 UTC (rev 
80706)
@@ -3,15 +3,19 @@
 
 # you dont need to change below lines
 
-ASSEMBLY = $(DESKLET).dll
+ASSEMBLY = bin/$(DESKLET).dll
 DSOURCES = $(SOURCES)
-LAUNCHER = mopen
+LAUNCHER = mopen -t -d
 LOPTIONS = --debug
 
 all: $(ASSEMBLY)
 
 $(ASSEMBLY): $(DSOURCES)
-       gmcs -debug -target:library -pkg:silver $(DSOURCES)
+       mkdir -p bin
+       gmcs -debug -target:library -pkg:silver -out:$(ASSEMBLY) $(DSOURCES)
 
+clean:
+       rm -f $(ASSEMBLY)
+
 run: $(ASSEMBLY)
        MONO_OPTIONS=$(LOPTIONS) $(LAUNCHER) default.xaml

Modified: trunk/moon/desklet/novell.clock/clock.cs
===================================================================
--- trunk/moon/desklet/novell.clock/clock.cs    2007-06-25 17:56:16 UTC (rev 
80705)
+++ trunk/moon/desklet/novell.clock/clock.cs    2007-06-25 17:59:37 UTC (rev 
80706)
@@ -10,52 +10,42 @@
 
 namespace Golem.Desklet
 {
-  public class Clock : Canvas 
-  {
-    RotateTransform secondsHand;
-    RotateTransform minuteHand;
-    RotateTransform hourHand;
-    Image background;
-    Timer t;
-    Uri moon1;
-    Uri moon2;
-    
-    void UpdateTime (object status)
-    {
-      Console.WriteLine ("UpdateTime");
-      DateTime now = DateTime.Now;
+       public class Clock : Canvas 
+       {
+               RotateTransform secondsHand;
+               RotateTransform minuteHand;
+               RotateTransform hourHand;
+               Timer timer;
 
-      if (now.Second < 30)
-       background.Source = moon1;
-      else
-       background.Source = moon2;
+               void UpdateTime (object status)
+               {
+                       Console.WriteLine ("UpdateTime");
+                       DateTime now = DateTime.Now;
 
-      secondsHand.Angle = now.Second * 6;
-      minuteHand.Angle = now.Minute * 6;
-      hourHand.Angle = now.Hour * 30;
-    }
+                       secondsHand.Angle = now.Second * 6;
+                       minuteHand.Angle = now.Minute * 6;
+                       hourHand.Angle = now.Hour * 30;
+               }
 
-    public void PageLoaded (object o, EventArgs e)
-    {
-      Console.WriteLine ("page loaded");
-      secondsHand = FindName ("secondsHand") as RotateTransform;
-      minuteHand = FindName ("minuteHand") as RotateTransform;
-      hourHand = FindName ("hourHand") as RotateTransform;
-      background = FindName ("backImage") as Image;
+               public void PageLoaded (object o, EventArgs e)
+               {
+                       Console.WriteLine ("page loaded");
+                       secondsHand = FindName ("secondsHand") as 
RotateTransform;
+                       minuteHand = FindName ("minuteHand") as RotateTransform;
+                       hourHand = FindName ("hourHand") as RotateTransform;
 
-      string imagesDir = IO.Path.Combine (Environment.CurrentDirectory, 
"images");
-      moon1 = new Uri (IO.Path.Combine (imagesDir, "moon1.jpg"));
-      moon2 = new Uri (IO.Path.Combine (imagesDir, "moon2.jpg"));
-      
-      if (secondsHand == null || minuteHand == null || hourHand == null || 
background == null) {
-       // TODO: Should communicate the error to the desklet host
-       Console.WriteLine ("Missing elements in the desklet xaml file");
-       return;
-      }
+                       // We can use 
+                       //string imagesDir = IO.Path.Combine 
(Environment.CurrentDirectory, "images");
 
-      Console.WriteLine ("Starting timer");
-      AutoResetEvent autoEvent = new AutoResetEvent(false);
-      t = new Timer (new TimerCallback (UpdateTime), autoEvent, 5, 1000);
-    }
-  }
+                       if (secondsHand == null || minuteHand == null || 
hourHand == null) {
+                               // TODO: Should communicate the error to the 
desklet host
+                               Console.WriteLine ("Missing elements in the 
desklet xaml file");
+                               return;
+                       }
+
+                       Console.WriteLine ("Starting timer");
+                       AutoResetEvent autoEvent = new AutoResetEvent(false);
+                       timer = new Timer (new TimerCallback (UpdateTime), 
autoEvent, 5, 1000);
+               }
+       }
 }

Modified: trunk/moon/desklet/novell.clock/default.xaml
===================================================================
--- trunk/moon/desklet/novell.clock/default.xaml        2007-06-25 17:56:16 UTC 
(rev 80705)
+++ trunk/moon/desklet/novell.clock/default.xaml        2007-06-25 17:59:37 UTC 
(rev 80706)
@@ -1,10 +1,8 @@
 <Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation";
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml";
-        x:Class="Golem.Desklet.Clock;assembly=clock.dll"
+        x:Class="Golem.Desklet.Clock;assembly=bin/clock.dll"
        Loaded="PageLoaded">
 
-       <Image Source="images/moon1.jpg" x:Name="backImage" Canvas.Left="0" 
Canvas.Top="0" />
-
        <!-- border 1 -->
        <Path Fill="#ffc6c8da" Stroke="#ff605773" StrokeThickness="3">
                <Path.Data>

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to