Пример #1
0
 /// <summary>
 /// Loads the plugin settings
 /// </summary>
 public void LoadSettings()
 {
     this.settingObject = new Settings();
     if (!File.Exists(this.settingFilename))
         this.SaveSettings();
     else
     {
         Object obj = ObjectSerializer.Deserialize(this.settingFilename, this.settingObject);
         this.settingObject = (Settings)obj;
     }
 }
Пример #2
0
        /// <summary>
        /// 窗体显示完毕之后刷新Combox的数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void NewNodeForm_Shown(object sender, EventArgs e)
        {
            if (pluginMain != null)
            {
                setting = (Settings)pluginMain.Settings;
                cmbComType.Items.Clear();

                foreach (ComSkin skin in setting.SkinList)
                {
                    cmbComType.Items.Add(skin.Name);
                }
                //默认选中第一个
                if (cmbComType.Items.Count > 0)
                {
                    cmbComType.SelectedIndex = 0;
                    setSkinLayer(setting.SkinList[0]);
                }
            }
        }