예제 #1
0
        private void AsyncCallback(ESGI.Entity.Interfaces.IContainer container)
        {
            KryptonRibbonRecentDoc rDoc = new KryptonRibbonRecentDoc()
            {
                Text = container.Property("c_id").Get <String>(),
                Tag  = container
            };

            rDoc.Click += new EventHandler(ClickWork);

            kryptonRibbon.RibbonAppButton.AppButtonRecentDocs.Add(rDoc);
        }
예제 #2
0
        public void MajTape(Object sender, EventArgs e)
        {
            if (Logic.Instance.TICKER != null && Logic.Instance.TICKER.Length > 0)
            {
                this.Invoke((MethodInvoker) delegate
                {
                    try
                    {
                        String ticker = Logic.Instance.TICKER[(int)new Random().Next(0, Logic.Instance.TICKER.Length)];
                        ESGI.Entity.Interfaces.IContainer container = Logic.Instance.Execute(
                            ticker,
                            OPERATIONS.STOCK);

                        kryptonRibbonGroupTextBox3.Clear();
                        kryptonRibbonGroupTextBox3.Text = String.Format("{0}:{1}", ticker, container.Property(ticker).
                                                                        Get <ESGI.Entity.Interfaces.IContainer>().
                                                                        Property("Ask").Get <String>());
                    }
                    catch (Exception ex)
                    {
                        kryptonRibbonGroupTextBox3.Text = "Service unavailable";
                    }
                });
            }
        }