Ejemplo n.º 1
0
        public frmSearch(frmNews frmNews)
        {
            InitializeComponent();
            ObservableCollection <string> GetAllObservors = DataBaseManager.GetAllObservors();

            GetAllObservors.Add("الكل");
            cbxObserver.ItemsSource = GetAllObservors;
            ObservableCollection <string> GetAllResources = DataBaseManager.GetAllResources();

            GetAllResources.Add("الكل");
            cbxResource.ItemsSource = GetAllResources;
            this.frmNews            = frmNews;
        }
Ejemplo n.º 2
0
 public frmViewNews(List <News> ListNews, int PselectedOne, frmNews frmNews)
 {
     InitializeComponent();
     this.frmNews      = frmNews;
     this.ListNews     = ListNews;
     ListLength        = ListNews.Count;
     this.selectedOne  = PselectedOne;
     CurrnetNewsNumber = selectedOne + 1;
     tbkCurrentNewsNumber.DataContext = this;
     tbkTotalNewsNumber.DataContext   = this;
     UpdateCurrentNews();
     this.Height = Screen.PrimaryScreen.Bounds.Height - 50;
 }
Ejemplo n.º 3
0
        public frmAddUpdateNews(News pNews, frmNews frmNews)
        {
            InitializeComponent();
            this.Height         = Screen.PrimaryScreen.Bounds.Height - 50;
            this.News_Reflected = pNews;
            this.frmNews        = frmNews;

            // this for to take clone of news and when save it will reflect to original
            if (News_Reflected != null)
            {
                this.News_NotReflected = (News)pNews.Clone();
            }
            else
            {
                this.News_NotReflected             = new News();
                this.News_NotReflected.DateAndTime = DateTime.Now;
            }

            this.DataContext = this.News_NotReflected;

            SetValues();
        }
Ejemplo n.º 4
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 17 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Controls.StackPanel)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.TitleBar_MouseDown);

            #line default
            #line hidden
                return;

            case 2:
                this.TitleBar = ((System.Windows.Controls.StackPanel)(target));
                return;

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

            #line 33 "..\..\..\Views\MainWindow.xaml"
                this.btnClose.Click += new System.Windows.RoutedEventHandler(this.btnClose_Click);

            #line default
            #line hidden
                return;

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

            #line 36 "..\..\..\Views\MainWindow.xaml"
                this.btnMaximizeRestore.Click += new System.Windows.RoutedEventHandler(this.btnMaximizeRestore_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.imgMaximizeRestore = ((System.Windows.Controls.Image)(target));
                return;

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

            #line 39 "..\..\..\Views\MainWindow.xaml"
                this.btnMinimize.Click += new System.Windows.RoutedEventHandler(this.btnMinimize_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.notification = ((System.Windows.Controls.Border)(target));
                return;

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

            #line 73 "..\..\..\Views\MainWindow.xaml"
                this.btnFavorite.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.btnFavorite_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.DateAndTimeNow = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 10:
                this.buttonsBar = ((System.Windows.Controls.Grid)(target));
                return;

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

            case 12:
                this.btnNews = ((System.Windows.Controls.Button)(target));
                return;

            case 13:
                this.Content = ((System.Windows.Controls.Grid)(target));
                return;

            case 14:
                this.SocialMedia = ((DailyNews.Views.frmSocialMedia)(target));
                return;

            case 15:
                this.News = ((DailyNews.Views.frmNews)(target));
                return;
            }
            this._contentLoaded = true;
        }