Beispiel #1
0
 //
 public MainWindow()
 {
     InitializeComponent();
     labelInfo.Content = "";
     //
     logName = AppDomain.CurrentDomain.BaseDirectory + DateTime.Now.ToString("dd-MM-yy_HH-mm") + ".txt";
     //
     INI = new IniFile(AppDomain.CurrentDomain.BaseDirectory + "config.ini");
     // Create 'TrueConf' COM object
     tc           = new AxTrueConfCallX();
     tcHost.Child = tc;
     //
     tc.OnXAfterStart       += Tc_OnXAfterStart;       //setting the OnXAfterStart event handler
     tc.OnServerConnected   += Tc_OnServerConnected;   //setting OnServerConnected event handler
     tc.OnXLogin            += Tc_OnXLogin;            //setting OnXLogin event handler
     tc.OnXLoginError       += Tc_OnXLoginError;       //setting OnXLoginError event handler
     tc.OnConferenceCreated += Tc_OnConferenceCreated; //setting OnConferenceCreated event handler
     tc.OnConferenceDeleted += Tc_OnConferenceDeleted; //setting OnConferenceDeleted event handler
     tc.OnInviteReceived    += Tc_OnInviteReceived;    //setting OnInviteReceived event handler
     tc.OnRejectReceived    += Tc_OnRejectReceived;    //setting OnRejectReceived event handler
     tc.OnFECCControl       += Tc_OnFECCControl;       //setting OnFECCControl event handler
     tc.OnXNotify           += Tc_OnXNotify;           //setting OnXNotify event handler
     tc.OnXChangeState      += Tc_OnXChangeState;      //setting OnXChangeState event handler
     // Set visible state UI elements
     button_Call.Visibility    = Visibility.Hidden;
     labelFecc.Visibility      = Visibility.Hidden;
     button_Left.Visibility    = Visibility.Hidden;
     button_Right.Visibility   = Visibility.Hidden;
     button_Up.Visibility      = Visibility.Hidden;
     button_Down.Visibility    = Visibility.Hidden;
     button_ZoomIn.Visibility  = Visibility.Hidden;
     button_ZoomOut.Visibility = Visibility.Hidden;
     //
 }
Beispiel #2
0
        public MainWindow()
        {
            InitializeComponent();

            settingsWindow = new SettingsWindow(SettingsWindow_Closed);

            CheckCmdLineArgs();

            dataContext = new MainDataContext();
            DataContext = dataContext;
            InputBinding hotkeySettings = new InputBinding(new RelayCommand(c => OpenSettings(), c => true),
                                                           new KeyGesture(Key.F12, ModifierKeys.Shift | ModifierKeys.Control));

            InputBindings.Add(hotkeySettings);

            LoadSettings();

            //set sizes
            mainWindow.Height = SystemParameters.VirtualScreenHeight;
            mainWindow.Width  = SystemParameters.VirtualScreenWidth;
            mainGrid.RowDefinitions[0].Height = new GridLength(0.03 * mainWindow.Height);
            mainGrid.RowDefinitions[2].Height = new GridLength(0.15 * mainWindow.Height);
            mainGrid.RowDefinitions[1].Height = new GridLength(mainWindow.Height - mainGrid.RowDefinitions[0].Height.Value - mainGrid.RowDefinitions[2].Height.Value);
            btnCall.Width       = mainWindow.Width / 3;
            chatPopup.MaxWidth  = 400;
            chatPopup.MaxHeight = mainWindow.Height - 100;

            timer           = new Timer(settings.chat * 1000);
            timer.Elapsed  += Timer_Elapsed;
            timer.AutoReset = false;

            //TrueConf sdk init
            tc = new AxTrueConfCallX();

            tcHost.Focusable = false;
            tcHost.Child     = tc;
            tc.GotFocus     += Tc_GotFocus;

            //TrueCon sdk events
            tc.OnXAfterStart              += Tc_OnXAfterStart;
            tc.OnXLogin                   += Tc_OnXLogin;
            tc.OnXLoginError              += Tc_OnXLoginError;
            tc.OnServerConnected          += Tc_OnServerConnected;
            tc.OnServerDisconnected       += Tc_OnServerDisconnected;
            tc.OnIncomingChatMessage      += Tc_OnIncomingChatMessage;
            tc.OnIncomingGroupChatMessage += Tc_OnIncomingGroupChatMessage;
            tc.OnInviteReceived           += Tc_OnInviteReceived;
            tc.OnXNotify                  += Tc_OnXNotify;
            tc.OnAbookUpdate              += Tc_OnAbookUpdate;
            tc.OnConferenceCreated        += Tc_OnConferenceCreated;
            tc.OnConferenceDeleted        += Tc_OnConferenceDeleted;
            tc.OnXChangeState             += Tc_OnXChangeState;
            tc.OnLogout                   += Tc_OnLogout;

            Closing += MainWindow_Closing;
        }
Beispiel #3
0
        public MainPage()
        {
            InitializeComponent();
            sdk       = new AxTrueConfCallX(); // init sdk object
            mainModel = new MainModel
            {
                Abook = new List <string>() //will contain address book for auto-filling in user IDs
            };
            sdkHost.Child = sdk;            //put sdk into WindowsFormsHost control
            InitSDKEvents();                // set sdk events handlers
            DataContext = mainModel;

            timer          = new Timer(1000);
            timer.Elapsed += Timer_Elapsed;
        }
Beispiel #4
0
 public MainWindow()
 {
     InitializeComponent();
     //
     labelInfo.Content = "";
     //
     logName = AppDomain.CurrentDomain.BaseDirectory + DateTime.Now.ToString("dd-MM-yy_HH-mm") + ".txt";
     //
     INI = new IniFile(AppDomain.CurrentDomain.BaseDirectory + "config.ini");
     // Create 'TrueConf' COM object
     tc           = new AxTrueConfCallX();
     tcHost.Child = tc;
     //
     tc.OnXAfterStart     += Tc_OnXAfterStart;       //setting the OnXAfterStart event handler
     tc.OnServerConnected += Tc_OnServerConnected;   //setting OnServerConnected event handler
     tc.OnXLogin          += Tc_OnXLogin;            //setting OnXLogin event handler
     tc.OnXLoginError     += Tc_OnXLoginError;       //setting OnXLoginError event handler
     tc.OnInviteReceived  += Tc_OnInviteReceived;    //setting OnInviteReceived event handler
     tc.OnFECCRequest     += Tc_OnFECCRequest;       //setting OnFECCRequest event handler
 }