private void ShowForm() { if (this.MainForm == null) { this.MainForm = new MainForm(ConfigSystem.GetSettingPort()); (this.MainForm as MainForm).SetSize(ConfigSystem.GetWIndowSize()); } (this.MainForm as MainForm).Booting(); }
private void GetSetting(WSNode node) { var obj = new { Port = ConfigSystem.GetSettingPort(), Size = ConfigSystem.GetWIndowSize(), Start = ConfigSystem.GetWindowStart() }; String json = JsonConvert.SerializeObject(obj); node.Data = json; }
private void SetSetting(WSNode node) { var data = JsonConvert.DeserializeObject <Dictionary <String, String> >(node.Data); foreach (var n in data) { ConfigSystem.WriteConfig("Config", "Setting", n.Key, n.Value); } if (this.context.MainForm != null) { (this.context.MainForm as MainForm).SetSize(ConfigSystem.GetWIndowSize()); } }