/// <summary> /// Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering. /// </summary> protected override void CreateChildControls() { try { strCurrentSiteUrl = HttpContext.Current.Request.Url.ToString(); objRadWindowManager = new RadWindowManager(); objRadWindowManager.ID = "objRadWindowManager"; objRadWindow = new RadWindow(); objRadWindow.ID = "objRadWindow"; objRadWindow.Behaviors = WindowBehaviors.Move | WindowBehaviors.Close | WindowBehaviors.Resize| WindowBehaviors.Maximize| WindowBehaviors.Minimize; objRadWindow.OnClientClose = "OnClientClose"; objRadWindow.OnClientCommand = "OnClientCommand"; objRadWindow.DestroyOnClose = false; objRadWindow.AutoSize = false; objRadWindow.VisibleTitlebar = true; objRadWindow.VisibleStatusbar = false; objRadWindow.Opacity = 100; objRadWindowManager.Windows.Add(objRadWindow); this.Controls.Add(objRadWindowManager); } catch (Exception ex) { CommonUtility.HandleException(strCurrentSiteUrl,ex); } }
public BusyOverlay(bool closable, string content = null, bool hideAppBar = true) { _closable = closable; _page = (PhoneApplicationPage)((PhoneApplicationFrame)Application.Current.RootVisual).Content; _hideAppBar = hideAppBar; _popup = new RadWindow() { IsAnimationEnabled = false, IsClosedOnOutsideTap = false, Content = _border = new Border() { Opacity = 0.5, Width = _page.ActualWidth, Height = _page.ActualHeight, Background = new SolidColorBrush(_overlayBackgroundColor), Child = new RadBusyIndicator() { IsRunning = true, AnimationStyle = AnimationStyle.AnimationStyle9, VerticalAlignment = VerticalAlignment.Center, HorizontalAlignment = HorizontalAlignment.Stretch, Content = content } } }; }
private void RbtnAgregar_Click_1(object sender, RoutedEventArgs e) { DialogParameters parameters = new DialogParameters(); parameters.Content = "Ingresa la nueva descripcion"; parameters.Closed = this.OnAddClosed; parameters.Header = "Agregar"; parameters.Owner = this; RadWindow.Prompt(parameters); }
private void DeleteHost_Click(object sender, RoutedEventArgs e) { if (viewModel.SelectedItem == null) { RadWindow.Alert("Please select host first."); return; } //viewModel.List.WatchList.RemoveAt(0); RadWindow.Confirm($"Are you sure you want to delete {viewModel.SelectedItem.Host}?", this.OnDeleteConfirmClosed); }
private void btnHistory_Click(object sender, RoutedEventArgs e) { RadWindow win = new RadWindow(); EstimateHistory historyDlg = new EstimateHistory(this.DataContext); win.Header = "Estimate History"; win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen; win.Content = historyDlg; win.ShowDialog(); }
/// <summary> /// Configures RadPrompt according to the RadWindow specified. /// </summary> /// <param name="window">RadWindow in which the RadPrompt will appear.</param> /// <param name="pars">Structure that holds all possible parameters for customizing dialog window.</param> public override void Configure(RadWindow window, DialogParameters pars) { this.dialogParams = pars; if (window.Header == null || String.IsNullOrEmpty(window.Header.ToString())) { window.Header = "Prompt"; } base.Configure(window, pars); }
public static void PopUpErrorMessage(Exception ex, string source) { StringBuilder message = new StringBuilder(); message.Append("An error occurred in " + source + ".\r\n"); message.Append("Time: " + DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss") + ".\r\n"); message.Append(ex.Message); RadWindow.Alert(message.ToString()); }
void mrsClient_CreateSalesEstimateLogCompleted(object sender, CreateSalesEstimateLogCompletedEventArgs e) { RadWindow window = this.ParentOfType <RadWindow>(); if (window != null) { window.DialogResult = true; window.Close(); } }
private void CancelButton_Click(object sender, RoutedEventArgs e) { RadWindow window = this.ParentOfType <RadWindow>(); if (window != null) { window.DialogResult = false; window.Close(); } }
void ValidationWin_Closed(object sender, WindowClosedEventArgs e) { RadWindow window = this.ParentOfType <RadWindow>(); if (window != null) { window.DialogResult = true; window.Close(); } }
private void showXamlBtn_Click(object sender, System.Windows.RoutedEventArgs e) { RadWindow window = new RadWindow() { Width = 500, Height = 400, WindowStartupLocation = WindowStartupLocation.CenterOwner }; TextBox textBox = new TextBox() { IsReadOnly = true, VerticalScrollBarVisibility = ScrollBarVisibility.Auto, HorizontalScrollBarVisibility = ScrollBarVisibility.Auto }; textBox.Text = (this.DataContext as ExampleDataContext).XamlData; window.Content = textBox; window.ShowDialog(); }
public System.Data.DataTable getoperarios() { string conect = GetOrigenope(intSUCURSALID); System.Data.DataTable Tabla = new System.Data.DataTable(); string strFuncion = Funcion(intSUCURSALID); try { using (System.Data.SqlClient.SqlConnection Cnn = new System.Data.SqlClient.SqlConnection(conect)) { //Cnn.ConnectionTimeout = 500; using (System.Data.SqlClient.SqlCommand Cmd = new System.Data.SqlClient.SqlCommand(strFuncion, Cnn)) { try { // Cmd.CommandType = CommandType.Text; Cmd.CommandText = strFuncion; Cmd.CommandTimeout = 0; System.Data.SqlClient.SqlDataAdapter Datos = new System.Data.SqlClient.SqlDataAdapter(Cmd); Cnn.Open(); Datos.Fill(Tabla); return(Tabla); } catch (Exception ex) { throw new Exception("Error de acceso a datos, Error: " + ex.ToString()); } finally { if (Cnn.State == ConnectionState.Open) { Cnn.Close(); } } } } } catch (Exception z) { RadWindow radWindow = new RadWindow(); RadWindow.Alert(new DialogParameters() { Content = "Error al acceso de datos .", Header = "BIG", DialogStartupLocation = WindowStartupLocation.CenterOwner // IconContent = ""; }); return(Tabla); } }
private void ReadFromXml() { bool success; Exception exception = new(); try { if (File.Exists(Path.Combine(App_Folder, "Settings.xml"))) { System.Xml.XmlDocument readFile = new(); readFile.Load(Path.Combine(App_Folder, "Settings.xml")); System.Xml.XmlNode startupNode = readFile.SelectSingleNode("/Settings/Startup"); RunsOnStartup = startupNode.InnerText == "True"; System.Xml.XmlNode splashScreenNode = readFile.SelectSingleNode("/Settings/SplashScreen"); SplashScreen = splashScreenNode.InnerText == "True"; System.Xml.XmlNode intervalNode = readFile.SelectSingleNode("/Settings/Interval"); Interval = double.TryParse(intervalNode.InnerText, out double outInterval) ? outInterval : 30; System.Xml.XmlNode notifTextNode = readFile.SelectSingleNode("/Settings/NotifText"); NotifText = notifTextNode.InnerText; } else { RunsOnStartup = true; SplashScreen = true; Interval = 30; NotifText = "Remember!" + Environment.NewLine + "You're not the one in charge here!"; } LastRead = DateTime.Now; if (Interval <= 0) { RadWindow.Alert(new DialogParameters { Header = "Error", Content = "The interval value must be greater than 0" + Environment.NewLine + "1 minute intervals will be used instead" }); Interval = 1; } success = true; } catch (Exception ex) { success = false; exception = ex; } if (!success) { RadWindow.Alert(new DialogParameters { Header = "The Shivisi App - Error", Content = "Error reading the settings" + Environment.NewLine + exception.Message }); } }
/// <summary> /// Configures RadAlert according to the RadWindow. /// </summary> /// <param name="window">RadWindow in which the RadPrompt will appear.</param> /// <param name="pars">Structure that holds all possible parameters for customizing dialog window.</param> public virtual void Configure(RadWindow window, DialogParameters pars) { if (window.Header == null || String.IsNullOrEmpty(window.Header.ToString())) { window.Header = "Alert"; } this.ParentWindow = window; this.dialogParams = pars; }
public void ShowInTaskbar(RadWindow control, string title) { control.Show(); var window = control.ParentOfType <Window>(); window.ShowInTaskbar = true; window.Title = title; var uri = new Uri("pack://application:,,,/RespaldosEdicion;component/Resources/bookshelf.ico"); window.Icon = BitmapFrame.Create(uri); }
private void InternalPrintButton_Click(object sender, RoutedEventArgs e) { RadWindow win = new RadWindow(); InternalPrintSelection previewDlg = new InternalPrintSelection(_estimateRevisionId, "internal", checkBoxDoNotIncludeProductNameAndCode.IsChecked == false, checkBoxDoNotIncludeUOMAndQuantity.IsChecked == false, _estimateDisclaimerCurrentId, _estimateDisclaimerNewId, checkBoxIncludeSpecifications.IsChecked ?? true); win.Header = "Select Print Version"; win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen; win.Content = previewDlg; win.Closed += new EventHandler <WindowClosedEventArgs>(win_Closed); win.ShowDialog(); }
public static void SetDialogResult(RadWindow radWindow, bool?value) { if (radWindow != null) { radWindow.SetValue(RadWindow.DialogResultProperty, value); if (value != null) { radWindow.Close(); } } }
private void OnContentClicked(object sender, RoutedEventArgs e) { InfoWindowContent infoWindowContent = new InfoWindowContent(); infoWindowContent.DataContext = this.DataContext; RadWindow window = new RadWindow(); window.Content = infoWindowContent; window.Header = "Image details..." ; window.ResizeMode = ResizeMode.NoResize; window.WindowStartupLocation=Controls.WindowStartupLocation.CenterScreen; window.ShowDialog(); }
private void btnCompare_Click(object sender, RoutedEventArgs e) { RadWindow win = new RadWindow(); CompareEstimates compareDlg = new CompareEstimates(this.DataContext); win.Header = "Compare Estimates"; win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen; win.Content = compareDlg; win.ResizeMode = ResizeMode.NoResize; win.ShowDialog(); }
public void ShowInTaskbar(RadWindow control, string title) { control.Show(); var window = control.ParentOfType <Window>(); window.ShowInTaskbar = true; window.Title = title; var uri = new Uri("pack://application:,,,/ListadoDeTesis;component/Resources/listLawyer.ico"); window.Icon = BitmapFrame.Create(uri); }
private void HyperlinkButton_AddTemplate_Click(object sender, RoutedEventArgs e) { NewNotesTemplate noteDlg = new NewNotesTemplate(0); RadWindow win = new RadWindow(); win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen; win.Closed += new EventHandler <WindowClosedEventArgs>(win_Closed); win.Header = "Add Note Template"; win.Content = noteDlg; win.ShowDialog(); }
public static void SetWindowSizeAndLocation(RadWindow window, Rect rectangle) { window.Left = rectangle.Left; window.Top = rectangle.Top; if (window.IsResizing) { window.Width = rectangle.Width; window.Height = rectangle.Height; } window.UpdateLayout(); }
public void AssociateWithObject(TreeListViewRow destination) { try { // Associate all selected objects foreach (var objectItem in ObjectViewModelLocator.GetObjectVM().SelectedItems) { // With all selected requirements (m:n) foreach (var requirementItem in RequirementViewModelLocator.GetRequirementVM().SelectedItems) { ObjectRequirementModel objectRequirementItem = new ObjectRequirementModel { IsNew = true, IsChanged = false, IsDeleted = false, Project_ID = Globals.Project_ID, Object_ID = objectItem.ID, Requirement_ID = requirementItem.ID, RequirementType_ID = requirementItem.RequirementType_ID, ArticleNo = requirementItem.ArticleNo, ArticleHeader = requirementItem.ArticleHeader, //RequirementType = Globals.DraggedItem.Type, ChildRequirements = new TD.ObservableItemCollection <ObjectRequirementModel>(), }; foreach (var childItem in requirementItem.ChildRequirements) { ObjectRequirementModel objectRequirementChildItem = new ObjectRequirementModel { IsNew = true, IsChanged = false, IsDeleted = false, Project_ID = Globals.Project_ID, Object_ID = objectRequirementItem.Object_ID, Requirement_ID = childItem.ID, RequirementType_ID = childItem.RequirementType_ID, //objectFunctionalityChildItem.FunctionParent_ID = childItem.Parent_ID; ArticleNo = childItem.ArticleNo, ArticleHeader = childItem.ArticleHeader, ChildRequirements = new TD.ObservableItemCollection <ObjectRequirementModel>() }; objectRequirementItem.ChildRequirements.Add(objectRequirementChildItem); } ; ObjectRequirements.Add(objectRequirementItem); } } } catch (Exception ex) { RadWindow.Alert(ex.Message); } }
protected void addtoalbum_Click(object sender, EventArgs e) { RadWindow window1 = new RadWindow(); window1.NavigateUrl = "../Photos/Add-Photo-Album.aspx"; window1.Modal = true; window1.VisibleOnPageLoad = true; window1.Width = 500; window1.Height = 300; llooader.Controls.Add(window1); }
public void ShowInTaskbar(RadWindow control, string title) { control.Show(); var window = control.ParentOfType <Window>(); window.ShowInTaskbar = true; window.Title = title; var uri = new Uri("pack://application:,,,/ManttoProductosAlternos;component/Resources/Books_128.png"); window.Icon = BitmapFrame.Create(uri); }
public Class1() { //InitializeComponent(); //InitRibbonView(); //var window = RadWindowManager.Current.GetWindows().Where(a => a.IsActiveWindow).FirstOrDefault(); var window = new RadWindow(); var ribbonView = InitRibbonView(); window.Content = ribbonView; window.Show(); }
protected void changePass_ServerClick(object sender, EventArgs e) { RadWindowManager windowManager = new RadWindowManager(); RadWindow widnow1 = new RadWindow(); widnow1.NavigateUrl = "../../../CommonUI/ChangePassword.aspx"; widnow1.ID = "RadWindow1"; widnow1.VisibleOnPageLoad = true; windowManager.Windows.Add(widnow1); this.form1.Controls.Add(widnow1); }
private void RbtnEliminar_Click(object sender, RoutedEventArgs e) { if (RlstTipos.SelectedIndex == -1) { MessageBox.Show("Seleccione el tipo de equipo que desea eliminar"); return; } tipoSeleccionado = RlstTipos.SelectedItem as CommonProperties; RadWindow.Confirm("¿Estas seguro de eliminar este elemento?", OnDeleteClosed); }
public AxObject(string sObject,RadWindow r){ InitAxObject(); _rootWindow = r; _zoom = false; SetupAxObject(sObject, "",null,"",""); //bread crumbs starts collapsed bread1.Visibility = System.Windows.Visibility.Collapsed; BreadGridRow.Height = new GridLength(0); }
protected void btn_Select_Click(object sender, EventArgs e) { if (ddl_Term.SelectedValue == null) { ddl_Term.SelectedValue = "0"; } if (ddl_GroupOstad.SelectedValue == null) { ddl_GroupOstad.SelectedValue = "0"; } if (ddl_Daneshkade.SelectedValue == null) { ddl_Daneshkade.SelectedValue = "0"; } if (txt_AzJobrani.Text == string.Empty) { txt_AzJobrani.Text = "0"; } if (txt_ToJobrani.Text == string.Empty) { txt_ToJobrani.Text = "0"; } if (txt_FromDate.Text == string.Empty) { txt_FromDate.Text = "0"; } if (txt_ToDate.Text == string.Empty) { txt_ToDate.Text = "0"; } if (txt_NumberAbsence.Text == string.Empty) { txt_NumberAbsence.Text = "0"; } Session["page"] = 5; //Response.Redirect("SearchProfByParams.aspx?"+"Term"+"="+ddl_Term.SelectedValue+"&"+"Departman"+"="+ddl_GroupOstad.SelectedValue +"&"+"Daneshkade"+"="+ ddl_Daneshkade.SelectedValue +"&"+"AzJ"+"="+txt_AzJobrani.Text+"&"+"TaJ"+"="+txt_ToJobrani.Text+"&"+"AzD"+"="+txt_FromDate.Text+"&"+"TaD"+"="+txt_ToDate.Text+"&"+"NumberAbsence"+"="+txt_NumberAbsence.Text); RadWindowManager windowManager = new RadWindowManager(); RadWindow widnow1 = new RadWindow(); // Set the window properties widnow1.NavigateUrl = ("../../../university/Faculty/CMS/SearchProfByParams.aspx?" + "Term" + "=" + ddl_Term.SelectedValue + "&" + "Departman" + "=" + ddl_GroupOstad.SelectedValue + "&" + "Daneshkade" + "=" + ddl_Daneshkade.SelectedValue + "&" + "AzJ" + "=" + txt_AzJobrani.Text + "&" + "TaJ" + "=" + txt_ToJobrani.Text + "&" + "AzD" + "=" + txt_FromDate.Text + "&" + "TaD" + "=" + txt_ToDate.Text + "&" + "NumberAbsence" + "=" + txt_NumberAbsence.Text); widnow1.ID = "RadWindow1"; widnow1.VisibleOnPageLoad = true; // Set this property to True for showing window from code widnow1.Height = 600; widnow1.Width = 1200; windowManager.Windows.Add(widnow1); windowManager.Height = 600; windowManager.Width = 1200; ContentPlaceHolder mpContentPlaceHolder; mpContentPlaceHolder = (ContentPlaceHolder)Page.Master.FindControl("ContentPlaceHolder1"); mpContentPlaceHolder.Controls.Add(widnow1); }
private void TL_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { if (e.PropertyName == "GL") { var SystemAccountingSettingModel = AutoMapper.Mapper.Map <SystemAccountingSettingModel, EditableSystemAccountingSettingModel>(_systemAccountingSettingsService.GetSystemAccountingSettingModel()); var SystemAccountingSettingModelTLLength = int.Parse(SystemAccountingSettingModel.TLLength); var SystemAccountingSettingModelGLLength = int.Parse(SystemAccountingSettingModel.GLLength); var len = SystemAccountingSettingModelTLLength - SystemAccountingSettingModelGLLength; long x = 1; long r = 0; for (int i = 1; i <= len; i++) { r += x * 9; x *= 10; } r += (TL.GL.GLCode) * x; // var selected = TL.GL.GLCode; string s = "0," + (SystemAccountingSettingModelTLLength - SystemAccountingSettingModelGLLength).ToString(); //var lenght=(TL.GL.GLCode).ToString() + l.ToString(); var lastGLCode = _tLsService.GetLastTLCode(TL.GL.GLId); if (lastGLCode == TL.GL.GLId) { var stringLastGLCode = "1"; var lastTLCode = stringLastGLCode.ToString().PadLeft(SystemAccountingSettingModelTLLength - SystemAccountingSettingModelGLLength, '0'); TL.TLCode = int.Parse($"{TL.GL.GLCode}{lastTLCode}"); TL.Regex = $"^{TL.GL.GLCode}[0-9]{{{s}}}$"; TL.TLCodeEmptyValue = TL.GL.GLCode; } else { lastGLCode++; //var lastTLLenght = (lastGLCode.ToString()).Length; if (lastGLCode < r) { var stringLastGLCode = lastGLCode.ToString(); var lastTLCode = stringLastGLCode.ToString().PadLeft(SystemAccountingSettingModelTLLength - SystemAccountingSettingModelGLLength, '0'); TL.TLCode = int.Parse($"{lastTLCode}"); TL.Regex = $"^{TL.GL.GLCode}[0-9]{{{s}}}$"; TL.TLCodeEmptyValue = TL.GL.GLCode; } else { DialogParameters parameters = new DialogParameters(); parameters.OkButtonContent = "بستن"; parameters.Header = "اخطار"; parameters.Content = " شماره گذاری این حساب به پایان رسیده است"; RadWindow.Alert(parameters); } } } }
public void ShowInTaskbar(RadWindow control, string title) { control.Show(); var window = control.ParentOfType <Window>(); window.ShowInTaskbar = true; window.Title = title; var uri = new Uri("pack://application:,,,/Inventario;component/Resources/icon.png"); window.Icon = BitmapFrame.Create(uri); }
public System.Data.DataTable getventas(int selescted) { System.Data.DataTable Tabla = new System.Data.DataTable(); string conect = GetOrigen(selescted); string strFuncion = Funcion(selescted); try { using (System.Data.SqlClient.SqlConnection Cnn = new System.Data.SqlClient.SqlConnection(conect)) { //Cnn.ConnectionTimeout = 500; using (System.Data.SqlClient.SqlCommand Cmd = new System.Data.SqlClient.SqlCommand(strFuncion, Cnn)) { try { // Cmd.CommandType = CommandType.Text; Cmd.CommandText = strFuncion; Cmd.CommandTimeout = 0; System.Data.SqlClient.SqlDataAdapter Datos = new System.Data.SqlClient.SqlDataAdapter(Cmd); Cnn.Open(); Datos.Fill(Tabla); return(Tabla); } catch (Exception ex) { return(Tabla); } finally { if (Cnn.State == ConnectionState.Open) { Cnn.Close(); } } } } } catch (Exception ex) { return(Tabla); RadWindow radWindow = new RadWindow(); RadWindow.Alert(new DialogParameters() { Content = "Los parámetros son inválidos.", Header = "BIG", DialogStartupLocation = WindowStartupLocation.CenterOwner // IconContent = ""; }); } }
private static RadWindow EnsureWindow(object model, object view) { var window = view as RadWindow; if (window == null) { window = new RadWindow { Content = view }; window.SetValue(View.IsGeneratedProperty, true); } return window; }
private bool OnDeleting() { DialogParameters parameters = new DialogParameters(); parameters.OkButtonContent = "بله، مطمئنم"; parameters.CancelButtonContent = "خیر"; parameters.Header = "اخطار"; parameters.Content = "آیا برای حذف مطمئن هستید؟"; parameters.Closed = OnClosed; RadWindow.Confirm(parameters); return(_dialogResult == true); }
protected void btn_changePassword_Click(object sender, EventArgs e) { RadWindowManager windowManager = new RadWindowManager(); RadWindow widnow1 = new RadWindow(); // Set the window properties widnow1.NavigateUrl = "../../../CommonUI/ChangePassword.aspx"; widnow1.ID = "RadWindow1"; widnow1.VisibleOnPageLoad = true; // Set this property to True for showing window from code windowManager.Windows.Add(widnow1); this.form1.Controls.Add(widnow1); }
private void LoadHtmlPlaceholder(object sender, System.Windows.RoutedEventArgs e) { this.window = new RadWindow(); RadHtmlPlaceholder htmlPlaceholder = new RadHtmlPlaceholder(); Uri uri = new Uri("http://www.bing.com", UriKind.RelativeOrAbsolute); htmlPlaceholder.SourceUrl = uri; this.window.Content = htmlPlaceholder; this.window.Width = 800; this.window.Height = 600; this.window.Top = 210; this.window.Left = 330; this.window.Show(); }
public void AccountsView_SelectionChanged(object sender, SelectionChangeEventArgs e) { RadWindow window = new RadWindow(); TDocs.BADSInfo selectedItem = AccountsView.SelectedItem as TDocs.BADSInfo; FilterDescriptor fd = new FilterDescriptor("accountNumber", FilterOperator.IsEqualTo, selectedItem.accountNumber); entitlementsDataSource.FilterDescriptors.Add(fd); window.Content = new BADSSheet(selectedItem); window.Header = "Account Data Sheet"; window.Height = 620; window.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen; window.ShowDialog(); entitlementsDataSource.FilterDescriptors.Remove(fd); }
protected void RadButtonAddUser_Click(object sender, EventArgs e) { RadWindow newWindow = new RadWindow(); newWindow.NavigateUrl = "UserDetails.aspx?UserID=0"; newWindow.Modal = true; newWindow.Height = 600; newWindow.Width = 850; //newWindow.VisibleStatusbar = false; newWindow.DestroyOnClose = true; newWindow.Title = "New User"; newWindow.VisibleOnPageLoad = true; newWindow.Behaviors = WindowBehaviors.Resize; newWindow.Behaviors = WindowBehaviors.Close; RadWindowManager1.Windows.Add(newWindow); }
private void Example_Loaded(object sender, RoutedEventArgs e) { if (Application.Current.Host.Settings.Windowless) { this.window = new RadWindow(); RadHtmlPlaceholder htmlPlaceholder = new RadHtmlPlaceholder(); Uri uri = new Uri("http://www.bing.com", UriKind.RelativeOrAbsolute); htmlPlaceholder.SourceUrl = uri; this.window.Content = htmlPlaceholder; this.window.Width = 800; this.window.Height = 600; this.window.Top = 210; this.window.Left = 330; this.window.Show(); this.previewPanel.Visibility = System.Windows.Visibility.Collapsed; } }
/// <summary> /// Initializes a new instance of the <see cref="RadWindowConductor" /> class. /// </summary> /// <param name="model">The model.</param> /// <param name="view">The view.</param> public RadWindowConductor(object model, RadWindow view) { this.model = model; this.view = view; var activatable = model as IActivate; if (activatable != null) activatable.Activate(); var deactivatable = model as IDeactivate; if (deactivatable != null) { view.Closed += Closed; deactivatable.Deactivated += Deactivated; } var guard = model as IGuardClose; if (guard != null) view.PreviewClosed += PreviewClosed; }
/// <summary> /// 根据选中饼图的航空公司弹出相应的数据列表窗体 /// </summary> /// <param name="selectedItem">选中点</param> /// <param name="radWindow">弹出窗体</param> /// <param name="header">窗体标示</param> protected void GetGridViewDataSourse(PieDataPoint selectedItem, RadWindow radWindow, string header) { if (selectedItem != null && radWindow != null) { var fleetAircraftTypeComposition = selectedItem.DataItem as FleetAircraftTypeComposition; if (fleetAircraftTypeComposition != null) { var time = Convert.ToDateTime(SelectedTime).AddMonths(1).AddDays(-1); var aircraft = Aircrafts.Where(o => o.OperationHistories.Any( a => a.StartDate <= time && !(a.EndDate != null && a.EndDate < time)) && o.AircraftBusinesses.Any( a => a.StartDate <= time && !(a.EndDate != null && a.EndDate < time))); var airlineAircrafts = new List<AircraftDTO>(); if (header.Equals("座级", StringComparison.OrdinalIgnoreCase)) { airlineAircrafts = aircraft.Where(p => { var aircraftBusinessDto = p.AircraftBusinesses.FirstOrDefault(pp => pp.StartDate <= time && !(pp.EndDate != null && pp.EndDate < time)); return aircraftBusinessDto != null && aircraftBusinessDto.Regional.Equals(fleetAircraftTypeComposition.AircraftRegional, StringComparison.OrdinalIgnoreCase); }).ToList(); } else if (header.Equals("机型", StringComparison.OrdinalIgnoreCase)) { airlineAircrafts = aircraft.Where(p => { var aircraftBusinessDto = p.AircraftBusinesses.FirstOrDefault(pp => pp.StartDate <= time && !(pp.EndDate != null && pp.EndDate < time)); return aircraftBusinessDto != null && aircraftBusinessDto.AircraftTypeName.Equals( fleetAircraftTypeComposition.AircraftRegional, StringComparison.OrdinalIgnoreCase); }).ToList(); } //找到子窗体的RadGridView,并为其赋值 var rgv = radWindow.Content as RadGridView; if (rgv != null) rgv.ItemsSource = Commonmethod.GetAircraftByTime(airlineAircrafts, time); radWindow.Header = header + " " + fleetAircraftTypeComposition.AircraftRegional + ":" + fleetAircraftTypeComposition.AirTt; if (!radWindow.IsOpen) { Commonmethod.ShowRadWindow(radWindow); } } } }
/// <summary> /// 初始化子窗体 /// </summary> public void InitalizerRadWindows(RadWindow radwindow, string windowsName, int length) { //运营计划子窗体的设置 radwindow.Name = windowsName; radwindow.Top = length; radwindow.Left = length; radwindow.Height = 300; radwindow.Width = 600; radwindow.ResizeMode = ResizeMode.CanResize; radwindow.Content = Commonmethod.CreatOperationGridView(); radwindow.Closed += RadwindowClosed; }
public void AddRadMenu(RadWindow rwindow) { var radcm = new RadContextMenu(); //新建右键菜单 radcm.Opened += radcm_Opened; var rmi = new RadMenuItem {Header = "导出表格"}; //新建右键菜单项 rmi.Click += MenuItemClick; //为菜单项注册事件 rmi.DataContext = rwindow.Name; radcm.Items.Add(rmi); RadContextMenu.SetContextMenu(rwindow, radcm); //为控件绑定右键菜单 }
/// <summary> /// 根据选中饼图的航空公司弹出相应的数据列表窗体 /// </summary> /// <param name="selectedItem">选中点</param> /// <param name="radwindow">弹出窗体</param> /// <param name="header">窗体标示</param> private void GetGridViewDataSourse(PieDataPoint selectedItem, RadWindow radwindow, string header) { if (selectedItem != null && radwindow != null) { DateTime time = Convert.ToDateTime(SelectedTime).AddMonths(1).AddDays(-1); FleetAgeComposition fleetagecomposition = selectedItem.DataItem as FleetAgeComposition; //找到子窗体的RadGridView,并为其赋值 RadGridView rgv = radwindow.Content as RadGridView; if (this.AircraftByAgeDic != null && this.AircraftByAgeDic.ContainsKey(fleetagecomposition.AgeGroup)) { rgv.ItemsSource = commonmethod.GetAircraftByTime(AircraftByAgeDic[fleetagecomposition.AgeGroup], time); } AgeWindow.Header = fleetagecomposition.AgeGroup + "的飞机数:" + fleetagecomposition.ToolTip; if (!radwindow.IsOpen) { commonmethod.ShowRadWindow(radwindow); } } }
protected void gridSchedulePromotion_ItemCommand(object source, GridCommandEventArgs e) { if (e.CommandName == "Select") { RadWindow openWindow = new RadWindow(); openWindow.NavigateUrl = "DialogPhoneNumber.aspx"; openWindow.VisibleOnPageLoad = true; this.RadWindowManager1.Windows.Add(openWindow); } }
/// <summary> /// 根据选中饼图的航空公司弹出相应的数据列表窗体 /// </summary> /// <param name="selectedItem">选中点</param> /// <param name="radwindow">弹出窗体</param> /// <param name="header">窗体标示</param> private void GetGridViewDataSourse(PieDataPoint selectedItem, RadWindow radwindow, string header) { if (selectedItem != null && radwindow != null) { FleetAircraft fleetaircraft = selectedItem.DataItem as FleetAircraft; DateTime time = Convert.ToDateTime(SelectedTime).AddMonths(1).AddDays(-1); var aircraft = this.ViewAircraft.Where(o => o.OperationHistories.Any(a => a.StartDate <= time && !(a.EndDate != null && a.EndDate < time)) && o.AircraftBusinesses.Any(a => a.StartDate <= time && !(a.EndDate != null && a.EndDate < time))); List<Aircraft> airlineAircrafts = aircraft.Where(p => p.AircraftBusinesses.FirstOrDefault(pp => pp.StartDate <= time && !(pp.EndDate != null && pp.EndDate < time)).AircraftType.AircraftCategory.Category == "客机" && p.OperationHistories.FirstOrDefault(pp => pp.StartDate <= time && !(pp.EndDate != null && pp.EndDate < time)).Airlines.ShortName == fleetaircraft.Aircraft).ToList(); //找到子窗体的RadGridView,并为其赋值 RadGridView rgv = radwindow.Content as RadGridView; rgv.ItemsSource = commonmethod.GetAircraftByTime(airlineAircrafts, time); radwindow.Header = fleetaircraft.Aircraft + header + ":" + fleetaircraft.ToolTip; if (!radwindow.IsOpen) { commonmethod.ShowRadWindow(radwindow); } } }
private static void ShowPrintPreviewDialog(RadDocument document, IDocumentFormatProvider provider) { PrintPreview printPreview = new PrintPreview(document, provider); RadWindow window = new RadWindow(); window.Content = printPreview; window.Header = "Print Preview"; window.Height = 400; window.Width = 500; #if SILVERLIGHT window.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen; #else window.WindowStartupLocation = WindowStartupLocation.CenterScreen; #endif window.Show(); }
protected void btnConsultaMedicos_Click(object sender, ImageClickEventArgs e) { PersistirControles(); PreencheDSExamesSelecionados(); //Carregar Tela RadWindow rwm = new RadWindow(); rwm.ID = "RadWindow4"; rwm.Modal = true; rwm.Title = "Pesquisar Médicos"; rwm.Behavior = Telerik.Web.UI.WindowBehaviors.Close; rwm.Width = Unit.Pixel(780); rwm.Height = Unit.Pixel(410); rwm.NavigateUrl = "PesquisarMedico.aspx"; rwm.OnClientClose = "Rebind"; rwm.ReloadOnShow = true; rwm.VisibleOnPageLoad = true; rwm.KeepInScreenBounds = true; //rwManager.ShowContentDuringLoad = true; //rwManager.Windows.Add(rw); Telerik.Web.UI.RadWindowManager oRadWindowManager = new Telerik.Web.UI.RadWindowManager(); oRadWindowManager.ShowContentDuringLoad = true; oRadWindowManager.Windows.Add(rwm); this.PlaceHolderAlta.Controls.Add(oRadWindowManager); }
protected void btnExamesComplementares_Click(object sender, ImageClickEventArgs e) { //UtSessao.Sessao["ListaExame"] = ; PersistirControles(); PreencheDSExamesSelecionados(); //Carregar Tela RadWindow rw = new RadWindow(); rw.ID = "RadWindow4"; rw.Modal = true; rw.Title = "Exames Complementares"; rw.Behavior = Telerik.Web.UI.WindowBehaviors.Close; rw.Width = Unit.Pixel(700); rw.Height = Unit.Pixel(310); rw.NavigateUrl = "ItemExamesComplementares.aspx"; rw.OnClientClose = "Rebind"; rw.ReloadOnShow = true; rw.VisibleOnPageLoad = true; rw.KeepInScreenBounds = true; //rwManager.ShowContentDuringLoad = true; //rwManager.Windows.Add(rw); Telerik.Web.UI.RadWindowManager oRadWindowManager = new Telerik.Web.UI.RadWindowManager(); oRadWindowManager.ShowContentDuringLoad = true; oRadWindowManager.Windows.Add(rw); this.PlaceHolderAlta.Controls.Add(oRadWindowManager); }
// Zooom! public AxObject(string Mode,string sObject, RadWindow r,String Id) { InitAxObject(); _rootWindow = r; _zoom = true; SetupAxObject(sObject, "", null,Id,""); //remove the grid! this.split1.Visibility = System.Windows.Visibility.Hidden; this.split1.Width = 0; this.split1.Margin = new Thickness(-10); r.Width = 600; //bread crumbs starts collapsed bread1.Visibility = System.Windows.Visibility.Collapsed; BreadGridRow.Height = new GridLength(0); }
/// <summary> /// 初始化子窗体 /// </summary> public void InitalizerRadWindows(RadWindow radwindow, string WindowsName, int length) { //运营计划子窗体的设置 radwindow.Name = WindowsName; radwindow.Top = length; radwindow.Left = length; radwindow.Height = 250; radwindow.Width = 500; radwindow.ResizeMode = ResizeMode.CanResize; radwindow.Content = commonmethod.CreatOperationGridView(); radwindow.Closed += new EventHandler<WindowClosedEventArgs>(radwindow_Closed); }
protected void but2_Click(object sender, EventArgs e) { RadButton addbox = (RadButton)RadPanelBar1.FindItemByValue("buttons").FindControl("addbox"); if (addbox.CommandName == "addb") { string id = Request.QueryString["id"].ToString(); int iid = int.Parse(id); string date = System.DateTime.Now.Date.ToString(); string addtobox = "INSERT INTO Box (MyID, SID, FollowDate, FollowStatus) VALUES (" + Session["UserId"] + "," + iid + "," + "'" + date + "'" + ", 1)"; profile.DataBase(addtobox); Response.Redirect("profile.aspx?Id=" + id); } if (addbox.CommandName == "rfb") { string id = Request.QueryString["id"].ToString(); int iid = int.Parse(id); string remove = @" DELETE FROM Box WHERE (MyID = "+Session["UserID"]+") AND (SID = "+iid+")"; profile.DataBase(remove); Response.Redirect("profile.aspx?Id=" + id); } if(addbox.CommandName == "cpp") { RadWindow window1 = new RadWindow(); window1.NavigateUrl = "profilec/pro-pic-change.aspx"; window1.Modal = true; window1.VisibleOnPageLoad = true; window1.Width = 310; window1.Height = 560; RadAjaxPanel1.Controls.Add(window1); } }
private void sendSamplesHandler(object o) { RadWindow win = new RadWindow(); ProgressVM prog = new ProgressVM(win); win.Content = prog; prog.sendSamples(); win.Show(); }
public void AddRadMenu(RadWindow rwindow) { RadContextMenu radcm = new RadContextMenu();//新建右键菜单 radcm.Opened += radcm_Opened; RadMenuItem rmi = new RadMenuItem();//新建右键菜单项 rmi.Header = "导出表格"; rmi.Click += new RadRoutedEventHandler(MenuItem_Click);//为菜单项注册事件 rmi.DataContext = rwindow.Name; radcm.Items.Add(rmi); RadContextMenu.SetContextMenu(rwindow, radcm);//为控件绑定右键菜单 }
protected void Page_Load(object sender, EventArgs e) { if ((!object.Equals(Request.Cookies["RFriend_Email"], null)) && (!object.Equals(Request.Cookies["RFriend_PWD"], null)) && (!object.Equals(Request.Cookies["RFriend_UID"], null))) { if ((!object.Equals(Request.Cookies["RFriend_Email"].Value, "")) && (!object.Equals(Request.Cookies["RFriend_PWD"].Value, "")) && (!object.Equals(Request.Cookies["RFriend_UID"], ""))) { Session["UserEmail"] = Request.Cookies["RFriend_Email"].Value; Session["Password"] = Request.Cookies["RFriend_PWD"].Value; Session["UserId"] = Request.Cookies["RFriend_UID"].Value; } else { } } else { Response.Redirect(ResolveUrl("~/Login.aspx")); } dt = new DataTable(); string getuname = "select [uname] from [User] where id=" + Session["UserId"] + ""; dt = pro.ReturnDT(getuname); string myuname = dt.Rows[0]["uname"].ToString(); RadTabStrip2.Tabs.FindTabByValue("profile").NavigateUrl = "~/Menu/profile.aspx?uname=" + myuname + ""; RadTabStrip3.OnClientTabSelecting = "onTabSelecting"; RadTabStrip1.Tabs.FindTabByText("home").NavigateUrl = "~/Default.aspx?menu=Home"; RadTabStrip1.Tabs.FindTabByText("connects").NavigateUrl = "~/Default.aspx?menu=connects"; RadTabStrip1.Tabs.FindTabByText("settings").NavigateUrl = "~/Default.aspx?menu=settings"; string uname = Request.QueryString["uname"].ToString(); string getall = @"select [ID] from [User] where [uname] = '"+uname+"'"; dt = new DataTable(); dt = pro.ReturnDT(getall); string vid = dt.Rows[0]["ID"].ToString(); string myid = Session["UserId"].ToString(); string getstatus = @"SELECT MyID, FriendID, FriendStatus FROM Friends WHERE (MyID = "+ myid+@") AND (FriendID = "+vid+@") OR (MyID = "+vid+@") AND (FriendID = "+ myid+@")"; DataTable dt2 = new DataTable(); dt2 = pro.ReturnDT(getstatus); DataTable dt3 = new DataTable(); string getboxstat = @"SELECT MyID, SID, FollowDate, FollowStatus FROM Box WHERE (MyID = "+myid+") AND (SID = "+vid+")"; dt3 = pro.ReturnDT(getboxstat); string getme = @"SELECT [User].Name, [User].BirthDate, [User].Gender, [User].Country, [User].RegisterDate, [User].City, [User].Status, [User].uname, [User].Degree, Propic.Image, Networks.Facebook, Networks.Twitter, Contact.Website,[User].[looking for] FROM [User] INNER JOIN Propic ON [User].ID = Propic.UID INNER JOIN Networks ON [User].ID = Networks.UID INNER JOIN Contact ON [User].ID = Contact.UID WHERE (Propic.[Current] = 1) AND ([User].ID = " + vid + ")"; DataTable pri = new DataTable(); pri = pro.ReturnDT(getme); if (pri.Rows[0]["Image"] is DBNull == false) { propic.DataValue = (byte[])pri.Rows[0]["Image"]; } dob.Text = pri.Rows[0]["BirthDate"].ToString(); gen.Text = pri.Rows[0]["Gender"].ToString(); web.Text = pri.Rows[0]["Website"].ToString(); fb.Text = pri.Rows[0]["Facebook"].ToString(); twit.Text = pri.Rows[0]["Twitter"].ToString(); if (pri.Rows[0]["Status"] is DBNull) { som.Text = "has not yet put a state of mind(SOM)"; } else { som.Text = pri.Rows[0]["Status"].ToString(); } name.Text = pri.Rows[0]["Name"].ToString(); un.Text = pri.Rows[0]["uname"].ToString(); if (myid == vid) { if (!Page.IsPostBack) { AddTab("info"); AddPageView(RadTabStrip3.FindTabByText("info")); AddTab("recent-posts"); AddTab("connections"); AddTab("inside-box"); AddTab("albums"); // key ==> /* * contact = info * posts = recent-posts * more = connections * eduwork = inside-box * photos = albums */ } but1.Text = "edit profile"; but1.CommandName = "ep"; but2.Text = "change profile picture"; but2.CommandName = "cpp"; RadWindow rnd = new RadWindow(); rnd.NavigateUrl = "~/Menu/profilec/cpp.aspx"; rnd.Visible = true; rnd.OpenerElementID = "but2"; rnd.EnableEmbeddedSkins = false; rnd.VisibleStatusbar = false; rnd.VisibleTitlebar = true; rnd.Modal = true; rnd.AutoSize = true; Panel2.Controls.Add(rnd); but3.Text = "privacy settings"; but3.CommandName = "ps"; //urself } else if (dt2.Rows.Count > 0) { int n = (int)dt2.Rows[0]["FriendStatus"]; string ida = dt2.Rows[0]["MyID"].ToString(); string idb = dt2.Rows[0]["FriendID"].ToString(); switch (n) { case 0: if (ida == Session["UserId"].ToString()) { // i sent the request , i can cancel it if (dt3.Rows.Count > 0) { but2.Text = "remove from box"; but2.CommandName = "rfb"; //added to box .. remove from box } } else { if (!Page.IsPostBack) { AddTab("info"); AddPageView(RadTabStrip3.FindTabByText("info")); AddTab("recent-posts"); AddTab("connections"); AddTab("inside-box"); AddTab("albums"); // i have the request i can accecpt it if (dt3.Rows.Count > 0) { but2.Text = "remove from box"; but2.CommandName = "rfb"; //added to box .. remove from box } } } break; case 1: if (!Page.IsPostBack) { AddTab("info"); AddPageView(RadTabStrip3.FindTabByText("info")); AddTab("recent-posts"); AddTab("connections"); AddTab("inside-box"); AddTab("albums"); } but1.Text = "view photos"; but1.ID = "vp"; RadToolTipManager2.TargetControls.Add("vp"); but2.Text = "message him"; but2.CommandName = "mh"; but3.Text = "remove from connections"; but3.CommandName = "rfc"; // he is a friend if (dt3.Rows.Count > 0) { but2.Text = "remove from box"; but2.CommandName = "rfb"; //added to box .. remove from box } break; } } else { if (dt3.Rows.Count > 0) { //added to box .. remove from box } // key ==> /* * contact = info * posts = recent-posts * more = connections * eduwork = inside-box * photos = albums */ string getsettings = @"SELECT addfyoke, messageh, contact, more, photos, posts , eduwork FROM [User] WHERE (ID = " +vid+")"; DataTable asd = new DataTable(); asd = pro.ReturnDT(getsettings); if (!Page.IsPostBack) { if ((int)asd.Rows[0]["contact"] == 0) { AddTab("info"); AddPageView(RadTabStrip3.FindTabByText("info")); } if ((int)asd.Rows[0]["posts"] == 0) { AddTab("recent-posts"); } if ((int)asd.Rows[0]["more"] == 0) { AddTab("connections"); } if ((int)asd.Rows[0]["eduwork"] == 0) { AddTab("inside-box"); } if ((int)asd.Rows[0]["photos"] == 0) { AddTab("albums"); } // AddTab("info"); // AddPageView(RadTabStrip3.FindTabByText("info")); // AddTab("recent-posts"); // AddTab("connections"); // AddTab("inside-box"); // AddTab("albums"); // i have the request i can accecpt it if (dt3.Rows.Count > 0) { but2.Text = "remove from box"; but2.CommandName = "rfb"; //added to box .. remove from box } } but1.Text = "add on friendyoke"; but1.CommandName = "aof"; but2.Text = "add to box"; but2.CommandName = "atb"; but3.Text = "message him"; but3.CommandName = "mh"; // he is random } }
/// <summary> /// 初始化子窗体 /// </summary> /// <param name="radWindows">需要初始化的窗体</param> /// <param name="windowsName">窗体名称</param> /// <param name="length">窗体距离</param> public void InitalizerRadWindows(RadWindow radWindows, string windowsName, int length) { //子窗体的设置 radWindows.Height = 200; radWindows.Width = 450; radWindows.Name = windowsName; radWindows.ResizeMode = ResizeMode.CanResize; if (windowsName == "totalPlanHistoryWindow") { radWindows.Top = totalOpertationWindow.Top; radWindows.Left = length; } else { radWindows.Top = length; radWindows.Left = length; } //子窗体的Content,Conent根据不同的子窗体而不同 RadGridView contentGridView; if (windowsName == "totalOpertationWindow" || windowsName == "opertationHistoryWindow") { contentGridView = CreatOperationGridView(); } else { contentGridView = CreatePlanHistorityGridView(); } radWindows.Content = contentGridView; radWindows.Closed += new EventHandler<WindowClosedEventArgs>(radWindows_Closed); }
public static void Print(this RadGridView grid, PrintSettings settings) { var rtb = CreateRadRichTextBox(grid, settings); var window = new RadWindow { Height = 0, Width = 0, Opacity = 0, Content = rtb }; rtb.PrintCompleted += (s, e) => window.Close(); window.Show(); rtb.Print("MyDocument", Telerik.Windows.Documents.UI.PrintMode.Native); }
private void ShowOptions(ColumnModel model) { RadWindow rw = new RadWindow(); RadPropertyGrid rpg = new RadPropertyGrid(); rpg.HorizontalAlignment = HorizontalAlignment.Stretch; rpg.FieldIndicatorVisibility = Visibility.Collapsed; rpg.LabelColumnWidth = new GridLength(110); rpg.DescriptionPanelVisibility = Visibility.Collapsed; rpg.SortAndGroupButtonsVisibility = Visibility.Collapsed; rpg.SearchBoxVisibility = Visibility.Collapsed; rpg.Item = model; rw.Content = rpg; rw.WindowStartupLocation = WindowStartupLocation.CenterScreen; rw.Header = "Export options"; rw.Width = 500; rw.Height = 450; rw.Padding = new Thickness(3); rw.ShowDialog(); }