Exemple #1
0
        // GET: ClientApp
        public ActionResult GetApp(string appName)
        {
            ClientAppViewModel result = new ClientAppViewModel();

            if (string.IsNullOrEmpty(appName))
            {
                return(HttpNotFound());
            }

            var clientAppServerPath = Server.MapPath(string.Format(@"~\ClientApps\{0}", appName));

            if (!Directory.Exists(clientAppServerPath))
            {
                return(HttpNotFound());
            }

            result.ClientFiles = new Dictionary <string, string>();
            foreach (var filePath in Directory.GetFiles(clientAppServerPath, "*.js"))
            {
                result.ClientFiles[string.Format(@"~/ClientApps/{0}/{1}", appName, Path.GetFileName(filePath))] = "script";
            }
            ViewBag.Title = appName;

            return(View(result));
        }
 public ConferenceControllerBase(ClientAppViewModel app, IEnumerable <UnitPhoneViewModel> units)
     : base(app)
 {
     this.StartTime = app.Service.GetDateTime();
     CreateMembers(units);
     this.CallLog = CreateCallLog();
     SaveLog();
 }
Exemple #3
0
 public AlertConferenceController(ClientAppViewModel app, IEnumerable <UnitPhoneViewModel> units)
     : base(app, units)
 {
     _selectedMember  = null;
     this.FirstMember = GetAllMembers().FirstOrDefault();
     CreateMonitorConnection(this.ClientApp.Channels.PO.Status == ePOStatus.OffHook);
     CheckAndPlaySound();
 }
Exemple #4
0
        public static AlertConferenceController CreateAlertConferenceController(ClientAppViewModel app, IEnumerable <UnitPhoneViewModel> units, eTaskType taskType)
        {
            if (taskType == eTaskType.CTT)
            {
                return(new AlertConferenceController(app, units));
            }

            return(new CCPK_AlertConferenceController(app, units));
        }
Exemple #5
0
        public ConferenceController(ClientAppViewModel app, IEnumerable <UnitPhoneViewModel> units) : base(app, units)
        {
            // enable conference
            this.ClientApp.Service.SetConference(true);

            // Add PO to conference first
            POConnection = new ConferenceConnection(this.ClientApp.ClientId, this.ClientApp.Channels.PO.PO, eVolumn.Volumn_6, eVolumn.Volumn_2);
            SendConnection(POConnection, true);
        }
        public TSL_AlertController(ClientAppViewModel app)
            : base(app, false)
        {
            this.Units     = new TSL_UnitPhoneListViewModel(app);// { ShowTask = true, ShowResult = true };
            this.Channels  = new TSL_ChannelListViewModel(app);
            this.OptionVM  = new TSL_AlertOptionViewModel(this);
            this.ControlVM = new TSL_AlertControlViewModel(this);

            this.Modem = this.Channels.Items.OfType <ModemViewModel>().First();
            this.Modem.PropertyChanged += Modem_PropertyChanged;
        }
        public CallControllerBase(ClientAppViewModel app, HostPhoneViewModel channel, UnitPhoneViewModel unit = null)
            : base(app)
        {
            this.StartTime     = app.Service.GetDateTime();
            this.KeepSelection = false;
            this.DisconnectPOConnectionWhenFinalise = true;
            _connection         = default(T);
            this.Channel        = channel;
            this.Unit           = unit;
            _dialCompletedEvent = new ManualResetEvent(true);
            this.CallStatus     = eCallStatus.Created;

            this.PropertyChanged += OnPropertyChanged;
        }
        //string _number = null;

        public CallController(ClientAppViewModel app, HostPhoneViewModel channel, UnitPhoneViewModel unit = null)
            : base(app, channel, unit)
        {
            if (this.Unit != null)
            {
                Dial();
            }
            else
            {
                this.CallStatus = eCallStatus.Connected;
            }

            SendConnection(this.Connection);
            this.Channel.PropertyChanged += Channel_PropertyChanged;
            System.Diagnostics.Debug.WriteLine("Create " + this.ToString());
        }
        public MainWindow()
        {
            try
            {
                InitializeComponent();

                var settings = NovaAlert.Common.Setting.ClientSetting.Instance;
                _app         = new NovaAlert.Bll.ClientAppViewModel();
                DataContext  = _app;
                this.Closed += MainWindow_Closed;

                System.Windows.Threading.DispatcherTimer timer = new System.Windows.Threading.DispatcherTimer(new TimeSpan(0, 0, 1),
                                                                                                              System.Windows.Threading.DispatcherPriority.Normal, OnTimer, this.Dispatcher);
            }
            catch (Exception ex)
            {
                LogService.Logger.Error(ex);
            }
        }
 public ComplexControllerBase(ClientAppViewModel app)
     : base(app)
 {
     this.Controllers = new ObservableCollection <IController>();
     this.Controllers.CollectionChanged += Controllers_CollectionChanged;
 }
Exemple #11
0
 public ControllerBase(ClientAppViewModel app)
 {
     this.ClientApp = app;
     this.ClientApp.ClearInfo();
     _internalSendConnection = new Action <ISwitchConnection, bool>(InternalSendConnection);
 }
 public InCallController(ClientAppViewModel app, HostPhoneViewModel channel, UnitPhoneViewModel unit = null)
     : base(app, channel, unit)
 {
     this.ClientApp.Service.Request(eResourceType.Channel, this.Channel.Id);
 }
 public TSL_UnitPhoneListViewModel(ClientAppViewModel app) : base(app)
 {
 }
Exemple #14
0
 public ConferenceMemberBase(ClientAppViewModel app, HostPhoneViewModel channel, UnitPhoneViewModel unit = null)
     : base(app, channel, unit)
 {
 }
 public CCPK_AlertController(ClientAppViewModel app)
     : base(app)
 {
     this.TaskType = eTaskType.CCPK;
 }
 public PrivateAlarmController(ClientAppViewModel app) : base(app, true)
 {
 }
 public CCPK_AlertConferenceController(ClientAppViewModel app, IEnumerable <UnitPhoneViewModel> units)
     : base(app, units)
 {
 }
 public MultiDestController(ClientAppViewModel app) : base(app, true)
 {
 }
Exemple #19
0
 public MainController(ClientAppViewModel app, bool canReceiveCall) : base(app)
 {
     this.CanReceiveCall = canReceiveCall;
 }
 public AlertController(ClientAppViewModel app)
     : base(app, true)
 {
     this.TaskType = eTaskType.CTT;
 }