Author: hisham
Date: 2005-06-14 09:03:52 -0400 (Tue, 14 Jun 2005)
New Revision: 45963

Added:
   trunk/efl-sharp/apps/image_viewer/image_test_eblocks.cs
Removed:
   trunk/efl-sharp/apps/image_viewer/test.cs
Log:
rename

Copied: trunk/efl-sharp/apps/image_viewer/image_test_eblocks.cs (from rev 
45962, trunk/efl-sharp/apps/image_viewer/test.cs)

Deleted: trunk/efl-sharp/apps/image_viewer/test.cs
===================================================================
--- trunk/efl-sharp/apps/image_viewer/test.cs   2005-06-14 12:59:53 UTC (rev 
45962)
+++ trunk/efl-sharp/apps/image_viewer/test.cs   2005-06-14 13:03:52 UTC (rev 
45963)
@@ -1,276 +0,0 @@
-using System;
-using System.Runtime.InteropServices;
-using System.Text.RegularExpressions;
-using System.IO;
-using System.Threading;
-using System.Collections;
-using Enlightenment.Evas;
-using Enlightenment.Ecore;
-using Enlightenment.Edje;
-using Enlightenment.Epsilon;
-using Enlightenment.Eblocks;
-
-public class ContainerImage : Enlightenment.Evas.ContainerItem
-{
-   public new Enlightenment.Evas.Image i;
-   private Enlightenment.Evas.Image shadow;
-   private string file;   
-   
-   public override Enlightenment.Evas.Geometry Geometry
-     {
-       get { return i.Geometry; }
-     }
-   
-   public ContainerImage(string f)
-     {
-       file = f;
-     }
-   
-   public override void Add(Enlightenment.Evas.Canvas canvas)
-     {
-       i = new Enlightenment.Evas.Image(canvas);       
-       i.Set(file, null);
-       
-       shadow = new Enlightenment.Evas.Image(canvas);
-       shadow.Set(file, null);
-       shadow.Set("temp_images/e17_titlebar_shadow2.png", null);
-       shadow.Border = new ImageBorder(5, 5, 5, 5);
-     }
-   
-   public override void Delete()
-     {
-       i.Delete();
-       shadow.Delete();
-     }
-   
-   public override void Show()
-     {
-       i.Show();
-       shadow.Show();
-     }
-   
-   public override void Hide()
-     {
-       i.Hide();
-       shadow.Hide();
-     }
-   
-   public override void Resize(int w, int h)
-     {
-       i.Resize(w, h);
-       i.Fill = new ImageFill (0, 0, w, h);
-       
-       shadow.Resize(w + 8, h + 8);
-       shadow.Fill = new ImageFill (0, 0, w + 8, h + 8);
-     }
-   
-   public override void Move(int x, int y)
-     {
-       i.Move(x, y);
-       shadow.Move(x, y);
-     }
-   
-   public override void StackBelow(Enlightenment.Evas.Item below)
-     {
-       i.StackBelow(below);
-       shadow.StackBelow(i);
-     }
-   
-   public override void Raise()
-     {
-       i.Raise();
-       shadow.StackBelow(i);
-     }
-   
-   public override Enlightenment.Evas.Item Clip
-     {
-       get { return i.Clip; }
-       set { i.Clip = value; shadow.Clip = value; }
-     }
-   
-   ~ContainerImage()
-     {}
-}
-
-
-public class EcoreEvasTest
-{
-   
-   private static Enlightenment.Ecore.Canvas EE = new 
Enlightenment.Ecore.Canvas();
-   private static Container cont;
-   private static ArrayList items = new ArrayList();
-   private static Thread thread;
-   private static string dir;
-   
-   public static void AppQuitButtonYesHandler(Dialog d)
-     {
-       System.Console.WriteLine("Pressed Yes!!");
-       MainLoop.Quit();
-     }
-   
-   public static void AppQuitButtonNoHandler(Dialog d)
-     {
-       System.Console.WriteLine("Pressed No!!");
-       d.Close();      
-       d = null;
-     }
-   
-      
-   public static void AppQuitButtonHandler(Enlightenment.Evas.Item item, 
object EventInfo)
-     {
-       Dialog d = new Dialog("Quit Application", "Are you sure you want to 
quit?", "Quitting will lose all unsaved data!");
-       d.AddButton("Yes", AppQuitButtonYesHandler);
-       d.AddButton("No", AppQuitButtonNoHandler);
-       d.Run();
-     }
-
-   public static void AppAboutButtonCloseHandler(Dialog d)
-     {
-       d.Close();
-       d = null;
-     }
-   
-   public static void AppAboutButtonHandler(Enlightenment.Evas.Item item, 
object EventInfo)
-     {
-       Dialog d = new Dialog("About EFL#", "EFL# Widget Test", "Coded by 
Hisham Mardam Bey");
-       d.AddButton("Close", AppAboutButtonCloseHandler);
-       d.Run();        
-     }
-   
-   private static void Callback(object state)
-     {
-       thread = Thread.CurrentThread;
-       
-       DirectoryInfo myDirectory = new DirectoryInfo(dir);
-       FileInfo[] _files = myDirectory.GetFiles();
-       foreach (FileInfo file in _files)
-         {
-            String s;
-            Thumb thumb = new Thumb(file.FullName);
-            if(thumb.Exists() == 0)
-              thumb.Generate();
-            s = thumb.Preview;
-            ContainerImage i = new ContainerImage(s);
-            items.Add(i);
-         }
-       
-       cont = new Container(EE, items);
-       cont.ItemSize(64, 64);
-       cont.Move(64, 37);
-       cont.Resize(640 - 60 - 2, 480 - 37 - 2);
-       cont.Show();
-       System.GC.KeepAlive(cont);
-     }   
-   
-   public static void AppResizeHandler(Enlightenment.Ecore.Canvas ee)
-     {
-       int x, y, w, h;
-       Box box;
-       EE.GeometryGet(out x, out y, out w, out h);
-       
-       box = (Box)EE.DataGet("box_top");
-       box.Resize(w, box.Geometry.H);
-       
-       box = (Box)EE.DataGet("box_icons");
-       box.Resize(box.Geometry.W, h);
-       
-       Edje win_bg = (Edje)EE.DataGet("win_bg");
-       win_bg.Resize(w, h);
-       
-       Enlightenment.Eblocks.Line line = 
(Enlightenment.Eblocks.Line)EE.DataGet("line");
-       line.Resize(w, line.Geometry.H);
-       
-       cont.Resize(w- 60 - 2, h - 37 - 2);
-     }
-   
-   
-   
-   public static void Main(string [] args)
-     { 
-       MainLoop.Init();
-       Enlightenment.Ecore.Canvas.Init();
-       Edje.Init();
-       
-       EE.SoftwareX11New(":0", IntPtr.Zero, 0, 0, 640, 480);
-       EE.ResizeEvent += new 
Enlightenment.Ecore.Canvas.EventHandler(AppResizeHandler);
-       EE.Title = "EFL# Demo App";
-       EE.NameClassSet("efl_sharp_demo","efl_sharp_demo");     
-       EE.Show();              
-       
-       Edje win_bg = new Edje(EE.Get());
-       win_bg.FileSet("themes/e17/e17.edj","window");
-       win_bg.Resize(640, 480);
-       win_bg.Move(0, 0);
-       win_bg.Lower();
-       win_bg.Show();
-       
-       Box box_top = new Box(EE.Get());
-       box_top.Spacing = 0;
-       box_top.Move(0, 0);
-       box_top.Resize(640, 35);
-               
-       Box box_menu = new Box(EE.Get());
-       box_menu.Spacing = 1;
-       box_menu.Resize(640 - 1, 25);
-       box_menu.Horizontal = true;             
-       box_top.Add(box_menu);  
-       
-       Button button;  
-       
-       button = new Button(EE.Get(), "File");
-       button.Resize(75, 25);
-       box_menu.Add(button);   
-       button = new Button(EE.Get(), "Edit");
-       button.Resize(75, 25);
-       box_menu.Add(button);   
-       button = new Button(EE.Get(), "About");
-       button.Resize(75, 25);
-       button.MouseUpEvent += new 
Enlightenment.Evas.Item.EventHandler(AppAboutButtonHandler); 
-       box_menu.Add(button);   
-       
-       Enlightenment.Eblocks.Line line;
-       
-       line = new Enlightenment.Eblocks.Line(EE.Get());
-       line.Horizontal = true;
-       line.Resize(640, 6);
-       box_top.Add(line);              
-       
-       box_top.Show();
-       
-       Box box_icons = new Box(EE.Get());
-       box_icons.Spacing = 0;
-       box_icons.Move(0, 37);
-       box_icons.Resize(64, 640 - 37);
-       
-       button = new Button(EE.Get(), "Tile");
-       button.Resize(64, 64);
-       box_icons.Add(button);
-       button = new Button(EE.Get(), "Stretch");
-       button.Resize(64, 64);
-       box_icons.Add(button);  
-       button = new Button(EE.Get(), "Rotate");
-       button.Resize(64, 64);
-       box_icons.Add(button);  
-       button = new Button(EE.Get(), "Flip");
-       button.Resize(64, 64);
-       box_icons.Add(button);  
-       button = new Button(EE.Get(), "Quit");
-       button.MouseUpEvent += new 
Enlightenment.Evas.Item.EventHandler(AppQuitButtonHandler);
-       button.Resize(64, 64);  
-       box_icons.Add(button);  
-       
-       box_icons.Show();
-       
-       dir = args[0];  
-
-       EE.DataSet("box_icons", box_icons);
-       EE.DataSet("box_top", box_top);
-       EE.DataSet("win_bg", win_bg);
-       EE.DataSet("line", line);
-       
-       WaitCallback callback = new WaitCallback(Callback);
-       ThreadPool.QueueUserWorkItem(callback);
-               
-       MainLoop.Begin();       
-     }   
-}

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

Reply via email to