示例#1
0
文件: Form1.cs 项目: SJSMP/Sjsmp-.Net
 private void refreshPropertiesButton_Click(object sender, EventArgs e)
 {
     if (m_adapter != null)
     {
         m_adapter.RefreshPropertyValues();
     }
 }
示例#2
0
文件: Form1.cs 项目: SJSMP/Sjsmp-.Net
 private void connectButton_Click(object sender, EventArgs e)
 {
     m_adapter = new SchemaAdapter(m_properites.connectionUrl, new ClientAuth(m_properites.user, m_properites.password));
     m_adapter.JsonReceivedEvent += (jObj) => { richTextBox1.Text = jObj.ToString(); };
     m_adapter.ActionResultEvent += (objectName, actionName, resultToken) => MessageBox.Show(resultToken != null? resultToken.ToString() : "null", objectName + "." + actionName + "()");
     //http://stackoverflow.com/a/10130126/376066 - need to do this manually (
     m_adapter.PropertyChanged   += (pcSender, pcE) => propertyGrid1.Refresh();
     propertyGrid1.SelectedObject = m_adapter;
     m_adapter.RefreshSchema();
     m_adapter.RefreshPropertyValues();
     schemaTimer.Enabled     = true;
     propertiesTimer.Enabled = true;
 }