// Constructor public PhotoProcess() { InitializeComponent(); appSettings = IsolatedStorageSettings.ApplicationSettings; Loaded += new System.Windows.RoutedEventHandler(MainPage_Loaded); OrientationChanged += new EventHandler<OrientationChangedEventArgs>(MainPage_OrientationChanged); }
public AddEditOrganization() { InitializeComponent(); autoEmail.ItemsSource = null; autoEmail.ItemsSource = ApplicationViewModel.Instance.UserNames; Loaded += new System.Windows.RoutedEventHandler(AddEditOrganization_Loaded); }
public ImageSequence() { DefaultStyleKey = typeof(ImageSequence); imageHeight = 1600; Loaded += new System.Windows.RoutedEventHandler(ImageSequence_Loaded); SizeChanged += new SizeChangedEventHandler(ImageSequence_SizeChanged); }
public Laboratory() { InitializeComponent(); this.Title = ApplicationStrings.HomePageTitle; Loaded += new System.Windows.RoutedEventHandler(Laboratory_Loaded); Unloaded += new RoutedEventHandler(Laboratory_Unloaded); }
/// <summary> /// 初始化图形上的所有系统菜单 /// </summary> /// <param name="contextMenu">弹出菜单或者菜单项</param> /// <param name="action">菜单消息处理过程</param> /// <param name="language">使用的语言</param> /// <param name="colorPanelTemplate">颜色菜单项template</param> /// <param name="colorControlTemplate">颜色菜单显示Template</param> public static void InitChartPopupMenu <T>(T contextMenu, System.Windows.RoutedEventHandler action, Common.EnumLanguage language, ItemsPanelTemplate colorPanelTemplate, ControlTemplate colorControlTemplate) where T : class { //选择移动菜单 MenuItem mainItem = AddOneItem(ChartMenuItems.Select, contextMenu, action, language); mainItem = AddOneItem(ChartMenuItems.Pan, contextMenu, action, language); //缩放菜单(放大,缩小,重置XY,重置Y) mainItem = AddOneItem(ChartMenuItems.Zoom, contextMenu, action, language); MenuItem subItem = AddOneItem(ChartMenuItems.zoomIn, mainItem, action, language); subItem = AddOneItem(ChartMenuItems.zoomOut, mainItem, action, language); subItem = AddOneItem(ChartMenuItems.resetXY, mainItem, action, language); subItem = AddOneItem(ChartMenuItems.resetY, mainItem, action, language); //显示菜单(颜色,信息,隐藏,网格) mainItem = AddOneItem(ChartMenuItems.Display, contextMenu, action, language); subItem = AddOneItem(ChartMenuItems.Colors, mainItem, action, language); //颜色列表菜单 subItem.ItemsPanel = colorPanelTemplate; foreach (var color in ChartCommonMethod.strColors) { AddSubColorMenu(subItem, color, action, colorControlTemplate); } subItem = AddOneItem(ChartMenuItems.showInformation, mainItem, action, language); subItem = AddOneItem(ChartMenuItems.Hide, mainItem, action, language); subItem = AddOneItem(ChartMenuItems.showGridLine, mainItem, action, language); //标注峰位主菜单(上峰位,下峰位) mainItem = AddOneItem(ChartMenuItems.peakPick, contextMenu, action, language); subItem = AddOneItem(ChartMenuItems.upPeakPick, mainItem, action, language); subItem = AddOneItem(ChartMenuItems.downPeakPick, mainItem, action, language); }
public UCLossTypeSetter() { InitializeComponent(); validList = new List <ValidationEntity>(); validList.Add(new ValidationEntity(ValidationEnum.IsNotEmpty, this.cmbLossType.SelectedValue, ResUCLossTypeSetter.Msg_PleaseChooseLossType)); Loaded += new System.Windows.RoutedEventHandler(UCLossTypeSetter_Loaded); }
public GeneralSettingUserControl() { Title = "GeneralSettingTitle"; Description = "GeneralOptionUserControlTitleText"; InitializeComponent(); Loaded += new System.Windows.RoutedEventHandler(GeneralSettingUserControl_Loaded); }
public Laboratory() { InitializeComponent(); this.Title = ApplicationStrings.HomePageTitle; Loaded += new System.Windows.RoutedEventHandler(Laboratory_Loaded); Unloaded += new RoutedEventHandler(Laboratory_Unloaded); }
public BookFrame(Book book, System.Windows.RoutedEventHandler action) : this() { Book = book; ToolTip = Book.BookTitle; Click += action; SetImage(); }
public BookFrame(Book book) : this() { Book = book; ToolTip = Book.BookTitle; Click += new System.Windows.RoutedEventHandler(OnBookClick); SetImage(); }
public TestRoot() { InitializeComponent(); Instance = this; Loaded += new System.Windows.RoutedEventHandler(MainPage_Loaded); }
public DeviceEventsView(IUnityContainer container) { InitializeComponent(); this.container = container; this.DataContext = this; Loaded += new System.Windows.RoutedEventHandler(DeviceEventsView_Loaded); }
public GraphicsDeviceControl() { Loaded += new System.Windows.RoutedEventHandler(XnaWindowHost_Loaded); SizeChanged += new SizeChangedEventHandler(XnaWindowHost_SizeChanged); Application.Current.Activated += new EventHandler(Current_Activated); Application.Current.Deactivated += new EventHandler(Current_Deactivated); CompositionTarget.Rendering += CompositionTarget_Rendering; }
public void DoAction(Action<MessageDialog> action) { this.OKButton.IsEnabled = false; Action<object, RoutedEventArgs> t = (object sender, RoutedEventArgs e) => { action(this); }; Loaded += new System.Windows.RoutedEventHandler(t); this.ShowDialog(); }
private MenuItem AddItemToMenu(string title, ContextMenu menu, System.Windows.RoutedEventHandler handler) { MenuItem mi = new MenuItem(); mi.Header = title; mi.Click += handler; menu.Items.Add(mi); return(mi); }
public void UCResponsibleUserCfg_Loaded(object sender, System.Windows.RoutedEventArgs e) { Loaded -= new System.Windows.RoutedEventHandler(UCResponsibleUserCfg_Loaded); needClearData = false; facade = new ARWindowFacade(this.CurrentPage); this.LayoutRoot.DataContext = responsibleUser; this.responsibleUser.ValidationErrors.Clear(); needClearData = true; }
public AutoFocusTextBox() : base() { GotFocus += new System.Windows.RoutedEventHandler(AutoFocusTextBox_GotFocus); LostFocus += new System.Windows.RoutedEventHandler(AutoFocusTextBox_LostFocus); MouseLeftButtonDown += new MouseButtonEventHandler(AutoFocusTextBox_MouseLeftButtonDown); BorderBrush = Brushes.Transparent; Background = Brushes.Transparent; KeyDown += new System.Windows.Input.KeyEventHandler(AutoFocusTextBox_KeyDown); Padding = new Thickness(0); VerticalAlignment = System.Windows.VerticalAlignment.Center; }
protected override HandleRef BuildWindowCore(HandleRef hwndParent) { Loaded += new System.Windows.RoutedEventHandler(GeckoWebBrowser_Loaded); HwndSourceParameters param = new HwndSourceParameters("web browser container"); param.Width = 100; param.Height = 100; param.ParentWindow = hwndParent.Handle; param.WindowStyle = 0x10000000 | 0x40000000; _source = new HwndSource(param); return(new HandleRef(this, _source.Handle)); }
public VotableExitCancelButton() : base() { //Start in the default mode IsVotable = true; //we will toggle this to suit our needs. CanInterruptVote = false; VoteRequestWhen = VoteRequestFlags.OnClick; VoteAutoCancelInterval = 60000; //1 minute Click += new System.Windows.RoutedEventHandler(VotableExitCancelButton_Click); Loaded += new System.Windows.RoutedEventHandler(VotableExitCancelButton_Loaded); }
public ElmtMakerTuple ButtonLikeMaker <TBtn>(string id) where TBtn : WpfCtrls.Primitives.ButtonBase, new() { var btn = new TBtn() { Uid = id }; var handler = new WpfHandler(LetImGuiHandleIt); btn.Click += handler; return(new ElmtMakerTuple(btn, handler, (btn1, hndl1) => ((TBtn)btn1).Click -= hndl1)); // closure-free lambda }
public NotesControl() { TextWrapping = System.Windows.TextWrapping.NoWrap; AcceptsReturn = true; AcceptsTab = true; VerticalScrollBarVisibility = System.Windows.Controls.ScrollBarVisibility.Visible; HorizontalScrollBarVisibility = System.Windows.Controls.ScrollBarVisibility.Visible; FontFamily = new System.Windows.Media.FontFamily("Global Monospace"); LostFocus += new System.Windows.RoutedEventHandler(EhLostFocus); LostKeyboardFocus += new System.Windows.Input.KeyboardFocusChangedEventHandler(EhLostKeyboardFocus); TextChanged += new System.Windows.Controls.TextChangedEventHandler(EhTextChanged); IsEnabled = false; }
public double speedCircles = 30; // circle speed public MainWindow() { // InitializeComponent() call LoadComponent() method. // The LoadComponent() method extracts the BAML (the compiled XAML) from your assembly, parses the BAML, to build the user interface InitializeComponent(); // Function to draw circles on the canvas. After execution of function all cicles have fixed position in the canvas, without animation. StartDraw(); // The Loaded event says that the tree is not only built and initialized, but layout has run on it, data has been bound, it's connected to a rendering surface (window), // and you're on the verge of being rendered. When we reach that point, we canvas the tree by broadcasting the Loaded event, starting at the root. // http://msdn.microsoft.com/en-us/library/ms748948.aspx#Window_Lifetime_Events Loaded += new System.Windows.RoutedEventHandler(Window1_Loaded); }
public GraphicsDeviceControl() { // We must be notified of the control finishing loading so we can get the GraphicsDeviceService Loaded += new System.Windows.RoutedEventHandler(XnaWindowHost_Loaded); // We must be notified of the control changing sizes so we can resize the GraphicsDeviceService SizeChanged += new SizeChangedEventHandler(XnaWindowHost_SizeChanged); // We must be notified of the application foreground status for our mouse input events Application.Current.Activated += new EventHandler(Current_Activated); Application.Current.Deactivated += new EventHandler(Current_Deactivated); // We use the CompositionTarget.Rendering event to trigger the control to draw itself CompositionTarget.Rendering += CompositionTarget_Rendering; }
public GraphicsDeviceControl() { // We must be notified of the control finishing loading so we can get the GraphicsDeviceService Loaded += new System.Windows.RoutedEventHandler(XnaWindowHost_Loaded); // We must be notified of the control changing sizes so we can resize the GraphicsDeviceService SizeChanged += new SizeChangedEventHandler(XnaWindowHost_SizeChanged); // We must be notified of the application foreground status for our mouse input events Application.Current.Activated += new EventHandler(Current_Activated); Application.Current.Deactivated += new EventHandler(Current_Deactivated); // We use the CompositionTarget.Rendering event to trigger the control to draw itself CompositionTarget.Rendering += CompositionTarget_Rendering; }
protected usrEntryObjectBase() { if (HasProgressPane) { MainWindow.Instance.EnsureAnchorable(Strings.usrEntryObjectBase_ProgressPanel_Header, "pack://application:,,,/BodyArchitect.Client.Resources;component/Images/Progress16.png", "EntryObjectProgress", AnchorableShowStrategy.Left); } if (HasDetailsPane) { MainWindow.Instance.EnsureAnchorable(Strings.usrEntryObjectBase_DetailsPanel_Header, "pack://application:,,,/BodyArchitect.Client.Resources;component/Images/Details16.png", "EntryObjectDetails", AnchorableShowStrategy.Left); } if (HasDetailsPane || HasProgressPane) { Loaded += new System.Windows.RoutedEventHandler(usrEntryObjectBase_Loaded); } }
public ElmtMakerTuple LinkTextBlockMaker(string id) { var link = new WpfDocs.Hyperlink(new WpfDocs.Run()); // Easiest way to do this is to capture id in a closure WpfCtrls.TextBlock linktxt = new WpfCtrls.TextBlock(link) { Uid = id }; WpfHandler handler = (o, e) => { InteractedElementId = id; QueueRedraws(RedrawsPerInteraction); TCS.SetResult(true); }; link.Click += handler; return(new ElmtMakerTuple(linktxt, handler, UnsubLinkTextBlock)); }
public EditableTextBox() : base() { Background = System.Windows.Media.Brushes.Transparent; TextAlignment = System.Windows.TextAlignment.Left; BorderThickness = new System.Windows.Thickness(0.0); IsReadOnly = true; Focusable = false; IsTabStop = false; IsHitTestVisible = true; Cursor = System.Windows.Input.Cursors.Arrow; Margin = new System.Windows.Thickness(5, 0, 5, 0); KeyDown += new System.Windows.Input.KeyEventHandler(ClassTextBox_KeyDown); KeyUp += new KeyEventHandler(EditableTextBox_KeyUp); LostFocus += new System.Windows.RoutedEventHandler(ClassTextBox_LostFocus); LostKeyboardFocus += new KeyboardFocusChangedEventHandler(ClassTextBox_LostKeyboardFocus); MouseEnter += new MouseEventHandler(ClassTextBox_MouseEnter); MouseLeave += new MouseEventHandler(ClassTextBox_MouseLeave); ContextMenuOpening += new ContextMenuEventHandler(ClassTextBox_ContextMenuOpening); ContextMenuClosing += new ContextMenuEventHandler(ClassTextBox_ContextMenuClosing); FocusVisualStyle = null; ResetContextMenu(); }
public Admin() { InitializeComponent(); this.Title = ApplicationStrings.AdminPageTitle; Loaded += new System.Windows.RoutedEventHandler(Admin_Loaded); Unloaded += new System.Windows.RoutedEventHandler(Admin_Unloaded); mc.srv_select_DataFromListsCompleted += new System.EventHandler <srv_select_DataFromListsCompletedEventArgs>(proxy_srv_select_DataFromListsCompleted); mc.SendTableUpdatedReceived += new System.EventHandler <SendTableUpdatedReceivedEventArgs>(proxy_SendTableUpdatedReceived); ucItems = new uc_Items_list(); ucItems.resultWindow.Closed += new System.EventHandler(ucItems_resultWindow_Closed); ucAdmin = new uc_AdminTool(); panel_msg.Children.Add(ucAdmin); if (!MDSLocalClient.IsConnected) { mc.ConnectAsync(thisName); } }
public Admin() { InitializeComponent(); this.Title = ApplicationStrings.AdminPageTitle; Loaded += new System.Windows.RoutedEventHandler(Admin_Loaded); Unloaded += new System.Windows.RoutedEventHandler(Admin_Unloaded); mc.srv_select_DataFromListsCompleted += new System.EventHandler<srv_select_DataFromListsCompletedEventArgs>(proxy_srv_select_DataFromListsCompleted); mc.SendTableUpdatedReceived += new System.EventHandler<SendTableUpdatedReceivedEventArgs>(proxy_SendTableUpdatedReceived); ucItems = new uc_Items_list(); ucItems.resultWindow.Closed += new System.EventHandler(ucItems_resultWindow_Closed); ucAdmin = new uc_AdminTool(); panel_msg.Children.Add(ucAdmin); if (!MDSLocalClient.IsConnected) { mc.ConnectAsync(thisName); } }
public CachedImage() { Loaded += new System.Windows.RoutedEventHandler(CachedImage_Loaded); Unloaded += new System.Windows.RoutedEventHandler(CachedImage_Unloaded); }
public ElmtMakerTuple(WpfElement wpfElement, WpfHandler handler, WpfUnsubber unsubber) { WpfElement = wpfElement; Handler = handler; Unsubber = unsubber; }
public Needle() { Loaded += new System.Windows.RoutedEventHandler(Needle_Loaded); Initialized += new EventHandler(Needle_Initialized); }
public UCResponsibleUserCfg() { InitializeComponent(); Loaded += new System.Windows.RoutedEventHandler(UCResponsibleUserCfg_Loaded); }
public Needle() { Loaded += new System.Windows.RoutedEventHandler(Needle_Loaded); Initialized += new EventHandler(Needle_Initialized); }
public ListBoxSample() { InitializeComponent(); Loaded += new System.Windows.RoutedEventHandler(ListBoxSample_Loaded); }
public MainPage() { InitializeComponent(); DataContext = App.ViewModelCenter.Get<VM.MainPage>(); Loaded += new System.Windows.RoutedEventHandler(MainPage_Loaded); }
public TimeTrackDetailsView() { InitializeComponent(); Loaded += new System.Windows.RoutedEventHandler(TimeTrackDetailsView_Loaded); }
public ListBoxSample() { InitializeComponent(); Loaded += new System.Windows.RoutedEventHandler(ListBoxSample_Loaded); }
public void UnsubLinkTextBlock(WpfElement element, WpfHandler handler) { TryGetHyperlink(element).Click -= handler; }
public CachedImageCtrl() { InitializeComponent(); Loaded += new System.Windows.RoutedEventHandler(CachedImage_Loaded); Unloaded += new System.Windows.RoutedEventHandler(CachedImage_Unloaded); }
public ImElement(WpfElement wpfElement, WpfHandler del) { WpfElement = wpfElement; Handler = del; }
/// <summary> /// 在父菜单下添加一个菜单项 /// </summary> /// <typeparam name="T">ContextMenu或者MenuItem</typeparam> /// <param name="commandItem">菜单项</param> /// <param name="parentMenu">父菜单</param> /// <param name="action">菜单消息处理过程</param> /// <param name="language">使用的语言</param> /// <returns></returns> public static MenuItem AddOneItem <T>(ChartMenuItems commandItem, T parentMenu, System.Windows.RoutedEventHandler action, Common.EnumLanguage language) where T : class { MenuItem curmenu = new MenuItem(); curmenu.Name = commandItem.ToString(); curmenu.Header = Common.Extenstion.EnumExtensions.GetEnumDescription(commandItem, language); curmenu.Click += action; if (parentMenu is ContextMenu) { (parentMenu as ContextMenu).Items.Add(curmenu); } else if (parentMenu is MenuItem) { (parentMenu as MenuItem).Items.Add(curmenu); } return(curmenu); }
public HTMLCanvasElement() { //by default timer for surface update is disabled timer.Stop(); Loaded += new System.Windows.RoutedEventHandler(HTMLCanvasElement_Loaded); Name = "HTMLCanvasElement"; //dv = new DrawingVisual(); //DrawingContext dc = dv.RenderOpen(); //Rect rect = new Rect(new Point(75, 75), new Point(25, 50)); //dc.DrawRectangle(Brushes.Yellow, new Pen(Brushes.Navy, 2), rect); //dc.DrawEllipse(Brushes.Wheat, new Pen(Brushes.Brown, 3), new Point(200, 150), 25, 50); //dc.Close(); //AddVisualChild(dv); canvas = new System.Windows.Controls.Canvas(); canvas.Width = _width; canvas.Height = _height; this.Children.Add(canvas); }
public MainView() { InitializeComponent(); Loaded += new System.Windows.RoutedEventHandler(MainView_Loaded); }