public WinTwoDail(WinLync Lync) { InitializeComponent(); this.Lync = Lync; this.Closed += new EventHandler(WinTwoDail_Closed); WinLync.lyncCounter++; imgNum1.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum1.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNum2.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum2.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNum3.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum3.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNum4.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum4.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNum5.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum5.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNum6.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum6.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNum7.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum7.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNum8.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum8.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNum9.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum9.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNum0.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum0.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNumS.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNumS.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNumX.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNumX.MouseLeave += new MouseEventHandler(img_MouseLeave); this.txtNumber.Focus(); }
void App_Startup(object sender, StartupEventArgs e) { LogManager.SystemLog.Debug("Start App_Startup"); win = new WinLync(); this.MainWindow = win; win.Show(); LogManager.SystemLog.Debug("End App_Startup"); }
public WinCall(WinLync lync, string str) { InitializeComponent(); OSInfo info = new OSInfo(); if (info.GetOSVersion() == "Win 8")//只匹配Win7 Win8 { winOrightHeight = win8OrigHeight; } strtemp = str; src = str; this.lync = lync; model = new WinCallViewModel(this, str); this.DataContext = model; Closed += new EventHandler(WinCall_Closed); this.WindowStartupLocation = WindowStartupLocation.CenterScreen; this.btnCallSuspend.MouseEnter += new MouseEventHandler(hideWinSlide); this.btnSetVol.MouseEnter += new MouseEventHandler(hideWinSlide); this.btnDial.MouseEnter += new MouseEventHandler(hideWinSlide); this.btnHoldDown.MouseEnter += new MouseEventHandler(btnHoldDown_MouseEnter); this.GotMouseCapture += new MouseEventHandler(hideWinSlide); this.MouseLeftButtonDown += new MouseButtonEventHandler(WinCall_MouseLeftButtonDown); this.MouseDown += new MouseButtonEventHandler(WinCall_MouseDown); if (str.Split(';')[0] == "VideoCall") { SetWinSize(); } if (lync.isConnected == false) { btnVideo.IsEnabled = false; btnCallSuspend.IsEnabled = false; btnDial.IsEnabled = false; btnSetMicPhone.IsEnabled = false; btnSetVol.IsEnabled = false; btnAddContact.IsEnabled = false; btnBlindTransCall.IsEnabled = false; } if (lync.toolBar.JointType == PhoneJointType.IPPhone_Device) { btnVideo.IsEnabled = false; } this.Loaded += new RoutedEventHandler(WinCall_Loaded); //被叫、主叫权限控制 if (SingletonObj.LoginInfo.LyncName != str.Split(';')[0] && str.Split(';').Length != 1) //之前是str.Split(';')[0] 2015/7/30 { this.btnAddContact.IsEnabled = false; } if (SingletonObj.LoginInfo.LyncName != str.Split(';')[0] || str.Split(';').Length < 3) //之前是str.Split(';')[0] 2015/7/30 { listContact.ContextMenu = null; } }
public WinHisitory(WinLync Lync) { this.Lync = Lync; InitializeComponent(); dateTimeFrom.SelectedDate = DateTime.Now.AddDays(-10); dateTimeTo.SelectedDate = DateTime.Now.AddDays(1); model = new WinHistoryViewModel(this); this.DataContext = model; WinLync.lyncCounter++; this.Closed += new EventHandler(WinHisitory_Closed); this.Title = StringHelper.FindLanguageResource("Hisitory"); isHave = true; }
public WinOptionSetting(WinLync lync) { this.lync = lync; InitializeComponent(); tabOptionSetting.TabStripPlacement = Dock.Left; WinOptionSettingViewModel model = new WinOptionSettingViewModel(this); this.DataContext = model; model.StartLoadData(); this.Closed += new EventHandler(WinOptionSetting_Closed); isHave = true; WinLync.lyncCounter++; }
public WinAllContact(WinLync lync, bool isBlindTransCall = false) { InitializeComponent(); this.isBlindTransCall = isBlindTransCall; //是查询两百条数据 GetAllLyncContacts("", 0); try { for (int i = 0; i < dtContact.Rows.Count; i++)//对数据按名称进行排序 { string iName = dtContact.Rows[i][0].ToString(); for (int j = i + 1; j < dtContact.Rows.Count; j++) { string jName = dtContact.Rows[j][0].ToString(); if (iName.CompareTo(jName) == 1) { object[] temp = new object[3]; temp = dtContact.Rows[j].ItemArray; dtContact.Rows[j].ItemArray = dtContact.Rows[i].ItemArray; dtContact.Rows[i].ItemArray = temp; iName = jName; } } } } catch (System.Exception ex) { LogManager.SystemLog.Error(ex.ToString()); } dtSource = dtContact.Copy(); //如果为空,则重按定位第一页按钮 2015/7/29 if (dtSource.Rows.Count == 0) { txtPage.Text = "1"; string str = ""; GetPageLyncContacts(str, Convert.ToInt32(txtPage.Text) - 1); dtSource = dtContact.Copy(); this.listContact.DataContext = dtContact; } else { this.listContact.DataContext = dtContact; } WinLync.lyncCounter++; this.lync = lync; this.Closed += new EventHandler(WinAllContact_Closed); this.txtInput.Focus();//是输入文本获取焦点 }
public WinDail(WinLync Lync) { InitializeComponent(); this.Lync = Lync; this.Closed += new EventHandler(WinDail_Closed); WinLync.lyncCounter++; imgNum1.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum1.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNum2.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum2.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNum3.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum3.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNum4.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum4.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNum5.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum5.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNum6.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum6.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNum7.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum7.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNum8.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum8.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNum9.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum9.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNum0.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNum0.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNumS.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNumS.MouseLeave += new MouseEventHandler(img_MouseLeave); imgNumX.MouseEnter += new MouseEventHandler(img_MouseEnter); imgNumX.MouseLeave += new MouseEventHandler(img_MouseLeave); imgCall.MouseEnter += new MouseEventHandler(img_MouseEnter); imgCall.MouseLeave += new MouseEventHandler(img_MouseLeave); imgBack.MouseEnter += new MouseEventHandler(img_MouseEnter); imgBack.MouseLeave += new MouseEventHandler(img_MouseLeave); this.Title = StringHelper.FindLanguageResource("Keypad"); this.txtNumber.Focus(); }
public bool isClose = false; //语音升级 视频升级方挂断后传递的值让接受方也挂断 public WinCallReceive(WinLync lync, string name, bool isVide) { InitializeComponent(); btnFinish.Visibility = Visibility.Hidden; imgOtherPhone.Visibility = Visibility.Hidden; txtOtherPhone.Visibility = Visibility.Hidden; callName = name; model = new WinCallReceiveViewModel(this, isVide); this.lync = lync; this.DataContext = model; this.Title = StringHelper.GetSubString(name); isvideo = isVide; if (isVide) { this.Height = 120; } else { imgType.Visibility = Visibility.Collapsed; } if (lync.isConnected == true) //语音升级视频后再转移,此时expander不可见,espace无此种转移 { this.expander.Visibility = Visibility.Hidden; //modify by 00327190 2015/7/27 语音升级视频时,未接受请求时,本地的视频升级按钮,加人按钮,呼叫保持按钮不能使用 lync.winCall.btnVideo.IsEnabled = false; lync.winCall.btnAddContact.IsEnabled = false; lync.winCall.btnCallSuspend.IsEnabled = false; } WinLync.lyncCounter++; this.Left = SystemParameters.WorkArea.Width - this.Width; this.Top = SystemParameters.WorkArea.Height - this.Height; this.Closing += new System.ComponentModel.CancelEventHandler(WinCallReceive_Closing); this.Closed += new EventHandler((sender, e) => { WinLync.lyncCounter--; }); GetPhone(); //2015/7/28 lync.isHave = true; }
public FrmToolBar(WinLync lync) { InitializeComponent(); phoneJointEventCB = new PhoneJointEventCB(PhoneJointEventCBMethod); this.Visible = false; this.TopMost = true; SetButtonVisible(false); BtnHisitory.FlatAppearance.BorderSize = 0; BtnHisitory.FlatStyle = FlatStyle.Flat; BtnSetting.FlatAppearance.BorderSize = 0; BtnSetting.FlatStyle = FlatStyle.Flat; BtnDail.FlatAppearance.BorderSize = 0; BtnDail.FlatStyle = FlatStyle.Flat; BtnIP.FlatAppearance.BorderSize = 0; BtnIP.FlatStyle = FlatStyle.Flat; BtnPC.FlatAppearance.BorderSize = 0; BtnPC.FlatStyle = FlatStyle.Flat; BtnFWD.FlatAppearance.BorderSize = 0; BtnFWD.FlatStyle = FlatStyle.Flat; BtnMail.FlatAppearance.BorderSize = 0; BtnMail.FlatStyle = FlatStyle.Flat; BtnDail.Click += new EventHandler(BtnDail_Click); BtnHisitory.Click += new EventHandler(BtnHisitory_Click); BtnSetting.Click += new EventHandler(BtnSetting_Click); BtnIP.Click += new EventHandler(BtnIP_Click); BtnPC.Click += new EventHandler(BtnPC_Click); BtnFWD.Click += new EventHandler(BtnFWD_Click); BtnMail.Click += new EventHandler(BtnMail_Click); LabState.MouseEnter += new EventHandler(LabState_MouseEnter); LabState.MouseLeave += new EventHandler(LabState_MouseLeave); this.Lync = lync; labState.TabIndex = 1; labState.Focus(); toolBarWiewModel = new AddInToolBarWiewModel(this); }