Beispiel #1
0
 public void listBoxItem_PreviewMouseEnter(object sender, MouseEventArgs e)
 {
     //Print(sender);
     //Console.WriteLine("ldkasj");
     System.Windows.Controls.ListBoxItem xx = (System.Windows.Controls.ListBoxItem)sender;
     xx.IsSelected = true;
 }
Beispiel #2
0
        private void selectFilesButton_Click(object sender, RoutedEventArgs e)
        {
            var dlg = new Microsoft.Win32.OpenFileDialog();
            dlg.Multiselect = true;

            bool? result = dlg.ShowDialog();

            if (result == true)
            {
                dlg.FileNames.ToList().ForEach(filename =>
                {
                    var newItem = new ListBoxItem()
                    {
                        Content = System.IO.Path.GetFileName(filename),
                        Tag = filename
                    };

                    ImageFileCollection.Add(newItem);
                });

                CheckDuplicates();

                ValidateInputPage();
            }
        }
Beispiel #3
0
        private void UserControl_Loaded (object sender, RoutedEventArgs e)
        {
            listBox1.Items.Clear();

            for (int i = 0; i < imageFiles.Count; i++)
            {
                ListBoxItem lbi = new ListBoxItem();
                Image im = new Image();

                im.Source = ((ImageInfo)imageFiles[i]).imageSource;
                double ratio = im.Source.Height / im.Source.Width;

                lbi.Height = ratio * listBox1.Width;
                im.Width = 0.9 * listBox1.Width;
                im.Height = lbi.Height * 0.9;

                lbi.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Center;

                im.Stretch = System.Windows.Media.Stretch.Fill;
                lbi.Content = im;
                listBox1.Items.Add(lbi);
            }


            if (listBox1.Items.Count > 0)
                listBox1.SelectedIndex = 0;
        }
Beispiel #4
0
		public void FillComboBox (ComboBox UsedComboBox, Object Data, String TableName, String ItemName, String ContentToSelect)
			{
			WCFStandardsNS.TableDescription TableDesc = ClientSchema.TableDictionary [TableName];
			WCFStandardsNS.ItemDescription ItemDesc = TableDesc.ItemDictionary [ItemName];
			WCFStandardsNS.AssociationDescription Assoc = ItemDesc.GetChildAssociation ();
			if (Assoc == null)
				return;

			DataSet FillDataSet = WCFAccess.GetCommonDataSet (Assoc.ParentTable.SqlFill);
			foreach (DataRow FillRow in FillDataSet.Tables [0].Rows)
				{
				ListBoxItem Item = new ListBoxItem ();
				Item.Tag = FillRow;
				List<String> DisplayList = new List<string> ();
				foreach (String FillItem in Assoc.ParentTable.LinqFillItems)
					{
					if (FillItem == "ID")
						{
						if (FillRow [FillItem].ToString () == ContentToSelect)
							Item.IsSelected = true;
						continue;
						}
					DisplayList.Add (FillRow [FillItem].ToString ());
					}
				Item.Content = String.Join (", ", DisplayList.ToArray ());
				UsedComboBox.Items.Add (Item);
				}
			}
        internal void displayMails()
        {
            int id = 0;

            LoadingDialog md = new LoadingDialog();
            md.Buttons = null;
            md.Show();
            loadInboxAndSent();
            md.Close();

            foreach (Mail m in this.mm.Inbox)
            {
                ListBoxItem newMail = new ListBoxItem();
                StackPanel mailContainer = new StackPanel();
                Label subject = new Label();

                mailContainer.Width = 450;

                subject.Tag = id;
                subject.Content = m.Title;

                mailContainer.Children.Add(subject);

                newMail.Content = mailContainer;

                this.EmailList.Items.Add(newMail);
                id++;
            }
        }
Beispiel #6
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.tbCheckId = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 2:
                this.lbCheck = ((System.Windows.Controls.ListBox)(target));
                return;

            case 3:
                this.lbiDrinks = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 4:
                this.lbiBars = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 5:
                this.lbiToilets = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 6:
                this.lbiInfo = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 7:
                this.lbiMed = ((System.Windows.Controls.ListBoxItem)(target));
                return;
            }
            this._contentLoaded = true;
        }
        public ChangeMCVersion()
        {
            InitializeComponent();
            try
            {
                foreach (TinyMinecraftVersion ver in VersionManager.versions)
                {
                    ListBoxItem item = new ListBoxItem();
                    item.Content = ver.Key;
                    item.Tag = ver;

                    if (ver.Type == ReleaseType.release)
                        lb_release.Items.Add(item);
                    else if (ver.Type == ReleaseType.snapshot)
                        lb_snapshot.Items.Add(item);
                    else
                        lb_instance.Items.Add(item);
                }
            }
            catch
            {
                MessageBox mb = new MessageBox("Warning!","The versions haven't initialized yet");
                mb.Show();
                this.Close();
            }
        }
Beispiel #8
0
        public UIElement Render()
        {
            var list = new System.Windows.Controls.ListBox();
            foreach (var noteItem in this.NoteItems)
            {
                var renderedNoteItem = noteItem.Render(this.NoteItems.IndexOf(noteItem));

                var listNodeItemItem = new ListBoxItem();
                listNodeItemItem.Content = renderedNoteItem;
                var deleteButtons = (renderedNoteItem as System.Windows.Controls.Panel).Children.OfType<System.Windows.Controls.Button>();
                foreach (var delButton in deleteButtons)
                {

                    delButton.PreviewMouseDown += (snd, args) =>
                    {
                        //have to find the index of the item, that should be deleted !!!

                        var toBeDeleted = this.NoteItems[(int)delButton.DataContext];
                        this.NoteItems.RemoveAt((int)delButton.DataContext); //[index]
                        list.Items.RemoveAt((int)delButton.DataContext);
                        RemoveFromFile(toBeDeleted);
                        CopyData();

                    };
                }

                list.Items.Add(listNodeItemItem);
            }
            return list;
        }
 protected MessageListBox(List<TheoryTypes> items, Mods mod)
 {
     InitializeComponent();
     this.mod = mod;
     if (mod == Mods.Edit)
     {
         throw new NotImplementedException("Так вот.");
     }
     else if (mod == Mods.Choose)
     {
         typeOfElement = typeof(TheoryTypes);
         ListBox listbox = new ListBox();
         ListBoxItem item;
         foreach (TheoryTypes type in items)
         {
             item = new ListBoxItem();
             item.Name = type.ToString();
             item.Content = type;
             listbox.Items.Add(item);
         }
         listbox.SelectionChanged += new SelectionChangedEventHandler(Listbox_SelectionChanged);
         Box.Content = listbox;
     }
     LanguageResource_Updated(null);
 }
Beispiel #10
0
            /**
             * Override of the WidgetBase AddChild function
             */
            public override void AddChild(IWidget child)
            {
                base.AddChild(child);
                MoSync.Util.RunActionOnMainThreadSync(() =>
                {
                    System.Windows.Controls.ListBoxItem item = new System.Windows.Controls.ListBoxItem();
                    WidgetBaseWindowsPhone widget            = (child as WidgetBaseWindowsPhone);
                    item.Content = widget.View;
                    if (widget.fillSpaceHorizontalyEnabled)
                    {
                        item.HorizontalContentAlignment = HorizontalAlignment.Stretch;
                    }
                    else
                    {
                        item.HorizontalContentAlignment = HorizontalAlignment.Left;
                    }

                    if (widget.fillSpaceVerticalyEnabled)
                    {
                        item.VerticalContentAlignment = VerticalAlignment.Stretch;
                    }
                    else
                    {
                        item.VerticalContentAlignment = VerticalAlignment.Center;
                    }
                    mList.Items.Add(item);
                });
            }
Beispiel #11
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ListViewItemMenu1 = ((System.Windows.Controls.ListBoxItem)(target));

            #line 22 "..\..\..\UserControls\UserControlDates.xaml"
                this.ListViewItemMenu1.PreviewMouseDown += new System.Windows.Input.MouseButtonEventHandler(this.ListViewItemMenu1_PreviewMouseDown);

            #line default
            #line hidden
                return;

            case 2:
                this.ListViewItemMenu2 = ((System.Windows.Controls.ListBoxItem)(target));

            #line 26 "..\..\..\UserControls\UserControlDates.xaml"
                this.ListViewItemMenu2.PreviewMouseDown += new System.Windows.Input.MouseButtonEventHandler(this.ListViewItemMenu1_PreviewMouseDown);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Beispiel #12
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ListViewItemMenu1 = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 2:
                this.ListViewItemMenu2 = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 3:
                this.Tooltip_Delete = ((MaterialDesignThemes.Wpf.PackIcon)(target));

            #line 25 "..\..\..\UserControls\UserControlGuests.xaml"
                this.Tooltip_Delete.PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.IconDelete_click);

            #line default
            #line hidden
                return;

            case 4:
                this.Tooltip_Modification = ((MaterialDesignThemes.Wpf.PackIcon)(target));

            #line 28 "..\..\..\UserControls\UserControlGuests.xaml"
                this.Tooltip_Modification.PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.IconModify_click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
 public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
 {
     if (value == null) return null;
     ListBoxItem item = new ListBoxItem();
     item.Content = value;
     return item;
 }
Beispiel #14
0
        public MainWindow()
        {
            InitializeComponent();

            currentTrack = null;
            PreviousTrack = null;
        }
 public FulcrumWindow()
 {
     InitializeComponent();
     try
     {
         //grab the forms associated with the api key and put in the box
         fulcrumForms = FulcrumCore.GetForms();
         if (fulcrumForms != null)
         {
             foreach (fulcrumform form in fulcrumForms.forms)
             {
                 ListBoxItem item = new ListBoxItem();
                 item.Tag = form.id;
                 item.Content = (form.name);
                 this.listboxForms.Items.Add(item);
             }
         }
         else
         {
             MessageBox.Show("Unable to retrieve Fulcrum data at this time.", "Fulcrum Tools", MessageBoxButton.OK, MessageBoxImage.Exclamation);
             this.Hide();
         }
     }
     catch (Exception e)
     {
         string ouch = e.Message;
         MessageBox.Show("Unable to retrieve Fulcrum data at this time.", "Fulcrum Tools", MessageBoxButton.OK, MessageBoxImage.Exclamation);
         this.Hide();
     }
 }
Beispiel #16
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.FilterChips = ((System.Windows.Controls.ListBox)(target));

            #line 37 "..\..\..\..\Pages\Universal\members.xaml"
                this.FilterChips.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.Filter_Change);

            #line default
            #line hidden
                return;

            case 2:
                this.allMembers = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 3:
                this.lateReturn = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 4:
                this.lateAccount = ((System.Windows.Controls.ListBoxItem)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ListViewItemMenu = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 2:
                this.ExpanderMenu = ((System.Windows.Controls.Expander)(target));
                return;

            case 3:
                this.ListViewMenu = ((System.Windows.Controls.ListView)(target));

            #line 28 "..\..\UserControlMenuItem.xaml"
                this.ListViewMenu.PreviewMouseDown += new System.Windows.Input.MouseButtonEventHandler(this.ListViewMenu_PreviewMouseDown);

            #line default
            #line hidden

            #line 32 "..\..\UserControlMenuItem.xaml"
                this.ListViewMenu.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ListViewMenu_SelectionChanged);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Beispiel #18
0
        public MainWindow()
        {
            InitializeComponent();

            // disable console
            tb_console.IsEnabled = false;

            for (int i = 0; i < 3; i++) {
                ListBoxItem lbi = new ListBoxItem();
                lbi.Width = 100;
                lbi.Height = 100;
                lbi.Content = "test";
                lbi.Background = Brushes.Red;
                ListBoxProductBacklog.Items.Add(lbi);
            }

            #region Socket Setup

            threadMonitor.ThreadEvent += Thread_MessageReciever;
            TcpClient tcpClient = new TcpClient("25.106.204.166", 1234);
            //tb_console.Text += "Connected to server.";
            sWriter = new StreamWriter(tcpClient.GetStream());
            Thread thread = new Thread(Read);
            thread.Start(tcpClient);
            #endregion
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.escha = ((Brutu__.EschaScene)(target));
                return;

            case 2:
                this.useProgress = ((System.Windows.Controls.ProgressBar)(target));
                return;

            case 3:
                this.siltLBI = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 4:
                this.beadsLBI = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 5:
                this.eschaStartButton = ((System.Windows.Controls.Button)(target));
                return;

            case 6:
                this.eschaStopButton = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.listbox = ((System.Windows.Controls.ListBox)(target));
                return;

            case 2:
                this.phone = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 3:
                this.tv = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 4:
                this.laptop = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 5:
                this.listboxItems = ((System.Windows.Controls.ListBox)(target));
                return;

            case 6:
                this.stackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 7:
                this.textTitle = ((System.Windows.Controls.TextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Beispiel #21
0
            /**
             * Adds a ListViewItem to the main list.
             * @param child The list view item to be added.
             */
            private void AddListItem(IWidget child)
            {
                base.AddChild(child);
                MoSync.Util.RunActionOnMainThreadSync(() =>
                {
                    System.Windows.Controls.ListBoxItem item = new System.Windows.Controls.ListBoxItem();
                    WidgetBaseWindowsPhone widget = (child as WidgetBaseWindowsPhone);
                    item.Content = widget.View;
                    if (widget.FILL_SPACE_H)
                    {
                        item.HorizontalContentAlignment = HorizontalAlignment.Stretch;
                    }
                    else
                    {
                        item.HorizontalContentAlignment = HorizontalAlignment.Left;
                    }

                    if (widget.FILL_SPACE_V)
                    {
                        item.VerticalContentAlignment = VerticalAlignment.Stretch;
                    }
                    else
                    {
                        item.VerticalContentAlignment = VerticalAlignment.Center;
                    }
                    mList.Items.Add(item);
                });
            }
 private void echo(string s, Brush c)
 {
     ListBoxItem li = new ListBoxItem();
     li.Foreground = c;
     li.Content = s;
     listBox1.Items.Add(li);
 }
 private void echo(String s)
 {
     ListBoxItem li = new ListBoxItem();
     li.Foreground = Brushes.Black;
     li.Content = s;
     listBox1.Items.Add(li);
 }
Beispiel #24
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (HasRolled == false)
            {
                HasRolled = true;
                RollButton.Content = "Re-roll Stats";
            }
            if (Rolls.HasItems == true) Rolls.Items.Clear();
            //int[] rolls = new int[4];
            //Random r = new Random();
            //rolls[0] = r.Next(1, 7);
            //rolls[1] = r.Next(1, 7);
            //rolls[2] = r.Next(1, 7);
            //rolls[3] = r.Next(1, 7);
            //int min = rolls.Min();
            //int total = rolls.Sum();

            //foreach (var roll in rolls)
            //{
            //    Rolls.Items.Add(roll);
            //}
            //Rolls.Items.Add(min);
            //Rolls.Items.Add(total);
            Random rr = new Random();
            for (int ii = 0; ii < 6; ii++)
            {
                ListBoxItem lbi = new ListBoxItem();
                lbi.Content = RollForIt(rr);
                Rolls.Items.Add(lbi);
            }
        }
        protected MessageListBox(List<ITheoryElement> items, Mods mod)
        {
            InitializeComponent();

            this.mod = mod;
            if (mod == Mods.Edit)
            {
                MessageBoxListEditPanel panel = new MessageBoxListEditPanel(items);
                Box.Content = panel;
            }
            else if (mod == Mods.Choose)
            {
                typeOfElement = typeof(ITheoryElement);
                ListBox listbox = new ListBox();
                ListBoxItem item;
                foreach (ITheoryElement element in items)
                {
                    item = new ListBoxItem();
                    item.Content = element;
                    //item.Content = type;
                    listbox.Items.Add(item);
                }
                listbox.SelectionChanged += new SelectionChangedEventHandler(Listbox_SelectionChanged);
                Box.Content = listbox;
            }
        }
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            var stackPannel = new StackPanel();
            var value = new ListBoxItem();
            value.Content = "False";
            value.Foreground = Brushes.White;
            value.Background = Brushes.Red;
            value.MouseUp += Value_MouseUp;

            var img = new ImgButton()
            {
                Content = "+",
                Width = 30,
                Foreground = Brushes.White,
                Background = Brushes.YellowGreen
            };
            img.Click += Img_Click;

            stackPannel.Children.Add(new Label() { Content = "Новый элемент" });
            stackPannel.Children.Add(value);
            stackPannel.Children.Add(img);
            stackPannel.Orientation = Orientation.Horizontal;

            var item = new ListBoxItem();
            item.Content = stackPannel;
            item.Selected += Item_Selected;

            choices.Items.Add(item);
            choices.SelectedItem = item;
        }
Beispiel #27
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.MyTask = ((System.Windows.Controls.ListBoxItem)(target));

            #line 12 "..\..\..\MainWindow.xaml"
                this.MyTask.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.MyTask_MouseDoubleClick);

            #line default
            #line hidden
                return;

            case 2:
                this.publishManage = ((System.Windows.Controls.ListBoxItem)(target));

            #line 14 "..\..\..\MainWindow.xaml"
                this.publishManage.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.publishManage_MouseDoubleClick);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Beispiel #28
0
 private void PopulateListbox()
 {
     // Grab the baseline data.
     BaselineDataForChart bdfc = new BaselineDataForChart();
     // Clear the listbox.
     lbPlan.Items.Clear();
     // Instantiate the idarray.
     idarray = new int[bdfc.Count()];
     // Populate list box.
     foreach (WeightRecord cr in bdfc)
     {
         ListBoxItem lbi = new ListBoxItem();
         if (cr.week == 0)
         {
             lbi.Content = "Goal weight of " + cr.weight.ToString("0.0") + " reached!";
         }
         else
         {
             lbi.Content = "Week " + cr.week.ToString() + " start weight is " + cr.weight.ToString("0.0");
         }
         lbi.FontSize = 28;
         lbPlan.Items.Add(lbi);
         idarray[lbPlan.Items.IndexOf(lbi)] = cr.id;
     }
 }
        private void CommandExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            // Ignore menu button source.
            if (e.Source is ICommandSource) return;

            // Ignore the ApplicationUndo command.
            if (e.Command == MonitorCommands.ApplicationUndo) return;

            // Could filter for commands you want to add to the stack
            // (for example, not selection events).

            TextBox txt = e.Source as TextBox;
            if (txt != null)
            {
                RoutedCommand cmd = (RoutedCommand)e.Command;
                
                CommandHistoryItem historyItem = new CommandHistoryItem(
                    cmd.Name, txt, "Text", txt.Text);

                ListBoxItem item = new ListBoxItem();
                item.Content = historyItem;
                lstHistory.Items.Add(historyItem);

               // CommandManager.InvalidateRequerySuggested();
            }
        }
Beispiel #30
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/TasbihZikr;component/MasnoonDuain.xaml", System.UriKind.Relative));
     this.LayoutRoot       = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.Duas             = ((System.Windows.Controls.ListBox)(this.FindName("Duas")));
     this.lookingMirror    = ((System.Windows.Controls.ListBoxItem)(this.FindName("lookingMirror")));
     this.afterFajrMaghrib = ((System.Windows.Controls.ListBoxItem)(this.FindName("afterFajrMaghrib")));
     this.fearEnemy        = ((System.Windows.Controls.ListBoxItem)(this.FindName("fearEnemy")));
     this.visitSick        = ((System.Windows.Controls.ListBoxItem)(this.FindName("visitSick")));
     this.duaAEating       = ((System.Windows.Controls.ListBoxItem)(this.FindName("duaAEating")));
     this.duaDressing      = ((System.Windows.Controls.ListBoxItem)(this.FindName("duaDressing")));
     this.duaSneezing      = ((System.Windows.Controls.ListBoxItem)(this.FindName("duaSneezing")));
     this.seeSneezing      = ((System.Windows.Controls.ListBoxItem)(this.FindName("seeSneezing")));
     this.becomeAngry      = ((System.Windows.Controls.ListBoxItem)(this.FindName("becomeAngry")));
     this.duaeToilet       = ((System.Windows.Controls.ListBoxItem)(this.FindName("duaeToilet")));
     this.dualToilet       = ((System.Windows.Controls.ListBoxItem)(this.FindName("dualToilet")));
     this.duaSleeping      = ((System.Windows.Controls.ListBoxItem)(this.FindName("duaSleeping")));
     this.wakingUp         = ((System.Windows.Controls.ListBoxItem)(this.FindName("wakingUp")));
     this.enterHome        = ((System.Windows.Controls.ListBoxItem)(this.FindName("enterHome")));
     this.leaveHome        = ((System.Windows.Controls.ListBoxItem)(this.FindName("leaveHome")));
 }
Beispiel #31
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ItemOpenUserProfilePage = ((System.Windows.Controls.ListBoxItem)(target));

            #line 44 "..\..\..\Pages\Users.xaml"
                this.ItemOpenUserProfilePage.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.ItemOpenUserProfilePage_MouseDoubleClick);

            #line default
            #line hidden
                return;

            case 2:
                this.TextBlockUserName = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 3:
                this.TextBlockUserProfession = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 4:
                this.ButtonOpenNewUserPage = ((System.Windows.Controls.Button)(target));

            #line 211 "..\..\..\Pages\Users.xaml"
                this.ButtonOpenNewUserPage.Click += new System.Windows.RoutedEventHandler(this.ButtonOpenNewUserPage_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
        protected void showBrowseListActionContextMenu(MediaItem _mediaItem, Point _point, ListBoxItem lbi, List<MediaItem> _mediaItems=null)
        {
            String text;

            if (ContentBrowseListControl.SelectedItem == null)
                return;

            if (!_mediaItem.isAllowedToDropOnTrackList())
                return;

            if (_mediaItems != null && !MediaItem.isAllowedToDropOnTrackList(_mediaItems))
                return;

            text = _mediaItem.text;

            if (_mediaItems != null && _mediaItems.Count > 1)
            {
                text += String.Format(" und {0} weitere", _mediaItems.Count - 1);
            }

            Point relativeLocation = ContentBrowseListControl.TranslatePoint(new Point(0, 0), lbi);

            //BrowseListActionPopupContentImage.DataContext = _mediaInformation;
            //BrowseListActionPopupContentInfo.Text = _mediaInformation.text;
            ContentBrowserContextMenuPopup.Width = ContentBrowseListControl.ActualWidth;
            ContentBrowserContextMenuPopup.DataContext = _mediaItem;
            ContentBrowserContextMenu.Text = text;
            //ContentBrowserContextMenuPopup.Tag = _mediaItems;
            ContentBrowserContextMenuPopup.PlacementRectangle = new Rect(0, _point.Y - (_point.Y - (relativeLocation.Y * -1) - 1), ContentBrowseListControl.ActualWidth + 1, 50);
            ContentBrowserContextMenuPopup.IsOpen = true;
            ContentBrowserContextMenuPopup.StaysOpen = false;
        }
        internal bool IsOnCurrentPage(ListBoxItem item)
        {
            var itemsHostRect = Rect.Empty;
            var listBoxItemRect = Rect.Empty;

            if (_visual == null)
            {
                ItemsControlHelper ich = new ItemsControlHelper(ListBox);
                ScrollContentPresenter scp = ich.ScrollHost == null ? null : ich.ScrollHost.GetVisualDescendants().OfType<ScrollContentPresenter>().FirstOrDefault();
                _visual = (ich.ScrollHost == null) ? null : ((scp == null) ? ((FrameworkElement)ich.ScrollHost) : ((FrameworkElement)scp));
            }

            if (_visual == null)
                return true;

            itemsHostRect = new Rect(0.0, 0.0, _visual.ActualWidth, _visual.ActualHeight);
            //ListBoxItem item = ListBox.ItemContainerGenerator.ContainerFromIndex(index) as ListBoxItem;
            if (item == null)
            {
                listBoxItemRect = Rect.Empty;
                return false;
            }

            GeneralTransform transform = item.TransformToVisual(_visual);
            listBoxItemRect = new Rect(transform.Transform(new Point()), transform.Transform(new Point(item.ActualWidth, item.ActualHeight)));
            if (!this.IsVerticalOrientation())
            {
                return ((itemsHostRect.Left <= listBoxItemRect.Left) && (listBoxItemRect.Right <= itemsHostRect.Right));
            }

            return ((listBoxItemRect.Bottom + 100 >= itemsHostRect.Top) && (listBoxItemRect.Top - 100 <= itemsHostRect.Bottom));
            //return ((itemsHostRect.Top <= listBoxItemRect.Bottom) && (listBoxItemRect.Top <= itemsHostRect.Bottom));
        }
 private ListBoxItem newLBitem(String name, String tag)
 {
     ListBoxItem c = new ListBoxItem();
     c.Content = name;
     c.Tag = tag;            
     return c;
 }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.FilterChips = ((System.Windows.Controls.ListBox)(target));

            #line 33 "..\..\..\..\Pages\Employee\EmployeeBooks.xaml"
                this.FilterChips.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.Filter_Change);

            #line default
            #line hidden
                return;

            case 2:
                this.AllBooks = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 3:
                this.BorrowedBooks = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 4:
                this.AvailableBooks = ((System.Windows.Controls.ListBoxItem)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.UnderlineCheckbox = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 2:

            #line 99 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OpenFile_Clicked);

            #line default
            #line hidden
                return;

            case 3:

            #line 109 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.SaveFile_Clicked);

            #line default
            #line hidden
                return;

            case 4:
                this.editorRichTextbox = ((System.Windows.Controls.RichTextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Beispiel #37
0
 public SetResolutionWin(ListBoxItem lbiRow, bool isAdd = true)
 {
     InitializeComponent();
     this.Owner = ProjectSettingWin.s_pW;
     m_lbiRow = lbiRow;
     m_isAdd = isAdd;
 }
        private void Load_Networks()
        {
            string SQL;
            string NetID, Netname;

            SQL = "select NetworkID, NetName from Networks";
            OleDbCommand aCommand = new OleDbCommand(SQL, localengine.RepositoryConnection);
            try
            {
                //create the datareader object to connect to table
                OleDbDataReader aReader = aCommand.ExecuteReader();

                //Iterate throuth the database
                while (aReader.Read())
                {
                    NetID = aReader.GetString(0);
                    Netname = aReader.GetString(1);

                    ListBoxItem li = new ListBoxItem();
                    li.Content = Netname;
                    li.Tag = NetID;
                    ContainNetworks.Items.Add(li);
                }
                aReader.Close();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }
        }
Beispiel #39
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.password_box = ((System.Windows.Controls.PasswordBox)(target));
                return;

            case 2:
                this.date_time = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 3:
                this.enter_btn = ((System.Windows.Controls.Button)(target));

            #line 12 "..\..\PasswordWindow.xaml"
                this.enter_btn.Click += new System.Windows.RoutedEventHandler(this.enter_btn_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.notification = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/LaunchersAndChoosersDemo;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot               = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.FirstListBox             = ((System.Windows.Controls.ListBox)(this.FindName("FirstListBox")));
     this.iEmailComposeTask        = ((System.Windows.Controls.ListBoxItem)(this.FindName("iEmailComposeTask")));
     this.iMarketplaceDetailTask   = ((System.Windows.Controls.ListBoxItem)(this.FindName("iMarketplaceDetailTask")));
     this.iMarketplaceHubTask      = ((System.Windows.Controls.ListBoxItem)(this.FindName("iMarketplaceHubTask")));
     this.iMarketplaceReviewTask   = ((System.Windows.Controls.ListBoxItem)(this.FindName("iMarketplaceReviewTask")));
     this.iMarketplaceSearchTask   = ((System.Windows.Controls.ListBoxItem)(this.FindName("iMarketplaceSearchTask")));
     this.iMediaPlayerLauncher     = ((System.Windows.Controls.ListBoxItem)(this.FindName("iMediaPlayerLauncher")));
     this.iPhoneCallTask           = ((System.Windows.Controls.ListBoxItem)(this.FindName("iPhoneCallTask")));
     this.iSearchTask              = ((System.Windows.Controls.ListBoxItem)(this.FindName("iSearchTask")));
     this.iSmsComposeTask          = ((System.Windows.Controls.ListBoxItem)(this.FindName("iSmsComposeTask")));
     this.iWebBrowserTask          = ((System.Windows.Controls.ListBoxItem)(this.FindName("iWebBrowserTask")));
     this.SecondListBox            = ((System.Windows.Controls.ListBox)(this.FindName("SecondListBox")));
     this.iCameraCaptureTask       = ((System.Windows.Controls.ListBoxItem)(this.FindName("iCameraCaptureTask")));
     this.iEmailAddressChooserTask = ((System.Windows.Controls.ListBoxItem)(this.FindName("iEmailAddressChooserTask")));
     this.iPhoneNumberChooserTask  = ((System.Windows.Controls.ListBoxItem)(this.FindName("iPhoneNumberChooserTask")));
     this.iPhotoChooserTask        = ((System.Windows.Controls.ListBoxItem)(this.FindName("iPhotoChooserTask")));
     this.iSaveEmailAddressTask    = ((System.Windows.Controls.ListBoxItem)(this.FindName("iSaveEmailAddressTask")));
     this.iSavePhoneNumberTask     = ((System.Windows.Controls.ListBoxItem)(this.FindName("iSavePhoneNumberTask")));
 }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Name = ((System.Windows.Controls.Label)(target));
                return;

            case 2:
                this.Surname = ((System.Windows.Controls.Label)(target));
                return;

            case 3:
                this.City = ((System.Windows.Controls.Label)(target));
                return;

            case 4:
                this.Street = ((System.Windows.Controls.Label)(target));
                return;

            case 5:
                this.PhoneNumber = ((System.Windows.Controls.Label)(target));
                return;

            case 6:
                this.ZipCode = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.HouseNumber = ((System.Windows.Controls.Label)(target));
                return;

            case 8:
                this.ApartmentNumber = ((System.Windows.Controls.Label)(target));
                return;

            case 9:
                this.ListBoxMethodOfPayment = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 10:
                this.OrderPrice = ((System.Windows.Controls.Label)(target));
                return;

            case 11:
                this.ButtonOrder = ((System.Windows.Controls.Button)(target));

            #line 43 "..\..\UserControlOrder.xaml"
                this.ButtonOrder.Click += new System.Windows.RoutedEventHandler(this.ButtonOrder_Click);

            #line default
            #line hidden
                return;

            case 12:
                this.MessageResponse = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }
 //歌词
 void ShowLynic(List <Lynic> lstLynic)
 {
     new Thread(() =>
     {
         int t = System.Environment.TickCount;
         int notRunningTime = 0;
         for (int i = 0; i < lstLynic.Count; i++)
         {
             while (currentStatus == PlayerStatus.Pause)
             {
                 notRunningTime++;//如果暂停,则将暂停的毫秒数记录下来。
                 Thread.Sleep(1);
             }
             while (System.Environment.TickCount - t - notRunningTime < lstLynic[i].MiniSencond)
             {
                 Thread.Sleep(1);
             }
             //Console.WriteLine(lstLynic[i].Content);
             this.Dispatcher.Invoke((Action)(() =>
             {
                 System.Windows.Controls.ListBoxItem item2 = lynicBoard.Items[2] as System.Windows.Controls.ListBoxItem;
                 item2.Content = lstLynic[i].Content;
                 if (i - 1 >= 0)
                 {
                     System.Windows.Controls.ListBoxItem item1 = lynicBoard.Items[1] as System.Windows.Controls.ListBoxItem;
                     item1.Content = lstLynic[i - 1].Content;
                 }
                 if (i - 2 >= 0)
                 {
                     System.Windows.Controls.ListBoxItem item0 = lynicBoard.Items[0] as System.Windows.Controls.ListBoxItem;
                     item0.Content = lstLynic[i - 2].Content;
                 }
                 if (i + 1 < lstLynic.Count)
                 {
                     System.Windows.Controls.ListBoxItem item3 = lynicBoard.Items[3] as System.Windows.Controls.ListBoxItem;
                     item3.Content = lstLynic[i + 1].Content;
                 }
                 if (i + 2 < lstLynic.Count)
                 {
                     System.Windows.Controls.ListBoxItem item4 = lynicBoard.Items[4] as System.Windows.Controls.ListBoxItem;
                     item4.Content = lstLynic[i + 2].Content;
                 }
                 if (i == lstLynic.Count - 1)    //歌词到了最后一行
                 {
                     System.Windows.Controls.ListBoxItem item3 = lynicBoard.Items[3] as System.Windows.Controls.ListBoxItem;
                     System.Windows.Controls.ListBoxItem item4 = lynicBoard.Items[4] as System.Windows.Controls.ListBoxItem;
                     item3.Content = "";
                     item4.Content = "";
                 }
                 if (i == lstLynic.Count - 2)    //歌词到了倒数第二行
                 {
                     System.Windows.Controls.ListBoxItem item4 = lynicBoard.Items[4] as System.Windows.Controls.ListBoxItem;
                     item4.Content = "";
                 }
             }));
             lstLynic[i].IsShow = true;
         }
     }).Start();
 }
Beispiel #43
0
 private void AddValue_Click(object sender, RoutedEventArgs e)
 {
     ListBoxItem item = new ListBoxItem();
     item.Content = "";
     valuesList.Items.Add(item);
     valuesList.SelectedIndex = valuesList.Items.Count - 1;
     valuesList.ScrollIntoView(item);
 }
 public void ListBoxTestDataContextNullTest() {
     var containter = new ListBoxItem() { DataContext = null };
     containter.Content = originalSource;
     var itemsControl = new ListBox();
     itemsControl.Items.Add(containter);
     var result = converter.TestConvert(itemsControl, originalSource);
     Assert.IsNull(result);
 }
 public void ListBoxTest() {
     var containter = new ListBoxItem() { DataContext = itemViewModel1 };
     containter.Content = originalSource;
     var itemsControl = new ListBox();
     itemsControl.Items.Add(containter);
     var result = converter.TestConvert(itemsControl, originalSource);
     Assert.AreEqual(itemViewModel1, result);
 }
Beispiel #46
0
 public SetSettingRowWin(ListBoxItem lbiRow, Dictionary<ListBoxItem, XmlElement> mapLbiRow, bool isAdd = true)
 {
     InitializeComponent();
     this.Owner = ProjectSettingWin.s_pW;
     m_lbiRow = lbiRow;
     m_mapLbiRow = mapLbiRow;
     m_isAdd = isAdd;
 }
Beispiel #47
0
		internal void FocusItem(ListBoxItem item)
		{
			if (item != null) {
				focusedItem = item;
				if (!item.IsFocused)
					item.Focus ();
			}
		}
 private void L2Add_Click(object sender ,RoutedEventArgs e)
 {
     ListBoxItem NEW = new ListBoxItem();
     NEW.Content = L2Value.Text;
     L2ListBox.Items.Add(NEW);
     UpdateDir();
     CalMoney();
 }
Beispiel #49
0
 private void UpdateList(string data)
 {
     itemListBox.Dispatcher.BeginInvoke(new Action(() =>
     {
         var item = new ListBoxItem() { Content = data };
         itemListBox.Items.Add(item);
     }));
 }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.MenuItemsListbox = ((System.Windows.Controls.ListBox)(target));
                return;

            case 2:
                this.btnToMain = ((System.Windows.Controls.ListBoxItem)(target));

            #line 49 "..\..\MainWindow.xaml"
                this.btnToMain.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.BtnToMain_PreviewMouseLeftButtonUp);

            #line default
            #line hidden
                return;

            case 3:
                this.btnToSensorList = ((System.Windows.Controls.ListBoxItem)(target));

            #line 58 "..\..\MainWindow.xaml"
                this.btnToSensorList.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.BtnToSensorList_PreviewMouseLeftButtonUp);

            #line default
            #line hidden
                return;

            case 4:
                this.btnToMap = ((System.Windows.Controls.ListBoxItem)(target));

            #line 67 "..\..\MainWindow.xaml"
                this.btnToMap.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.BtnToMap_PreviewMouseLeftButtonUp);

            #line default
            #line hidden
                return;

            case 5:
                this.btnAbout = ((System.Windows.Controls.ListBoxItem)(target));

            #line 76 "..\..\MainWindow.xaml"
                this.btnAbout.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.BtnAbout_PreviewMouseLeftButtonUp);

            #line default
            #line hidden
                return;

            case 6:
                this.MenuToggleButton = ((System.Windows.Controls.Primitives.ToggleButton)(target));
                return;

            case 7:
                this.Snacky = ((MaterialDesignThemes.Wpf.Snackbar)(target));
                return;
            }
            this._contentLoaded = true;
        }
Beispiel #51
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Recipes_Box = ((System.Windows.Controls.ListBox)(target));
                return;

            case 2:
                this.Pastitsio = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 3:
                this.Soufle = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 4:
                this.Quakeropita = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 5:
                this.Igridient_label = ((System.Windows.Controls.Label)(target));
                return;

            case 6:
                this.amount_label = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.availability_label = ((System.Windows.Controls.Label)(target));
                return;

            case 8:
                this.Food_Image = ((System.Windows.Controls.Image)(target));
                return;

            case 9:
                this.rect1 = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 10:
                this.textBox = ((System.Windows.Controls.TextBox)(target));

            #line 58 "..\..\Recipes.xaml"
                this.textBox.GotFocus += new System.Windows.RoutedEventHandler(this.textBox_GotFocus);

            #line default
            #line hidden

            #line 58 "..\..\Recipes.xaml"
                this.textBox.LostFocus += new System.Windows.RoutedEventHandler(this.textBox_LostFocus);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.wInicio = ((ProyectoAgendaSQL.Inicio)(target));
                return;

            case 2:
                this.menu = ((System.Windows.Controls.Menu)(target));
                return;

            case 3:
                this.itemInicio = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 4:
                this.itemAdmin = ((System.Windows.Controls.ListBoxItem)(target));

            #line 9 "..\..\Inicio.xaml"
                this.itemAdmin.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.itemAdmin_MouseLeftButtonUp);

            #line default
            #line hidden
                return;

            case 5:
                this.itemConsultas = ((System.Windows.Controls.ListBoxItem)(target));

            #line 10 "..\..\Inicio.xaml"
                this.itemConsultas.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.itemConsultas_MouseLeftButtonUp);

            #line default
            #line hidden
                return;

            case 6:
                this.itemEmpleado = ((System.Windows.Controls.ListBoxItem)(target));

            #line 11 "..\..\Inicio.xaml"
                this.itemEmpleado.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.itemEmpleado_MouseLeftButtonUp);

            #line default
            #line hidden
                return;

            case 7:
                this.CerrarSeción = ((System.Windows.Controls.ListBoxItem)(target));

            #line 12 "..\..\Inicio.xaml"
                this.CerrarSeción.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.CerrarSeción_MouseLeftButtonUp);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.txtboxexpr = ((System.Windows.Controls.TextBox)(target));
                return;

            case 2:

            #line 11 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.canvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 4:
                this.btnfourier = ((System.Windows.Controls.Button)(target));

            #line 13 "..\..\MainWindow.xaml"
                this.btnfourier.Click += new System.Windows.RoutedEventHandler(this.btnfourier_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.lstbx = ((System.Windows.Controls.ListBox)(target));
                return;

            case 6:
                this.n10 = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 7:
                this.n30 = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 8:
                this.n50 = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 9:
                this.n70 = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 10:
                this.n90 = ((System.Windows.Controls.ListBoxItem)(target));
                return;
            }
            this._contentLoaded = true;
        }
Beispiel #54
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.UnderlineCheckbox = ((System.Windows.Controls.ListBoxItem)(target));
         return;
     }
     this._contentLoaded = true;
 }
Beispiel #55
0
 /**
  * Inserts a list view item at a certain index.
  * @param child The widget to be added to the list.
  * @param index The index where the widget should be added.
  */
 private void InsertListItem(IWidget child, int index)
 {
     base.InsertChild(child, index);
     MoSync.Util.RunActionOnMainThreadSync(() =>
     {
         System.Windows.Controls.ListBoxItem item = new System.Windows.Controls.ListBoxItem();
         WidgetBaseWindowsPhone widget = (child as WidgetBaseWindowsPhone);
         item.Content = widget.View;
         mList.Items.Insert(index, item);
     });
 }
Beispiel #56
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.listItem = ((System.Windows.Controls.ListBoxItem)(target));

            #line 8 "..\..\Page2.xaml"
                this.listItem.MouseEnter += new System.Windows.Input.MouseEventHandler(this.addShade);

            #line default
            #line hidden

            #line 8 "..\..\Page2.xaml"
                this.listItem.MouseLeave += new System.Windows.Input.MouseEventHandler(this.removeShade);

            #line default
            #line hidden

            #line 8 "..\..\Page2.xaml"
                this.listItem.Selected += new System.Windows.RoutedEventHandler(this.listItem_Selected);

            #line default
            #line hidden
                return;

            case 2:
                this.grid2 = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.resultTitle = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 4:
                this.resultAuthors = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 5:
                this.resultCitedBy = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 6:
                this.btnViewCites = ((System.Windows.Controls.Button)(target));

            #line 15 "..\..\Page2.xaml"
                this.btnViewCites.Click += new System.Windows.RoutedEventHandler(this.btnViewCitations);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            System.Windows.Controls.ListBoxItem listBoxItem = FindParent <System.Windows.Controls.ListBoxItem>(sender as DependencyObject);
            if (listBoxItem == null)
            {
                return;
            }

            ViewModel.TabHeaderItem tabHeaderItem = listBoxItem.DataContext as ViewModel.TabHeaderItem;
            _tabHeader3.Items.Remove(tabHeaderItem);
        }
Beispiel #58
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.LevelFive = ((GameLabNumber2.Level5)(target));
                return;

            case 2:
                this.gMain = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.dMain = ((System.Windows.Controls.DockPanel)(target));
                return;

            case 4:
                this.firstlView = ((System.Windows.Controls.ListView)(target));
                return;

            case 5:
                this.FirstTask = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 6:
                this.SecondTask = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 7:
                this.secondlView = ((System.Windows.Controls.ListView)(target));
                return;

            case 8:
                this.FirstQuest = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 9:
                this.SecondQuest = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 10:
                this.logLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 11:
                this.tbAnswer = ((System.Windows.Controls.TextBox)(target));
                return;

            case 12:
                this.answerButton = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
Beispiel #59
0
        private static ListBoxItem CreateRecentScenesItem(string target, bool startScreenEntry = false)
        {
            ListBoxItem newItem = new ListBoxItem();
            TextBlock   label   = new TextBlock();

            label.Text      = target.Replace("/n/n", Environment.NewLine);
            newItem.Tag     = target;
            newItem.Content = label;
            newItem.PreviewMouseLeftButtonUp += RecentSceneEntryClicked;
            newItem.KeyUp += RecentSceneEntryPressed;
            return(newItem);
        }
Beispiel #60
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 9 "..\..\..\Pages\UserPage.xaml"
                ((SkiResort.Pages.UserPage)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Page_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.UserListBox = ((System.Windows.Controls.ListBox)(target));
                return;

            case 3:
                this.BuyListBoxItem = ((System.Windows.Controls.ListBoxItem)(target));

            #line 18 "..\..\..\Pages\UserPage.xaml"
                this.BuyListBoxItem.Selected += new System.Windows.RoutedEventHandler(this.BuyListBoxItem_Selected);

            #line default
            #line hidden
                return;

            case 4:
                this.UseListBoxItem = ((System.Windows.Controls.ListBoxItem)(target));

            #line 24 "..\..\..\Pages\UserPage.xaml"
                this.UseListBoxItem.Selected += new System.Windows.RoutedEventHandler(this.UseListBoxItem_Selected);

            #line default
            #line hidden
                return;

            case 5:
                this.ReportListBoxItem = ((System.Windows.Controls.ListBoxItem)(target));

            #line 32 "..\..\..\Pages\UserPage.xaml"
                this.ReportListBoxItem.Selected += new System.Windows.RoutedEventHandler(this.ReportListBoxItem_Selected);

            #line default
            #line hidden
                return;

            case 6:
                this.UserFrame = ((System.Windows.Controls.Frame)(target));
                return;
            }
            this._contentLoaded = true;
        }