private void Row_DoubleClick(object sender, MouseButtonEventArgs e) { var selected = ((DataGridRow)sender).Item as Przedmiot; var idKat = CbKat.SelectedValue; Window2 win2 = new Window2(selected, (int)idKat); win2.Show(); }
public void SWpublish() //已改 { //保存三违信息确认的数据库信息 RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel; //DBSCMDataContext dc = new DBSCMDataContext(); var SWcheck = dc.Nswinput.Where(p => p.Id == Convert.ToInt32(sm.SelectedRows[0].RecordID.Trim())); foreach (var r in SWcheck) { //r.ID = Convert.ToInt32(sm.SelectedRows[0].RecordID.Trim()); r.Fine = lbl_Fine.Text.Trim() == "" ? 0 : Convert.ToDecimal(lbl_Fine.Text.Trim()); r.Ispublic = Radio3.Checked ? 1 : 0; r.Isadministrativepenalty = Radio1.Checked ? 1 : 0; r.Isend = 1; r.Islearn = Radio5.Checked ? 1 : 0; try { dc.SubmitChanges(); } catch (Exception er) { Ext.Msg.Alert("", er.ToString()).Show(); } } //短信提醒三违人员 if (ckb_IsSms.Checked == true) { ////获取发送者账号信息 //string user = ""; //user = SessionBox.GetUserSession().LoginName; ////获取手机号码 //var per = dc.Person.Where(p => p.Name == tf_name.Text.Trim()); //string tel = ""; //foreach (var r in per) //{ // tel = r.Tel.Trim(); //} ////获取发送的短信内容 //string content = ""; //if (ta_smsText.Text == "") //{ // content = "祁南矿干部走动式巡查管理系统提示您:您有一条三违信息已经确认!"; //} //else //{ // content = ta_smsText.Text.Trim(); //} ////发送短信 //Sms sms = new Sms(); //sms.SendSms(GhtnTech.Utility.ExtensionHelper.SmsType.HiddenTroubleTips, user, content, tel); } Ext.Msg.Alert("提示", "该三违信息已确认!").Show(); ckb_IsSms.Checked = false; storeload(); Window2.Hide(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { win2 = new Window2(); win2.Show(); string file1 = @"C:\Users\Username\Desktop\drop.avi"; vlcPlayer.addTarget("file:///" + file1, null, AXVLC.VLCPlaylistMode.VLCPlayListReplaceAndGo, 0); vlcPlayer.play(); }
private void CreateWindow2Overlay() { win2 = new Window2(); win2.Left = Left; win2.Top = Top; win2.Width = Width; win2.Height = Height; win2.Owner = this; win2.Show(); }
/// <summary> /// 初始化页面数据 /// </summary> private void InitData() { btnClose.OnClientClick = ActiveWindow.GetHidePostBackReference(); tbxFCustomer.OnClientTriggerClick = Window2.GetSaveStateReference(txtFCode.ClientID, tbxFCustomer.ClientID) + Window2.GetShowReference("../../Common/WinCustomer.aspx", "客户档案"); tbxFName.OnClientTriggerClick = Window2.GetSaveStateReference(txtFItemCode.ClientID, tbxFName.ClientID) + Window2.GetShowReference("../../Common/WinProducReference.aspx", "产品档案"); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Button1.OnClientClick = Window1.GetShowReference("./iframe_iframe_window2.aspx"); Button2.OnClientClick = Window2.GetShowReference("./iframe_iframe_window2.aspx"); } labResult.Text = "页面加载时间:" + DateTime.Now.ToLongTimeString(); }
public void TryLogin() { //Console.WriteLine(LoginName); //Console.WriteLine(LoginPass); if (userToCheck.CheckUser(LoginName)) { Window2 sec = new Window2(); Application.Current.Windows[0].Close(); sec.ShowDialog(); } }
protected void Dialysis_help(object sender, DirectEventArgs e) { _PAT_ID = e.ExtraParams["pat_ic"].ToString(); Window2.Width = 700; Window2.Height = 700; Window2.Show(); Window2.Loader.SuspendScripting(); Window2.Loader.Url = "./Dialysis_help.aspx?sel_PAT_NO=" + _PAT_ID; Window2.Loader.DisableCaching = true; Window2.LoadContent(); }
/// <summary> /// 初始化页面数据 /// </summary> private void InitData() { ViewState["_AppendToEnd"] = true; txtCreateBy.Text = CurrentUser.AccountName; tbxFCustomer.OnClientTriggerClick = Window2.GetSaveStateReference(txtFCode.ClientID, tbxFCustomer.ClientID) + Window2.GetShowReference("../../Common/WinUnitAll.aspx");//WinSupplier txtFDate.SelectedDate = DateTime.Now; }
/// <summary> /// 初始化页面数据 /// </summary> private void InitData() { ViewState["_AppendToEnd"] = true; txtCreateBy.Text = CurrentUser.AccountName; tbxBankCode.OnClientTriggerClick = Window1.GetSaveStateReference(tbxBankCode.ClientID) + Window1.GetShowReference("../../Common/WinBank.aspx"); tbxFCustomer.OnClientTriggerClick = Window2.GetSaveStateReference(txtFCode.ClientID, tbxFCustomer.ClientID) + Window2.GetShowReference("../../Common/WinCustomer.aspx"); tbxFSubjectCode.OnClientTriggerClick = Window4.GetSaveStateReference(tbxFSubjectCode.ClientID) + Window4.GetShowReference("../../Common/WinSubject.aspx"); //删除选中单元格的客户端脚本 string deleteScript = DeleteScript(); string deleteSubject = DeleteSubject(); //新增 var defaultObj = new JObject { { "FItemCode", "" }, { "FItemName", "" }, { "FSpec", "" }, { "FUnit", "" }, { "FPrice", "" }, { "FQty", "0" }, { "FBottleQty", "0" }, { "FBottleOweQty", "0" }, { "FCateName", "" }, { "colDelete", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>",// deleteScript, IconHelper.GetResolvedIconUrl(Icon.Delete)) }, }; //报销项目 var subjectObj = new JObject { { "FSubjectCode", "" }, { "FSubjectName", "" }, { "FAmount", "" }, { "FMemo", "" }, { "colDeleteSubject", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>",// deleteSubject, IconHelper.GetResolvedIconUrl(Icon.Delete)) }, }; // 在第一行新增一条数据 btnAdd.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd); btnAddSubject.OnClientClick = Grid2.GetAddNewRecordReference(subjectObj, AppendSubjectToEnd); txtFDate.SelectedDate = DateTime.Now; }
protected void btn_newStep_Click(object sender, EventArgs e) { if (Grid1.SelectedRowIndex >= 0) { PageContext.RegisterStartupScript(Window2.GetShowReference(string.Format("FlowMgmt_newStep.aspx?flowId={0}", Grid1.DataKeys[Grid1.SelectedRowIndex][0]))); } else { Alert.ShowInTop("请先选择相应的流程后再编辑步骤!"); return; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { btnShowInClient.OnClientClick = Window2.GetShowReference(); btnHideInClient.OnClientClick = Window2.GetHideReference(); btnHideInClient2.OnClientClick = Window2.GetHidePostBackReference("btnHideInClient2"); //PageContext.RegisterStartupScript(Window2.GetShowReference() + Window2.GetMaximizeReference()); } }
private IntPtr CreateVSWindowInternal2(string commandName, ref VSWindowHandle handle, DTE2 applicationObject, AddIn addIn) { string hostAssembly = Assembly.GetCallingAssembly().Location; // +Alphonso (8/14/2014) // // Note: // 'DocumentSite' can only be set once so if we utilize the same // guid for each window creation it in essence is referring to // the same object that has already been created and registered // as a COM Instance. // // The myth is that the COM Guid needs to be the same as the assembly // guid but I believe this is a Microsoft bug. For that reason I'm // commenting out this code and replacing it with a new Guid each time which // mimics having a separate assembly where the COM visible Guid's are different. // // Bug Fix: // 1 Assembly + 1 Control = Single COM+ Guid(); // 1 Assembly + N number of Controls = New COM+ Guids(); //const string hostAssemblyComGuid = "{F494D23E-B31E-45AB-BCA4-28865DFC2E60}"; string hostAssemblyComGuid = Guid.NewGuid().ToString(); object m_managedControl = null; IntPtr m_controlHandle = IntPtr.Zero; // Create the window and then store it in our collection. Windows2 hwndWindows = (Windows2)applicationObject.Windows; Window2 hwndWindowControl = (Window2)hwndWindows.CreateToolWindow2( addIn, hostAssembly, handle.ClassName, handle.VSWindowTitle, hostAssemblyComGuid, ref m_managedControl ); hwndWindowControl.Visible = true; hwndWindowControl.Width = m_stack.Pop(); // width hwndWindowControl.Height = m_stack.Pop(); // height // Grab the managed handle of the control so we can register it // to receive our unmanaged window messages whenever events are raised. // Without this we won't be able to capture specific window events :(. m_controlHandle = ((System.Windows.Forms.Control)m_managedControl).Handle; ((IThemeControl)m_managedControl).SetTheme(); handle.ControlHandle = m_controlHandle; handle.Window = hwndWindowControl; handle.Control = m_managedControl as System.Windows.Forms.Control; return(handle.ControlHandle); }
protected void btn_addMember_Click(object sender, EventArgs e) { if (Grid2.SelectedRowIndex >= 0) { string projId = Grid2.DataKeys[Grid2.SelectedRowIndex][0].ToString(); string url = string.Format("SelectUsers.aspx?id={0}", projId); PageContext.RegisterStartupScript(Window2.GetShowReference(url)); } else { Alert.ShowInTop("请先选定左侧相应的项目再进行管理!"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { OperationResult objOperationResult = new OperationResult(); dpFechaInicio.SelectedDate = DateTime.Now.AddDays(-1); //DateTime.Parse("25/07/2014"); dpFechaFin.SelectedDate = DateTime.Now; // DateTime.Parse("25/07/2014"); LoadComboBox(); btnHojaRuta.OnClientClick = winEdit1.GetSaveStateReference(hfRefresh.ClientID) + winEdit1.GetShowReference("../ExternalUser/FRMHojaRuta.aspx"); btnReagendar.OnClientClick = Window1.GetSaveStateReference(hfRefresh.ClientID) + Window1.GetShowReference("../ExternalUser/FRMReagenda.aspx"); btnEliminarAgenda.OnClientClick = Window2.GetSaveStateReference(hfRefresh.ClientID) + Window2.GetShowReference("../ExternalUser/FRMCancelarAgenda.aspx"); } }
public Window1() { InitializeComponent(); // Only time creating an instance of MyModel Model = new MyModel(); Model.MyProperties = string.Empty; // Pass reference of MyModel to other Windows (or even better ViewModels) Window2 wnd = new Window2(Model); wnd.Show(); MessageBox.Show(Model.MyProperties); // Output: "This is an example." }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string tabId = Request["id"]; label_tabId.Text = tabId; //加载申请信息 loadInfo(tabId); btn_addFlow.OnClientClick = Window2.GetSaveStateReference(txa_defFlow.ClientID, txb_flowId.ClientID) + Window2.GetShowReference("~/admin/FlowMgmt_SelfDefined.aspx"); } }
private void OpenSecondWindow_Click(object sender, RoutedEventArgs e) { if (SecondWindowOpen == false) { window2 = new Window2(); window2.Visibility = Visibility.Visible; this.SecondWindowOpen = true; } else { //do whatever you want with window2, like window2.Close(); //or window2.Visibility = Visibility.Hidden; } }
public void GoToPage(ApplicationPage page) { switch (page) { case ApplicationPage.NewControl1: _stage.Child = new UserControl1(); break; case ApplicationPage.NewWindow2: var win = new Window2(); win.Show(); break; } }
public void PlaceUpdate() { RowSelectionModel sm = this.GridPanel2.SelectionModel.Primary as RowSelectionModel; if (sm.SelectedRows.Count == 1) { TDID.SetValue(sm.SelectedRows[0].RecordID.Trim()); Window2.Show(); } else { Ext.Msg.Alert("提示", "请只选择一个要修改的地点!").Show(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Button1.OnClientClick = Window1.GetShowReference("../grid/grid_iframe_window.aspx", "弹出窗口一"); Button2.OnClientClick = Window2.GetShowReference("../grid/grid_iframe_window.aspx", "弹出窗口二"); // EnableConfirmOnClose="true" and CloseAction="HidePostBack" //Window2.OnClientCloseButtonClick = Window2.GetConfirmHidePostBackReference(); } labResult.Text = "页面加载时间:" + DateTime.Now.ToLongTimeString(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { TriggerBox1.OnClientTriggerClick = Window1.GetSaveStateReference(TriggerBox1.ClientID, HiddenField1.ClientID) + Window1.GetShowReference("./triggerbox_iframe_iframe.aspx"); TriggerBox2.OnClientTriggerClick = Window2.GetSaveStateReference(TriggerBox2.ClientID, HiddenField2.ClientID) + Window2.GetShowReference("./triggerbox_iframe_iframe.aspx"); } labResult.Text = "页面加载时间:" + DateTime.Now.ToLongTimeString(); }
/// <summary> /// 當月使用藥品耗材查詢 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Dialysis_13(object sender, DirectEventArgs e) { _PAT_ID = e.ExtraParams["pat_ic"].ToString(); USER_ID = Session["USER_ID"].ToString(); TextArea1.Visible = true; // TextArea1.Text = "USER_ID = " + USER_ID; Window2.Width = 600; Window2.Height = 400; Window2.Show(); Window2.Loader.SuspendScripting(); Window2.Loader.Url = "./Dialysis_13.aspx?sel_PAT_NO=" + _PAT_ID + "&USER_ID=" + USER_ID; Window2.Loader.DisableCaching = true; Window2.LoadContent(); }
public void LoadData() { baseLoad(); RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel; var data = dc.Movefrequency.Where(p => p.Frequencyid == Convert.ToInt32(sm.SelectedRows[0].RecordID.Trim())); foreach (var r in data) { up_dep.SetValue(r.Deptid); up_pos.SetValue(r.Posid.Value.ToString()); up_pla.SetValue(r.Placeid.Value.ToString()); up_fun.Text = r.Frequency.Value.ToString(); } Window2.Show(); }
/// <summary> /// 更新驾驶员 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnUpdRole_Click(object sender, EventArgs e) { string sIDStr = string.Empty; int selectedCount = Grid1.SelectedRowIndexArray.Length; if (selectedCount == 0) { Alert.ShowInTop("请选择一项纪录!", MessageBoxIcon.Warning); return; } object[] keys = Grid1.DataKeys[Grid1.SelectedRowIndex]; string openUrl = String.Format("Driver_Window.aspx?ID={0}", HttpUtility.UrlEncode(keys[0].ToString())); PageContext.RegisterStartupScript(Window2.GetShowReference(openUrl, "修改驾驶员")); }
private static string FindFolder(UIHierarchyItem item) { Window2 window = _dte.ActiveWindow as Window2; if (window != null && window.Type == vsWindowType.vsWindowTypeDocument) { // if a document is active, use the document's containing directory Document doc = _dte.ActiveDocument; if (doc != null && !string.IsNullOrEmpty(doc.FullName)) { ProjectItem docItem = _dte.Solution.FindProjectItem(doc.FullName); if (docItem != null) { string fileName = docItem.Properties.Item("FullPath").Value.ToString(); if (File.Exists(fileName)) { return(Path.GetDirectoryName(fileName)); } } } } string folder = null; ProjectItem projectItem = item.Object as ProjectItem; Project project = item.Object as Project; if (projectItem != null) { string fileName = projectItem.FileNames[0]; if (File.Exists(fileName)) { folder = Path.GetDirectoryName(fileName); } else { folder = fileName; } } else if (project != null) { folder = project.GetRootFolder(); } return(folder); }
protected void btnLook_Click(object sender, EventArgs e) { int roleID = GetSelectedDataKeyID(GridDpt); if (roleID <= 0) { Alert.ShowInTop("请选择要查看的任务"); return; } BLL.tTask bll = new BLL.tTask(); Model.tTask m = bll.GetModel(roleID); string openUrl = String.Format("./TaskEditLook.aspx?Id={0}", HttpUtility.UrlEncode(roleID.ToString())); PageContext.RegisterStartupScript(Window2.GetSaveStateReference(roleID.ToString()) + Window2.GetShowReference(openUrl, m.Title)); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Button1.OnClientClick = Window1.GetShowReference("./iframe_iframe_window2.aspx"); // EnableConfirmOnClose="true" //Window1.OnClientCloseButtonClick = Window1.GetConfirmHideReference(); Button2.OnClientClick = Window2.GetShowReference("./iframe_iframe_window2.aspx"); // EnableConfirmOnClose="true" and CloseAction="HidePostBack" //Window2.OnClientCloseButtonClick = Window2.GetConfirmHidePostBackReference(); } //Button1.Text = "Popup window in current window"; // +DateTime.Now.ToString(); //Button2.Text = "Popup window in parent window"; // +DateTime.Now.ToString(); }
/// <summary> /// 右键修改事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnMenuModify_Click(object sender, EventArgs e) { if (this.tvCheckItemSet.SelectedNode != null && this.tvCheckItemSet.SelectedNodeID != "0") { this.hdSelectId.Text = this.tvCheckItemSet.SelectedNode.NodeID; var q = BLL.CheckItemSetService.GetCheckItemSetById(this.tvCheckItemSet.SelectedNodeID); if (q != null) { PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("SpecialCheckTypesEdit.aspx?supCheckItem={0}&checkItemSetId={1}", q.SupCheckItem, q.CheckItemSetId, "编辑 - "))); } } else { ShowNotify("请选择树节点!", MessageBoxIcon.Warning); } }
/// <summary> /// 当前活动的项目(项目资源管理窗口中) /// </summary> /// <returns></returns> public static Project GetActiveProject() { try { Window2 window = _dte.ActiveWindow as Window2; Document doc = _dte.ActiveDocument; if (window != null && window.Type == vsWindowType.vsWindowTypeDocument) { // if a document is active, use the document's containing directory if (doc != null && !string.IsNullOrEmpty(doc.FullName)) { ProjectItem docItem = _dte.Solution.FindProjectItem(doc.FullName); if (docItem != null && docItem.ContainingProject != null) { return(docItem.ContainingProject); } } } Array activeSolutionProjects = _dte.ActiveSolutionProjects as Array; if (activeSolutionProjects != null && activeSolutionProjects.Length > 0) { return(activeSolutionProjects.GetValue(0) as Project); } if (doc != null && !string.IsNullOrEmpty(doc.FullName)) { var item = _dte.Solution?.FindProjectItem(doc.FullName); if (item != null) { return(item.ContainingProject); } } } catch (Exception ex) { //Logger.Log("Error getting the active project" + ex); OutPutInfo.Error(ex); } return(null); }
private void menuItemCreatePlaylist_Click(object sender, RoutedEventArgs e) { w2 = new Window2(compositions, playlists); w2.Show(); }
private void button3_Click(object sender, RoutedEventArgs e) { var newWindow = new Window2(); newWindow.Show(); }
public ToolWindowContext(Window Window, Window2 Window2, dynamic ControlObject) { this.Window = Window; this.Window2 = Window2; this.ControlObject = ControlObject; }
public ShellWindow(Window2 window) { _window = window; }
public WindowNodeFactory(Window2 window) : this(window, null) { }
public WindowNodeFactory(Window2 window, string name) { _window = window; _name = name; }
private void ShowDeploymentProperties() { string guidStr = "{426E8D27-3D33-4fc8-B3E9-9883AADC679F}"; object objTemp = null; string projPath = ProjectPath; string execAsm = Assembly.GetExecutingAssembly().Location; Windows2 wins = (Windows2)_app.Windows; try { if (!isToolWin) { toolWin = (Window2)wins.CreateToolWindow2(_addIn, execAsm, "DeployAddIn.DepProp", "Deployment Properties", guidStr, ref objTemp); toolWin.IsFloating = false; toolWin.Linkable = false; propForm = (DepProp)objTemp; propForm.AutoScroll = true; //propForm.Init(projPath); isToolWin = true; } propForm.Init(ProjectPath); if (wins == null) toolWin.Visible = true; //toolWin.Activate(); toolWin.Visible = true; } catch (Exception e) { MessageBox.Show(e.Message); } }