public static void StorePersonalizationSettings(Personalizer personalizer, bool shown) { if (_this != null) { personalizer[PersonalizationItemNames.FavoritesTop] = _this.Top.ToString(); personalizer[PersonalizationItemNames.FavoritesLeft] = _this.Left.ToString(); personalizer[PersonalizationItemNames.FavoritesWidth] = _this.Width.ToString(); personalizer[PersonalizationItemNames.FavoritesHeight] = _this.Height.ToString(); personalizer[PersonalizationItemNames.FavoritesSplit] = _this.favoritesSplitter.SplitterDistance.ToString(); personalizer[PersonalizationItemNames.FavoritesIsShown] = shown ? "1" : "0"; personalizer.Write(); } }
private static void LoadPersonalizationSettings(Personalizer personalizer) { if (_this != null) { personalizer.Load(); int top = personalizer.GetIntValue(PersonalizationItemNames.FavoritesTop); if (top > 0) _this.Top = top; int left = personalizer.GetIntValue(PersonalizationItemNames.FavoritesLeft); if (left > 0) _this.Left = left; int width = personalizer.GetIntValue(PersonalizationItemNames.FavoritesWidth); if (width > 0) _this.Width = width; int height = personalizer.GetIntValue(PersonalizationItemNames.FavoritesHeight); if (height > 0) _this.Height = height; int split = personalizer.GetIntValue(PersonalizationItemNames.FavoritesSplit); if (split > 0) _this.favoritesSplitter.SplitterDistance = split; personalizer[PersonalizationItemNames.FavoritesIsShown] = "1"; personalizer.Write(); } }
private static void LoadPersonalizationSettings(Personalizer personalizer) { if (_this != null) { personalizer.Load(); int top = personalizer.GetIntValue(PersonalizationItemNames.RemoteTop); if (top > 0) _this.Top = top; int left = personalizer.GetIntValue(PersonalizationItemNames.RemoteLeft); if (left > 0) _this.Left = left; int width = personalizer.GetIntValue(PersonalizationItemNames.RemoteWidth); if (width > 0) _this.Width = width; int height = personalizer.GetIntValue(PersonalizationItemNames.RemoteHeight); if (height > 0) _this.Height = height; personalizer[PersonalizationItemNames.RemoteIsShown] = "1"; personalizer.Write(); } }
public static void StorePersonalizationSettings(Personalizer personalizer, bool shown) { if (_this != null) { personalizer[PersonalizationItemNames.RemoteTop] = _this.Top.ToString(); personalizer[PersonalizationItemNames.RemoteLeft] = _this.Left.ToString(); personalizer[PersonalizationItemNames.RemoteWidth] = _this.Width.ToString(); personalizer[PersonalizationItemNames.RemoteHeight] = _this.Height.ToString(); personalizer[PersonalizationItemNames.RemoteIsShown] = shown ? "1" : "0"; personalizer.Write(); } }
public GUI() { Logger.Debug("Initialize Lyra"); this.InitializeComponent(); this.Enabled = false; this.personalizeStore = new Personalizer(Application.StartupPath + @"\laststate.dat"); Logger.DebugFormat("Personalizer loaded from '{0}'", Application.StartupPath + @"\laststate.dat"); this.MigrateIfNeeded(); this.InitializeLyraGUI(); this.InitializeSearch(); BackgroundWorker bgWorker = new BackgroundWorker(); bgWorker.DoWork += delegate { this.InitializeLyraData(); }; this.start = new Start(); this.start.StartPosition = FormStartPosition.CenterScreen; this.start.Show(this); bgWorker.RunWorkerCompleted += this.bgWorker_RunWorkerCompleted; bgWorker.RunWorkerAsync(); if (Screen.AllScreens.Length == 1) { this.menuItem54.Enabled = false; } else { if (Util.SCREEN_ID == 0) { this.menuItem55.Checked = true; } else { this.menuItem56.Checked = true; } } }