Ejemplo n.º 1
0
        public MpeStringEditorForm(string currentValue, MpeParser parser, IWindowsFormsEditorService editorService)
        {
            SetStyle(ControlStyles.DoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            InitializeComponent();
            Height               = 184;
            propPanel.Location   = simplePanel.Location;
            propPanel.Size       = simplePanel.Size;
            stringPanel.Location = simplePanel.Location;
            stringPanel.Size     = simplePanel.Size;
            propPanel.Visible    = false;
            stringPanel.Visible  = false;
            simpleTextbox.Text   = currentValue;
            if (properties == null)
            {
                properties = new ArrayList();
                properties.Add("itemcount");
                properties.Add("selecteditem");
                properties.Add("selecteditem2");
                properties.Add("selectedthumb");
                properties.Add("title");
                properties.Add("artist");
                properties.Add("album");
                properties.Add("track");
                properties.Add("year");
                properties.Add("comment");
                properties.Add("director");
                properties.Add("genre");
                properties.Add("cast");
                properties.Add("dvdlabel");
                properties.Add("imdbnumber");
                properties.Add("file");
                properties.Add("plot");
                properties.Add("plotoutline");
                properties.Add("rating");
                properties.Add("tagline");
                properties.Add("votes");
                properties.Add("credits");
                properties.Add("thumb");
                properties.Add("currentplaytime");
                properties.Add("shortcurrentplaytime");
                properties.Add("duration");
                properties.Add("shortduration");
                properties.Add("playlogo");
                properties.Add("playspeed");
                properties.Add("percentage");
                properties.Add("currentmodule");
                properties.Add("channel");
                properties.Add("TV.start");
                properties.Add("TV.stop");
                properties.Add("TV.current");
                properties.Add("TV.Record.channel");
                properties.Add("TV.Record.start");
                properties.Add("TV.Record.stop");
                properties.Add("TV.Record.genre");
                properties.Add("TV.Record.title");
                properties.Add("TV.Record.description");
                properties.Add("TV.Record.thumb");
                properties.Add("TV.View.channel");
                properties.Add("TV.View.thumb");
                properties.Add("TV.View.start");
                properties.Add("TV.View.stop");
                properties.Add("TV.View.genre");
                properties.Add("TV.View.title");
                properties.Add("TV.View.description");
                properties.Add("TV.View.Percentage");
                properties.Add("TV.Guide.Day");
                properties.Add("TV.Guide.thumb");
                properties.Add("TV.Guide.Title");
                properties.Add("TV.Guide.Time");
                properties.Add("TV.Guide.Duration");
                properties.Add("TV.Guide.TimeFromNow");
                properties.Add("TV.Guide.Description");
                properties.Add("TV.Guide.Genre");
                properties.Add("TV.Guide.EpisodeName");
                properties.Add("TV.Guide.SeriesNumber");
                properties.Add("TV.Guide.EpisodeNumber");
                properties.Add("TV.Guide.EpisodePart");
                properties.Add("TV.Guide.EpisodeDetail");
                properties.Add("TV.Guide.Date");
                properties.Add("TV.Guide.StarRating");
                properties.Add("TV.Guide.Classification");
                properties.Add("TV.RecordedTV.Title");
                properties.Add("TV.RecordedTV.Time");
                properties.Add("TV.RecordedTV.Description");
                properties.Add("TV.RecordedTV.thumb");
                properties.Add("TV.RecordedTV.Genre");
                properties.Add("TV.Scheduled.Title");
                properties.Add("TV.Scheduled.Time");
                properties.Add("TV.Scheduled.Description");
                properties.Add("TV.Scheduled.thumb");
                properties.Add("TV.Scheduled.Genre");
                properties.Add("TV.Search.Title");
                properties.Add("TV.Search.Time");
                properties.Add("TV.Search.Description");
                properties.Add("TV.Search.thumb");
                properties.Add("TV.Search.Genre");
            }
            this.editorService = editorService;
            MpeStringTable table = parser.GetStringTable("English");

            int[]        keys = table.Keys;
            ListViewItem sel  = null;

            for (int i = 0; i < keys.Length; i++)
            {
                string s = table[keys[i]];
                //ListViewItem item = stringList.Items.Add(s);
                ListViewItem item = stringList.Items.Add(keys[i].ToString("D6"));
                item.Tag = keys[i];
                //item.SubItems.Add(keys[i].ToString("D6"));
                item.SubItems.Add(s);
                if (currentValue.Equals(keys[i].ToString()))
                {
                    item.Selected = true;
                    sel           = item;
                }
            }
            if (sel != null)
            {
                MpeLog.Debug("Is the selected string visible?");
                sel.EnsureVisible();
            }
            propertyList.DataSource = properties;
        }
Ejemplo n.º 2
0
 public MpeStringEditorForm(string currentValue, MpeParser parser, IWindowsFormsEditorService editorService)
 {
   SetStyle(ControlStyles.DoubleBuffer, true);
   SetStyle(ControlStyles.AllPaintingInWmPaint, true);
   InitializeComponent();
   Height = 184;
   propPanel.Location = simplePanel.Location;
   propPanel.Size = simplePanel.Size;
   stringPanel.Location = simplePanel.Location;
   stringPanel.Size = simplePanel.Size;
   propPanel.Visible = false;
   stringPanel.Visible = false;
   simpleTextbox.Text = currentValue;
   if (properties == null)
   {
     properties = new ArrayList();
     properties.Add("itemcount");
     properties.Add("selecteditem");
     properties.Add("selecteditem2");
     properties.Add("selectedthumb");
     properties.Add("title");
     properties.Add("artist");
     properties.Add("album");
     properties.Add("track");
     properties.Add("year");
     properties.Add("comment");
     properties.Add("director");
     properties.Add("genre");
     properties.Add("cast");
     properties.Add("dvdlabel");
     properties.Add("imdbnumber");
     properties.Add("file");
     properties.Add("plot");
     properties.Add("plotoutline");
     properties.Add("rating");
     properties.Add("tagline");
     properties.Add("votes");
     properties.Add("credits");
     properties.Add("thumb");
     properties.Add("currentplaytime");
     properties.Add("shortcurrentplaytime");
     properties.Add("duration");
     properties.Add("shortduration");
     properties.Add("playlogo");
     properties.Add("playspeed");
     properties.Add("percentage");
     properties.Add("currentmodule");
     properties.Add("channel");
     properties.Add("TV.start");
     properties.Add("TV.stop");
     properties.Add("TV.current");
     properties.Add("TV.Record.channel");
     properties.Add("TV.Record.start");
     properties.Add("TV.Record.stop");
     properties.Add("TV.Record.genre");
     properties.Add("TV.Record.title");
     properties.Add("TV.Record.description");
     properties.Add("TV.Record.thumb");
     properties.Add("TV.View.channel");
     properties.Add("TV.View.thumb");
     properties.Add("TV.View.start");
     properties.Add("TV.View.stop");
     properties.Add("TV.View.genre");
     properties.Add("TV.View.title");
     properties.Add("TV.View.description");
     properties.Add("TV.View.Percentage");
     properties.Add("TV.Guide.Day");
     properties.Add("TV.Guide.thumb");
     properties.Add("TV.Guide.Title");
     properties.Add("TV.Guide.Time");
     properties.Add("TV.Guide.Duration");
     properties.Add("TV.Guide.TimeFromNow");
     properties.Add("TV.Guide.Description");
     properties.Add("TV.Guide.Genre");
     properties.Add("TV.Guide.EpisodeName");
     properties.Add("TV.Guide.SeriesNumber");
     properties.Add("TV.Guide.EpisodeNumber");
     properties.Add("TV.Guide.EpisodePart");
     properties.Add("TV.Guide.EpisodeDetail");
     properties.Add("TV.Guide.Date");
     properties.Add("TV.Guide.StarRating");
     properties.Add("TV.Guide.Classification");
     properties.Add("TV.RecordedTV.Title");
     properties.Add("TV.RecordedTV.Time");
     properties.Add("TV.RecordedTV.Description");
     properties.Add("TV.RecordedTV.thumb");
     properties.Add("TV.RecordedTV.Genre");
     properties.Add("TV.Scheduled.Title");
     properties.Add("TV.Scheduled.Time");
     properties.Add("TV.Scheduled.Description");
     properties.Add("TV.Scheduled.thumb");
     properties.Add("TV.Scheduled.Genre");
     properties.Add("TV.Search.Title");
     properties.Add("TV.Search.Time");
     properties.Add("TV.Search.Description");
     properties.Add("TV.Search.thumb");
     properties.Add("TV.Search.Genre");
   }
   this.editorService = editorService;
   MpeStringTable table = parser.GetStringTable("English");
   int[] keys = table.Keys;
   ListViewItem sel = null;
   for (int i = 0; i < keys.Length; i++)
   {
     string s = table[keys[i]];
     //ListViewItem item = stringList.Items.Add(s);
     ListViewItem item = stringList.Items.Add(keys[i].ToString("D6"));
     item.Tag = keys[i];
     //item.SubItems.Add(keys[i].ToString("D6"));
     item.SubItems.Add(s);
     if (currentValue.Equals(keys[i].ToString()))
     {
       item.Selected = true;
       sel = item;
     }
   }
   if (sel != null)
   {
     MpeLog.Debug("Is the selected string visible?");
     sel.EnsureVisible();
   }
   propertyList.DataSource = properties;
 }