public ExplorerSkinWindow(TopLevelWindow window, ExplorerSkin skin) : base(window, skin, true) { LockUpdate = true; SetExplorerWindow(window); TitleControl.Visible = false; TitleBackgroundControl1.Visible = false; AddressBar = new LayeredBreadcrumbs(TopBorder1); TopBorder1.Controls.Remove(AddressBar); TopBorder1.Controls.Insert(0, AddressBar); SearchButton = new LayeredTextbox(TopBorder1); SearchButton.SizeType = LayeredButton.SizingType.SizeToDefault; NavigateBackButton = new LayeredImageButton(TopBorder1); NavigateBackButton.Enabled = false; NavigateForwardButton = new LayeredImageButton(TopBorder1); NavigateForwardButton.Enabled = false; HistoryButton = new LayeredImageButton(TopBorder1); HistoryButton.Enabled = false; RefreshButton = new LayeredImageButton(TopBorder1); DownArrowButton = new LayeredImageButton(TopBorder1); HistoryList = new List <string>(); ExplorerSkin = skin; LockUpdate = false; _explorerSettingsUpdateHandler = new ExplorerSettingsUpdateHandler(this); }
public static void Load() { foreach (var p in typeof(Settings).GetProperties()) { var value = SettingsFile.GetValue(SettingsSection, p.Name, ""); object convertedValue; if (p.PropertyType == typeof(LanguageFile)) { convertedValue = LanguageFile.LoadFromDefault(value); } else if (p.PropertyType == typeof(WindowBorderSkin)) { convertedValue = WindowBorderSkinProvider.LoadTheme(value.Split(',')[0], value.Split(',')[1]); } else if (p.PropertyType == typeof(ExplorerSkin)) { convertedValue = ExplorerSkin.LoadTheme(value.Split(',')[0], value.Split(',')[1]); } else { convertedValue = Convert.ChangeType(value, p.PropertyType); } p.SetValue(null, convertedValue, null); } PropertyChanged += AutoSave; }
public void ChangeExpSkin(string Name, string Color) { Settings.ExplorerSkin.Dispose(); Settings.ExplorerSkin = ExplorerSkin.LoadTheme(Name, Color); RebuildColorsLists(); ReBuildSkinGroups(); }
private void RebuildSkinsLists() { SkinList.Items.Clear(); ExpSkinList.Items.Clear(); DirectoryInfo Root = new DirectoryInfo(SkinPaths.SkinsFolder); foreach (DirectoryInfo DirectoryName in Root.GetDirectories()) { try { if (ExplorerSkin.IsExplorerSkin(DirectoryName.Name)) { ExpSkinList.Items.Add(DirectoryName.Name); } else { SkinList.Items.Add(DirectoryName.Name); } } catch (Exception) { } } SkinList.SelectedItem = Settings.Skin.Name; ExpSkinList.SelectedItem = Settings.ExplorerSkin.Name; }
protected override void Dispose(bool disposing) { new Action(RemoveHandlers).Invoke(); try { _explorerSettingsUpdateHandler.Dispose(); SearchButton = null; NavigateBackButton = null; NavigateForwardButton = null; RefreshButton = null; DownArrowButton = null; HistoryButton = null; AddressBar = null; _explorerSkin = null; if (!IsClosing) { ExplorerWindow = null; } } catch (Exception) { } base.Dispose(disposing); }
public static void Unload() { Skin.Dispose(); ExplorerSkin.Dispose(); }