/// <summary>
                /// Retrieving config settings from configuration.exe and at startup from MeediOSApp 
                /// </summary>
                /// <PARAM name="properties">Containing the list of settings</PARAM><PARAM name="errorText">Returns the error text</PARAM>
                /// <returns>
                /// Returns true on success, false on error.
                /// </returns>
                /// 
                /// 
                public bool SetProperties
                    (IMeedioItem Properties,
                    out string errorText)
                {


                    errorText = null;


                    try
                    {


                        //LogPluginSettings(Properties);


                        PropertiesSetter.SetProperties(Properties);
                         

                        #region MediaFolders

                        MfSettingsMovies = Properties
                            ["AdvancedSettingsFoldersa"].ToString().Trim();

                        #endregion


                    }
                    catch (Exception ex)
                    {

                        MessageBox.Show
                            (ex.ToString());

                        return false;
                    }



                    return true;
                }
Esempio n. 2
0
        #pragma warning restore 649

        private void Awake()
        {
            this.propertiesSetter = new PropertiesSetter(PhotonNetwork.NetworkingClient, this.clearOnLeave, this.clearOnDisconnect, this.queueUntilJoined, this.maxFailure);
        }
        public SampleWnd()
        {
            InitializeComponent();

            ps1.WndBorderThickness          = new Thickness(0);
            ps1.ButtonPanelColor            = new MessageBoxColor("#F03A3A3A");
            ps1.MessagePanelColor           = new MessageBoxColor("#F03A3A3A");
            ps1.TitlePanelColor             = new MessageBoxColor("#F03A3A3A");
            ps1.TitlePanelBorderThickness   = new Thickness(0, 0, 0, 2);
            ps1.TitlePanelBorderColor       = new MessageBoxColor("#FFEFE2E2");
            ps1.MessagePanelBorderThickness = new Thickness(0);
            ps1.ButtonPanelBorderThickness  = new Thickness(0);
            ps1.WndBorderThickness          = new Thickness(1);
            ps1.TitleFontSize      = 14;
            ps1.TitleFontColor     = new MessageBoxColor("#FFCBBEBE");
            ps1.MessageFontColor   = new MessageBoxColor(Colors.White);
            ps1.MessageFontSize    = 14;
            ps1.ButtonFontSize     = 16;
            ps1.WindowMinHeight    = 200;
            ps1.LockHeight         = true;
            ps1.WindowWidth        = 450;
            ps1.WindowShowDuration = new Duration(new TimeSpan(0, 0, 0, 0, 300));

            ps2 = new PropertiesSetter(ps1);
            ps2.MessageFontSize = 18;

            ps3            = new PropertiesSetter(ps1);
            ps3.CloseTimer = new MessageBoxCloseTimer(5, -100);

            ps4                  = new PropertiesSetter(ps1);
            ps4.WarningIcon      = new BitmapImage(new Uri("C:\\Users\\1\\Pictures\\ssccicon.png"));
            ps4.MessageFontSize  = 20;
            ps4.TitleFontFamily  = new FontFamily("黑体");
            ps4.ButtonFontFamily = new FontFamily("黑体");

            ps5                       = new PropertiesSetter(ps1);
            ps5.CloseTimer            = new MessageBoxCloseTimer(5, -100);
            ps5.WindowWidth           = 700;
            ps5.ButtonFontSize        = -1;
            ps5.ButtonFontColor       = null;
            ps5.ButtonBorderThickness = new Thickness();
            ps5.ButtonBorderColor     = null;
            ps5.WindowMinHeight       = 400;
            List <Style> buttonStyleList = new List <Style>();
            Style        s1 = new Style();

            s1.TargetType = typeof(Button);
            s1.Setters.Add(new Setter(Button.BackgroundProperty, new SolidColorBrush(Colors.White)));
            s1.Setters.Add(new Setter(Button.BorderBrushProperty, new SolidColorBrush(Colors.DarkGray)));
            s1.Setters.Add(new Setter(Button.ForegroundProperty, new SolidColorBrush(Colors.Black)));
            s1.Setters.Add(new Setter(Button.BorderThicknessProperty, new Thickness(4)));
            s1.Setters.Add(new Setter(Button.FontFamilyProperty, new FontFamily("黑体")));
            s1.Setters.Add(new Setter(Button.FontSizeProperty, new FontSizeConverter().ConvertFrom("14")));
            s1.Setters.Add(new Setter(Button.MarginProperty, new Thickness(3, 6, 3, 6)));
            s1.Setters.Add(new Setter(Button.WidthProperty, 180.0));
            buttonStyleList.Add(s1);
            Style s2 = new Style();

            s2.TargetType = typeof(Button);
            s2.Setters.Add(new Setter(Button.BorderThicknessProperty, new Thickness(2)));
            s2.Setters.Add(new Setter(Button.FontFamilyProperty, new FontFamily("宋体")));
            s2.Setters.Add(new Setter(Button.FontSizeProperty, new FontSizeConverter().ConvertFrom("10")));
            s2.Setters.Add(new Setter(Button.MarginProperty, new Thickness(3, 6, 3, 6)));
            s2.Setters.Add(new Setter(Button.BackgroundProperty, new SolidColorBrush(Colors.Gray)));
            s2.Setters.Add(new Setter(Button.BorderBrushProperty, new SolidColorBrush(Colors.Gray)));
            s2.Setters.Add(new Setter(Button.ForegroundProperty, new SolidColorBrush(Colors.LightGray)));
            s2.Setters.Add(new Setter(Button.WidthProperty, 70.0));
            buttonStyleList.Add(s2);
            Style s3 = new Style();

            s3.TargetType = typeof(Button);
            s3.Setters.Add(new Setter(Button.BorderThicknessProperty, new Thickness(2)));
            s3.Setters.Add(new Setter(Button.FontFamilyProperty, new FontFamily("宋体")));
            s3.Setters.Add(new Setter(Button.FontSizeProperty, new FontSizeConverter().ConvertFrom("10")));
            s3.Setters.Add(new Setter(Button.MarginProperty, new Thickness(3, 6, 3, 6)));
            s3.Setters.Add(new Setter(Button.BackgroundProperty, new SolidColorBrush(Colors.Gray)));
            s3.Setters.Add(new Setter(Button.BorderBrushProperty, new SolidColorBrush(Colors.Gray)));
            s3.Setters.Add(new Setter(Button.ForegroundProperty, new SolidColorBrush(Colors.LightGray)));
            s3.Setters.Add(new Setter(Button.WidthProperty, 70.0));
            buttonStyleList.Add(s3);
            Style s4 = new Style();

            s4.TargetType = typeof(Button);
            s4.Setters.Add(new Setter(Button.BorderThicknessProperty, new Thickness(2)));
            s4.Setters.Add(new Setter(Button.FontFamilyProperty, new FontFamily("宋体")));
            s4.Setters.Add(new Setter(Button.FontSizeProperty, new FontSizeConverter().ConvertFrom("10")));
            s4.Setters.Add(new Setter(Button.MarginProperty, new Thickness(3, 6, 3, 6)));
            s4.Setters.Add(new Setter(Button.BackgroundProperty, new SolidColorBrush(Colors.Gray)));
            s4.Setters.Add(new Setter(Button.BorderBrushProperty, new SolidColorBrush(Colors.Gray)));
            s4.Setters.Add(new Setter(Button.ForegroundProperty, new SolidColorBrush(Colors.LightGray)));
            s4.Setters.Add(new Setter(Button.WidthProperty, 40.0));
            buttonStyleList.Add(s4);
            ps5.ButtonStyleList = buttonStyleList;

            ps6 = new PropertiesSetter(ps5);
            ps6.EnableCloseButton = true;

            ps7            = new PropertiesSetter(ps1);
            ps7.CloseTimer = new MessageBoxCloseTimer(1, -100);
        }