public PosDocumentFinancePrintDialog(Window pSourceWindow, DialogFlags pDialogFlags, fin_documentfinancemaster pDocumentFinanceMaster)
            : base(pSourceWindow, pDialogFlags)
        {
            //Init Local Vars
            String windowTitle           = string.Format(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_dialog_document_finance_print"), pDocumentFinanceMaster.DocumentNumber);
            Size   windowSize            = new Size(400, 259);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_document_new.png");

            //Parameters
            _documentFinanceMaster = pDocumentFinanceMaster;
            //Vars
            _requestMotive = _documentFinanceMaster.DocumentType.PrintRequestMotive;
            if (_requestMotive)
            {
                windowSize.Height += 42 + 76;                //Secondcopy + Motive UI Components
            }
            //ActionArea Buttons
            _buttonOk     = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            _buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(_buttonCancel, ResponseType.Cancel));

            //Call
            InitUI();

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, _vboxContent, actionAreaButtons);
        }
Пример #2
0
 public static ResponseType show(Window parent_window, DialogFlags dialogFlags, MessageType messageType, ButtonsType buttonsType,string  message)
 {
     _dlg = new MessageDialog (parent_window, dialogFlags,messageType, buttonsType, message);
     ResponseType response = (ResponseType) _dlg.Run ();
     _dlg.Destroy ();
     return response;
 }
Пример #3
0
        public RecentFileListWindow(string title, Gtk.Window parent, DialogFlags flags, params object[] button_data) : base(title, parent, flags, button_data)
        {
            _searchView = new Gtk.Entry("");
            _searchView.SetSizeRequest(500, 40);
            _searchView.Changed         += _searchView_Changed;
            _searchView.KeyReleaseEvent += HandleSearchViewKeyReleaseEvent;
            _searchView.KeyPressEvent   += HandleKeyPressEvent;
            _searchView.FocusOutEvent   += HandleFocusOutEvent;
            VBox.Add(_searchView);

            CreateTree();
            _scrolledWindow = new Gtk.ScrolledWindow();
            _scrolledWindow.SetSizeRequest(500, 600);
            _scrolledWindow.Add(_treeView);
            VBox.Add(_scrolledWindow);
            _pathLabel = new Gtk.Label();
            _pathLabel.SetSizeRequest(500, 40);
            VBox.Add(_pathLabel);

            MemberExtensionsHelper.Instance.IsDirty = true;
            UpdateDocuments();
            VBox.SetSizeRequest(500, 700);
            this.SetSizeRequest(500, 700);

            CanFocus               = true;
            _searchView.CanFocus   = true;
            _searchView.IsEditable = true;
            _searchView.GrabFocus();
            ShowAll();
        }
Пример #4
0
        public PosDatePickerDialog(Window pSourceWindow, DialogFlags pDialogFlags, String pDialogTitle, DateTime pDateTime)
            : base(pSourceWindow, pDialogFlags)
        {
            //Parameters
            _dateTime = pDateTime;

            //Init Local Vars
            String windowTitle           = pDialogTitle;
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_date_picker.png");

            _windowSize = new Size(600, 373);

            //Init Content
            _fixedContent = new Fixed();

            //Call Init UI
            InitUI();

            //ActionArea Buttons
            TouchButtonIconWithText buttonOk     = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            TouchButtonIconWithText buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(buttonCancel, ResponseType.Cancel));

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, _windowSize, _fixedContent, actionAreaButtons);
        }
Пример #5
0
        public DialogUserDetail(Window pSourceWindow, GenericTreeViewXPO pTreeView, DialogFlags pFlags, DialogMode pDialogMode, XPGuidObject pXPGuidObject)
            : base(pSourceWindow, pTreeView, pFlags, pDialogMode, pXPGuidObject)
        {
            this.Title = Utils.GetWindowTitle(Resx.window_title_edit_user);
            SetSizeRequest(500, 469);

            //Store References
            _userDetail   = (DataSourceRow as SYS_UserDetail);
            _isLoggedUser = (_userDetail == GlobalFramework.LoggedUser);

            //Store Current User Unchanged Profile
            _currentUserPermissionProfileGuid = (_userDetail.Profile != null && _dialogMode == DialogMode.Update)
                ? _userDetail.Profile.Oid
                : Guid.Empty;

            //Store Current User Unchanged PasswordReset
            _currentUserPasswordReset = _userDetail.PasswordReset;
            //Store Current User Unchanged Disabled
            _currentUserDisabled = _userDetail.Disabled;

            //Init UI
            InitUI();
            InitNotes();
            ShowAll();
        }
Пример #6
0
        /// <summary>
        /// Creates an instance of the frmAbout class.
        /// </summary>
        /// <history>
        /// [Curtis_Beard]      11/02/2006  Created
        /// </history>
        public frmAbout(Window w, DialogFlags f)
            : base("", w, f)
        {
            InitializeComponent();

             SetVersion();
        }
Пример #7
0
        //XPO Mode: Prepare GenericTreeView to Use in InitObject : Constructor OverLoad 2
        public PosSelectRecordDialog(
            Window pSourceWindow,
            DialogFlags pDialogFlags,
            string pWindowsTitle,
            Size pSize,
            XPGuidObject pDefaultValue,
            CriteriaOperator pXpoCriteria,
            GenericTreeViewMode pGenericTreeViewMode,
            ActionAreaButtons pActionAreaButtons
            )
            : base(pSourceWindow, pDialogFlags)
        {
            try
            {
                //We can use InitObject Here because we dont have pColumnProperties, pDataSource and pDialogType
                //We must create instance with Activator to use Generic parameter constructors, and Send it to InitObject
                _genericTreeView = (T3)Activator.CreateInstance(typeof(T3), new object[] {
                    pSourceWindow,
                    pDefaultValue,
                    pXpoCriteria,
                    null,          //DialogType
                    pGenericTreeViewMode,
                    GenericTreeViewNavigatorMode.HideToolBar
                });

                //InitObject
                InitObject(pSourceWindow, pDialogFlags, pWindowsTitle, pSize, _genericTreeView, pGenericTreeViewMode, pActionAreaButtons);
            }
            catch (Exception ex)
            {
                _log.Error(ex.Message, ex);
            }
        }
Пример #8
0
        public PosEditCompanyDetails(Window pSourceWindow, DialogFlags pDialogFlags)
            : base(pSourceWindow, pDialogFlags, true, false)
        {
            //Init Local Vars
            String windowTitle           = Resx.window_title_edit_configurationpreferenceparameter;
            Size   windowSize            = new Size(600, 600);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_system.png");

            //References
            _sourceWindow = pSourceWindow;

            //ActionArea Buttons
            _buttonOk = new TouchButtonIconWithText("touchButtonOk_DialogActionArea", _colorBaseDialogActionAreaButtonBackground, Resx.global_button_label_ok, _fontBaseDialogActionAreaButton, _colorBaseDialogActionAreaButtonFont, _fileActionOK, _sizeBaseDialogActionAreaButtonIcon, _sizeBaseDialogActionAreaButton.Width, _sizeBaseDialogActionAreaButton.Height)
            {
                Sensitive = false
            };

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok));

            //Init Content
            InitUI();

            //Start Validated
            Validate();

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, _scrolledWindow, actionAreaButtons);

            //Set Focus to Window, To Hide Keyboard: Only Used if First SelectionBox are Hiden
            //this.GrabFocus();
        }
Пример #9
0
        public PosChangeUserDialog(Window pSourceWindow, DialogFlags pDialogFlags)
            : base(pSourceWindow, pDialogFlags)
        {
            //Init Local Vars
            String windowTitle           = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_dialog_change_user");
            Size   windowSize            = new Size(559, 562);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_users.png");

            //Init Content
            _fixedContent = new Fixed();

            InitTablePadUsers();

            //ActionArea Buttons
            //_buttonOk = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok) { Sensitive = false };
            _buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            //actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(_buttonCancel, ResponseType.Cancel));

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, _fixedContent, actionAreaButtons);
        }
Пример #10
0
        public PosFilePickerDialog(Window pSourceWindow, DialogFlags pDialogFlags, FileFilter pFileFilter, FileChooserAction pFileChooserAction)
            : base(pSourceWindow, pDialogFlags)
        {
            //Parameters
            _fileFilter        = pFileFilter;
            _fileChooserAction = pFileChooserAction;

            //Init Local Vars
            String windowTitle = Resx.window_title_dialog_filepicker;

            _windowSize = new Size(700, 473);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_select_record.png");

            //Init Content
            _fixedContent = new Fixed();

            //Call Init UI
            InitUI();

            //ActionArea Buttons
            TouchButtonIconWithText buttonOk     = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            TouchButtonIconWithText buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(buttonCancel, ResponseType.Cancel));

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, _windowSize, _fixedContent, actionAreaButtons);
        }
Пример #11
0
        public void Show(Gtk.Window parent_window, DialogFlags flags, MessageType msgtype, ButtonsType btntype, string msg)
        {
            var md = new MessageDialog(parent_window, flags, msgtype, btntype, msg);

            md.Run();
            md.Destroy();
        }
Пример #12
0
        public void Show(DialogFlags flags, MessageType msgtype, ButtonsType btntype, string msg)
        {
            var md = new MessageDialog(null, flags, msgtype, btntype, msg);

            md.Run();
            md.Destroy();
        }
        public RecentFileListWindow(string title, Gtk.Window parent, DialogFlags flags, params object[] button_data)
            : base(title, parent, flags, button_data)
        {
            _searchView = new Gtk.Entry ("");
            _searchView.SetSizeRequest (500, 40);
            _searchView.Changed += _searchView_Changed;
            _searchView.KeyReleaseEvent += HandleSearchViewKeyReleaseEvent;
            _searchView.KeyPressEvent += HandleKeyPressEvent;
            _searchView.FocusOutEvent += HandleFocusOutEvent;
            VBox.Add (_searchView);

            CreateTree ();
            VBox.Add (_treeView);

            _pathLabel = new Gtk.Label ();
            _pathLabel.SetSizeRequest (500, 40);
            VBox.Add (_pathLabel);

            MemberExtensionsHelper.Instance.IsDirty = true;
            UpdateDocuments ();
            this.SetSizeRequest (500, 700);

            CanFocus = true;
            _searchView.CanFocus = true;
            _searchView.IsEditable = true;
            _searchView.GrabFocus ();
            ShowAll ();
        }
        public MemberListWindow(string title, Gtk.Window parent, DialogFlags flags, params object[] button_data)
            : base(title, parent, flags, button_data)
        {
            if (IdeApp.Workbench == null) {
                return;
            }
            var rootWindow = IdeApp.Workbench.RootWindow;
            _searchView = new Gtk.Entry ("");
            _searchView.SetSizeRequest (500, 40);
            _searchView.Changed += _searchView_Changed;
            _searchView.KeyReleaseEvent += HandleSearchViewKeyReleaseEvent;
            _searchView.KeyPressEvent += HandleKeyPressEvent;
            _searchView.FocusOutEvent += HandleFocusOutEvent;
            VBox.Add (_searchView);

            CreateTree ();
            VBox.Add (_treeView);

            MemberExtensionsHelper.Instance.IsDirty = true;
            UpdateMembers ();
            var editor = IdeApp.Workbench.ActiveDocument.Editor;
            var visualInsertLocation = editor.LogicalToVisualLocation (editor.Caret.Location);
            var targetView = IdeApp.Workbench.RootWindow;

            this.SetSizeRequest (500, 700);

            CanFocus = true;
            _searchView.CanFocus = true;
            _searchView.IsEditable = true;
            _searchView.GrabFocus ();
            ShowAll ();
        }
Пример #15
0
        public void InitObject(Window pSourceWindow, DialogFlags pDialogFlags, String pIcon, String pTitle, System.Drawing.Size pSize, Widget pContent, Widget pActionAreaLeftContent, ActionAreaButtons pActionAreaRightButtons)
        {
            //parameters
            _sourceWindow           = pSourceWindow;
            _windowSize             = pSize;
            _windowTitle            = pTitle;
            _windowIcon             = pIcon;
            _content                = pContent;
            _actionAreaLeftContent  = pActionAreaLeftContent;
            _actionAreaRightButtons = pActionAreaRightButtons;
            Modal          = false;//require else cant drag and drop on linux
            Decorated      = false;
            Resizable      = false;
            WindowPosition = WindowPosition.Center;
            SetSizeRequest(pSize.Width, pSize.Height);
            DefaultResponse = ResponseType.Cancel;
            ModifyBg(StateType.Normal, Utils.ColorToGdkColor(_colorBaseDialogWindowBackgroundBorder));
            TransientFor = _sourceWindow;
            //ActionArea
            //ActionArea.HeightRequest = _buttonSize.Height + 10 + (int) (BorderWidth * 2);

            //Events
            KeyReleaseEvent += PosBaseDialog_KeyReleaseEvent;

            Build();
        }
Пример #16
0
        public void InitObject(Window pSourceWindow, DialogFlags pDialogFlags, string pWindowTitle, decimal pInitialValue = 0.0m, decimal pTotalOrder = 0.0m)
        {
            Size   windowSize            = new Size(524, 497);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_payments.png");

            //Init MoneyPad
            _moneyPad = new MoneyPad(pSourceWindow, pInitialValue);
            _moneyPad.EntryChanged += _moneyPad_EntryChanged;
            //If pInitialValue defined, Assign it
            _amount = (pInitialValue > 0) ? pInitialValue : 0.0m;

            //Init Content
            Fixed fixedContent = new Fixed();

            fixedContent.Put(_moneyPad, 0, 0);

            //ActionArea Buttons
            _buttonOk     = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            _buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);
            //Start Enable or Disable
            _buttonOk.Sensitive = (pInitialValue > 0 && pInitialValue > pTotalOrder) ? true : false;

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(_buttonCancel, ResponseType.Cancel));

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, pWindowTitle, windowSize, fixedContent, actionAreaButtons);
        }
Пример #17
0
        public PosTemplateDialog(Window pSourceWindow, DialogFlags pDialogFlags)
            : base(pSourceWindow, pDialogFlags)
        {
            //Init Local Vars
            String windowTitle           = Resx.window_title_dialog_template;
            Size   windowSize            = new Size(600, 340);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_default.png");

            //Init Content
            Fixed fixedContent = new Fixed();

            fixedContent.Put(new Label("Place content here"), 0, 0);

            //ActionArea Buttons
            TouchButtonIconWithText buttonOk     = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            TouchButtonIconWithText buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(buttonCancel, ResponseType.Cancel));

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, fixedContent, actionAreaButtons);
        }
Пример #18
0
        public PosPayInvoicesDialog(Window pSourceWindow, DialogFlags pDialogFlags, decimal pPaymentAmountTotal, int pNoOfInvoices)
            : base(pSourceWindow, pDialogFlags)
        {
            //Parameters
            _sourceWindow       = pSourceWindow;
            _paymentAmountTotal = pPaymentAmountTotal;
            _noOfInvoices       = pNoOfInvoices;

            //Init Local Vars
            String windowTitle = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_dialog_pay_invoices");

            _windowSize = new Size(480, 444);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_pay_invoice.png");

            //ActionArea Buttons
            _buttonOk           = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            _buttonCancel       = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);
            _buttonOk.Sensitive = false;

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(_buttonCancel, ResponseType.Cancel));

            //Init Content
            InitUI();

            //Start Validated
            Validate();

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, _windowSize, _fixedContent, actionAreaButtons);
        }
Пример #19
0
        public static ResponseType show(Window parent_window, DialogFlags dialogFlags, MessageType messageType, ButtonsType buttonsType, string message)
        {
            _dlg = new MessageDialog(parent_window, dialogFlags, messageType, buttonsType, message);
            ResponseType response = (ResponseType)_dlg.Run();

            _dlg.Destroy();
            return(response);
        }
Пример #20
0
        public LoginDialog(string title, 
							Window parent, 
							DialogFlags flags, 
							params object[] button_data)
            : base(title, parent, flags, button_data)
        {
            InitializeLoginDialog();
        }
Пример #21
0
 IntPtr gimp_dialog_new(string title,
                        string role,
                        IntPtr parent,
                        DialogFlags flags,
                        GimpHelpFunc help_func,
                        string help_id,
                        string button1, ResponseType action1,
                        string end);
Пример #22
0
 public PosBaseDialogGenericTreeView(Window pSourceWindow, DialogFlags pDialogFlags, DialogMode pDialogMode, T pDataSourceRow)
     : base(pSourceWindow, pDialogFlags)
 {
     //Parameters
     _sourceWindow  = pSourceWindow;
     _dialogMode    = pDialogMode;
     _dataSourceRow = pDataSourceRow;
 }
Пример #23
0
 public DialogArticleType(Window pSourceWindow, GenericTreeViewXPO pTreeView, DialogFlags pFlags, DialogMode pDialogMode, XPGuidObject pXPGuidObject)
     : base(pSourceWindow, pTreeView, pFlags, pDialogMode, pXPGuidObject)
 {
     this.Title = Utils.GetWindowTitle(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_edit_articletype"));
     SetSizeRequest(500, 335);
     InitUI();
     InitNotes();
     ShowAll();
 }
Пример #24
0
 public DialogCustomer(Window pSourceWindow, GenericTreeViewXPO pTreeView, DialogFlags pFlags, DialogMode pDialogMode, XPGuidObject pXPGuidObject)
     : base(pSourceWindow, pTreeView, pFlags, pDialogMode, pXPGuidObject)
 {
     this.Title = Utils.GetWindowTitle(Resx.window_title_edit_customer);
     SetSize(400, 566);
     InitUI();
     InitNotes();
     ShowAll();
 }
Пример #25
0
 public DialogUserProfile(Window pSourceWindow, GenericTreeViewXPO pTreeView, DialogFlags pFlags, DialogMode pDialogMode, XPGuidObject pXPGuidObject)
     : base(pSourceWindow, pTreeView, pFlags, pDialogMode, pXPGuidObject)
 {
     this.Title = Utils.GetWindowTitle(Resx.window_title_edit_user_profile);
     SetSizeRequest(500, 335);
     InitUI();
     InitNotes();
     ShowAll();
 }
Пример #26
0
        /// <summary>

        /// Creates an instance of the frmAbout class.

        /// </summary>

        /// <history>

        /// [Curtis_Beard]      11/02/2006  Created

        /// </history>

        public frmAbout(Window w, DialogFlags f) : base("", w, f)

        {
            InitializeComponent();



            SetVersion();
        }
Пример #27
0
        public BaseMessageDialog(Window parent, string msg, DialogFlags flags,
            MessageType mtype, ButtonsType btype, bool wrap)
        {
            dialog = new MessageDialog(parent, flags, mtype, btype, GLib.Markup.EscapeText(msg));

            try {
                ((Label)((Container)((Container)dialog.VBox.Children[0]).Children[1]).Children[0]).Wrap = wrap;
            } catch { }
        }
Пример #28
0
        //Constructor
        public PosBaseDialog(Window pSourceWindow, DialogFlags pFlags, bool pCconfirmDialogOnEnter = true, bool pWindowTitleCloseButton = true)
            : base("Base Dialog Window", pSourceWindow, pFlags)
        {
            //Parameters
            _confirmDialogOnEnter   = pCconfirmDialogOnEnter;
            _windowTitleCloseButton = pWindowTitleCloseButton;

            //Init Window Black Mask
            if (_useBaseDialogWindowMask /*&& ! Debugger.IsAttached*/)
            {
                //Window Mask Background Hack
                _windowMaskBackground = new Window("");
                _windowMaskBackground.TransientFor = pSourceWindow;
                _windowMaskBackground.SetSizeRequest(10, 10);
                _windowMaskBackground.Move(-100, -100);
                _windowMaskBackground.ModifyBg(StateType.Normal, Utils.ColorToGdkColor(System.Drawing.Color.Black));
                //Prevent click outside Dialog
                _windowMaskBackground.Opacity     = 0.35F;//0.55F | 0.75F
                _windowMaskBackground.CanFocus    = false;
                _windowMaskBackground.AcceptFocus = false;
                _windowMaskBackground.Sensitive   = false;
                _windowMaskBackground.Fullscreen();
                _windowMaskBackground.Show();

                TransientFor = _windowMaskBackground;
                Destroyed   += delegate { _windowMaskBackground.Destroy(); };
            }
            else
            {
                //Check if is not null, before create startup window, ex xpo create scheme
                if (pSourceWindow != null)
                {
                    TransientFor = pSourceWindow;

                    //Prevent click outside Dialog
                    pSourceWindow.CanFocus    = false;
                    pSourceWindow.AcceptFocus = false;
                    Destroyed += delegate
                    {
                        pSourceWindow.CanFocus    = true;
                        pSourceWindow.AcceptFocus = true;
                    };
                }
            }

            //Theme Background
            //if (pFileImageBackground != string.Empty)
            //{
            //  _styleBackground = Utils.GetThemeStyleBackground(pFileImageBackground);
            //}
            //else
            //{
            //  _styleBackground = Utils.GetThemeStyleBackground(FrameworkUtils.OSSlash(GlobalFramework.Settings["fileImageBackgroundDialogDefault"]));
            //}
        }
Пример #29
0
        public PosInputTextDialog(Window pSourceWindow, DialogFlags pDialogFlags, Size pSize, string pWindowTitle, string pWindowIcon, string pEntryLabel, string pInitialValue, KeyboardMode pKeyboardMode, string pRule, bool pRequired)
            : base(pSourceWindow, pDialogFlags)
        {
            //Init Local Vars
            String windowTitle = pWindowTitle;
            Size   windowSize  = pSize;

            if (!File.Exists(pWindowIcon))
            {
                pWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_system.png");
            }

            //Always assign  pInitialValue to Dialog.Value
            _value = pInitialValue;

            //Entry
            _entryBoxValidation = new EntryBoxValidation(this, pEntryLabel, pKeyboardMode, pRule, pRequired);
            if (pInitialValue != string.Empty)
            {
                _entryBoxValidation.EntryValidation.Text = pInitialValue;
            }

            //VBox
            _vbox = new VBox(false, 0)
            {
                WidthRequest = windowSize.Width - 12
            };
            _vbox.PackStart(_entryBoxValidation, false, false, 0);

            //Init Content
            Fixed fixedContent = new Fixed();

            fixedContent.Put(_vbox, 0, 0);

            //ActionArea Buttons
            TouchButtonIconWithText buttonOk     = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            TouchButtonIconWithText buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);

            buttonOk.Sensitive = _entryBoxValidation.EntryValidation.Validated;

            //After Button Construction
            _entryBoxValidation.EntryValidation.Changed += delegate {
                _value             = _entryBoxValidation.EntryValidation.Text;
                buttonOk.Sensitive = _entryBoxValidation.EntryValidation.Validated;
            };

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(buttonCancel, ResponseType.Cancel));

            //Init Object
            this.InitObject(this, pDialogFlags, pWindowIcon, windowTitle, windowSize, fixedContent, actionAreaButtons);
        }
Пример #30
0
        public BOBaseDialog(Window pSourceWindow, GenericTreeViewXPO pTreeView, DialogFlags pFlags, DialogMode pDialogMode, XPGuidObject pDataSourceRow)
            : base("", pSourceWindow, pFlags)
        {
            //Parameters
            _treeView      = pTreeView;
            _dialogMode    = pDialogMode;
            _dataSourceRow = pDataSourceRow;

            //TODO: try to prevent NULL Error
            //_dataSourceRow = GlobalFramework.SessionXpo.GetObjectByKey<XPGuidObject>(_dataSourceRow.Oid);
            //TODO: Validar se o erro de editar dá erro de acesso objecto eliminado.
            //APPEAR when we Try to ReEdit Terminal, after assign Printer
            //An exception of type 'System.NullReferenceException' occurred in logicpos.exe but was not handled in user code
            _dataSourceRow.Reload();

            //Defaults
            //Modal = true; //< Problems in Ubuntu, TitleBar Disapear
            WindowPosition = WindowPosition.CenterAlways;
            GrabFocus();
            SetSize(400, 400);
            _widgetMaxWidth = WidthRequest - (_dialogPadding * 2) - 16;

            //Grey Window : Luis|Muga
            //this.Decorated = false;
            //White Window : Mario
            this.Decorated      = true;
            this.Resizable      = false;
            this.WindowPosition = WindowPosition.Center;
            //Grey Window : Luis|Muga
            //this.ModifyBg(StateType.Normal, Utils.StringToGTKColor(GlobalFramework.Settings["colorBackOfficeContentBackground"]));

            //Accelerators
            AccelGroup accelGroup = new AccelGroup();

            AddAccelGroup(accelGroup);

            //Init WidgetList
            _crudWidgetList = new GenericCRUDWidgetListXPO(_dataSourceRow.Session);

            //Icon
            string fileImageAppIcon = FrameworkUtils.OSSlash(string.Format("{0}{1}", GlobalFramework.Path["images"], SettingsApp.AppIcon));

            if (File.Exists(fileImageAppIcon))
            {
                Icon = Utils.ImageToPixbuf(System.Drawing.Image.FromFile(fileImageAppIcon));
            }

            //Init StatusBar
            InitStatusBar();
            //InitButtons
            InitButtons();
            //InitUi
            InitUI();
        }
Пример #31
0
        public GimpDialog(string title, string role, IntPtr parent,
                          DialogFlags flags,
                          GimpHelpFunc help_func, string help_id) :

            base(gimp_dialog_new(title, role, parent, flags,
                                 help_func, help_id,
                                 // Stock.Help, ResponseType.Help,
                                 Stock.Cancel, ResponseType.Cancel,
                                 Stock.Ok, ResponseType.Ok, null))
        {
        }
Пример #32
0
        public static ResponseType Show(Window parentWindow, DialogFlags flags, MessageType type, ButtonsType bt, bool useMarkup, string title, string format, params object[] args)
        {
            if (args == null)
                args = new object[0];

            MessageDialog md = new MessageDialog(parentWindow, flags, type, bt, useMarkup, format, args);
            md.Title = title;
            int result = md.Run();
            md.Destroy();
            return (ResponseType)result;
        }
Пример #33
0
        public GimpDialog(string title, string role, IntPtr parent,
                          DialogFlags flags,
                          GimpHelpFunc help_func, string help_id,
                          string button1, ResponseType action1,
                          string button2, ResponseType action2) :

            base(gimp_dialog_new(title, role, parent, flags,
                                 help_func, help_id,
                                 button1, action1,
                                 button2, action2, null))
        {
        }
        //Overload : Default Dates Start: 1st Day of Month, End Last Day Of Month
        public PosDatePickerStartEndDateDialog(Window pSourceWindow, DialogFlags pDialogFlags)
            : base(pSourceWindow, pDialogFlags)
        {
            //pastMonths=0 to Work in Curent Month Range, pastMonths=1 Works in Past Month, pastMonths=2 Two months Ago etc
            int      pastMonths      = 1;
            DateTime workingDate     = FrameworkUtils.CurrentDateTimeAtomic().AddMonths(-pastMonths);
            DateTime firstDayOfMonth = new DateTime(workingDate.Year, workingDate.Month, 1);
            DateTime lastDayOfMonth  = firstDayOfMonth.AddMonths(1).AddDays(-1);
            DateTime dateTimeStart   = firstDayOfMonth;
            DateTime dateTimeEnd     = lastDayOfMonth.AddHours(23).AddMinutes(59).AddSeconds(59);

            InitUI(pDialogFlags, dateTimeStart, dateTimeEnd);
        }
        private void InitUI(DialogFlags pDialogFlags, DateTime pDateStart, DateTime pDateEnd)
        {
            //Parameters
            _dateStart = pDateStart;
            _dateEnd   = pDateEnd;

            //Init Local Vars
            String windowTitle           = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_dialog_datepicket_startend");
            Size   windowSize            = new Size(300, 255);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_date_picker.png");

            //Init Content
            _fixedContent = new Fixed();

            //Init DateEntry Start
            _entryBoxDateStart = new EntryBoxValidationDatePickerDialog(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_date_start"), _dateStart, SettingsApp.RegexDate, true);
            _entryBoxDateStart.EntryValidation.Text = _dateStart.ToString(SettingsApp.DateFormat);
            _entryBoxDateStart.EntryValidation.Validate();
            _entryBoxDateStart.ClosePopup += entryBoxDateStart_ClosePopup;
            //Init DateEntry End
            _entryBoxDateEnd = new EntryBoxValidationDatePickerDialog(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_date_end"), _dateEnd, SettingsApp.RegexDate, true);
            _entryBoxDateEnd.EntryValidation.Text = _dateEnd.ToString(SettingsApp.DateFormat);
            _entryBoxDateEnd.EntryValidation.Validate();
            _entryBoxDateEnd.ClosePopup += entryBoxDateEnd_ClosePopup;

            VBox vbox = new VBox(true, 0)
            {
                WidthRequest = 290
            };

            vbox.PackStart(_entryBoxDateStart, true, true, 2);
            vbox.PackStart(_entryBoxDateEnd, true, true, 2);

            _fixedContent.Put(vbox, 0, 0);

            //ActionArea Buttons
            _buttonOk     = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            _buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(_buttonCancel, ResponseType.Cancel));

            //Start Validated
            Validate();

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, _fixedContent, actionAreaButtons);
        }
Пример #36
0
        public PosSendMessageDialog(Window pSourceWindow, DialogFlags pDialogFlags, string pWindowIcon)
        //public PosInputTextDialog(Window pSourceWindow, DialogFlags pDialogFlags, string pWindowTitle, string pEntryLabel, string pDefaultValue, string pRule, bool pRequired)
            : base(pSourceWindow, pDialogFlags, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_dialog_send_message"), pWindowIcon, "Label", "Default", SettingsApp.RegexAlfaNumericExtended, true)
        {
            this.HeightRequest = 320;

            //UserDetail
            CriteriaOperator criteriaOperatorUser = CriteriaOperator.Parse("(Disabled IS NULL OR Disabled  <> 1)");

            _entryBoxSelectUser = new XPOEntryBoxSelectRecordValidation <sys_userdetail, TreeViewUser>(_sourceWindow, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_user"), "Designation", "Oid", _valueUser, criteriaOperatorUser, SettingsApp.RegexGuid, false);
            _entryBoxSelectUser.EntryValidation.IsEditable = false;
            //Public Reference
            _valueUser = _entryBoxSelectUser.Value;

            //Terminal
            CriteriaOperator criteriaOperatorTerminal = CriteriaOperator.Parse("(Disabled IS NULL OR Disabled  <> 1)");

            _entryBoxSelectTerminal = new XPOEntryBoxSelectRecordValidation <pos_configurationplaceterminal, TreeViewConfigurationPlaceTerminal>(_sourceWindow, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_user"), "Designation", "Oid", _valueTerminal, criteriaOperatorTerminal, SettingsApp.RegexGuid, false);
            _entryBoxSelectTerminal.EntryValidation.IsEditable = false;
            //Public Reference
            _valueTerminal = _entryBoxSelectTerminal.Value;

            _vbox.PackStart(_entryBoxSelectTerminal, true, true, 0);
            _vbox.PackStart(_entryBoxSelectUser, true, true, 0);
            _vbox.ShowAll();

            //dialog.VBoxContent.PackStart(textViewTouch, true, true, 0);
            //dialog.VBoxContent.ShowAll();

            /*
             * //Init Local Vars
             * String windowTitle = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_dialog_send_message;
             * Size windowSize = new Size(600, 500);
             * String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_send_message.png");
             *
             * //Init Content
             * Fixed fixedContent = new Fixed();
             * fixedContent.Put(new Label("Place content here"), 0, 0);
             *
             * //ActionArea Buttons
             * TouchButtonIconWithText buttonOk = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
             * TouchButtonIconWithText buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);
             *
             * //ActionArea
             * ActionAreaButtons actionAreaButtons = new ActionAreaButtons();
             * actionAreaButtons.Add(new ActionAreaButton(buttonOk, ResponseType.Ok));
             * actionAreaButtons.Add(new ActionAreaButton(buttonCancel, ResponseType.Cancel));
             * //Init Object
             * this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, fixedContent, actionAreaButtons);
             */
        }
Пример #37
0
        public BaseDialogBox(string title, Window parent, DialogFlags flags, params object[] button_data) :
            base(title, parent, flags, button_data)
        {
            hbox             = new HBox(false, 8);
            hbox.BorderWidth = 8;
            ContentArea.PackStart(hbox, false, false, 0);

            Image stock = new Image(Stock.DialogQuestion, IconSize.Dialog);

            hbox.PackStart(stock, false, false, 0);

            AddComponents();
            hbox.ShowAll();
        }
Пример #38
0
		public MessageDialog (Gtk.Window parent_window, DialogFlags flags, MessageType type, ButtonsType bt, bool use_markup, string format, params object[] args)
		{
			IntPtr p = (parent_window != null) ? parent_window.Handle : IntPtr.Zero;

			if (format == null) {
				Raw = gtk_message_dialog_new (p, flags, type, bt, IntPtr.Zero, IntPtr.Zero);
				return;
			}

			IntPtr nmsg = GLib.Marshaller.StringToPtrGStrdup (GLib.Marshaller.StringFormat (format, args));
			if (use_markup)
				Raw = gtk_message_dialog_new_with_markup (p, flags, type, bt, nmsg, IntPtr.Zero);
			else
				Raw = gtk_message_dialog_new (p, flags, type, bt, nmsg, IntPtr.Zero);
			GLib.Marshaller.Free (nmsg);
		}
        /// <summary>
        /// Initializes a new instance of the <see cref="ConfiguratorDialog"/> class.
        /// </summary>
        /// <param name="treeStore">The tree store.</param>
        /// <param name="dialogTitle">The dialog title.</param>
        /// <param name="parentWindow">The parent window.</param>
        /// <param name="flags">The flags.</param>
        /// <param name="buttonData">The button data.</param>
        public ConfiguratorDialog(
			TreeStore treeStore,
			string dialogTitle = "Configuration",
			Window parentWindow = null,
			DialogFlags flags = DialogFlags.DestroyWithParent,
			params object[] buttonData)
            : base(dialogTitle, parentWindow, flags, buttonData)
        {
            // Save the various parameters as member variables.
            if (treeStore == null)
            {
                throw new ArgumentNullException("treeStore");
            }

            // Set up the widget.
            InitializeWidget(treeStore);

            // Set up the default
            DefaultSize = new Size(400, 250);
        }
Пример #40
0
 public BaseMessageDialog(Window parent, string msg, DialogFlags flags,
     MessageType mtype, ButtonsType btype)
     : this(parent, msg, flags, mtype, btype, false)
 {
 }
Пример #41
0
	public static void Show(Gtk.Window parent_window, DialogFlags flags, MessageType msgtype, ButtonsType btntype, string msg) 
    { 
        MessageDialog md = new MessageDialog (parent_window, flags, msgtype, btntype, msg); 
        md.Run (); 
        md.Destroy(); 
    } 
Пример #42
0
 public frmErrorLog(Window w, DialogFlags f, ArrayList errors)
     : base("", w, f)
 {
     alErrors = errors;
      InitializeComponent();
 }
Пример #43
0
 public HGDLogin(string title, Window parent, DialogFlags flags, params object[] button_data)
     : base(title, parent, flags, button_data)
 {
     this.Build ();
 }
Пример #44
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="w"></param>
 /// <param name="f"></param>
 public frmOptions(Window w, DialogFlags f)
     : base("", w, f)
 {
     InitializeComponent();
 }
 static extern IntPtr gtk_message_dialog_new(IntPtr parent_window, DialogFlags flags, MessageType type, ButtonsType bt, string msg, IntPtr args);
Пример #46
0
		public IdeDialog (string title, Gtk.Window parentWindow, DialogFlags flags): base (title, parentWindow, flags)
		{
			IdeTheme.ApplyTheme (this);
		}
Пример #47
0
		static extern IntPtr gtk_message_dialog_new_with_markup (IntPtr parent_window, DialogFlags flags, MessageType type, ButtonsType bt, IntPtr msg, IntPtr args);
Пример #48
0
		public MessageDialog (Gtk.Window parent_window, DialogFlags flags, MessageType type, ButtonsType bt, string format, params object[] args) : this (parent_window, flags, type, bt, true, format, args) {}