This project is read-only.

AutoPlay Photo

Jan 21, 2009 at 3:22 PM
Edited Jan 21, 2009 at 3:23 PM
On photo slideshow is it possible to start on pause mode ?

Thank You

Marco
Jan 29, 2009 at 4:43 AM
I would like to know this as well!!!
Jan 30, 2009 at 1:29 AM
bump
Jan 30, 2009 at 8:09 AM

Hi,

it's not possible with a configuration setting. Your must implement it yourself. Have a look at "public static void StartSlideShow()" in Navigation.cs.

Olaf

Jan 30, 2009 at 3:09 PM
Wow Olaf, your the man... Adding the following works like a champ

  /// <summary>
  /// Starts the slide show.
  /// </summary>
  public static void StartSlideShow()
  {
   SelectAlbum(DataHandler.CurrentAlbumIndex);
                        DataHandler.Albums[DataHandler.CurrentAlbumIndex].TransitionManager.Pause();   //New Line
  }



so one more question... where are the areas that I would go to create a setting for this?  I would prefer to add a "setting" to the XmlConfigurationProvider in the "NavigationTray" section so that I can switch Play/Pause...
something like

<option name="AutoPlay" value="true" />
Jan 30, 2009 at 5:36 PM
Check out the following thread:

http://www.codeplex.com/SlideShow2/Thread/View.aspx?ThreadId=39003

Two different ways to implement this are suggested (one using the data.xml file in my post and one using the configuration settings posted by AndrewMo).
Hope this helps.

Brian
Jan 30, 2009 at 6:05 PM
Thanks Brian, that looks like a great solution.  I did as you mentioned at the end of that post and I created the following config file

  <?xml version="1.0" encoding="utf 8" ?>
  <configuration background="black" AutoStart="false">
  <module name="SlideNavigation">
  <option name="Enabled" value="false" />
  </module>
  <module name="EmbededViewer">
  <option name="Enabled" value="true" />
  </module>
  <module name="NavigationTray">
  <option name="Enabled" value="true" />
  <option name="BackgroundOpacity" value="1" />
  <option name="Background" value="#000000" />
  </module>
  <module name="ToggleAlbumViewButton">
  <option name="Enabled" value="false" />
  </module>
  <module name="ToggleFullScreenButton">
  <option name="Enabled" value="true" />
  </module>
  <module name="ToggleEmbedViewButton">
  <option name="Enabled" value="false" />
  </module>
  <module name="SlideDescription">
  <option name="Enabled" value="true" />
  <option name="TitleForeground" value="#ffffff" />
  <option name="DescriptionForeground" value="#ffffff" />
  <option name="Background" value="#000000" />
  </module>
  <module name="ThumbnailViewer">
  <option name="Enabled" value="true" />
  <option name="Background" value="#000000" />
  <option name="Width" value="310" />
  <option name="ScrollIncrement" value="310" />
  <option name="ScrollButtonBrush" value="#8D9AB4" />
  <option name="ScrollButtonHoverBrush" value="#ffffff" />
  </module>
  <module name="SlideThumbnail">
  <option name="BorderHighlightBrush" value="#ffffff" />
  </module>
  <module name="SlidePreview">
  <option name="Enabled" value="true" />
  <option name="Height" value="150" />
  <option name="BorderBrush" value="#ffffff" />
  <option name="BorderWidth" value="2" />
  </module>
  </configuration>


Now everything works except the AutoStart still "starts" even though it is set to false.
Jan 30, 2009 at 10:06 PM
It turned out to be a syntax error.  I changed the XmlConfigurationProvider.cs areas to the following

            #region [ General ]
            Dictionary<string, string> generalOptions = xmlOptions[string.Empty];
            Options.General = new Options.GeneralOptions()
            {
                Background =
                    generalOptions.ContainsKey("background") ?
                    ParseBrush(generalOptions["background"]) :
                    Options.General.Background,
                AutoStart =
                    ParseBool(generalOptions, "autoStart") ?? Options.General.AutoStart
            };
            #endregion


  private Dictionary<string, string> ParseRoot(XmlReader reader)
  {
   Dictionary<string, string> options = new Dictionary<string, string>();
   options.Add("background", reader.GetAttribute("background"));
            options.Add("autoStart", reader.GetAttribute("autoStart") ?? "true");
   return options;
  }

notice the change from ("AutoStart") to ("autoStart")

Everything is working as expected now.  Thank!!!