示例#1
0
        // Constructor
        public SMS()
        {
            InitializeComponent();
            PanelVisibilityManager.register_panel(this);

            sms_list      = Api.Session.Sms.EmitMessageList();
            response_list = Api.Session.Sms.ResponsesMessagesList();

            conv_dict = new Dictionary <int, Conversation>();

            refresh_logsList();

            lbl_titleConv.DataContext = Tokenizer.get_tokens();

            Window parentWindow = Window.GetWindow(Application.Current.MainWindow);

            AllContacts ac = new AllContacts();

            ac.ContactUpdated += new EventHandler(PopulateList_ContactUpdated);

            Tokenizer.TokenMatcher = text =>
            {
                if (text.EndsWith(";"))
                {
                    return(text.Substring(0, text.Length - 1).Trim());
                }

                return(null);
            };
        }
示例#2
0
        public void RefreshLogs()
        {
            all_logs  = new List <Voxity.API.Models.Log>();
            emit_logs = new List <Voxity.API.Models.Log>();
            rcv_logs  = new List <Voxity.API.Models.Log>();

            InitializeComponent();
            PanelVisibilityManager.register_panel(this);

            DataContext = this;

            bw_loadLogs.DoWork += (sender, e) =>
            {
                StringCollection filter_src  = new StringCollection();
                StringCollection filter_dest = new StringCollection();

                // Outcalling
                String[] src = new String[] { "1015" };
                filter_src.AddRange(src);

                // Incalling
                String[] dest = new String[] { "1015" };
                filter_dest.AddRange(dest);

                List <Voxity.API.Models.Log> list_userLog = Api.Session.Calls.Logs();

                // Outcalling
                all_logs = list_userLog.Where(s => s.source == Api.User.internalExtension).ToList();
                // Incalling
                all_logs.AddRange(list_userLog.Where(d => d.destination == Api.User.internalExtension && d.source != Api.User.internalExtension).ToList());

                emit_logs = list_userLog.Where(s => s.source == Api.User.internalExtension).ToList();

                rcv_logs = list_userLog.Where(s => s.destination == Api.User.internalExtension).ToList();
            };

            bw_loadLogs.RunWorkerCompleted += (sender, eventArgs) =>
            {
                all.log_list = all_logs;
                all.refresh_logsList();

                emit.log_list = emit_logs;
                emit.refresh_logsList();

                rcv.log_list = rcv_logs;
                rcv.refresh_logsList();

                // Fix me, use PropertyChangedEventArgs to refresh
                DataContext = null;
                DataContext = this;
            };

            bw_loadLogs.RunWorkerAsync();
        }
示例#3
0
        public Import()
        {
            InitializeComponent();
            PanelVisibilityManager.register_panel(this);

            sp_contactError.DataContext = this;

            bw_import.WorkerReportsProgress = true;
            bw_import.ProgressChanged      += ProgressChanged;
            bw_import.DoWork             += DoWork;
            bw_import.RunWorkerCompleted += bw_import_RunWorkerCompleted;
        }
示例#4
0
 public Settings()
 {
     InitializeComponent();
     PanelVisibilityManager.register_panel(this);
 }