コード例 #1
0
 public frmViewSocialMediaPost(List <SocialMedia> ListPosts, int PselectedOne, frmSocialMedia frmSocialMedia)
 {
     InitializeComponent();
     this.frmSocialMedia = frmSocialMedia;
     this.ListPosts      = ListPosts;
     ListLength          = ListPosts.Count;
     this.selectedOne    = PselectedOne;
     CurrnetPostNumber   = selectedOne + 1;
     tbkCurrentPostNumber.DataContext = this;
     tbkTotalPostNumber.DataContext   = this;
     UpdateCurrentPost();
     this.Height = Screen.PrimaryScreen.Bounds.Height - 50;
 }
コード例 #2
0
        public frmAddUpdatesSocialMedia(SocialMedia pSocialMediaPost, frmSocialMedia frmSocialMedia)
        {
            InitializeComponent();
            this.Height = Screen.PrimaryScreen.Bounds.Height - 50;
            this.SocialMediaPost_Reflected = pSocialMediaPost;
            this.frmSocialMedia            = frmSocialMedia;

            // this for to take clone of SocialMediaPost and when save it will reflect to original
            if (pSocialMediaPost != null)
            {
                // this means this post exists and will take copy(clone) of it
                this.SocialMediaPost_NotReflected = (SocialMedia)pSocialMediaPost.Clone();
            }
            else
            {
                // this means this post doent exist (new post)
                this.SocialMediaPost_NotReflected             = new SocialMedia();
                this.SocialMediaPost_NotReflected.DateAndTime = DateTime.Now;
            }


            SetValues();
        }
コード例 #3
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;
        }
コード例 #4
0
 public frmSearchSocialMedia(frmSocialMedia frmSocialMedia)
 {
     InitializeComponent();
     setValuesForFields(); // To get values for Filds from database
     this.frmSocialMedia = frmSocialMedia;
 }