Description of ToolSettings.
예제 #1
0
 public override void Run()
 {
     var colorDialog = new System.Windows.Forms.ColorDialog();
     var result = colorDialog.ShowDialog();
     if (result == DialogResult.OK)
     {
         var color = colorDialog.Color;
         string clrStr = "#" + color.ToArgb().ToString("X8");
         var settings = new ToolSettings();
         settings.SetTheme(clrStr);
         settings.SaveSettings(clrStr);
     }
 }
예제 #2
0
        public override void Run()
        {
            var colorDialog = new System.Windows.Forms.ColorDialog();
            var result      = colorDialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                var    color    = colorDialog.Color;
                string clrStr   = "#" + color.ToArgb().ToString("X8");
                var    settings = new ToolSettings();
                settings.SetTheme(clrStr);
                settings.SaveSettings(clrStr);
            }
        }
예제 #3
0
        public override void Run()
        {
            try
            {
                string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(this.GetType()).Location);
                System.Reflection.Assembly.LoadFrom(System.IO.Path.Combine(path, "AvalonDock.Themes.dll"));

                bw         = new BackgroundWorker();
                bw.DoWork += delegate
                {
                    try
                    {
                        while (ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainWindow == null)
                        {
                            Thread.Sleep(100);
                        }
                        ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainWindow.Dispatcher.Invoke
                            (DispatcherPriority.Normal, new System.Threading.ThreadStart
                            (
                                delegate
                        {
                            //string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(typeof(ToolSettings)).Location);
                            //string uri = "/AvalonDock.Themes;component/themes/dev2010.xaml";
                            //ThemeFactory.ChangeTheme(new Uri(uri, UriKind.RelativeOrAbsolute));
                            var settings = new ToolSettings();
                            var theme    = settings.LoadSettings();
                            settings.SetTheme(theme);
                        }
                            )
                            );
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.ToString(), "ToolCommandStartup.Run()");
                    }
                };
                bw.RunWorkerAsync();
            }
            catch
            {
            }
        }
예제 #4
0
 public override void Run()
 {
     var settings = new ToolSettings();
     settings.SetTheme("default");
     settings.SaveSettings("default");
 }
예제 #5
0
 public override void Run()
 {
     var settings = new ToolSettings();
     settings.SetTheme("classic");
     settings.SaveSettings("classic");
 }
예제 #6
0
 public override void Run()
 {
     var settings = new ToolSettings();
     settings.SetTheme("#FF800000");
     settings.SaveSettings("#FF800000");
 }
예제 #7
0
 public override void Run()
 {
     var settings = new ToolSettings();
     settings.SetTheme("aero.normalcolor");
     settings.SaveSettings("aero.normalcolor");
 }
예제 #8
0
        public override void Run()
        {
            try
            {
                string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(this.GetType()).Location);
                System.Reflection.Assembly.LoadFrom(System.IO.Path.Combine(path, "AvalonDock.Themes.dll"));

                bw = new BackgroundWorker();
                bw.DoWork += delegate
                {
                    try
                    {
                        while (ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainWindow == null)
                        {
                            Thread.Sleep(100);
                        }
                        ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainWindow.Dispatcher.Invoke
                            (DispatcherPriority.Normal, new System.Threading.ThreadStart
                             (
                             	delegate
                             	{
                             		//string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(typeof(ToolSettings)).Location);
                             		//string uri = "/AvalonDock.Themes;component/themes/dev2010.xaml";
                             		//ThemeFactory.ChangeTheme(new Uri(uri, UriKind.RelativeOrAbsolute));
                             		var settings = new ToolSettings();
                             		var theme = settings.LoadSettings();
                             		settings.SetTheme(theme);
                             	}
                             )
                            );
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.ToString(), "ToolCommandStartup.Run()");
                    }
                };
                bw.RunWorkerAsync();
            }
            catch
            {
            }
        }
예제 #9
0
 public override void Run()
 {
     var settings = new ToolSettings();
     settings.SetTheme("ExpressionLight");
     settings.SaveSettings("ExpressionLight");
 }
예제 #10
0
 public override void Run()
 {
     var settings = new ToolSettings();
     settings.SetTheme("dev2010green");
     settings.SaveSettings("dev2010green");
 }