예제 #1
0
        public static void Run(Action <Action <string, Action, Action <Action <string, Action, Action <Action <string, Action> > > > > > addItems, string title = null, string image = null, string logoImage = null)
        {
            var x = new Firefly.Wpf.MenuDemo.MenuSample(y =>
            {
                if (!string.IsNullOrEmpty(title))
                {
                    y.MenuName = title;
                }
                if (!string.IsNullOrEmpty(image) && System.IO.File.Exists(image))
                {
                    y.SetBackgroundImage(image);
                }
                if (!string.IsNullOrEmpty(logoImage))
                {
                    y.SetLogoInage(logoImage);
                }
                addItems(y.AddMenu);
            });

            x.Run();
        }
예제 #2
0
        public static void Run(ToolStrip theMenu, string title = null, string image = null, string logoImage = null)
        {
            var x = new Firefly.Wpf.MenuDemo.MenuSample(theMenu, y =>
            {
                if (!string.IsNullOrEmpty(title))
                {
                    y.MenuName = title;
                }
                if (!string.IsNullOrEmpty(image) && System.IO.File.Exists(image))
                {
                    y.SetBackgroundImage(image);
                }
                if (!string.IsNullOrEmpty(logoImage))
                {
                    y.SetLogoInage(logoImage);
                }
            });


            x.Run();
        }