Ejemplo n.º 1
0
    public Tree(string[] args)
    {
        Application.Init ();

        store = new TreeStore (typeof (string), typeof (string));

        Glade.XML gxml = new Glade.XML(null, "tree.glade", "window", null );
        gxml.Autoconnect( this );

        window.Resize(500, 400 );
        // eventos
        window.DeleteEvent += new DeleteEventHandler( Salir );
        b_agregar.Clicked += new EventHandler( Agregar );
        b_eliminar.Clicked += new EventHandler( Borrar );
        b_limpiar.Clicked += new EventHandler( Limpiar );
        b_salir.Clicked += new EventHandler( Cerrar );

        // crear arbol

        tv = new TreeView ();
        tv.Model = store;
        tv.HeadersVisible = true;

        tv.AppendColumn ("Nombre", new CellRendererText (), "text", 0);
        tv.AppendColumn ("Apellidos", new CellRendererText (), "text", 1);

        scrolledwindow1.Add (tv);
        window.ShowAll ();
        Application.Run ();
    }
Ejemplo n.º 2
0
    private UploadFileChooserUI()
    {
        Glade.XML gxml = new Glade.XML (null, "organizer.glade", "filechooserdialog1", null);
          gxml.Autoconnect (this);
          _job = new ThreadStart(ProcessThumbnail);
          _previewthread = new Thread(_job);

          label16.WidthRequest = eventbox7.WidthRequest;

          eventbox7.ModifyBg(Gtk.StateType.Normal, bgcolor);
          eventbox8.ModifyBg(Gtk.StateType.Normal, bgcolor);
          eventbox9.ModifyBg(Gtk.StateType.Normal, bgcolor);

          filechooserdialog1.Title = "Select files to upload";
          filechooserdialog1.SetIconFromFile(DeskFlickrUI.ICON_PATH);
          filechooserdialog1.SetFilename(PersistentInformation.GetInstance().UploadFilename);
          filechooserdialog1.SelectMultiple = true;

          FileFilter imagefilter = new FileFilter();
          imagefilter.AddMimeType("image/jpeg");
          imagefilter.AddMimeType("image/png");
          filechooserdialog1.Filter = imagefilter;

          filechooserdialog1.SelectionChanged += new EventHandler(OnFileSelectedChanged);
          filechooserdialog1.FileActivated += new EventHandler(OnOpenButtonClicked);
          button10.Clicked += new EventHandler(OnOpenButtonClicked);
          button11.Clicked += new EventHandler(OnCancelButtonClicked);
          DeskFlickrUI.GetInstance().SetUploadWindow(false);
          filechooserdialog1.ShowAll();
    }
Ejemplo n.º 3
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="messagetype"></param>
        /// <param name="message"></param>
        /// <param name="callback">Can be null</param>
        public MessageBox( MessageType messagetype, string title, string message, Callback callback )
        {
            this.callback = callback;

            Glade.XML app = new Glade.XML( EnvironmentHelper.GetExeDirectory() + "/metaverse.client.glade", "messagebox", "" );
            app.Autoconnect( this );
            messagebox.SetIconFromFile(EnvironmentHelper.GetOsmpIconFilepath());

            messagebox.Title = title;
            messagelabel.Text = message;

            switch (messagetype)
            {
                case MessageType.Info:
                    imageicon.SetFromStock( "gtk-dialog-info", IconSize.Dialog );
                    break;
                case MessageType.Warning:
                    imageicon.SetFromStock( "gtk-dialog-warning", IconSize.Dialog );
                    break;
                case MessageType.Error:
                    imageicon.SetFromStock( "gtk-dialog-error", IconSize.Dialog );
                    break;
            }

            btnok.Clicked += new EventHandler( btnok_Activated );
        }
    public GUIAbout()
    {
        Glade.XML gxml = new Glade.XML("../../src/GUI/Glade/ekranabout.glade", "AboutWindow", null);
        gxml.Autoconnect(this);

        setEvents();
    }
Ejemplo n.º 5
0
        public LLViewPictureWindow(Life myLife)
        {
            this.myLife = myLife;

            Glade.XML gxml = new Glade.XML (null, "llviewpicturewindow.glade", "ViewPictureWindow", null);
            gxml.Autoconnect(this);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Constructor
        /// </summary>
        public UpgradeForm(IMainView explorerPresenter)
        {
            Glade.XML gxml = new Glade.XML("ApsimNG.Resources.Glade.UpgradeForm.glade", "window1");
            gxml.Autoconnect(this);
            listview1.Model = listmodel;

            CellRendererText textRender = new Gtk.CellRendererText();
            textRender.Editable = false;

            TreeViewColumn column0 = new TreeViewColumn("Version", textRender, "text", 0);
            listview1.AppendColumn(column0);
            column0.Sizing = TreeViewColumnSizing.Autosize;
            column0.Resizable = true;

            TreeViewColumn column1 = new TreeViewColumn("Description", textRender, "text", 1);
            listview1.AppendColumn(column1);
            column1.Sizing = TreeViewColumnSizing.Autosize;
            column1.Resizable = true;

            HTMLview = new HTMLView(new ViewBase(null));
            HTMLalign.Add(HTMLview.MainWidget);
            this.tabbedExplorerView = explorerPresenter;
            button1.Clicked += OnUpgrade;
            button2.Clicked += OnViewMoreDetail;
            window1.Destroyed += OnFormClosing;
            window1.MapEvent += OnShown;
        }
Ejemplo n.º 7
0
  /** ChatIM constructor. 
   *  @param core the main application
   *  @param r_add the recipient address
   */
  public BrunetChatIM(User u, Buddy bud, BrunetChatMain bcm)
  {
    _user = u;
    _recipient_buddy = bud;
    _bcm = bcm;
    
    string fname = "BrunetChat.glade";
    string root = "windowBrunetChatIM";

    Glade.XML gxml = new Glade.XML (fname, root, null);
    //Glade.XML gxml = new Glade.XML (null,fname, root, null);
    gxml.Autoconnect(this);
    
    _text_buf_display = textviewDisplay.Buffer;
    _text_buf_input = textviewInput.Buffer;
    _text_buf_recipient = textviewRecipient.Buffer;
    _text_buf_recipient.Text = _recipient_buddy.Alias;
    Gdk.Color red_color = new Gdk.Color (0xff, 0, 0);
    Gdk.Color blue_color = new Gdk.Color (0, 0, 0xff);
    
    TextTag sendercolor = new TextTag("Sender Color");
    sendercolor.ForegroundGdk = blue_color;
    
    TextTag recipientcolor = new TextTag("Recipient Color");
    recipientcolor.ForegroundGdk = red_color;
    _text_buf_display.TagTable.Add(sendercolor);
    _text_buf_display.TagTable.Add(recipientcolor);
    
  }
Ejemplo n.º 8
0
        public GladeExample()
        {
            // Load the file glwidget.glade and collect all the objects starting from
            // the specified "glwidget" root. This is the name of the Window in the
            // glade file.
            Glade.XML gxml = new Glade.XML(null, "glwidget.glade", "glwidget", null);

            // Connect the Signals defined in Glade. Also connect any matching names
            // of objects to properties of the object specified ('this') that are marked
            // with the [Widget] attribute. In turn this makes this.glwidget get assigned
            // to the glwidget Gtk.Window object.
            gxml.Autoconnect(this);

            // Create a new glw widget and request a size.
            glw = new GLWidget();

            // Create a new Vertical Box that the glw can live in.
            VBox vb = (Gtk.VBox)gxml["vbox1"];

            // Pack the glw widget into the VBox.
            vb.PackStart (glw);

            // Create a new clickable button.
            Button butModal = new Button();
            butModal.Label = "Press For Modal!";
            butModal.Clicked += new EventHandler(butModal_Clicked);

            // Stick the button into the vbox.
            vb.PackStart(butModal);
        }
Ejemplo n.º 9
0
        public MainWindow(string[] Args)
        {
            gxml = new Glade.XML(null, "gui.glade", "MainWindow", null);
            gxml.Autoconnect(this);

            events = new Queue<Event>();
            deltas = new Queue<Delta>();

            curr = new BugDisplay(frmCurrent);
            //curr.render(false,"hello world");
            dupl = new BugDisplay(frmDupl);

            ((Window)gxml.GetWidget("MainWindow")).Maximize();
            ((Window)gxml.GetWidget("MainWindow")).ShowAll();
            hrfBrowser.Clicked += OnNoClicked;
            //GlobalProxySelection.Select = new WebProxy("http://taz:8118");

            bugz = new Bugzilla("http://bugzilla.gnome.org/");
            BugDB.bugz = bugz;
            if (Args.Length !=0)
                product = Args[0];

            todo = new Queue<Bug>();
            ready();
            hasprocess = true;
            GLib.Idle.Add(new GLib.IdleHandler(processTask));
            notify = new ThreadNotify (new ReadyEvent (ready));
        }
Ejemplo n.º 10
0
    public GUI(string[] args)
    {
        Application.Init();

        Glade.XML mainWindowGlade = new Glade.XML(null, "gui.glade",
                "mainWindow", null);
        mainWindowGlade.Autoconnect(this);

        Glade.XML aboutDialogGlade = new Glade.XML(null, "gui.glade",
                "aboutDialog", null);
        aboutDialogGlade.Autoconnect(this);

        Glade.XML fileSaveDialogGlade = new Glade.XML(null, "gui.glade",
                "fileSaveDialog", null);
        fileSaveDialogGlade.Autoconnect(this);

        Glade.XML fileOpenDialogGlade = new Glade.XML(null, "gui.glade",
                "fileOpenDialog", null);
        fileOpenDialogGlade.Autoconnect(this);

        this.fileOpenDialog.SelectMultiple = true;
        this.SetupSlicesTreeView();

        Application.Run();
    }
Ejemplo n.º 11
0
    private AboutUI()
    {
        Glade.XML gxml = new Glade.XML (null, "organizer.glade", "window4", null);
          gxml.Autoconnect (this);

          Gdk.Pixbuf pixbuf = new Gdk.Pixbuf(DeskFlickrUI.ICON_PATH);
          logoimage.Pixbuf = pixbuf;
          dfolabel.Markup = "<span font_desc='Sans Bold 16'>Desktop Flickr Organizer v0.8</span>";

          notebook2.SetTabLabelText(notebook2.CurrentPageWidget, "About");
          notebook2.NextPage();
          notebook2.SetTabLabelText(notebook2.CurrentPageWidget, "Attribution");
          notebook2.NextPage();
          notebook2.SetTabLabelText(notebook2.CurrentPageWidget, "License");
          notebook2.Page = 0;

          closebutton.Label = "Close";
          closebutton.Clicked += new EventHandler(OnCloseButtonClicked);

          SetAboutInfo();
          SetAttributionInfo();

          window4.SetIconFromFile(DeskFlickrUI.ICON_PATH);
          window4.ShowAll();
    }
Ejemplo n.º 12
0
 public ConnectionMenu(TreeView connectionList)
 {
     this.connectionList = connectionList;
     Glade.XML xmlMnuConnections = new Glade.XML(null, "FileFind.Meshwork.GtkClient.meshwork.glade", "mnuConnections", null);
     mnuConnections = (xmlMnuConnections.GetWidget("mnuConnections") as Gtk.Menu);
     xmlMnuConnections.Autoconnect (this);
 }
Ejemplo n.º 13
0
        public ViewGui()
            : base("")
        {
            string fullName = "MainView.gui.glade";

            Assembly a = Assembly.GetAssembly(this.GetType());
            Console.WriteLine(a.CodeBase);

            if (!System.IO.File.Exists(a.CodeBase + "/" + fullName))
                fullName = "gui.glade";

            glade = new XML (Assembly.GetCallingAssembly (), fullName, "ViewGui", null);
            glade.Autoconnect (this);

            Window win = (Window) glade ["ViewGui"];
            win.Maximize();

            //Initialisation du menu principal
            MainUIManager uim = new MainUIManager (this);

            vboxMain.PackStart (uim.MenuBar, false, false, 0);
            ((Gtk.Box.BoxChild)(vboxMain[uim.MenuBar])).Position = 0;

            //Pagecontrol des vues
            notebookViews = new Notebook ();
            hpanedMain.Pack2 (notebookViews, true, false);
            notebookViews.Show ();
            //notebookViews.RemovePage(0);
        }
Ejemplo n.º 14
0
    public TrackballExample(string[] args)
    {
        Application.Init ();

        // Create a new GL widget
        glw = new TrackballWidget();

        // Create a new Teapot object
        GtkGL.Teapot teapot = new Teapot();

        // Add our Teapot object to the GLWidget's list of associated GLObjects
        glw.AddGLObject( teapot );

        // Read in the glade file that describes the widget layout
        Glade.XML gxml = new Glade.XML (null, "glwidget.glade", "glwidget", null);

        // Connect the Signals defined in Glade
        gxml.Autoconnect (this);

        // Pack the gl window into the vbox
        Gtk.VBox vbox1 = (Gtk.VBox)gxml["vbox1"];
        vbox1.PackStart ( glw );

        // Show the GL widget
        Gtk.Window window = (Gtk.Window)gxml["glwidget"];
        window.Show();

        glw.Show();

        // Go dog.  Go!
        Application.Run ();
    }
Ejemplo n.º 15
0
        public MonoCovGui()
        {
            xml = new Glade.XML (typeof (MonoCovGui).Assembly, "monocov.glade", null, null);
            xml.Autoconnect (this);

            main.Title = CAPTION;
        }
Ejemplo n.º 16
0
	public unsafe MphotoToplevel (IImageRepository _repo, string[] args, params object[] props)
		: base ("Mphoto", "0.0", Modules.UI, args, props)
	{
		cwh = new Glade.XMLCustomWidgetHandler (GladeCustomWidgetHandler);
		Glade.XML.SetCustomHandler (cwh);
		gxml = new Glade.XML (null, "mphoto.glade", null, null);

		Console.WriteLine ("Autoconnect");
		gxml.Autoconnect (this);

//        CreateCustomWidget ("browser_icon_list");
//        CreateCustomWidget ("collections_tree_view");
//        CreateCustomWidget ("imageinfo_tree_view");
//        CreateCustomWidget ("eog_image_view");
//        CreateCustomWidget ("keywords_widget");

		this.leftside_notebook = (Gtk.Notebook) gxml["browser_left_notebook"];
		this.top_level_notebook = (Gtk.Notebook) gxml["top_level_notebook"];

		this.toplevel = gxml["mphoto_browser"];
		this.label_zoom_value = (Gtk.Label) gxml["label_zoom_value"];
		this.search_dialog = (Gtk.Window) gxml["search_dialog"];

		this.Repository = _repo;

		// initialize the tree views to the side
		imageinfo_tree_view.IconList = icon_list;
		keywords_widget.IconList = icon_list;

		collections_tree_view.RowActivated += new RowActivatedHandler (CollectionsTreeViewActivateHandler);
		icon_list.Activated += new EventHandler (IconlistActivated);

		GlobalMphotoToplevel = this;
	}
Ejemplo n.º 17
0
    public SettingsDialog(bool modal)
    {
        Glade.XML gxml = new Glade.XML("editor.glade", "settingsDialog");
        gxml.Autoconnect(this);

        if(settingsDialog == null || entryExe == null)
            throw new Exception("Couldn't load settings Dialog");

        entryExe.Text = Settings.Instance.SupertuxExe;
        rbToolsLeft.Active = !Settings.Instance.ToolboxOnRight;
        rbToolsRight.Active = Settings.Instance.ToolboxOnRight;

        entryName.Text = Settings.Instance.Name;
        entryContact.Text = Settings.Instance.ContactInfo;
        entryLicense.Text = Settings.Instance.License;

        SidebarChanged = false;
        settingsDialog.Icon = EditorStock.WindowIcon;
        if (!modal) {
            settingsDialog.ShowAll();
        } else {
            settingsDialog.Run();
            settingsDialog.Destroy();
        }
    }
Ejemplo n.º 18
0
  public BrunetChatLogin(ChatConfigSerialization config)
  {
    _chat_config = config;
    
    string fname = "BrunetChat.glade";
    string root = "dialogBrunetChatLogin";
    Glade.XML gxml = new Glade.XML (fname, root, null);
    //Glade.XML gxml = new Glade.XML (null,fname, root, null);
    gxml.Autoconnect(this);

    int init_users = _chat_config.UserList.Users.Length;
    if (0 < init_users){
      userStrings = new ArrayList();
      userHashtable = new Hashtable();
      foreach(User user in _chat_config.UserList.Users ){
        userHashtable.Add(user.Email,user); 
        userStrings.Add(user.Email);
      }
      
      int count =  userStrings.Count;
      Console.WriteLine("User count: {0}",count);
      string[] popstring = new string[count];
      for (int loop = 0;loop<count;loop++){
        popstring[loop] = (string)userStrings[loop];
        Console.WriteLine(popstring[loop]);
      }
      comboEmail.PopdownStrings = popstring;
    }
    
  }
Ejemplo n.º 19
0
 public EntryEditor()
 {
     Glade.XML gxml = new Glade.XML (Util.GladePath("slogger.glade"),
      "NewEntryDialog", null);
        gxml.Autoconnect (this);
        OKButton.Sensitive = false;
 }
Ejemplo n.º 20
0
        /// <summary>
        /// Construtor
        /// </summary>
        public LegendView(ViewBase owner)
            : base(owner)
        {
            Glade.XML gxml = new Glade.XML("ApsimNG.Resources.Glade.LegendView.glade", "hbox1");
            gxml.Autoconnect(this);
            _mainWidget = hbox1;
            combobox1.Model = comboModel;
            combobox1.PackStart(comboRender, false);
            combobox1.AddAttribute(comboRender, "text", 0);
            combobox1.Changed += OnPositionComboChanged;
            combobox1.Focused += OnTitleTextBoxEnter;

            listview.Model = listModel;
            TreeViewColumn column = new TreeViewColumn();
            column.Title = "Series name";
            column.PackStart(listToggle, false);
            listRender.Editable = false;
            column.PackStart(listRender, true);
            column.SetAttributes(listToggle, "active", 0);
            column.SetAttributes(listRender, "text", 1);
            listview.AppendColumn(column);
            listToggle.Activatable = true;
            listToggle.Toggled += OnItemChecked;
            _mainWidget.Destroyed += _mainWidget_Destroyed;
        }
Ejemplo n.º 21
0
		public MethodMeasureWidget (MethodMeasure methodMeasure) 
		{
			xmlMethodMeasureWidget = new Glade.XML (null,"measures.glade", "table2", null);
			xmlMethodMeasureWidget.Autoconnect (this);
			numberOfLines.Text = methodMeasure.TotalLines.ToString ();
			numberOfParameters.Text = methodMeasure.Parameters.ToString ();
		}
Ejemplo n.º 22
0
    private AlbumEditorUI(Album album, bool isnew)
    {
        Glade.XML gxml = new Glade.XML (null, "organizer.glade", "window3", null);
          gxml.Autoconnect (this);

          this._isnew = isnew;
          this._album = album;
          window3.Title = String.Format("Editing information for {0}", album.Title);
          window3.SetIconFromFile(DeskFlickrUI.ICON_PATH);

          label8.Text = "Edit";
          label9.Text = "Title: ";
          label10.Text = "Description: ";

          entry3.Text = album.Title;
          textview6.Buffer.Text = album.Desc;

          entry3.Changed += new EventHandler(OnTitleChanged);
          textview6.Buffer.Changed += new EventHandler(OnDescriptionChanged);

          button7.Clicked += new EventHandler(OnCancelButtonClicked);
          button8.Clicked += new EventHandler(OnSaveButtonClicked);

          image4.Pixbuf = PersistentInformation.GetInstance()
                            .GetSmallImage(album.PrimaryPhotoid);
          window3.ShowAll();
    }
Ejemplo n.º 23
0
		public ExceptionWindow(DebuggerService debuggerService, Thread thread, TargetEventArgs args)
		{
			this.debuggerService = debuggerService;
			
			Glade.XML gxml = new Glade.XML("gui.glade", "exceptionWindow", null);
			gxml.Autoconnect(this);
			
			image.Pixbuf = Pixmaps.Exception.GetPixbuf();
			
			if (args.Type == TargetEventType.UnhandledException) {
				buttonContinue.Visible = false;
			}
			
			labelExceptionCaught.Text = (args.Type == TargetEventType.Exception ? "Exception" : "Unandled exception") + " has been caugth:";
			
			StringBuilder sb = new StringBuilder();
			StackFrame[] callstack;
			try {
				callstack = thread.GetBacktrace().Frames;
			} catch {
				return;
			}
			
			foreach(StackFrame frame in callstack) {
				sb.Append(frame.ToString() + Environment.NewLine);
			}
			
			textviewCallstack.Buffer.Text = sb.ToString();
		}
Ejemplo n.º 24
0
        public WorkbenchView(WorkbenchController controller)
        {
            SplashWindow.Update ("Creating GUI");
            XML gxml = new Glade.XML (null,
                          WorkbenchSingleton.GLADEFILE,
                          "Workbench",
                          null);

            window = (Gtk.Window) gxml["Workbench"];
            Gtk.VPaned splitter = (Gtk.VPaned) gxml["mainPane"];

            editorNotebook = new EditorNotebook ();
            splitter.Pack1 (editorNotebook, true, false);

            ScrolledWindow sw = new ScrolledWindow ();
            console = new TextView ();
            console.Editable = false;
            console.WrapMode = WrapMode.Word;
            sw.Add (console);

            Notebook bottomNotebook = new Notebook ();
            bottomNotebook.AppendPage (sw, new Label ("Console"));
            splitter.Pack2 (bottomNotebook, true, false);

                        window.Icon = icon;
            this.WindowTitle = "";
            gxml.Autoconnect (controller);
            bottomNotebook.ShowAll ();
            editorNotebook.ShowAll ();
            SplashWindow.Update ("Simetron is ready!");
        }
Ejemplo n.º 25
0
 public BookEditor()
 {
     Glade.XML gxml = new Glade.XML (Util.GladePath("contact-browser.glade"),
      "BookEditor", null);
        gxml.Autoconnect (this);
        beDlg = (Gtk.Dialog) gxml.GetWidget("BookEditor");
 }
Ejemplo n.º 26
0
		public FindResultsWidget (IEnumerable results) 
		{
			xmlFindResultsWidget = new Glade.XML (null,"measures.glade", "table4", null);
			xmlFindResultsWidget.Autoconnect (this);
			countTypes.Text = CountTypes (results).ToString ();
			countMethods.Text = CountMethods (results).ToString ();
		}
Ejemplo n.º 27
0
        public GladeWindow(string name)
        {
            glade = new Glade.XML (glade_resource, name);
            glade.Autoconnect (this);

            window = glade[name] as Window;
        }
Ejemplo n.º 28
0
        // Constructor for subclasses of this class
        public AddEvent(Window parent, ListStore eventsModel)
        {
            Glade.XML gxml = new Glade.XML ("add_event.glade", "dlgAddEvent", null);
            gxml.Autoconnect(this);

            this.dlgAddEvent.TransientFor = parent;

            // Set actual day and month
            this.spbtnDay.Value = DateTime.Now.Day;
            this.cmbMonth.Active = DateTime.Now.Month - 1;

            this.spbtnYear.Adjustment.Lower = DateTime.Now.Year;
            this.spbtnYear.Adjustment.Upper = 9999;
            this.spbtnYear.Value = DateTime.Now.Year;

            // Load event types
            EventTypesManager etm = EventTypesManager.Instance;

            this.cmbEventTypes.RemoveText(0);

            foreach (EventType anEventType in etm.RetrieveAll()) {
                this.cmbEventTypes.AppendText(anEventType.Name);
            }

            this.eventsModel = eventsModel;
        }
Ejemplo n.º 29
0
 public HeightScaleDialog()
 {
     Glade.XML app = new Glade.XML( EnvironmentHelper.GetExeDirectory() + "/TerrainEditing.glade", "heightscaledialog", "" );
     app.Autoconnect(this);
     minimumheightentry.Text = MetaverseClient.GetInstance().worldstorage.terrainmodel.MinHeight.ToString();
     maximumheightentry.Text = MetaverseClient.GetInstance().worldstorage.terrainmodel.MaxHeight.ToString();
 }
Ejemplo n.º 30
0
    public ResizeDialog(Sector sector, Tilemap tilemap)
    {
        this.sector = sector;
        this.tilemap = tilemap;
        Glade.XML gxml = new Glade.XML("editor.glade", "resizeDialog");
        gxml.Autoconnect(this);

        if (resizeDialog == null ||
            XOffsetEntry == null ||
            YOffsetEntry == null ||
            WidthEntry   == null ||
            HeightEntry  == null)
        {
            throw new Exception("Couldn't load resize Dialog");
        }

        if (tilemap == null) {
            XOffsetEntry.Text = "0";
            YOffsetEntry.Text = "0";
            WidthEntry.Text = sector.Width.ToString();
            HeightEntry.Text = sector.Height.ToString();
            undoTitleBase = "Sector \"" + sector.Name + "\"";
        } else {
            XOffsetEntry.Text = "0";
            YOffsetEntry.Text = "0";
            WidthEntry.Text = tilemap.Width.ToString();
            HeightEntry.Text = tilemap.Height.ToString();
            undoTitleBase = "Tilemap \"" + tilemap.Name + "\"";
        }
        resizeDialog.Title += " " + undoTitleBase;
        resizeDialog.Icon = EditorStock.WindowIcon;
        resizeDialog.ShowAll();
    }
Ejemplo n.º 31
0
        public herramientas_del_sistemas(string LoginEmp_, string NomEmpleado_, string AppEmpleado_, string ApmEmpleado_, string nombrebd_)
        {
            LoginEmpleado    = LoginEmp_;
            NomEmpleado      = NomEmpleado_;
            AppEmpleado      = AppEmpleado_;
            ApmEmpleado      = ApmEmpleado_;
            connectionString = conexion_a_DB._url_servidor + conexion_a_DB._port_DB + conexion_a_DB._usuario_DB + conexion_a_DB._passwrd_user_DB;
            nombrebd         = conexion_a_DB._nombrebd;

            Glade.XML gxml = new Glade.XML(null, "herramientas.glade", "menu_herramientas", null);
            gxml.Autoconnect(this);
            ////// Muestra ventana de Glade
            menu_herramientas.Show();
            button_cambios_tabla.Clicked       += new EventHandler(on_button_cmb_tab_clicked);
            button_catalogos.Clicked           += new EventHandler(on_button_catalogos_clicked);
            button_corrige_san_nicolas.Clicked += new EventHandler(on_button_corrige_san_nicolas_clicked);
            ////// Sale de la ventana
            button_salir.Clicked += new EventHandler(on_cierraventanas_clicked);
        }
Ejemplo n.º 32
0
        void on_button_cancela_folios_clicked(object sender, EventArgs args)
        {
            if ((bool)accesocancelafolio == true)
            {
                menu_admision.Destroy();
                Glade.XML gxml = new Glade.XML(null, "registro_admision.glade", "cancelador_folios", null);
                gxml.Autoconnect(this);
                cancelador_folios.Show();

                button_cancelar.Clicked += new EventHandler(on_button_cancelar_clicked);
                button_salir.Clicked    += new EventHandler(on_cierraventanas_clicked);
            }
            else
            {
                MessageDialog msgBox = new MessageDialog(MyWin, DialogFlags.Modal, MessageType.Error,
                                                         ButtonsType.Ok, "No esta autorizado para esta opcion...");
                msgBox.Run();                           msgBox.Destroy();
            }
        }
Ejemplo n.º 33
0
        private void SetupUI()
        {
            gXML = new Glade.XML(null, "demoapp.glade", "FindWindow", null);
            gXML.Autoconnect(this);

            ReparentAdd(gXML.GetWidget("FindTop"), false);
            ReparentAdd(gXML.GetWidget("FindBottom"), true);
            members = (TreeView)gXML.GetWidget("FindMembersTreeView");
            // members.KeyPressEvent += new KeyPressEventHandler (KeyPressed);
            members.RowActivated += new RowActivatedHandler(RowActivated);
            types = (TreeView)gXML.GetWidget("FindTypesTreeView");
            types.RowActivated += new RowActivatedHandler(RowActivated);
            SetupViews();

            entry          = (Entry)gXML.GetWidget("FindEntry");
            entry.Changed += new EventHandler(EntryChanged);

            ShowAll();
        }
Ejemplo n.º 34
0
            public ManageBookmarkDialog(BookmarkGroup bookmarks)
            {
                Glade.XML xml = new Glade.XML("browser.glade", "manage_bookmarks_dialog");
                xml.Autoconnect(this);
                iter_to_id = new Hashtable();
                root_group = bookmarks;
                bookmarks_treeview.RulesHint    = true;
                bookmarks_treeview.EnableSearch = true;

                // treeview handlers
                bookmarks_treeview.RowExpanded       += new Gtk.RowExpandedHandler(on_row_expanded);
                bookmarks_treeview.Selection.Changed += new EventHandler(on_row_selected);
                bookmarks_treeview.RowActivated      += new Gtk.RowActivatedHandler(on_row_activated);
                cell_render          = new CellRendererText();
                cell_render.Edited  += new EditedHandler(on_cellrender_edited);
                cell_render.Editable = true;

                bookmarks_treeview.AppendColumn("Column 1", cell_render, "text", 0);
            }
Ejemplo n.º 35
0
        public seleccion_folio(string LoginEmp, string NomEmpleado, string AppEmpleado, string ApmEmpleado, string _nombrebd_)
        {
            LoginEmpleado = LoginEmp;
            nombrebd      = _nombrebd_;

            Glade.XML gxml = new Glade.XML(null, "imp_prot.glade", "busqueda_folio", null);
            gxml.Autoconnect(this);

            // Muestra ventana de Glade
            busqueda_folio.Show();

            entry_fecha_admision.Sensitive    = false;
            entry_hora_registro.Sensitive     = false;
            entry_fechahora_alta.Sensitive    = false;
            entry_nombre_paciente.Sensitive   = false;
            entry_pid_paciente.Sensitive      = false;
            entry_telefono_paciente.Sensitive = false;
            entry_cirugia.Sensitive           = false;
            entry_doctor.Sensitive            = false;
            entry_especialidad.Sensitive      = false;
            entry_tipo_paciente.Sensitive     = false;
            entry_aseguradora.Sensitive       = false;
            entry_poliza.Sensitive            = false;

            // Activacion de boton de busqueda
            button_buscar_paciente.Clicked += new EventHandler(on_button_buscar_paciente_clicked);
            // Voy a buscar el folio que capturo
            button_selec_folio.Clicked += new EventHandler(on_selec_folio_clicked);
            // Imprimir
            button_imprimir_protocolo.Clicked += new EventHandler(on_button_imprimir_protocolo_clicked);
            // Sale de la ventana
            button_salir.Clicked += new EventHandler(on_cierraventanas_clicked);

            statusbar_caja.Pop(0);
            statusbar_caja.Push(1, "login: "******"  |Usuario: " + NomEmpleado + " " + AppEmpleado + " " + ApmEmpleado);
            statusbar_caja.HasResizeGrip = false;


            // convierte un string a numero
            //string  prueba;
            //prueba=this.folioservicio.ToString();
            //prueba=int.Parse("787878");
        }
Ejemplo n.º 36
0
        public envio_de_facturas(string LoginEmp, string NomEmpleado_, string AppEmpleado_, string ApmEmpleado_, string nombrebd_)
        {
            LoginEmpleado    = LoginEmp;
            NomEmpleado      = NomEmpleado_;
            AppEmpleado      = AppEmpleado_;
            ApmEmpleado      = ApmEmpleado_;
            NomEmpleados     = NomEmpleado + " " + AppEmpleado + " " + ApmEmpleado;
            connectionString = conexion_a_DB._url_servidor + conexion_a_DB._port_DB + conexion_a_DB._usuario_DB + conexion_a_DB._passwrd_user_DB;
            nombrebd         = conexion_a_DB._nombrebd;

            Glade.XML gxml = new Glade.XML(null, "caja.glade", "envio_facturas", null);
            gxml.Autoconnect(this);
            envio_facturas.Show();

            this.entry_al_dia.Sensitive   = false;
            this.entry_al_mes.Sensitive   = false;
            this.entry_al_anno.Sensitive  = false;
            this.entry_del_dia.Sensitive  = false;
            this.entry_del_mes.Sensitive  = false;
            this.entry_del_anno.Sensitive = false;

            this.entry_buscar.IsEditable = false;

            this.button_facturas_enviadas.Sensitive = false;
            this.check_todas_fechas.Sensitive       = false;
            this.entry_del_dia.Text  = DateTime.Today.ToString("dd");
            this.entry_del_mes.Text  = DateTime.Today.ToString("MM");
            this.entry_del_anno.Text = DateTime.Today.ToString("yyyy");
            this.entry_al_dia.Text   = DateTime.Today.ToString("dd");
            this.entry_al_mes.Text   = DateTime.Today.ToString("MM");
            this.entry_al_anno.Text  = DateTime.Today.ToString("yyyy");

            check_todas_fechas.Clicked            += new EventHandler(on_check_todas_fechas);
            check_enviadas.Clicked                += new EventHandler(on_check_facturas_clicked);
            check_todos_clientes.Clicked          += new EventHandler(on_check_todos_clientes_clicked);
            button_salir.Clicked                  += new EventHandler(on_cierraventanas_clicked);
            button_buscar_cliente.Clicked         += new EventHandler(on_buscar_cliente_clicked);
            this.button_facturas_enviadas.Clicked += new EventHandler(on_facturas_enviadas_clicked);
            this.button_enviar_factura.Clicked    += new EventHandler(on_enviar_facturas_clicked);
            this.button_imprimir.Clicked          += new EventHandler(on_button_imprimir_clicked);
            crea_treeview_busqueda_factura();
        }
        public CSettingsWindow(CConfiguration config, bool ShowWindow)
        {
            ProxyAttrStruct proxy;

            this.config = config;
            string settingsW = "SettingsWindow";

            Glade.XML settingsXml = new Glade.XML(null, "gui.glade", settingsW, null);
            settingsXml.Autoconnect(this);
            mainWindow       = (Gtk.Window)settingsXml.GetWidget(settingsW);
            mainWindow.Title = Catalog.GetString("Settings");
            SettingsGeneralHeadlineLabel.Text      = "<b>" + Catalog.GetString("General settings") + "</b>";
            SettingsGeneralHeadlineLabel.UseMarkup = true;
            SettingsNetworkHeadlineLabel.Text      = "<b>" + Catalog.GetString("Network settings") + "</b>";
            SettingsNetworkHeadlineLabel.UseMarkup = true;
            SettingsXmlCb.Active = config.XmlRefreshInterval;
            SettingsLocationFc.SetCurrentFolder(config.ThemesDownloadPath);
            //Events
            SettingsCancelButton.Clicked  += new EventHandler(OnCancelButtonClicked);
            SettingsOkButton.Clicked      += new EventHandler(OnOkButtonClicked);
            SettingsNoProxyRb.Clicked     += new EventHandler(OnProxyClicked);
            SettingsProxyActiveRb.Clicked += new EventHandler(OnProxyClicked);
            //Proxies
            proxy = config.GetProxy(CConfiguration.ProxyType.Gang);
            SettingsProxyAddress.Text = proxy.Ip;
            SettingsProxyPort.Text    = proxy.Port.ToString();
            proxy = config.GetProxy(CConfiguration.ProxyType.System);
            SettingsProxySystemAddress.Text      = proxy.Ip;
            SettingsProxySystemPort.Text         = proxy.Port.ToString();
            SettingsProxySystemPort.Sensitive    = false;
            SettingsProxySystemAddress.Sensitive = false;
            SettingsProxySystemActiveRb.Active   = (config.ProxyKind == CConfiguration.ProxyType.System);
            SettingsNoProxyRb.Active             = (config.ProxyKind == CConfiguration.ProxyType.None);
            SettingsProxyActiveRb.Active         = (config.ProxyKind == CConfiguration.ProxyType.Gang);

            SettingsUpdateCb.Active = !(config.DontBotherForUpdates);
            config.GConfClient.AddNotify(config.GConfPath + "themesDownloadPath", OnThemesPathChangedEventHandler);
            if (ShowWindow)
            {
                Show();
            }
        }
        public BitwiseOperationsWidget(DataBook db, Gtk.Action action)
        {
            dataBook      = db;
            performAction = action;

            Glade.XML gxml = new Glade.XML(FileResourcePath.GetDataPath("bless.glade"), "BitwiseOperationsHBox", "bless");
            gxml.Autoconnect(this);

            OperationComboBox.Active = 0;
            OperandAsComboBox.Active = 0;
            numberBase = 16;

            // set button sensitivity
            OnOperandEntryChanged(null, null);

            this.Shown += OnWidgetShown;

            this.Add(BitwiseOperationsHBox);
            this.ShowAll();
        }
Ejemplo n.º 39
0
    public GladeApp(string[] args)
    {
        Application.Init();

        //Glade.XML gxml = new Glade.XML (null, "ui/app.glade", "winMain", null);
        Glade.XML gxml = new Glade.XML("ui/app.glade", "winMain", null);
        gxml.Autoconnect(this);
        winMain.Resize(800, 600);
        winMain.ShowAll();
        winMain.DeleteEvent += OnDeleteEvent;

        this.eveChild = tvMain;

        tbtCard.Clicked     += OnTbtCardPressButtonEvent;
        tbtComanda.Clicked  += OnTbtComandaPressButtonEvent;
        tbtCheckout.Clicked += OnTbtCheckoutPressButtonEvent;
        tbtBar.Clicked      += OnTbtBarPressButtonEvent;
        tbtKitchen.Clicked  += OnTbtKitchenPressButtonEvent;
        Application.Run();
    }
Ejemplo n.º 40
0
 public cambia_paciente(string LoginEmpleado_, string NomEmpleado_, string AppEmpleado_, string ApmEmpleado_, string nombrebd_)
 {
     LoginEmpleado    = LoginEmpleado_;
     NomEmpleado      = NomEmpleado_;
     AppEmpleado      = AppEmpleado_;
     ApmEmpleado      = ApmEmpleado_;
     connectionString = conexion_a_DB._url_servidor + conexion_a_DB._port_DB + conexion_a_DB._usuario_DB + conexion_a_DB._passwrd_user_DB;
     nombrebd         = conexion_a_DB._nombrebd;
     Glade.XML gxml = new Glade.XML(null, "registro_admision.glade", "cambio_datos_paciente", null);
     gxml.Autoconnect(this);
     //Muestra ventana de Glade
     cambio_datos_paciente.Show();
     button_buscar.Clicked       += new EventHandler(on_button_busca_pacientes_clicked);
     button_guardar.Clicked      += new EventHandler(on_button_guardar_clicked);
     button_editar.Clicked       += new EventHandler(on_button_editar_clicked);
     button_salir.Clicked        += new EventHandler(on_cierraventanas_clicked);
     button_seleccionar.Sensitive = false;
     button_editar.Sensitive      = false;
     button_guardar.Sensitive     = false;
 }
Ejemplo n.º 41
0
        public nutricion(string LoginEmp_, string NomEmpleado_, string AppEmpleado_, string ApmEmpleado_, string nombrebd_)
        {
            LoginEmpleado = LoginEmp_;
            NomEmpleado   = NomEmpleado_;
            AppEmpleado   = AppEmpleado_;
            ApmEmpleado   = ApmEmpleado_;
            nombrebd      = conexion_a_DB._nombrebd;

            Glade.XML gxml = new Glade.XML(null, "nutricion.glade", "menu_nutricion", null);
            gxml.Autoconnect(this);
            ////// Muestra ventana de Glade
            menu_nutricion.Show();

            ////// Sale de la ventana
            button_salir.Clicked += new EventHandler(on_cierraventanas_clicked);
            button_requisicion_materiales.Clicked += new EventHandler(on_button_requisicion_materiales_clicked);
            button_solicitud_dietas.Clicked       += new EventHandler(on_button_solicitud_dietas_clicked);
            button_surtir_dietas.Clicked          += new EventHandler(on_button_surtir_dietas_clicked);
            //button_paquetes_dietas.Clicked += new EventHandler();
        }
Ejemplo n.º 42
0
        public FeaturesDialog()
        {
            Glade.XML app = new Glade.XML("./MapDesigner.glade", "featurewindow", "");
            app.Autoconnect(this);

            int numfeatures = Directory.GetFiles("objects3d").GetLength(0);

            featuretable.Resize((uint)numfeatures, 1);
            int featurenumber = 1;

            foreach (string file in Directory.GetFiles("objects3d"))
            {
                LogFile.GetInstance().WriteLine(file);
                AddFeature(file, featurenumber);
                featurenumber++;
            }
            //featuretable.ResizeMode = ResizeMode.Immediate;
            featurewindow.ShowAll();
            featurewindow.Resize(picturewidth * 2 + 20, numfeatures * (pictureheight * 2 + 20));
        }
Ejemplo n.º 43
0
        public terapia_nino(string LoginEmp_, string NomEmpleado_, string AppEmpleado_, string ApmEmpleado_, string _nombrebd_)
        {
            LoginEmpleado = LoginEmp_;
            NomEmpleado   = NomEmpleado_;
            AppEmpleado   = AppEmpleado_;
            ApmEmpleado   = ApmEmpleado_;
            nombrebd      = _nombrebd_;


            Glade.XML gxml = new Glade.XML(null, "terapia_nino.glade", "menu_terapia_nino", null);
            gxml.Autoconnect(this);
            ////// Muestra ventana de Glade
            menu_terapia_nino.Show();

            ////// Sale de la ventana
            button_salir.Clicked += new EventHandler(on_cierraventanas_clicked);

            button_cargos_pacientes.Clicked += new EventHandler(on_button_cargos_pacientes_clicked);
            button_soli_material.Clicked    += new EventHandler(on_button_soli_material_clicked);
        }
Ejemplo n.º 44
0
        public CWindow(CConfiguration config, string WindowName, string WindowTitle, WindowShowType ShowType)
        {
            this.config = config;
            string win = WindowName;

            Glade.XML settingsXml = new Glade.XML(null, "gui.glade", win, null);
            settingsXml.Autoconnect(this);
            mainWindow              = (Gtk.Window)settingsXml.GetWidget(win);
            mainWindow.Title        = WindowTitle;
            mainWindow.DeleteEvent += new DeleteEventHandler(OnWindowDeleteEvent);
            IsShownModal            = (ShowType == WindowShowType.wstModal);
            switch (ShowType)
            {
            case WindowShowType.wstModal: ShowModal(); break;

            case WindowShowType.wstNormal: Show(); break;

            case WindowShowType.wstNo: break;
            }
        }
Ejemplo n.º 45
0
        public OpenPdfUi(string[] args)
        {
            Program program = new Program(progname, progversion, Modules.UI, args);

            Glade.XML gxml = new Glade.XML(null, "openpdfui.glade", "pdfview", null);
            gxml.Autoconnect(this);

            // TODO: I need to work out how to set the minimum width of this splitter
            TreeViewColumn DemoCol      = new TreeViewColumn();
            CellRenderer   DemoRenderer = new CellRendererText();

            DemoCol.Title = "Demo";
            DemoCol.PackStart(DemoRenderer, true);
            DemoCol.AddAttribute(DemoRenderer, "text", 0);
            pages.AppendColumn(DemoCol);
            pages.WidthRequest = 40;

            appbar1.Push("Ready");
            program.Run();
        }
Ejemplo n.º 46
0
        public SmartPlaylistEditor()
        {
            glade = new Glade.XML(null, "smart-playlist.glade", dialog_name, "banshee");
            glade.Autoconnect(this);

            dialog = (Dialog)glade.GetWidget(dialog_name);
            Banshee.Base.IconThemeUtils.SetWindowIcon(dialog);

            // Add the QueryBuilder widget
            model   = new TracksQueryModel();
            builder = new QueryBuilder(model);
            builder.Show();
            builder.Spacing = 4;

            builder_box.PackStart(builder, true, true, 0);

            name_entry.Changed += HandleNameChanged;

            Update();
        }
Ejemplo n.º 47
0
    public DemoApp(string[] args, params object[] props) : base("DemoApp", "0.1", Modules.UI, args, props)
    {
        ParseArgs(args);

        Glade.XML gxml = new Glade.XML("sourceview.glade", "win", null);
        gxml.Autoconnect(this);

        if (win == null)
        {
            throw new Exception("GladeWidgetAttribute is broken.");
        }

        Gtk.TextView tw = (Gtk.TextView)gxml.GetWidget("tw");

        System.IO.StreamReader stream = new StreamReader(this.file);
        string text = stream.ReadToEnd();

        tw.Buffer.Insert(tw.Buffer.EndIter, text);

        Console.WriteLine("here we go");
        Config     conf = new Config();
        Highlights hl   = new Highlights(conf.patterns);

        ConnectTextTagTable(tw.Buffer.TagTable, conf.styles);

        hl.DebugPrint();
        Token [] tokens = hl.Search(text);

        foreach (Token t in tokens)
        {
            Gtk.TextIter siter, eiter;

            tw.Buffer.GetIterAtOffset(out siter, t.sindex);
            tw.Buffer.GetIterAtOffset(out eiter, t.eindex);

            //Console.WriteLine("*** {3} - {4}*** <{0}>{1}</{0}:{2}>",
            //t.style.name, tw.Buffer.GetText(siter, eiter, false), t.style.pattern, t.sindex, t.eindex + 1);

            tw.Buffer.ApplyTag(tw.Buffer.TagTable.Lookup(t.style.path), siter, eiter);
        }
    }
Ejemplo n.º 48
0
        /// <summary>
        /// Setup Dialog
        /// </summary>
        private void SetupDialog()
        {
            Glade.XML gxml = new Glade.XML("NewContactDialog.glade", "NewContactDialog");
            gxml.Autoconnect(this);
            NewContactDialog.Icon  = Gdk.Pixbuf.LoadFromResource("monosim.png");
            NewContactDialog.Title = MainClass.AppNameVer + " - " + GlobalObjUI.LMan.GetString("addcontacts");
            LblTitle.Text          = GlobalObjUI.LMan.GetString("addcontacts");
            LblDesc.Text           = GlobalObjUI.LMan.GetString("descnumber");
            LblNumber.Text         = GlobalObjUI.LMan.GetString("phonenumber");

            if (maxAlphaChars > 0)
            {
                TxtDesc.MaxLength = maxAlphaChars;
            }

            TxtDesc.Text                       = txtDesc;
            TxtNumber.Text                     = txtNumber;
            TxtNumber.MaxLength                = 21;
            NewContactDialog.TransientFor      = mainWin;
            NewContactDialog.DestroyWithParent = true;
        }
Ejemplo n.º 49
0
        public PreferencesDialog(Window parent)
            : base(Catalog.GetString("Bless Preferences"), parent, DialogFlags.DestroyWithParent)
        {
            Glade.XML gxml = new Glade.XML(FileResourcePath.GetDataPath("bless.glade"), "PreferencesPaned", "bless");
            gxml.Autoconnect(this);

            mainWindow = parent;

            generalPreferences = new GeneralPreferences(mainWindow);
            sessionPreferences = new SessionPreferences(mainWindow);
            undoPreferences    = new UndoPreferences(mainWindow);
            LoadPreferencesTreeView();

            this.Modal        = false;
            this.TransientFor = parent;
            this.BorderWidth  = 6;
            this.AddButton("Close", ResponseType.Close);
            this.Response += new ResponseHandler(OnDialogResponse);
            this.VBox.Add(PreferencesPaned);
            this.VBox.ShowAll();
        }
Ejemplo n.º 50
0
        public imagenologia(string LoginEmp_, string NomEmpleado_, string AppEmpleado_, string ApmEmpleado_, string nombrebd_)
        {
            LoginEmpleado = LoginEmp_;
            NomEmpleado   = NomEmpleado_;
            AppEmpleado   = AppEmpleado_;
            ApmEmpleado   = ApmEmpleado_;
            nombrebd      = conexion_a_DB._nombrebd;

            Glade.XML gxml = new Glade.XML(null, "imagenologia.glade", "menu_imagenologia", null);
            gxml.Autoconnect(this);
            ////// Muestra ventana de Glade
            menu_imagenologia.Show();

            ////// Sale de la ventana
            button_salir.Clicked += new EventHandler(on_cierraventanas_clicked);

            button_cargos_pacientes.Clicked       += new EventHandler(on_button_cargos_pacientes_clicked);
            button_solicitud_examenes.Clicked     += new EventHandler(on_button_solicitud_examenes_clicked);
            button_requisicion_materiales.Clicked += new EventHandler(on_button_requisicion_materiales_clicked);
            button_reporte_imagenologia.Clicked   += new EventHandler(on_button_reporte_imagenologia_clicked);
        }
Ejemplo n.º 51
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GraphView" /> class.
        /// </summary>
        public GraphView(ViewBase owner) : base(owner)
        {
            Glade.XML gxml = new Glade.XML("ApsimNG.Resources.Glade.GraphView.glade", "vbox1");
            gxml.Autoconnect(this);
            _mainWidget = vbox1;

            plot1       = new PlotView();
            plot1.Model = new PlotModel();
            plot1.SetSizeRequest(-1, 100);
            vbox2.PackStart(plot1, true, true, 0);

            smallestDate          = DateTime.MaxValue;
            largestDate           = DateTime.MinValue;
            this.LeftRightPadding = 40;
            expander1.Visible     = false;

            plot1.Model.MouseDown += OnChartClick;

            captionLabel.Text = null;
            captionEventBox.ButtonPressEvent += OnCaptionLabelDoubleClick;
        }
Ejemplo n.º 52
0
        public About(Window parent)
        {
            Glade.XML gxml = new Glade.XML("main_window.glade", "adAbout", null);
            gxml.Autoconnect(this);

            Gdk.Pixbuf pf = new Gdk.Pixbuf("blue_fea.gif");
            this.adAbout.Logo = pf;

            this.adAbout.TransientFor = parent;

            this.adAbout.Name = "Zaspe#";

            // Set version
            Version assemblyVersion = Assembly.GetExecutingAssembly().GetName().Version;

            this.adAbout.Version = assemblyVersion.Major + "." +
                                   assemblyVersion.Minor + "." + assemblyVersion.Build;

            this.adAbout.Run();
            this.adAbout.Destroy();
        }
Ejemplo n.º 53
0
    public MainWindow(WrenchProject project)
    {
        this.project = project;

        ui = new Glade.XML(null, "mb-gtkconfig.glade", "main_window", null);
        ui.Autoconnect(this);

        main_window.Title = project.Info.Name + " " +
                            project.Info.Version + " - Build Configuration";

        group_menu = new Menu();
        group_menu.Show();
        group_option.Menu = group_menu;

        // kill the default page that glade forces us to have
        notebook.RemovePage(0);
        AddNewGroup(DefaultGroupName);
        group_option.SetHistory(0);

        LoadConfigItems();
    }
Ejemplo n.º 54
0
        public MainWindow(Library library)
        {
            Glade.XML gxml = new Glade.XML(null, "PaperMiners.MainWindow.glade", "mainwindow", null);
            gxml.Autoconnect(this);
            overview.Model = treeStore;

            Gtk.TreeViewColumn authorColumn = new Gtk.TreeViewColumn();
            authorColumn.Title      = "Authors";
            authorColumn.FixedWidth = 100;
            authorColumn.Expand     = false;
            authorColumn.Resizable  = true;
            authorColumn.Sizing     = TreeViewColumnSizing.Fixed;

            Gtk.CellRendererText authorCell = new Gtk.CellRendererText();

            authorColumn.PackStart(authorCell, true);

            Gtk.TreeViewColumn titleColumn = new Gtk.TreeViewColumn();
            titleColumn.Title = "Title";

            Gtk.CellRendererText titleCell = new Gtk.CellRendererText();
            titleColumn.PackStart(titleCell, true);

            authorColumn.AddAttribute(authorCell, "text", 0);
            titleColumn.AddAttribute(titleCell, "text", 1);
            foreach (Topic topic in Enum.GetValues(typeof(Topic)))
            {
                if (topic != Topic.None)
                {
                    TreeIter iter = treeStore.AppendValues(Utils.TopicName(topic));
                    foreach (Paper pap in library.Papers.Where(x => x.MainTopic == topic))
                    {
                        treeStore.AppendValues(iter, Utils.ToCommaAnd(pap.Authors), pap.Title);
                    }
                }
            }

            overview.AppendColumn(authorColumn);
            overview.AppendColumn(titleColumn);
        }
Ejemplo n.º 55
0
        void ShowServersCallback( string[] whoresults )
        {
            if (availableserversdialog != null)
            {
                availableserversdialog.Destroy();
            }

            List<string> serverlist = new List<string>();
            foreach (string name in whoresults)
            {
                if (name.StartsWith( servernameprefix ))
                {
                    serverlist.Add( name.Substring( servernameprefix.Length ) );
                }
            }

            Glade.XML app = new Glade.XML( EnvironmentHelper.GetExeDirectory() + "/metaverse.client.glade", "availableserversdialog", "" );
            app.Autoconnect( this );

            btnclose.Clicked += new EventHandler( btnclose_Clicked );
            btnconnect.Clicked += new EventHandler( btnconnect_Clicked );
            btngetinfo.Clicked += new EventHandler( btngetinfo_Clicked );

            liststore = new ListStore( typeof( string ) );
            serverstreeview.Model = liststore;

            serverstreeview.AppendColumn( "Server:", new CellRendererText(), "text", 0 );

            serverstreeview.ShowAll();

            foreach (string name in whoresults)
            {
                if (name.StartsWith( servernameprefix ))
                {
                    string worldname = name.Substring( servernameprefix.Length );
                    liststore.AppendValues( worldname );
                }
            }
        }
Ejemplo n.º 56
0
        /// <summary>
        /// Constructor
        /// </summary>
        public MainWindowClass()
        {
            // Instance glade xml object using glade file
            Glade.XML gxml = new Glade.XML("MainWindow.glade", "MainWindow");

            // Aonnect glade xml object to this Gtk.Windows
            gxml.Autoconnect(this);

            // Use PopMenuFile top object from glade file
            gxml = new Glade.XML("MainWindow.glade", "PopMenuFile");
            gxml.Autoconnect(this);

            // Use PopMenuSim top object from glade file
            gxml = new Glade.XML("MainWindow.glade", "PopMenuSim");
            gxml.Autoconnect(this);

            // Update Gtk graphic objects
            UpdateGraphicObjects();

            // Update Event Handlers
            UpdateReactors();
        }
Ejemplo n.º 57
0
 public oftalmologia(string LoginEmp_, string NomEmpleado_, string AppEmpleado_, string ApmEmpleado_, string nombrebd_)
 {
     LoginEmpleado = LoginEmp_;
     NomEmpleado   = NomEmpleado_;
     AppEmpleado   = AppEmpleado_;
     ApmEmpleado   = ApmEmpleado_;
     nombrebd      = conexion_a_DB._nombrebd;
     Glade.XML gxml = new Glade.XML(null, "hospitalizacion.glade", "menu_hospitalizacion", null);
     gxml.Autoconnect(this);
     ////// Muestra ventana de Glade
     menu_hospitalizacion.Show();
     menu_hospitalizacion.Title = "Menu de Oftalmologia";
     label35.Text = "Menu de Oftalmologia";
     ////// Sale de la ventana
     button_salir.Clicked                    += new EventHandler(on_cierraventanas_clicked);
     button_cargos_pacientes.Clicked         += new EventHandler(on_button_cargos_pacientes_clicked);
     button_soli_material.Clicked            += new EventHandler(on_button_soli_material_clicked);
     button_autorizacion_medicamento.Clicked += new EventHandler(on_button_autorizacion_medicamento_clicked);
     button_inv_subalmacen.Clicked           += new EventHandler(on_button_inv_subalmacen_clicked);
     button_asignacion_habitacion.Clicked    += new EventHandler(on_button_asignacion_habitacion_clicked);
     button_traspaso_subalmacenes.Clicked    += new EventHandler(on_button_traspaso_subalmacenes_clicked);
 }
Ejemplo n.º 58
0
        public SelectWriteModeDialogClass(Gtk.Window parent, string winTitle)
        {
            Glade.XML gxml = new Glade.XML("SelectWriteModeDialog.glade", "SelectWriteModeDialog");
            gxml.Autoconnect(this);

            SelectWriteModeDialog.Icon              = Gdk.Pixbuf.LoadFromResource("monosim.png");
            SelectWriteModeDialog.TransientFor      = parent;
            SelectWriteModeDialog.DestroyWithParent = true;

            SelectWriteModeDialog.Title = MainClass.AppNameVer + " - " + winTitle;

            string title = GlobalObjUI.LMan.GetString("simwritemode");

            title = title.Replace("<br>", "").Replace("&nbsp;", " ");

            LblTitle.Markup = title;

            BtnOverride.Image = new Gtk.Image(Stock.Remove, IconSize.Button);
            BtnAppend.Image   = new Gtk.Image(Stock.Add, IconSize.Button);
            BtnOverride.Label = GlobalObjUI.LMan.GetString("simoverride");
            BtnAppend.Label   = GlobalObjUI.LMan.GetString("simappend");
        }
Ejemplo n.º 59
0
        public reporte_de_abonos(string _nombrebd_, string tiporpt_, string LoginEmpleado_)
        {
            connectionString        = conexion_a_DB._url_servidor + conexion_a_DB._port_DB + conexion_a_DB._usuario_DB + conexion_a_DB._passwrd_user_DB;
            nombrebd                = conexion_a_DB._nombrebd;
            escala_en_linux_windows = classpublic.escala_linux_windows;
            tiporpt       = tiporpt_;
            LoginEmpleado = LoginEmpleado_;
            Glade.XML gxml = new Glade.XML(null, "caja.glade", "rango_de_fecha", null);
            gxml.Autoconnect(this);
            rango_de_fecha.Show();

            checkbutton_impr_todo_proce.Label   = "Imprime TODO";
            entry_referencia_inicial.IsEditable = false;
            entry_referencia_inicial.Text       = DateTime.Now.ToString("dd-MM-yyyy");
            entry_dia1.KeyPressEvent           += onKeyPressEvent;
            entry_mes1.KeyPressEvent           += onKeyPressEvent;
            entry_ano1.KeyPressEvent           += onKeyPressEvent;
            entry_dia2.KeyPressEvent           += onKeyPressEvent;
            entry_mes2.KeyPressEvent           += onKeyPressEvent;
            entry_ano2.KeyPressEvent           += onKeyPressEvent;
            entry_dia1.Text       = DateTime.Now.ToString("dd");
            entry_mes1.Text       = DateTime.Now.ToString("MM");
            entry_ano1.Text       = DateTime.Now.ToString("yyyy");
            entry_dia2.Text       = DateTime.Now.ToString("dd");
            entry_mes2.Text       = DateTime.Now.ToString("MM");
            entry_ano2.Text       = DateTime.Now.ToString("yyyy");
            button_salir.Clicked += new EventHandler(on_cierraventanas_clicked);
            button_imprime_rangofecha.Clicked += new EventHandler(imprime_reporte_abonos);
            label_orden.Hide();
            label_nom_cliente.Hide();
            label142.Hide();
            radiobutton_cliente.Hide();
            radiobutton_fecha.Hide();
            checkbutton_todos_los_clientes.Hide();
            entry_referencia_inicial.Hide();
            entry_cliente.Hide();
            button_busca_cliente.Hide();
        }
Ejemplo n.º 60
0
        public terapia_neonatal(string LoginEmp_, string NomEmpleado_, string AppEmpleado_, string ApmEmpleado_, string _nombrebd_)
        {
            LoginEmpleado = LoginEmp_;
            NomEmpleado   = NomEmpleado_;
            AppEmpleado   = AppEmpleado_;
            ApmEmpleado   = ApmEmpleado_;
            nombrebd      = conexion_a_DB._nombrebd;

            Glade.XML gxml = new Glade.XML(null, "terapia_neonatal.glade", "menu_terapia_neonatal", null);
            gxml.Autoconnect(this);
            ////// Muestra ventana de Glade
            menu_terapia_neonatal.Show();

            ////// Sale de la ventana
            button_salir.Clicked += new EventHandler(on_cierraventanas_clicked);

            button_cargos_pacientes.Clicked         += new EventHandler(on_button_cargos_pacientes_clicked);
            button_soli_material.Clicked            += new EventHandler(on_button_soli_material_clicked);
            button_autorizacion_medicamento.Clicked += new EventHandler(on_button_autorizacion_medicamento_clicked);
            button_inv_subalmacen.Clicked           += new EventHandler(on_button_inv_subalmacen_clicked);
            button_asignacion_habitacion.Clicked    += new EventHandler(on_button_asignacion_habitacion_clicked);
            button_traspaso_subalmacenes.Clicked    += new EventHandler(on_button_traspaso_subalmacenes_clicked);
        }