Пример #1
0
        /* CONSTRUCTOR */
        public Window() : base("Gnome orbiter")
        {
            silver = new GtkSilver(320, 420);
            silver.Attach(new Canvas());

            fetcher            = new PlanetFetcher();
            fetcher.FetchDone += OnFetchDone;
            fetcher.Start();

            silver.Canvas.Children.Add(new Background(silver));

            throbber = new Throbber(silver);
            silver.Canvas.Children.Add(throbber);

            CreateButtons();

            Add(silver);

            RectangleGeometry r = new RectangleGeometry();

            r.Rect             = new Rect(10.0, 10.0, 300.0, 400.0);
            silver.Canvas.Clip = r;

            silver.SetSizeRequest(320, 420);
        }
Пример #2
0
        public MoonlightWidget()
        {
            this.Build();

            silver = new GtkSilver(100, 100);
            silver.Transparent = true;
            canvas = new Canvas();
            canvas.Width = 100;
            canvas.Height = 100;
            canvas.Background = new SolidColorBrush(Colors.White);
            silver.Attach(canvas);

            //			Image image = new Image();
            //			image.Stretch = Stretch.Fill;
            //			image.Width = 100;
            //			image.Height = 100;
            //			Downloader downloader = new Downloader();
            //			downloader.Completed += delegate {
            //				image.SetSource(downloader, null);
            //			};
            //			downloader.Open("GET", new Uri("file:///home/ceronman/Escritorio/images/bigbrother.png"));
            //			downloader.Send();
            //
            //			canvas.Children.Add(image);

            this.Add(silver);
        }
Пример #3
0
        public static int Main(string [] args)
        {
            Application.Init();
            GtkSilver.Init();

            if (args.Length >= 1)
            {
                if (args [0] == "--black")
                {
                    ThemeDirectory = "theme-black";
                }
                else if (args [0] == "--blue")
                {
                    ThemeDirectory = "theme-blue";
                }
            }

            Window window = new Window();


            window.ShowAll();
            Application.Run();

            return(0);
        }
Пример #4
0
		public Entry ToEntryElement (GtkSilver silver)
		{
			Entry e = new Entry (silver);
			e.Header = String.Format ("{0}: {1}", author, title);
			e.Text = summary;

			return e;
		}
Пример #5
0
 public MainWindow() : base(Gtk.WindowType.Toplevel)
 {
     Build();
     svg    = new StringBuilder();
     xaml   = new StringBuilder();
     silver = new GtkSilver(400, 400);
     hbox1.PackStart(silver, true, true, 0);
 }
Пример #6
0
        public Entry ToEntryElement(GtkSilver silver)
        {
            Entry e = new Entry(silver);

            e.Header = String.Format("{0}: {1}", author, title);
            e.Text   = summary;

            return(e);
        }
Пример #7
0
	public MainWindow (): base (Gtk.WindowType.Toplevel)
	{
		Build ();
		svg = new StringBuilder();
		xaml = new StringBuilder();
		silver = new GtkSilver (400, 400);
		hbox1.PackStart (silver, true, true, 0);

	}
Пример #8
0
Файл: Entry.cs Проект: dfr0/moon
		/* CONSTRUCTOR */
		public Entry (GtkSilver silver)
		{
			string xaml = File.ReadAllText (GnomeOrbiter.ThemeDirectory + "/" + "Entry.xaml");
			realControl = silver.InitializeFromXaml (xaml, this);

			realControl.MouseEnter += RealControlMouseEnterHandler;
			realControl.MouseLeave += RealControlMouseLeaveHandler;

			UpdateLayout ();
		}
Пример #9
0
        public MoonlightController(GtkSilver moonlight)
        {
            this.moonlight = moonlight;
            serializer = new Serializer();
            undo = new UndoEngine();
            Selection = new StandardSelection(this);
            CurrentTool = new SelectionTool(this);
            propertyManager = new PropertyManager(this);

            SetupCanvas();
        }
Пример #10
0
        /* CONSTRUCTOR */
        public Entry(GtkSilver silver)
        {
            string xaml = File.ReadAllText(GnomeOrbiter.ThemeDirectory + "/" + "Entry.xaml");

            realControl = silver.InitializeFromXaml(xaml, this);

            realControl.MouseEnter += RealControlMouseEnterHandler;
            realControl.MouseLeave += RealControlMouseLeaveHandler;

            UpdateLayout();
        }
Пример #11
0
Файл: Main.cs Проект: dfr0/moon
		public static int Main (string [] args)
		{
			Application.Init ();
			GtkSilver.Init ();
		
			Window window = new Window ("My Canvas");
			window.DeleteEvent += DeleteEventHandler;
	
			GtkSilver silver = new GtkSilver (400, 400);
			silver.LoadFile ("MyCanvas.xaml");
			
			window.Add (silver);
			window.ShowAll ();
			Application.Run ();

			return 0;
		}
Пример #12
0
Файл: Main.cs Проект: ynkbt/moon
        public static int Main(string [] args)
        {
            Application.Init();
            GtkSilver.Init();

            Window window = new Window("My Canvas");

            window.DeleteEvent += DeleteEventHandler;

            GtkSilver silver = new GtkSilver(400, 400);

            silver.LoadFile("MyCanvas.xaml");

            window.Add(silver);
            window.ShowAll();
            Application.Run();

            return(0);
        }
Пример #13
0
		/* CONSTRUCTOR */
		public Window () : base ("Gnome orbiter")
		{
			silver = new GtkSilver (320, 420);
			silver.Attach (new Canvas ());

			fetcher = new PlanetFetcher ();
			fetcher.FetchDone += OnFetchDone;
			fetcher.Start ();

			silver.Canvas.Children.Add (new Background (silver));
			
			throbber = new Throbber (silver);
			silver.Canvas.Children.Add (throbber);

			CreateButtons ();
			
			Add (silver);

			RectangleGeometry r = new RectangleGeometry ();
			r.Rect = new Rect (10.0, 10.0, 300.0, 400.0);
			silver.Canvas.Clip = r;

			silver.SetSizeRequest (320, 420);
		}
Пример #14
0
        /* CONSTRUCTOR */
        public Background(GtkSilver silver)
        {
            string xaml = File.ReadAllText(GnomeOrbiter.ThemeDirectory + "/" + "Background.xaml");

            silver.InitializeFromXaml(xaml, this);
        }
Пример #15
0
        /* CONSTRUCTOR */
        public Throbber(GtkSilver silver)
        {
            string xaml = File.ReadAllText(GnomeOrbiter.ThemeDirectory + "/" + "Throbber.xaml");

            realControl = silver.InitializeFromXaml(xaml, this);
        }
Пример #16
0
		/* CONSTRUCTOR */
		public Throbber (GtkSilver silver)
		{
			string xaml = File.ReadAllText (GnomeOrbiter.ThemeDirectory + "/" + "Throbber.xaml");
			realControl = silver.InitializeFromXaml (xaml, this);
		}
Пример #17
0
		/* CONSTRUCTOR */
		public Background (GtkSilver silver)
		{
			string xaml = File.ReadAllText (GnomeOrbiter.ThemeDirectory + "/" + "Background.xaml");
			silver.InitializeFromXaml (xaml, this);
		}