コード例 #1
0
 public MessageItem(MessageCallback call, string content, string cap, Buttons btns, DefaultButton defaultBtn)
 {
     this.message = content;
     this.caption = cap;
     this.buttons = btns;
     this.defaultButton = defaultBtn;
 }
コード例 #2
0
 // Methods
 public MessageItem()
 {
     this.message = string.Empty;
     this.caption = string.Empty;
     this.buttons = Buttons.OK;
     this.defaultButton = DefaultButton.Button1;
 }
コード例 #3
0
ファイル: DefaultButtonManager.cs プロジェクト: anam/gp-HO
 public static DefaultButton GetDefaultButtonByID(int id)
 {
     DefaultButton defaultButton = new DefaultButton();
     SqlDefaultButtonProvider sqlDefaultButtonProvider = new SqlDefaultButtonProvider();
     defaultButton = sqlDefaultButtonProvider.GetDefaultButtonByID(id);
     return defaultButton;
 }
コード例 #4
0
    private void showDefaultButtonData()
    {
        DefaultButton defaultButton = new DefaultButton();
        defaultButton = DefaultButtonManager.GetDefaultButtonByID(Int32.Parse(Request.QueryString["defaultButtonID"]));

        txtDefaultButtonName.Text = defaultButton.DefaultButtonName;
        txtDefaultButtonText.Text = defaultButton.DefaultButtonText;
    }
コード例 #5
0
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        DefaultButton defaultButton = new DefaultButton();

        defaultButton.DefaultButtonName = txtDefaultButtonName.Text;
        defaultButton.DefaultButtonText = txtDefaultButtonText.Text;
        int resutl = DefaultButtonManager.InsertDefaultButton(defaultButton);
        Response.Redirect("AdminDefaultButtonDisplay.aspx");
    }
コード例 #6
0
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        DefaultButton defaultButton = new DefaultButton();
        defaultButton = DefaultButtonManager.GetDefaultButtonByID(Int32.Parse(Request.QueryString["defaultButtonID"]));
        DefaultButton tempDefaultButton = new DefaultButton();
        tempDefaultButton.DefaultButtonID = defaultButton.DefaultButtonID;

        tempDefaultButton.DefaultButtonName = txtDefaultButtonName.Text;
        tempDefaultButton.DefaultButtonText = txtDefaultButtonText.Text;
        bool result = DefaultButtonManager.UpdateDefaultButton(tempDefaultButton);
        Response.Redirect("AdminDefaultButtonDisplay.aspx");
    }
コード例 #7
0
 public DefaultButton GetDefaultButtonFromReader(IDataReader reader)
 {
     try
     {
         DefaultButton defaultButton = new DefaultButton
             (
                 (int)reader["DefaultButtonID"],
                 reader["DefaultButtonName"].ToString(),
                 reader["DefaultButtonText"].ToString()
             );
          return defaultButton;
     }
     catch(Exception ex)
     {
         return null;
     }
 }
コード例 #8
0
ファイル: DontShowAgainDialog.cs プロジェクト: TerabyteX/main
        /// <summary>
        /// Overloaded constructor
        /// </summary>
        /// <param name="serviceProvider">The associated service provider.</param>
        /// <param name="messageText">Thetext to be shown on the dialog</param>
        /// <param name="helpTopic">The associated help topic</param>
        /// <param name="button">The default button</param>
        internal DontShowAgainDialog(IServiceProvider serviceProvider, string messageText, string helpTopic, DefaultButton button)
        {
            if(serviceProvider == null)
            {
                throw new ArgumentNullException("serviceProvider");
            }

            this.serviceProvider = serviceProvider;
            this.InitializeComponent();

            if(button == DefaultButton.OK)
            {
                this.AcceptButton = this.okButton;
            }
            else
            {
                this.AcceptButton = this.cancelButton;
            }

            this.SetupComponents(messageText, helpTopic);
        }
コード例 #9
0
ファイル: fileoverwritedialog.cs プロジェクト: Jeremiahf/wix3
        /// <summary>
        /// Overloaded constructor
        /// </summary>
        /// <param name="serviceProvider">The associated service provider.</param>
        /// <param name="messageText">Thetext to be shown on the dialog</param>
        /// <param name="title">The title of the dialog</param>
        /// <param name="helpTopic">The associated help topic</param>
        /// <param name="button">The default button</param>
        internal FileOverwriteDialog(IServiceProvider serviceProvider, string messageText, string title, string helpTopic, DefaultButton button)
        {
            if (serviceProvider == null)
            {
                throw new ArgumentNullException("serviceProvider");
            }

            this.serviceProvider = serviceProvider;
            this.InitializeComponent();

            if (button == DefaultButton.Yes)
            {
                this.AcceptButton = this.yesButton;
            }
            else
            {
                this.AcceptButton = this.cancelButton;
            }

            this.Text = title;
            this.SetupComponents(messageText, helpTopic);
        }
コード例 #10
0
    public bool UpdateDefaultButton(DefaultButton defaultButton)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("Login_UpdateDefaultButton", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@DefaultButtonID", SqlDbType.Int).Value = defaultButton.DefaultButtonID;
            cmd.Parameters.Add("@DefaultButtonName", SqlDbType.NVarChar).Value = defaultButton.DefaultButtonName;
            cmd.Parameters.Add("@DefaultButtonText", SqlDbType.NVarChar).Value = defaultButton.DefaultButtonText;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return result == 1;
        }
    }
コード例 #11
0
ファイル: InputPad.cs プロジェクト: developer119korea/sudoku
 private void CreateDeleteButton()
 {
     _deleteButton = InstantiateBasicButton("Delete", this.transform, new Vector3(480.0f, -200.0f, 0.0f), Quaternion.identity, Vector3.one);
 }
コード例 #12
0
        private static MessageBoxResult CallMessageBox(Window owner, string text, string caption, MessageBoxButton button, MessageBoxIcon icon, DefaultButton defaultButton)
        {
            var func = new Func <MessageBoxResult>(() =>
            {
                var ownerX = owner as WindowX;
                if (Settings.InteractOwnerMask && ownerX != null)
                {
                    ownerX.IsMaskVisible = true;
                }
                var msgBox = new Components.MessageBoxXWindow(text, caption, button, icon, defaultButton, owner, Settings);
                msgBox.ShowDialog();
                if (Settings.InteractOwnerMask && ownerX != null)
                {
                    ownerX.IsMaskVisible = false;
                }
                return(msgBox.MessageBoxResult);
            });

            MessageBoxResult result = MessageBoxResult.OK;

            if (Dispatcher != null)
            {
                Dispatcher.Invoke(new Action(() =>
                {
                    result = func.Invoke();
                }));
            }
            else
            {
                result = func.Invoke();
            }

            return(result);
        }
コード例 #13
0
        /// <summary>
        /// Launches a DontShowAgainDialog if it is needed.
        /// </summary>
        /// <param name="serviceProvider">An associated serviceprovider.</param>
        /// <param name="messageText">The text the dilaog box will contain.</param>
        /// <param name="helpTopic">The associated help topic.</param>
        /// <param name="button">The default button.</param>
        /// <param name="registryKey">The registry key that serves for persisting the not show again value.</param>
        /// <returns>A Dialog result.</returns>
        internal static DialogResult LaunchDontShowAgainDialog(IServiceProvider serviceProvider, string messageText, string helpTopic, DefaultButton button, string registryKey)
        {
            if (String.IsNullOrEmpty(registryKey))
            {
                throw new ArgumentException(SR.GetString(SR.ParameterCannotBeNullOrEmpty, CultureInfo.CurrentUICulture), "registryKey");
            }

            DialogResult result = DialogResult.OK;

            bool dontShowAgain = ReadDontShowAgainValue(registryKey);

            if (!dontShowAgain)
            {
                DontShowAgainDialog dialog = new DontShowAgainDialog(serviceProvider, messageText, helpTopic, button);
                result = dialog.ShowDialog();

                // Now write to the registry the value.
                if (dialog.DontShowAgainValue)
                {
                    WriteDontShowAgainValue(registryKey, 1);
                }
            }

            return(result);
        }
コード例 #14
0
ファイル: DefaultButtonManager.cs プロジェクト: anam/gp-HO
 public static int InsertDefaultButton(DefaultButton defaultButton)
 {
     SqlDefaultButtonProvider sqlDefaultButtonProvider = new SqlDefaultButtonProvider();
     return sqlDefaultButtonProvider.InsertDefaultButton(defaultButton);
 }
コード例 #15
0
 public MessageForm(string text, string caption, Buttons buttons, BoxIcon icon, DefaultButton defaultButton, bool centerScreen, bool displayHelpButton) : this(null, text, caption, buttons, icon, defaultButton, centerScreen, displayHelpButton, 0, false)
 {
 }
コード例 #16
0
 public MessageForm(string text, string caption, Buttons buttons, BoxIcon icon, DefaultButton defaultButton, bool centerScreen, bool displayHelpButton, int maxWidth, bool noWrap) : this(null, text, caption, buttons, icon, defaultButton, centerScreen, displayHelpButton, maxWidth, noWrap)
 {
 }
コード例 #17
0
ファイル: MessageForm.cs プロジェクト: shinji257/hakchi2
        public static Button Show(string title, string message, Image icon = null, Button[] buttons = null, DefaultButton defaultButton = DefaultButton.Button1)
        {
            var form = Get(title, message, icon, buttons, defaultButton);

            form.ShowDialog();
            return(form.result);
        }
コード例 #18
0
ファイル: MessageForm.cs プロジェクト: shinji257/hakchi2
        public static MessageForm Get(string title, string message, Image icon = null, Button[] buttons = null, DefaultButton defaultButton = DefaultButton.Button1)
        {
            if (buttons != null && (buttons.Length < 1 || buttons.Length > 3))
            {
                throw new ArgumentOutOfRangeException();
            }

            MessageForm form = new MessageForm();

            form.Text = title ?? form.Text;
            form.messageLabel.MaximumSize = new Size(form.panel3.Size.Width, 0);
            form.messageLabel.Text        = message;
            form.pictureBox1.Image        = icon ?? Resources.sign_info;

            form.buttons = buttons ?? new Button[] { Button.OK };
            System.Windows.Forms.Button[] formButtons = new System.Windows.Forms.Button[] { form.button1, form.button2, form.button3 };
            for (int i = 0; i < form.buttons.Length; ++i)
            {
                formButtons[i].Text = Resources.ResourceManager.GetString(form.buttons[i].ToString());
            }
            switch (form.buttons.Length)
            {
            default:
                throw new NotSupportedException();

            case 1:
                formButtons[0].Left    = formButtons[2].Left;
                formButtons[1].Visible = false;
                formButtons[2].Visible = false;
                break;

            case 2:
                formButtons[0].Left    = formButtons[1].Left;
                formButtons[1].Left    = formButtons[2].Left;
                formButtons[2].Visible = false;
                break;

            case 3:
                break;
            }
            formButtons[(int)defaultButton].Select();

            return(form);
        }
コード例 #19
0
        internal MessageBoxX(string message, string caption, MessageBoxButton button, MessageBoxIcon icon, DefaultButton defaultButton, MessageBoxButtonArrangement buttonArrangement, bool isEscEnabled, Window owner, object yesButton, object noButton, object cancelButton, object okButton)
        {
            Message = message;
            if (!string.IsNullOrEmpty(caption))
            {
                Title = caption;
            }

            _yesButtonContent    = yesButton;
            _noButtonContent     = noButton;
            _okButtonContent     = okButton;
            _cancelButtonContent = cancelButton;

            _messageBoxButton = button;
            _defaultButton    = defaultButton;
            _isEscEnabled     = isEscEnabled;

            MessageBoxIcon    = icon;
            ButtonArrangement = buttonArrangement;

            if (owner != null)
            {
                Owner = owner;
                WindowStartupLocation = WindowStartupLocation.CenterOwner;
            }
            else
            {
                WindowStartupLocation = WindowStartupLocation.CenterScreen;
            }
        }
コード例 #20
0
ファイル: MessageForm.cs プロジェクト: shinji257/hakchi2
 public static Button Show(Form hostForm, string title, string message, Image icon = null, Button[] buttons = null, DefaultButton defaultButton = DefaultButton.Button1)
 {
     if (hostForm.Disposing)
     {
         return(Button.Undefined);
     }
     if (hostForm.InvokeRequired)
     {
         return((Button)hostForm.Invoke(new Func <Form, string, string, Image, Button[], DefaultButton, Button>(Show), new object[] { hostForm, title, message, icon, buttons, defaultButton }));
     }
     return(Show(title, message, icon, buttons, defaultButton));
 }
コード例 #21
0
ファイル: InputPad.cs プロジェクト: developer119korea/sudoku
 private void CreateDoActioButton()
 {
     _undoButton = InstantiateBasicButton("Undo", this.transform, new Vector3(-350.0f, -200.0f, 0.0f), Quaternion.identity, Vector3.one);
     _redoButton = InstantiateBasicButton("Redo", this.transform, new Vector3(350.0f, -200.0f, 0.0f), Quaternion.identity, Vector3.one);
 }
コード例 #22
0
 /// <summary>
 /// Open a message box and return the result selected by the user.
 /// </summary>
 /// <param name="message">Text to display.</param>
 /// <param name="caption">The title of message box.</param>
 /// <param name="button">The group of buttons to display in the message box.</param>
 /// <param name="icon">Large icon displayed on the left side of the message box.</param>
 /// <param name="defaultButton">The default button. Buttons set as default will be highlighted.</param>
 public static MessageBoxResult Show(string message, string caption, MessageBoxButton button, MessageBoxIcon icon, DefaultButton defaultButton)
 {
     return(CallMessageBoxXWindow(null, message, caption, button, icon, defaultButton, null));
 }
コード例 #23
0
        private static MessageBoxResult CallMessageBoxXWindow(Window owner, string message, string caption, MessageBoxButton button, MessageBoxIcon icon, DefaultButton defaultButton, MessageBoxXSetting setting)
        {
            var window       = new MessageBoxXWindow(message, caption, button, icon, defaultButton, owner, setting ?? MessageBoxXSettings.Setting);
            var dialogResult = window.ShowDialog();

            switch (dialogResult)
            {
            case true:
                return((button == MessageBoxButton.YesNo || button == MessageBoxButton.YesNoCancel)
                        ? MessageBoxResult.Yes
                        : MessageBoxResult.OK);

            case false:
                return(MessageBoxResult.No);

            default:
                return(MessageBoxResult.Cancel);
            }
        }
コード例 #24
0
ファイル: DontShowAgainDialog.cs プロジェクト: TerabyteX/main
        /// <summary>
        /// Launches a DontShowAgainDialog if it is needed.
        /// </summary>
        /// <param name="serviceProvider">An associated serviceprovider.</param>
        /// <param name="messageText">The text the dilaog box will contain.</param>
        /// <param name="helpTopic">The associated help topic.</param>
        /// <param name="button">The default button.</param>
        /// <param name="registryKey">The registry key that serves for persisting the not show again value.</param>
        /// <returns>A Dialog result.</returns>
        internal static DialogResult LaunchDontShowAgainDialog(IServiceProvider serviceProvider, string messageText, string helpTopic, DefaultButton button, string registryKey)
        {
            if(String.IsNullOrEmpty(registryKey))
            {
                throw new ArgumentException(SR.GetString(SR.ParameterCannotBeNullOrEmpty, CultureInfo.CurrentUICulture), "registryKey");
            }

            DialogResult result = DialogResult.OK;

            bool dontShowAgain = ReadDontShowAgainValue(registryKey);

            if(!dontShowAgain)
            {
                DontShowAgainDialog dialog = new DontShowAgainDialog(serviceProvider, messageText, helpTopic, button);
                result = dialog.ShowDialog();

                // Now write to the registry the value.
                if(dialog.DontShowAgainValue)
                {
                    WriteDontShowAgainValue(registryKey, 1);
                }
            }

            return result;
        }
コード例 #25
0
        internal MessageBoxXWindow(string message, string caption, MessageBoxButton button, MessageBoxIcon icon, DefaultButton defaultButton, Window owner, MessageBoxXSettings settings)
        {
            _message = message;
            if (!string.IsNullOrEmpty(caption))
            {
                Title = caption;
            }

            _yesButtonContent    = settings.YesButton;
            _noButtonContent     = settings.NoButton;
            _okButtonContent     = settings.OKButton;
            _cancelButtonContent = settings.CancelButton;

            _messageBoxButton = button;
            CanClose          = button != MessageBoxButton.YesNo;

            _defaultButton = defaultButton;
            _isEscEnabled  = settings.IsEscEnabled;

            _icon = icon;
            _buttonArrangement = settings.ButtonArrangement;

            if (owner != null)
            {
                Owner = owner;
                WindowStartupLocation = WindowStartupLocation.CenterOwner;
            }
            else
            {
                WindowStartupLocation = WindowStartupLocation.CenterScreen;
            }
        }
コード例 #26
0
 /// <summary>
 /// Open a message box and return the result selected by the user.
 /// </summary>
 /// <param name="owner">The owner of message box.</param>
 /// <param name="message">Text to display.</param>
 /// <param name="caption">The title of message box.</param>
 /// <param name="button">The group of buttons to display in the message box.</param>
 /// <param name="icon">Large icon displayed on the left side of the message box.</param>
 /// <param name="defaultButton">The default button. Buttons set as default will be highlighted.</param>
 public static MessageBoxResult Show(Window owner, string message, string caption, MessageBoxButton button, MessageBoxIcon icon, DefaultButton defaultButton, MessageBoxXSetting setting)
 {
     return(CallMessageBoxXWindow(owner, message, caption, button, icon, defaultButton, setting));
 }
コード例 #27
0
        /// <summary>
        /// Launches a FileOverwriteDialog.
        /// </summary>
        /// <param name="serviceProvider">An associated serviceprovider.</param>
        /// <param name="messageText">The text the dialog box will contain.</param>
        /// <param name="title">The title of the dialog.</param>
        /// <param name="helpTopic">The associated help topic.</param>
        /// <param name="button">The default button.</param>
        /// <param name="applyAllValue">The value of the apply all checkbox.</param>
        /// <returns>A Dialog result.</returns>
        internal static DialogResult LaunchFileOverwriteDialog(IServiceProvider serviceProvider, string messageText, string title, string helpTopic, DefaultButton button, out bool applyAllValue)
        {
            DialogResult result = DialogResult.Yes;

            FileOverwriteDialog dialog = new FileOverwriteDialog(serviceProvider, messageText, title, helpTopic, button);

            result        = dialog.ShowDialog();
            applyAllValue = dialog.ApplyToAllValue;

            return(result);
        }
コード例 #28
0
 public MessageForm(Form parent, string text, string caption, Buttons buttons, BoxIcon icon, DefaultButton defaultButton, bool centerScreen, bool displayHelpButton, int maxWidth) : this(parent, text, caption, buttons, icon, defaultButton, centerScreen, displayHelpButton, maxWidth, false)
 {
 }
コード例 #29
0
        /// <summary>
        /// Overloaded constructor
        /// </summary>
        /// <param name="serviceProvider">The associated service provider.</param>
        /// <param name="messageText">Thetext to be shown on the dialog</param>
        /// <param name="title">The title of the dialog</param>
        /// <param name="helpTopic">The associated help topic</param>
        /// <param name="button">The default button</param>
        internal FileOverwriteDialog(IServiceProvider serviceProvider, string messageText, string title, string helpTopic, DefaultButton button)
        {
            if (serviceProvider == null)
            {
                throw new ArgumentNullException("serviceProvider");
            }

            this.serviceProvider = serviceProvider;
            this.InitializeComponent();

            if (button == DefaultButton.Yes)
            {
                this.AcceptButton = this.yesButton;
            }
            else
            {
                this.AcceptButton = this.cancelButton;
            }

            this.Text = title;
            this.SetupComponents(messageText, helpTopic);
        }
コード例 #30
0
        public MessageForm(Form parent, string text, string caption, Buttons buttons, BoxIcon icon, DefaultButton defaultButton, bool centerScreen, bool displayHelpButton, int maxWidth, bool noWrap)
        {
            this.parent        = parent;
            this.text          = text;
            this.caption       = caption;
            this.buttons       = buttons;
            this.icon          = icon;
            this.defaultButton = defaultButton;
            StartPosition      = centerScreen ? FormStartPosition.CenterScreen : FormStartPosition.CenterParent;
            HelpButton         = displayHelpButton;
            this.maxWidth      = (maxWidth > 0 ? maxWidth : defaultWidth) - 20;
            this.noWrap        = noWrap;

            InitializeComponent();

            SetCaption();
            SetButtons();
            SetIcon();
            SetText();

            label.ContextMenu = new ContextMenu();
            label.ContextMenu.MenuItems.Add(new MenuItem(Properties.Resources.MenuItemCopy, new EventHandler(Copy)));
        }
コード例 #31
0
ファイル: fileoverwritedialog.cs プロジェクト: Jeremiahf/wix3
        /// <summary>
        /// Launches a FileOverwriteDialog.
        /// </summary>
        /// <param name="serviceProvider">An associated serviceprovider.</param>
        /// <param name="messageText">The text the dialog box will contain.</param>
        /// <param name="title">The title of the dialog.</param>
        /// <param name="helpTopic">The associated help topic.</param>
        /// <param name="button">The default button.</param>
        /// <param name="applyAllValue">The value of the apply all checkbox.</param>
        /// <returns>A Dialog result.</returns>
        internal static DialogResult LaunchFileOverwriteDialog(IServiceProvider serviceProvider, string messageText, string title, string helpTopic, DefaultButton button, out bool applyAllValue)
        {
            DialogResult result = DialogResult.Yes;

            FileOverwriteDialog dialog = new FileOverwriteDialog(serviceProvider, messageText, title, helpTopic, button);
            result = dialog.ShowDialog();
            applyAllValue = dialog.ApplyToAllValue;

            return result;
        }
コード例 #32
0
ファイル: InputPad.cs プロジェクト: developer119korea/sudoku
 private void CreateMemoButton()
 {
     _memoButton = InstantiateBasicButton("Memo", this.transform, new Vector3(-480.0f, -200.0f, 0.0f), Quaternion.identity, Vector3.one);
 }
コード例 #33
0
        public LoginPage()
        {
            NavigationPage.SetHasNavigationBar(this, false);

            // Status bar for iOS.
            var statusBar = new BoxView();

            if (Device.OS == TargetPlatform.iOS)
            {
                statusBar.BackgroundColor = StyleManager.DarkAccentColor;
                statusBar.HeightRequest   = 20;
            }

            // Application title & subtitle.
            var titleString = new FormattedString();

            titleString.Spans.Add(new Span {
                ForegroundColor = StyleManager.AccentColor, FontAttributes = FontAttributes.Italic, FontSize = 40, Text = "Todo "
            });
            titleString.Spans.Add(new Span {
                ForegroundColor = StyleManager.DarkAccentColor, FontAttributes = FontAttributes.Italic, FontSize = 32, Text = "app"
            });
            var title = new DefaultLabel {
                FormattedText = titleString, HorizontalOptions = LayoutOptions.Center
            };

            var subtitle = new ItalicLabel {
                Text = "Helping you doing everything", TextColor = StyleManager.AccentColor
            };

            var titleLayout = new StackLayout {
                Children = { title, subtitle },
                Spacing  = 2,
                Padding  = new Thickness(0, 30)
            };

            // Start layout (down arrow).
            var login = new ItalicLabel {
                Text = "Log in", CustomFontSize = NamedSize.Medium
            };
            var downArrow = new Image {
                Source        = "down_button.png",
                HeightRequest = 60
            };
            var startLayout = new StackLayout {
                Padding  = new Thickness(0, 100),
                Spacing  = 18,
                Children = { login, downArrow }
            };

            // Login layout.
            emailTextBox = new DefaultEntry {
                Placeholder = "Email"
            };
            passwordTextBox = new DefaultEntry {
                Placeholder = "Password", IsPassword = true
            };
            var entryLayout = new StackLayout {
                Spacing  = 15,
                Children = { emailTextBox, passwordTextBox }
            };

            submitButton = new DefaultButton {
                Command = new Command(Submit)
            };
            signUpString = new FormattedString();
            signUpString.Spans.Add(new Span {
                ForegroundColor = StyleManager.AccentColor, FontAttributes = FontAttributes.Italic
            });
            signUpString.Spans.Add(new Span {
                ForegroundColor = StyleManager.DarkAccentColor, FontAttributes = FontAttributes.Bold
            });
            var toggleModeLabel = new DefaultLabel {
                FormattedText = signUpString, HorizontalOptions = LayoutOptions.Center
            };

            var signInLayout = new StackLayout {
                Padding  = new Thickness(0, 20),
                Spacing  = 30,
                Children = { submitButton, toggleModeLabel }
            };

            var loginLayout = new StackLayout {
                Padding   = new Thickness(0, 35),
                Children  = { entryLayout, signInLayout },
                IsVisible = false
            };

            downArrow.GestureRecognizers.Add(new TapGestureRecognizer {
                Command = new Command(() => {
                    loginLayout.IsVisible = true;
                    startLayout.IsVisible = false;
                })
            });

            var toggleModeGestureRecognizer = new TapGestureRecognizer();

            toggleModeGestureRecognizer.Tapped += (sender, ev) => toggleMode();
            toggleModeLabel.GestureRecognizers.Add(toggleModeGestureRecognizer);

            // Main content layout.
            var contentLayout = new StackLayout {
                Padding           = 25,
                HorizontalOptions = LayoutOptions.Center,
                Children          =
                {
                    titleLayout,
                    startLayout,
                    loginLayout
                }
            };

            Content = new StackLayout {
                Children = { statusBar, contentLayout }
            };

            setLoginMode();
        }
コード例 #34
0
ファイル: DefaultButtonManager.cs プロジェクト: anam/gp-HO
 public static bool UpdateDefaultButton(DefaultButton defaultButton)
 {
     SqlDefaultButtonProvider sqlDefaultButtonProvider = new SqlDefaultButtonProvider();
     return sqlDefaultButtonProvider.UpdateDefaultButton(defaultButton);
 }
コード例 #35
0
ファイル: DefaultButtonManager.cs プロジェクト: iebbd/org
    public static int InsertDefaultButton(DefaultButton defaultButton)
    {
        SqlDefaultButtonProvider sqlDefaultButtonProvider = new SqlDefaultButtonProvider();

        return(sqlDefaultButtonProvider.InsertDefaultButton(defaultButton));
    }
コード例 #36
0
ファイル: InputPad.cs プロジェクト: developer119korea/sudoku
 private void CreateQuitButton()
 {
     _quitButton = InstantiateBasicButton("Quit", this.transform, new Vector3(0.0f, -300.0f, 0.0f), Quaternion.identity, Vector3.one);
 }
コード例 #37
0
ファイル: DefaultButtonManager.cs プロジェクト: iebbd/org
    public static bool UpdateDefaultButton(DefaultButton defaultButton)
    {
        SqlDefaultButtonProvider sqlDefaultButtonProvider = new SqlDefaultButtonProvider();

        return(sqlDefaultButtonProvider.UpdateDefaultButton(defaultButton));
    }
コード例 #38
0
    public int InsertDefaultButton(DefaultButton defaultButton)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("Login_InsertDefaultButton", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@DefaultButtonID", SqlDbType.Int).Direction = ParameterDirection.Output;
            cmd.Parameters.Add("@DefaultButtonName", SqlDbType.NVarChar).Value = defaultButton.DefaultButtonName;
            cmd.Parameters.Add("@DefaultButtonText", SqlDbType.NVarChar).Value = defaultButton.DefaultButtonText;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return (int)cmd.Parameters["@DefaultButtonID"].Value;
        }
    }
コード例 #39
0
 public MessageForm(string text, string caption, Buttons buttons, BoxIcon icon, DefaultButton defaultButton) : this(null, text, caption, buttons, icon, defaultButton, false, false, 0, false)
 {
 }
コード例 #40
0
 /// <summary>
 /// Open a message box and return the result selected by the user.
 /// </summary>
 /// <param name="owner">The owner of message box.</param>
 /// <param name="text">Text to display.</param>
 /// <param name="caption">The title of message box.</param>
 /// <param name="button">The group of buttons to display in the message box.</param>
 /// <param name="icon">Large icon displayed on the left side of the message box.</param>
 /// <param name="defaultButton">The default button. Buttons set as default will be highlighted.</param>
 public static MessageBoxResult Show(Window owner, string text, string caption, MessageBoxButton button, MessageBoxIcon icon, DefaultButton defaultButton)
 {
     return(CallMessageBox(owner, text, caption, button, icon, defaultButton));
 }
コード例 #41
0
 public MessageForm(Form parent, string text, string caption, Buttons buttons, BoxIcon icon, DefaultButton defaultButton, bool centerScreen) : this(parent, text, caption, buttons, icon, defaultButton, centerScreen, false, 0, false)
 {
 }
コード例 #42
0
        public SettingsPage()
        {
            SuspendLayout();
            TBLayout.SuspendLayout();
            ContentSettings.SuspendLayout();
            ((ISupportInitialize)(BlueTrackBar)).BeginInit();
            ((ISupportInitialize)(GreenTrackBar)).BeginInit();
            ((ISupportInitialize)(RedTrackBar)).BeginInit();

            Controls.Add(TBLayout);
            Controls.Add(ContentSettings);
            Name = "SettingsPage";

            RedTextBox.AddColor1();
            RedTextBox.ValueChanged += new EventHandler(RedChanged);
            GreenTextBox.AddColor1();
            GreenTextBox.ValueChanged += new EventHandler(GreenChanged);
            BlueTextBox.AddColor1();
            BlueTextBox.ValueChanged += new EventHandler(BlueChanged);
            ButtonAccept.AddColor1();
            ButtonAccept.Click += new EventHandler(AcceptChange);
            ButtonCancel.AddColor1();
            ButtonCancel.Click += new EventHandler(CancelChange);
            DefaultButton.AddColor1();
            DefaultButton.Click                  += new EventHandler(ChangeDefault);
            BlueTrackBar.Scroll                  += new EventHandler(BlueTrack_Scroll);
            RedTrackBar.Scroll                   += new EventHandler(RedTrack_Scroll);
            GreenTrackBar.Scroll                 += new EventHandler(GreenTrack_Scroll);
            CheckToolTip.CheckedChanged          += new EventHandler(SetCheckedToolTip);
            CheckEventLog.CheckedChanged         += new EventHandler(SetCheckEventLog);
            DefaultButton.UseVisualStyleBackColor = false;

            // TBLayout
            TBLayout.ColumnCount = 3;
            TBLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.33333F));
            TBLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.33333F));
            TBLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.33333F));
            TBLayout.Controls.Add(ButtonCancel, 1, 0);
            TBLayout.Controls.Add(DefaultButton, 0, 0);
            TBLayout.Controls.Add(ButtonAccept, 2, 0);
            TBLayout.Location = new Point(58, 479);
            TBLayout.Margin   = new Padding(0, 0, 0, 7);
            TBLayout.Name     = "TBLayout";
            TBLayout.RowCount = 1;
            TBLayout.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
            TBLayout.Size     = new Size(422, 35);
            TBLayout.TabIndex = 1;
            //
            // ContentSettings
            ContentSettings.AutoScroll = true;
            ContentSettings.HorizontalScroll.Enabled = false;
            ContentSettings.Controls.Add(BlueTextBox);
            ContentSettings.Controls.Add(GreenTextBox);
            ContentSettings.Controls.Add(RedTextBox);
            ContentSettings.Controls.Add(BlueLabel);
            ContentSettings.Controls.Add(GreenLabel);
            ContentSettings.Controls.Add(RedLabel);
            ContentSettings.Controls.Add(BlueTrackBar);
            ContentSettings.Controls.Add(GreenTrackBar);
            ContentSettings.Controls.Add(RedTrackBar);
            ContentSettings.Controls.Add(EditColor);
            ContentSettings.Controls.Add(ColorDefault);
            ContentSettings.Controls.Add(TitleChangeColor);
            ContentSettings.Controls.Add(CheckToolTip);
            ContentSettings.Controls.Add(CheckEventLog);
            ContentSettings.Location  = new Point(7, 7);
            ContentSettings.Margin    = new Padding(7);
            ContentSettings.Name      = "ContentSettings";
            ContentSettings.Size      = new Size(473, 465);
            ContentSettings.TabIndex  = 0;
            ContentSettings.BackColor = RedGreenBlue.Color1;

            ResumeLayout(false);
            TBLayout.ResumeLayout(false);
            ContentSettings.ResumeLayout(false);
            ContentSettings.PerformLayout();
            ((ISupportInitialize)(BlueTrackBar)).EndInit();
            ((ISupportInitialize)(GreenTrackBar)).EndInit();
            ((ISupportInitialize)(RedTrackBar)).EndInit();
        }
コード例 #43
0
 /// <summary>
 /// Open a message box and return the result selected by the user.
 /// </summary>
 /// <param name="owner">The owner of message box.</param>
 /// <param name="message">Text to display.</param>
 /// <param name="caption">The title of message box.</param>
 /// <param name="icon">Large icon displayed on the left side of the message box.</param>
 /// <param name="defaultButton">The default button. Buttons set as default will be highlighted.</param>
 public static MessageBoxResult Show(Window owner, string message, string caption, MessageBoxIcon icon, DefaultButton defaultButton)
 {
     return(CallMessageBoxXWindow(owner, message, caption, MessageBoxButton.OK, icon, defaultButton, null));
 }
コード例 #44
0
        /// <summary>
        /// Overloaded constructor
        /// </summary>
        /// <param name="serviceProvider">The associated service provider.</param>
        /// <param name="messageText">Thetext to be shown on the dialog</param>
        /// <param name="helpTopic">The associated help topic</param>
        /// <param name="button">The default button</param>
        internal DontShowAgainDialog(IServiceProvider serviceProvider, string messageText, string helpTopic, DefaultButton button)
        {
            if (serviceProvider == null)
            {
                throw new ArgumentNullException("serviceProvider");
            }

            this.serviceProvider = serviceProvider;
            this.InitializeComponent();

            if (button == DefaultButton.OK)
            {
                this.AcceptButton = this.okButton;
            }
            else
            {
                this.AcceptButton = this.cancelButton;
            }


            this.SetupComponents(messageText, helpTopic);
        }
コード例 #45
0
 public void Show(String strTitle, string strMessage, Buttons buttons, DefaultButton defaultbutton, MessageBoxIcon msbi)
 {
     MasterPage mPage = _page.Master;
     Label lblTitle = null;
     Label lblError = null;
     Button btn1 = null;
     Button btn2 = null;
     Button btn3 = null;
     Image imgIcon = null;
     
     lblTitle = ((Default)_page.Master).messageBoxTitle;
     lblError = ((Default)_page.Master).messageBoxMsg;
     btn1 = ((Default)_page.Master).button1;
     btn2 = ((Default)_page.Master).button2;
     btn3 = ((Default)_page.Master).button3;
     imgIcon = ((Default)_page.Master).messageBoxIcon;
     lblTitle.Text = strTitle;
     lblError.Text = strMessage;
     btn1.CssClass = "btn btn-default";
     btn2.CssClass = "btn btn-default";
     btn3.CssClass = "btn btn-default";
     switch (msbi)
     {
         case MessageBoxIcon.Asterisk:
             //imgIcon.ImageUrl = "~/img/asterisk.jpg";
             break;
         case MessageBoxIcon.Exclamation:
             //imgIcon.ImageUrl = "~/img/exclamation.jpg";
             break;
         case MessageBoxIcon.Hand:
             break;
         case MessageBoxIcon.Information:
             break;
         case MessageBoxIcon.None:
             break;
         case MessageBoxIcon.Question:
             break;
         case MessageBoxIcon.Warning:
             break;
     }
     switch (buttons)
     {
         case Buttons.AbortRetryIgnore:
             btn1.Text = "Abort";
             btn2.Text = "Retry";
             btn3.Text = "Ignore";
             btn1.Visible = true;
             btn2.Visible = true;
             btn3.Visible = true;
             
             break;
         case Buttons.OK:
             btn1.Text = "OK";
             btn1.Visible = true;
             btn2.Visible = false;
             btn3.Visible = false;
             break;
         case Buttons.OKCancel:
             btn1.Text = "OK";
             btn2.Text = "Cancel";
             btn1.Visible = true;
             btn2.Visible = true;
             btn3.Visible = false;
             break;
         case Buttons.RetryCancel:
             btn1.Text = "Retry";
             btn2.Text = "Cancel";
             btn1.Visible = true;
             btn2.Visible = true;
             btn3.Visible = false;
             break;
         case Buttons.YesNo:
             btn1.Text = "No";
             btn2.Text = "Yes";
             btn1.Visible = true;
             btn2.Visible = true;
             btn3.Visible = false;
             break;
         case Buttons.YesNoCancel:
             btn1.Text = "Yes";
             btn2.Text = "No";
             btn3.Text = "Cancel";
             btn1.Visible = true;
             btn2.Visible = true;
             btn3.Visible = true;
             break;
     }
     if (defaultbutton == DefaultButton.Button1)
     {
         btn1.CssClass = "btn btn-primary";
         btn2.CssClass = "btn btn-default";
         btn3.CssClass = "btn btn-default";
     }
     else if (defaultbutton == DefaultButton.Button2)
     {
         btn1.CssClass = "btn btn-default";
         btn2.CssClass = "btn btn-primary";
         btn3.CssClass = "btn btn-default";
     }
     else if (defaultbutton == DefaultButton.Button3)
     {
         btn1.CssClass = "btn btn-default";
         btn2.CssClass = "btn btn-default";
         btn3.CssClass = "btn btn-primary";
     }
     FirePopUp();
 }