Example #1
0
        public AddressEditor(AppConfig config, Gtk.Window parent, Gtk.Container cont, JObject data = null)
        {
            this.Build ();

            this.config = config;
            ParentWin = parent;
            Cont = cont;

            myComboState = new MyCombo (comboState);
            myComboMuni = new MyCombo (comboMuni);
            myComboAsenta = new MyCombo (comboAsenta);

            buttonDelete.ConfirmClick += OnDeleteConfirm;

            WidgetPath = Util.GtkGetWidgetPath (this, config);

            if (GlobalDefaultStateID == -1)
                config.LoadWindowKey (WidgetPath, "default_state_id", out GlobalDefaultStateID);
            DefaultStateID = GlobalDefaultStateID;

            if (GlobalDefaultMuniID == -1)
                config.LoadWindowKey (WidgetPath, "default_muni_id", out GlobalDefaultMuniID);
            DefaultMuniID = GlobalDefaultMuniID;

            if (GlobalDefaultAsentaID == -1)
                config.LoadWindowKey (WidgetPath, "default_asenta_id", out GlobalDefaultAsentaID);
            DefaultAsentaID = GlobalDefaultAsentaID;

            LoadData (data);
        }
Example #2
0
        public DeviceErrorDlg(AppConfig config, string message)
        {
            this.Build ();

            this.config = config;

            labelMessage.Text = message;
        }
Example #3
0
        private const uint SEND_CLOSE_TIMEOUT = 50; // msecs to pass before closing the window.

        #endregion Fields

        #region Constructors

        public UtilityWin(AppConfig config)
            : base(Gtk.WindowType.Toplevel)
        {
            this.config = config;
            this.DeleteEvent += delegate { SaveState (); };
            this.MapEvent += delegate {
                LoadState ();
                GLib.Timeout.Add (PRESENT_TIMEOUT, new GLib.TimeoutHandler (delegate () { Present (); return false; }));
            };
        }
Example #4
0
        public PhoneEditor(AppConfig config, Gtk.Window parent, Gtk.Container cont, JObject data = null)
        {
            this.Build ();

            this.config = config;
            ParentWin = parent;
            Cont = cont;

            buttonDelete.ConfirmClick += OnDeleteConfirm;

            LoadData (data);
        }
Example #5
0
        public MainWindow(AppConfig config)
            : base(Gtk.WindowType.Toplevel)
        {
            Build ();
            this.config = config;

            fixedBgAllocateFlag = false;
            IsLogout = false;

            config.LoadPermissions (delegate {
                ConfigureByPermissions ();
            });

            Maximize ();
        }
Example #6
0
        public WelcomeDlg(AppConfig config)
            : base(Gtk.WindowType.Toplevel)
        {
            this.Build ();
            this.config = config;
            userFirstEdit = true;
            passwdFirstEdit = true;
            success = false;

            table1.FocusChain = new Gtk.Widget[] { entryUser, entryPasswd, buttonOk, buttonConf };

            string ver = AppConfig.GetAppVersion ();
            labelVersion.Markup = String.Format ("<span color=\"white\"><b>v. {0}</b></span>", ver);
            labelVersionShadow.Markup = String.Format ("<span color=\"black\"><b>v. {0}</b></span>", ver);
        }
Example #7
0
        public PatientEditorWin(TYPE type, AppConfig config, JObject data = null)
            : base(config)
        {
            this.Build ();

            personaEditor.Setup (config, this);
            personaAddEditor.Setup (config, this);

            OpType = type;

            switch (type) {
                case TYPE.NEW:
                    SetupForNew ();
                    break;
                case TYPE.EDIT:
                    SetupForEdit (data);
                    break;
            }
        }
Example #8
0
        public UserEditorWin(TYPE type, AppConfig config, JObject data = null)
            : base(config)
        {
            this.Build ();

            personaEditor.Setup (config, this);
            personaAddEditor.Setup (config, this);

            OpType = type;

            tableUser.FocusChain = new Gtk.Widget[] { entryUsername, entryPassword, entryConfirm, comboStatus, comboLevel };

            switch (type) {
            case TYPE.NEW:
                SetupForNew ();
                break;
            case TYPE.EDIT:
                SetupForEdit (data);
                break;
            }
        }
Example #9
0
        public static void Main(string[] args)
        {
            AppConfig.TrySetProcessName ();
            AppConfig.ThemeSetup ();

            Application.Init ();

            CharpGtk charp = new CharpGtk ();
            AppConfig config = new AppConfig (charp, new Radionic ());

            if (!config.LoadOrSetup ()) {
                return;
            }

            MainWindow win;
            do {
                win = null;

                WelcomeDlg wDlg = new WelcomeDlg (config);
                charp.parent = wDlg;

                wDlg.Show ();
                Application.Run ();

                config.Save ();

                if (!wDlg.authSuccess ()) {
                    return;
                }

                wDlg = null;

                win = new MainWindow (config);
                charp.parent = win;
                config.mainwin = win;
                win.Show ();
                Application.Run ();
                config.mainwin = null;
            } while (win.IsLogout);
        }
Example #10
0
        public PatientListWin(AppConfig config)
            : base(config)
        {
            this.Build ();

            store = new Gtk.NodeStore (typeof (PatientListNode));
            nodeview.NodeStore = store;

            selection = nodeview.NodeSelection;
            selection.Mode = Gtk.SelectionMode.Multiple;
            selection.Changed += new System.EventHandler (this.OnSelectionChanged);

            Gtk.TreeViewColumn infoCol;

            nodeview.AppendColumn (Catalog.GetString ("Prefix"), new Gtk.CellRendererText (), "text", 0);
            infoCol = nodeview.AppendColumn (Catalog.GetString ("Name"), new Gtk.CellRendererText (), "text", 1);
            infoCol.Expand = true;
            nodeview.AppendColumn (Catalog.GetString ("Paterno"), new Gtk.CellRendererText (), "text", 2);
            nodeview.AppendColumn (Catalog.GetString ("Materno"), new Gtk.CellRendererText (), "text", 3);

            Refresh ();
        }
Example #11
0
 public void Setup(AppConfig config, Gtk.Window parent)
 {
     this.config = config;
     this.ParentWin = parent;
 }
Example #12
0
        public static string GtkGetWidgetPath(Gtk.Widget w, AppConfig config)
        {
            uint len;
            string name, rev;

            w.Path (out len, out name, out rev);
            return config.LoginMD5 + "/" + name;
        }