Exemplo n.º 1
0
        void setoff(string click)
        {
            if (!isValid)
            {
                return;
            }
            var syms = getselectedsymbols();

            if (syms.Count < 1)
            {
                status(click + " requires you to select a symbol from grid.");
                return;
            }
            // get symbol
            var sym = syms[0];

            // get name
            click = click.Replace(SETOFF, string.Empty);
            // get message
            var set = new MessageSETUSER(sym, click, false);
            // send on message
            string tmp = string.Empty;

            response.GotMessage(MessageTypes.SENDUSERSET, 0, 0, 0, Util.Serialize <MessageSETUSER>(set, debug), ref tmp);
            status("Sent: " + set.ToString() + " to " + ResponseName);
            debug("User Sent: " + set.ToString() + " to " + ResponseName);
        }
Exemplo n.º 2
0
        void seton(string click)
        {
            if (!isValid)
            {
                return;
            }
            var syms = getselectedsymbols();

            if (syms.Count < 1)
            {
                status(click + " requires you to select a symbol from grid.");
                return;
            }

            // get symbol
            var sym = syms[0];

            // confirm
            if (isUserSetsConfirmed && (System.Windows.Forms.MessageBox.Show("Do you want to '" + click + "' for " + sym + " on " + response.FullName + "?", "Confirm User Set", System.Windows.Forms.MessageBoxButtons.YesNoCancel) != System.Windows.Forms.DialogResult.Yes))
            {
                status("User canceled: " + click);
                return;
            }
            // get name
            click = click.Replace(SETON, string.Empty);
            // get message
            var set = new MessageSETUSER(sym, click, true);
            // send on message
            string tmp = string.Empty;

            response.GotMessage(MessageTypes.SENDUSERSET, 0, 0, 0, Util.Serialize <MessageSETUSER>(set, debug), ref tmp);
            status("Sent: " + set.ToString() + " to " + ResponseName);
            debug("User Sent: " + set.ToString() + " to " + ResponseName);
        }