private void setMultiplay()
 {
     txtUsername.Text   = MultiplayManager.getUsername();
     txtMpCallsign.Text = MultiplayManager.getCallsign();
     txtUrl.Text        = MultiplayManager.getServerUrl();
     txtWsUrl.Text      = MultiplayManager.getWsServerUrl();
 }
Exemple #2
0
 private void onOk(object sender, RoutedEventArgs e)
 {
     MultiplayManager.setServerUrl(inputUrl.Text);
     MultiplayManager.setWsServerUrl(inputWsUrl.Text);
     MultiplayManager.setUsername(inputUsername.Text);
     MultiplayManager.setPassword(inputPassword.Password);
     MultiplayManager.setCallsign(inputCallsign.Text);
     MultiplayManager.setOverrideCallsign((checkCallsign.IsChecked.GetValueOrDefault(false) ? 1 : 0));
     MultiplayManager.setSession(inputSession.Text);
 }
Exemple #3
0
        public ServerDetailsDialog()
        {
            InitializeComponent();

            inputUrl.Text           = MultiplayManager.getServerUrl();
            inputWsUrl.Text         = MultiplayManager.getWsServerUrl();
            inputUsername.Text      = MultiplayManager.getUsername();
            inputPassword.Password  = MultiplayManager.getPassword();
            inputCallsign.Text      = MultiplayManager.getCallsign();
            checkCallsign.IsChecked = MultiplayManager.isOverrideCallsign();
            inputSession.Text       = MultiplayManager.getSession();
        }
        public MainWindow()
        {
            InitializeComponent();

            sceHandler = new FsxManager.CsSimConnectEventHandler(mainSceHandler);
            FsxManager.addSimconnectHandler(sceHandler);
            mpStHandler = new MultiplayManager.CsMultiplayStatusHandler(mainMpStatusHandler);
            MultiplayManager.addStatusHandler(mpStHandler);
            mpDataHandler = new MultiplayManager.CsMultiplayDataChangedHandler(mainMpDataChangedHandler);
            MultiplayManager.addDataChangedHandler(mainMpDataChangedHandler);

            srvmgr_start();

            setSimulator();
            setAircraft();
            setMultiplay();
        }
        private void setAircraft()
        {
            if (FsxManager.isConnected())
            {
                txtCallsign.Text       = MultiplayManager.isOverrideCallsign() ? MultiplayManager.getCallsign() : FsxManager.getAtcId();
                txtCallsign.Foreground = Brushes.Black;
                txtTitle.Text          = FsxManager.getTitle();
                txtTitle.Foreground    = Brushes.Black;

                txtAtcId.Text                 = FsxManager.getAtcId();
                txtAtcId.Foreground           = Brushes.Black;
                txtAtcType.Text               = FsxManager.getAtcType();
                txtAtcType.Foreground         = Brushes.Black;
                txtAtcModel.Text              = FsxManager.getAtcModel();
                txtAtcModel.Foreground        = Brushes.Black;
                txtAtcAirline.Text            = FsxManager.getAtcAirline();
                txtAtcAirline.Foreground      = Brushes.Black;
                txtAtcFlightNumber.Text       = FsxManager.getAtcFlightnumber();
                txtAtcFlightNumber.Foreground = Brushes.Black;
            }
            else
            {
                txtCallsign.Text       = "(callsign)";
                txtCallsign.Foreground = Brushes.LightGray;
                txtTitle.Text          = "(aircraft title)";
                txtTitle.Foreground    = Brushes.LightGray;

                txtAtcId.Text                 = "(callsign)";
                txtAtcId.Foreground           = Brushes.LightGray;
                txtAtcType.Text               = "(type)";
                txtAtcType.Foreground         = Brushes.LightGray;
                txtAtcModel.Text              = "(model)";
                txtAtcModel.Foreground        = Brushes.LightGray;
                txtAtcAirline.Text            = "(airline)";
                txtAtcAirline.Foreground      = Brushes.LightGray;
                txtAtcFlightNumber.Text       = "(flightnumber)";
                txtAtcFlightNumber.Foreground = Brushes.LightGray;
            }
        }
 private void menu_MultiplayDisconnect(object sender, RoutedEventArgs e)
 {
     MultiplayManager.disconnect();
 }