Exemplo n.º 1
0
        protected override void OnClosed(EventArgs e)
        {
            base.OnClosed(e);
            ini.AddOrUpdate("Main\\Location", new Point(this.Left, this.Top));
            ini.AddOrUpdate("Main\\Size", new Point(this.Width, this.Height));
            ini.AddOrUpdate("Main\\State", this.WindowState == WindowState.Minimized ? WindowState.Normal : WindowState);
            ini.AddOrUpdate("Main\\SubtitlePanelWidth", column.ActualWidth == 0 ? PanelWidth : column.ActualWidth);

            ini.AddOrUpdate("Subtitle\\Foreground", ColorToHtmlFormat((video.Foreground as SolidColorBrush).Color));
            ini.AddOrUpdate("Subtitle\\FontFamily", video.FontFamily.ToString());
            ini.AddOrUpdate("Subtitle\\FontSize", video.FontSize);
            ini.AddOrUpdate("Subtitle\\FontWeight", video.FontWeight == FontWeights.Normal ? "Normal" : "Bold");
            ini.AddOrUpdate("Subtitle\\FontStyle", video.FontStyle == FontStyles.Normal ? "Normal" : "Italic");
            ini.AddOrUpdate("Player\\Volume", video.Volume);
            ini.Save();
        }
Exemplo n.º 2
0
 private void SaveConfig()
 {
     SaveProxys();
     ini.AddOrUpdate("Main\\State", (uint)this.WindowState);
     ini.AddOrUpdate("Main\\Left", this.Left);
     ini.AddOrUpdate("Main\\Top", this.Top);
     ini.AddOrUpdate("Main\\Width", (int)this.Width);
     ini.AddOrUpdate("Main\\Height", (int)this.Height);
     ini.AddOrUpdate("Main\\Autorun", this.autorun.IsChecked);
     ini.Save();
 }
Exemplo n.º 3
0
        protected override void OnClosed(EventArgs e)
        {
            base.OnClosed(e);
            ini.AddOrUpdate("Main\\Location", new Point(this.Left, this.Top));
            ini.AddOrUpdate("Main\\Size", new Point(this.Width, this.Height));
            ini.AddOrUpdate("Main\\State", this.WindowState == WindowState.Minimized ? WindowState.Normal : WindowState);
            ini.AddOrUpdate("Main\\Autoscroll", (bool)autoscroll.IsChecked);
            ini.AddOrUpdate("Main\\EndingLine", endl.SelectedValue.ToString());

            ini.AddOrUpdate("Main\\Background", ColorToHtmlFormat((console.Background as SolidColorBrush).Color));
            ini.AddOrUpdate("Main\\Foreground", ColorToHtmlFormat((console.Foreground as SolidColorBrush).Color));
            ini.AddOrUpdate("Main\\FontFamily", console.FontFamily.ToString());
            ini.AddOrUpdate("Main\\FontSize", console.FontSize);

            ini.AddOrUpdate("Port\\LastPort", ((COMPort)comports.SelectedValue).Name);
            ini.AddOrUpdate("Port\\Baudrate", combaud.SelectedValue.ToString());
            ini.AddOrUpdate("Port\\DataBits", databits.SelectedValue.ToString());
            ini.AddOrUpdate("Port\\Parity", parity.SelectedValue.ToString());
            ini.AddOrUpdate("Port\\StopBits", stopbits.SelectedValue.ToString());
            ini.Save();
        }