コード例 #1
0
 private void MetroWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     t.Stop();
     SettingsSerializationManager.Serialize("default.xml", FftAndColorsSource);
     FftAndColorsSource.Dispose();
     Sender.Dispose();
 }
コード例 #2
0
 public MainWindow()
 {
     FftAndColorsSource = SettingsSerializationManager.DeSerialize("default.xml", typeof(FFTDependencyWrapper)) as FFTDependencyWrapper;
     Sender             = BridgeRouter.Instance;
     InitializeComponent();
     initializeBindings();
     t          = new System.Windows.Threading.DispatcherTimer();
     t.Interval = new TimeSpan(0, 0, 0, 0, 50);
     t.Tick    += new EventHandler(dispatcherTimer_Tick);
     t.Start();
 }
コード例 #3
0
        public void ProfileControl_CheckBoxClicked(object sender, Tuple <ProfileAction, byte> e)
        {
            switch (e.Item1)
            {
            case ProfileAction.Create:
                SettingsSerializationManager.Serialize(string.Format("{0}.xml", e.Item2), FftAndColorsSource);
                break;

            case ProfileAction.Delete:
                File.Delete(string.Format("{0}.xml", e.Item2));
                break;

            case ProfileAction.Apply:
                FftAndColorsSource = SettingsSerializationManager.DeSerialize(string.Format("{0}.xml", e.Item2), typeof(FFTDependencyWrapper)) as FFTDependencyWrapper;
                initializeBindings();
                break;

            default:
                break;
            }
        }