コード例 #1
0
        private void getNodeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (_AppClient != null)
            {
                AppTestGenericInputForm aInput = new AppTestGenericInputForm();
                aInput.Text = "Get Node";
                aInput.SetItems(1);
                aInput.SetPrompt(0, "Index:");

                if (aInput.ShowDialog() == DialogResult.OK)
                {
                    int aIndex = 0;
                    if (int.TryParse(aInput.GetValue(0), out aIndex))
                    {
                        ANodeInfo aNodeInfo = null;
                        string    aDetails  = "null";

                        AppendToOutput("Get Node", true);
                        aNodeInfo = _AppClient.GetNode(aIndex);

                        if (aNodeInfo != null)
                        {
                            aDetails = string.Format("Date: {0}\nSize: {1}\nSymbol: {2}\nTime: {3}\n Type: {4}\nUnique Key: {5}\nValue: {6}\nVersion: {7}",
                                                     aNodeInfo.Date, aNodeInfo.Size, aNodeInfo.Symbol, aNodeInfo.Time, aNodeInfo.Type, aNodeInfo.UniqueKey, aNodeInfo.Value, aNodeInfo.Version);
                        }

                        AppendToOutput(aDetails, true);
                    }
                }
            }
        }