private void start_up_setting_click(object sender, EventArgs e) { click_sound.Play(); individualization indivi = new individualization(CurrentFont, click_sound, 1); #region 设置默认值 indivi.close_to_notify.Checked = cbhk_properties.NeedBackToNodify; indivi.check_update.Checked = cbhk_properties.AutoCheckUpdate; indivi.cbhk_visible.SelectedIndex = cbhk_properties.Visible; #endregion if (indivi.ShowDialog() == DialogResult.OK) { if (indivi.set_music.Tag != null) { cbhk_properties.Music = indivi.set_music.Tag.ToString(); //初始化音乐 StartSettings.Add("Music:" + indivi.set_music.Tag.ToString()); } //可见性 cbhk_properties.Visible = indivi.cbhk_visible.SelectedIndex; StartSettings.Add("Visible:" + cbhk_properties.Visible); //关闭后缩小到托盘 cbhk_properties.NeedBackToNodify = indivi.close_to_notify.Checked; StartSettings.Add("NeedBackToNodify:" + cbhk_properties.NeedBackToNodify); //自动更新 cbhk_properties.AutoCheckUpdate = indivi.check_update.Checked; StartSettings.Add("AutoCheckUpdate:" + cbhk_properties.AutoCheckUpdate); } }
private void 个性化ToolStripMenuItem_Click(object sender, EventArgs e) { click_sound.Play(); individualization indivi = new individualization(CurrentFont, click_sound, 0); #region 设置默认值 indivi.link_speed.Value = links_playing.Interval / 1000; indivi.auto_start.Checked = cbhk_properties.AutoStart; #endregion if (indivi.ShowDialog() == DialogResult.OK) { #region 标题文本 if (indivi.diy_info.ForeColor != Color.FromArgb(168, 168, 168)) { cbhk_properties.Title = indivi.diy_info.Text; Text = "命令管家|" + cbhk_properties.Title; //标题信息 IndiviSettings.Add("Text:" + indivi.diy_info.Text); } #endregion #region 设置轮播图 if (link_page.Controls.Count == 0) { if (indivi.ClearLinks) { link_page.Controls.Clear(); } ImageLinksPathes = indivi.ImageLinksPathes; UrlInfo = indivi.UrlInfo; ImageLinksDescription = indivi.ImageLinksDescription; SetCarouselmap(); } else if (link_page.Controls.Count > 0) { //添加新的链接 foreach (string a_path in indivi.ImageLinksPathes) { ImageLinksPathes.Add(a_path); } foreach (string a_url in indivi.UrlInfo) { UrlInfo.Add(a_url); } foreach (string a_description in indivi.ImageLinksDescription) { ImageLinksDescription.Add(a_description); } SetCarouselmap(); cbhk_properties.CarouseMapSpeed = indivi.link_speed.Value > 0 ? (int)indivi.link_speed.Value * 1000 : 1000; IndiviSettings.Add("CarouselMapSpeed:" + cbhk_properties.CarouseMapSpeed); links_playing.Interval = cbhk_properties.CarouseMapSpeed; } #endregion #region 设置字体 if (indivi.load_font.Tag != null && indivi.load_font.Tag.ToString().Trim() != "") { Size current_size = cbhk_title_menu.Size; foreach (ToolStripMenuItem a_item in cbhk_title_menu.Items) { a_item.Font = indivi.target_font; foreach (ToolStripMenuItem subitem in a_item.DropDownItems) { subitem.Font = indivi.target_font; } } cbhk_title_menu.Size = current_size; } #endregion #region 开机自启 cbhk_properties.AutoStart = indivi.auto_start.Checked; IndiviSettings.Add("AutoStart:" + cbhk_properties.AutoStart); #endregion } }