Ejemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();

            bmsPoller          = new Timer();
            bmsPoller.Interval = BMS_POLLER_INTERVAL;
            bmsPoller.Tick    += bmsPoller_Tick;

            BMSPath = (String)Registry.GetValue(BMS_REG_PATH, "baseDir", "");
            this.txtBMSLocation.Text = BMSPath;
            loadBMSConfig();
            player.StartInfo.UseShellExecute = false;
            player.StartInfo.FileName        = "mpv.exe";
            player.StartInfo.Arguments       = "--force-window=no ./blowers.ogg";

            if (File.Exists("ABWindow.xml"))
            {
                var deserializer = new System.Xml.Serialization.XmlSerializer(typeof(AfterburnerIndicator));
                var sr           = new System.IO.StreamReader("ABWindow.xml", new System.Text.UTF8Encoding(false));
                ABIndicator = (AfterburnerIndicator)deserializer.Deserialize(sr);
            }
            else
            {
                ABIndicator = new AfterburnerIndicator();
            }
        }
Ejemplo n.º 2
0
        static public AfterburnerIndicator ShowAfterburnerWindow(AfterburnerIndicator ABIndicator)
        {
            AfterburnerWindow ownWindow = new AfterburnerWindow(ABIndicator);

            ownWindow.ShowDialog();
            return(ownWindow.ABIndicator);
        }
Ejemplo n.º 3
0
 public AfterburnerWindow(AfterburnerIndicator ABIndicator)
 {
     InitializeComponent();
     this.ABIndicator             = ABIndicator;
     this.enabledCheckBox.Checked = ABIndicator.isEnabled;
     this.widthTextBox.Text       = ABIndicator.width.ToString();
     this.heightTextBox.Text      = ABIndicator.height.ToString();
     this.comboBox1.SelectedIndex = comboBox1.FindString(ABIndicator.getScreenLocation());
 }
Ejemplo n.º 4
0
 private void ABConfig_Click(object sender, EventArgs e)
 {
     ABIndicator = AfterburnerWindow.ShowAfterburnerWindow(ABIndicator);
 }