public MainPage() { this.InitializeComponent(); ShowSplashPanel.Begin(); ShowLogo.Begin(); ShowMenu.Begin(); playSound("onTrans01.wav", false); }
/// <summary> /// 下载器控件集合元素变化,用于给新加入的控件设置绑定 /// </summary> private void DownloadBarCollection_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { GC.Collect(); if (DownloadBarCollection.Count == 0 && viewbox.Opacity == 0) { ShowLogo.Begin(); } if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add) { foreach (Controls.DownloadBar db in e.NewItems) { SetWidthBind(db);//为新加入的控件设置绑定 if (viewbox.Opacity != 0) { HideLogo.Begin(); } } } }
/// <summary> /// Save Features.Charts settings to the settings file /// </summary> /// <param name="generalNode">XML-node for the Features.Charts settings</param> public void Save(XmlNode chartsNode) { string xpath; XmlNode node; xpath = "./height"; SettingsHelper.SetSettingValue(xpath, chartsNode, Height.ToString()); xpath = "./maxHeight"; SettingsHelper.SetSettingValue(xpath, chartsNode, MaxHeight.ToString()); xpath = "./width"; SettingsHelper.SetSettingValue(xpath, chartsNode, Width.ToString()); xpath = "./maxWidth"; SettingsHelper.SetSettingValue(xpath, chartsNode, MaxWidth.ToString()); xpath = "./colors"; SettingsHelper.SetSettingValue(xpath, chartsNode, "color", Colors); xpath = "./lineThickness"; SettingsHelper.SetSettingValue(xpath, chartsNode, LineThickness.ToString()); xpath = "./maxLineThickness"; SettingsHelper.SetSettingValue(xpath, chartsNode, MaxLineThickness.ToString()); xpath = "./logotype"; SettingsHelper.SetSettingValue(xpath, chartsNode, Logotype); xpath = "./maxValues"; SettingsHelper.SetSettingValue(xpath, chartsNode, MaxValues.ToString()); xpath = "./timeSortOrder"; SettingsHelper.SetSettingValue(xpath, chartsNode, TimeSortOrder.ToString()); xpath = "./labelOrientation"; SettingsHelper.SetSettingValue(xpath, chartsNode, LabelOrientation.ToString()); xpath = "./font"; node = SettingsHelper.GetNode(chartsNode, xpath); _fontSettings.Save(node); xpath = "./legend"; node = SettingsHelper.GetNode(chartsNode, xpath); _legendSettings.Save(node); xpath = "./guidelines"; node = SettingsHelper.GetNode(chartsNode, xpath); _guidelinesSettings.Save(node); xpath = "./showSourse"; SettingsHelper.SetSettingValue(xpath, chartsNode, ShowSource.ToString()); xpath = "./showLogo"; SettingsHelper.SetSettingValue(xpath, chartsNode, ShowLogo.ToString()); xpath = "./lineThicknessPhrame"; SettingsHelper.SetSettingValue(xpath, chartsNode, LineThicknessPhrame.ToString()); xpath = "./lineColorPhrame"; SettingsHelper.SetSettingValue(xpath, chartsNode, LineColorPhrame.ToString()); xpath = "./backgroundColorGraphs"; SettingsHelper.SetSettingValue(xpath, chartsNode, BackgroundColorGraphs.ToString()); }