Exemplo n.º 1
0
 private void lst_images_ItemDeleted(RichListControl self, int index, object selected)
 {
     if (selectedDetail != null)
     {
         selectedDetail.Images.RemoveAt(index);
         Notify();
     }
 }
Exemplo n.º 2
0
 private object lst_images_ItemDoubleClick(RichListControl self, int selectedIndex, object selectedItem)
 {
     dlg_image.InitialDirectory = Path.GetDirectoryName(selectedItem.ToString());
     dlg_image.FileName = selectedItem.ToString();
     if (dlg_image.ShowDialog() == DialogResult.OK && selectedDetail != null)
     {
         selectedDetail.Images[selectedIndex] = dlg_image.FileName;
         Notify();
         return dlg_image.FileName;
     }
     return null;
 }
Exemplo n.º 3
0
 private object[] lst_images_ItemAdding(RichListControl self)
 {
     if (dlg_image.ShowDialog() == DialogResult.OK)
     {
         var selecteds = dlg_image.FileNames;
         if (selectedDetail != null)
             selectedDetail.Images.AddRange(selecteds);
         Notify();
         return selecteds;
     }
     return null;
 }
Exemplo n.º 4
0
 private object[] lst_rules_ItemAdding(RichListControl self)
 {
     var res = Microsoft.VisualBasic.Interaction.InputBox("rule name:");
     if (string.IsNullOrEmpty(res))
         return null;
     group_details.Enabled = true;
     if (details.Any(kv => kv.Item1 == res))
         return null;
     details.Add(Tuple.Create(res, new Detail()));
     Notify();
     return new[] { res };
 }
Exemplo n.º 5
0
 private void lst_rules_SelectedItemChanged(RichListControl self, object selected)
 {
     if (selected == null)
         return;
     selectedDetail = details.Find(k => k.Item1 == selected.ToString()).Item2;
     txt_ruleRegex.Text = selectedDetail.RuleRegex;
     track_opacity.Value = selectedDetail.Opacity;
     check_random.Checked = selectedDetail.IsRandom;
     check_slideShow.Checked = selectedDetail.IsSlideShow;
     num_slideShowTiming.Value = selectedDetail.SlideShowTiming;
     lst_images.Clear();
     foreach (var item in selectedDetail.Images)
         lst_images.Add(item);
     Notify();
 }
Exemplo n.º 6
0
 private void lst_rules_ItemDeleted(RichListControl self, int index, object selected)
 {
     if (!self.Items.Any())
         group_details.Enabled = false;
     details.RemoveAt(index);
     Notify();
 }