예제 #1
0
        void data_DoubleClick(object sender, EventArgs e)
        {
            Control      ctrl         = sender as Control;
            PluginResult pluginResult = ctrl.Tag as PluginResult;

            if (sender is PictureEdit)
            {
                if (_propertyName == "FrontCoverPath")
                {
                    _title.FrontCoverPath = (string)pluginResult.Value;
                }
                else
                {
                    _title.BackCoverPath = (string)pluginResult.Value;
                }
            }
            else
            {
                _propertyInfo.SetValue(_title, pluginResult.Value, null);
            }
            if (cbDefault.Checked)
            {
                OMLEngine.Dao.MataDataMapping mapping = new OMLEngine.Dao.MataDataMapping();
                mapping.MatadataProperty = _propertyName;
                mapping.MetadataProvider = pluginResult.PluginName;
                OMLEngine.Settings.SettingsManager.MetaDataMap_Add(mapping);
            }
            DialogResult = DialogResult.OK;
        }
예제 #2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            OMLEngine.Settings.SettingsManager.MetaDataMap_Clear();

            Control[] controls;
            int       i = 0;

            while ((controls = tableLayoutPanel1.Controls.Find("lblProperty" + i, false)).Length != 0)
            {
                LabelControl lblProperty = controls[0] as LabelControl;

                ComboBoxEdit cbeMapping = tableLayoutPanel1.Controls.Find("cbeMapping" + i, false)[0] as ComboBoxEdit;

                if (cbeMapping.Text != "")
                {
                    OMLEngine.Dao.MataDataMapping map = new OMLEngine.Dao.MataDataMapping();
                    map.MatadataProperty = lblProperty.Text;
                    map.MetadataProvider = cbeMapping.Text;
                    OMLEngine.Settings.SettingsManager.MetaDataMap_Add(map);
                }

                i++;
            }
            //SettingsManager.Save();
        }
예제 #3
0
 void data_DoubleClick(object sender, EventArgs e)
 {
     Control ctrl = sender as Control;
     PluginResult pluginResult = ctrl.Tag as PluginResult;
     if (sender is PictureEdit)
     {
         if (_propertyName == "FrontCoverPath")
             _title.FrontCoverPath = (string)pluginResult.Value;
         else
             _title.BackCoverPath = (string)pluginResult.Value;
     }
     else
         _propertyInfo.SetValue(_title, pluginResult.Value, null);
     if (cbDefault.Checked)
     {
         OMLEngine.Dao.MataDataMapping mapping = new OMLEngine.Dao.MataDataMapping();
         mapping.MatadataProperty = _propertyName;
         mapping.MetadataProvider = pluginResult.PluginName;
         OMLEngine.Settings.SettingsManager.MetaDataMap_Add(mapping);
     }
     DialogResult = DialogResult.OK;
 }
예제 #4
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            OMLEngine.Settings.SettingsManager.MetaDataMap_Clear();

            Control[] controls;
            int i = 0;
            while ( (controls = tableLayoutPanel1.Controls.Find("lblProperty" + i, false)).Length != 0)
            {
                LabelControl lblProperty = controls[0] as LabelControl;

                ComboBoxEdit cbeMapping = tableLayoutPanel1.Controls.Find("cbeMapping" + i, false)[0] as ComboBoxEdit;

                if (cbeMapping.Text != "")
                {
                    OMLEngine.Dao.MataDataMapping map = new OMLEngine.Dao.MataDataMapping();
                    map.MatadataProperty = lblProperty.Text;
                    map.MetadataProvider = cbeMapping.Text;
                    OMLEngine.Settings.SettingsManager.MetaDataMap_Add(map);
                }

                i++;
            }
            //SettingsManager.Save();
        }