void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.myBook = ((WPFMitsuControls.Book)(target));
                return;

            case 2:

            #line 27 "..\..\..\UserControl1.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AutoPreviousClick);

            #line default
            #line hidden
                return;

            case 3:

            #line 29 "..\..\..\UserControl1.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AutoNextClick);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Example #2
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.book2 = ((WPFMitsuControls.Book)(target));
         return;
     }
     this._contentLoaded = true;
 }
Example #3
0
        public BookViewModel(ref Book myBook, string Path)
        {
            _FolderPath = Path;
            _myBook = myBook;

            //Set Book Size
            myBook.Width = SystemParameters.PrimaryScreenWidth - 90;
            myBook.Height = SystemParameters.PrimaryScreenHeight - 60;

            //Set Timer for the Clock
            DispatcherTimer timer = new DispatcherTimer();
            timer.Interval = TimeSpan.FromMilliseconds(400);
            timer.Tick += LoadData;
            timer.Start();

            //Timer for Help Msg
            TimeCloseInf = new DispatcherTimer();
            TimeCloseInf.Interval = TimeSpan.FromSeconds(20);
            TimeCloseInf.Tick += Cbk_CloseMsg;
        }
Example #4
0
 BookPage findSelectedPage(Book c, System.Windows.Point p)
 {
     Visual findFrom = c.InputHitTest(p) as Visual;
     return findFrom.FindParent<BookPage>() as BookPage;
 }
        private void MenuButtonClick(object sender, RoutedEventArgs e)
        {
            if(_menuBook!=null) return;

            _menuBook = new Book();
            MemoryStream sr = null;
            ParserContext pc = null;
            const string xaml = "<DataTemplate><Border BorderThickness=\"0\" BorderBrush=\"Gray\" Background=\"Transparent\"><ContentControl Content=\"{Binding .}\" /></Border></DataTemplate>";
            sr = new MemoryStream(Encoding.ASCII.GetBytes(xaml));
            pc = new ParserContext();
            pc.XmlnsDictionary.Add("", "http://schemas.microsoft.com/winfx/2006/xaml/presentation");
            pc.XmlnsDictionary.Add("x", "http://schemas.microsoft.com/winfx/2006/xaml");
            var datatemplate = (DataTemplate)XamlReader.Load(sr, pc);
            _menuBook.ItemTemplate = datatemplate;
            var folderName = Directory.GetCurrentDirectory() + "\\Menus\\El Sol Menu";
            var fileNames = Directory.GetFiles(folderName);
            foreach (var fileName in fileNames)
            {

                if (IsImageExt(Path.GetExtension(fileName)))
                {
                    var i = new Image();
                    BitmapSource bi = new BitmapImage(new Uri(fileName));

                    i.Source = bi;
                    bi.Freeze();
                    _menuBook.Items.Add(i);
                    _menuBook.Width = bi.Width * 2;
                    _menuBook.Height = bi.Height;
                }
            }

            var cont = FrameworkManager.AddControlWithAllGestures(_menuBook,100,30);
            //_menuBook.ScaleTo(.5, .5);
            //cont.StartScale = 0.5f;
        }
Example #6
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.PageGrid = ((System.Windows.Controls.Grid)(target));
                return;

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

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

            case 4:
                this.myBook = ((WPFMitsuControls.Book)(target));
                return;

            case 5:

            #line 85 "..\..\..\Pages\Page1.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Feedback_Click);

            #line default
            #line hidden
                return;

            case 6:

            #line 113 "..\..\..\Pages\Page1.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuRuClick);

            #line default
            #line hidden
                return;

            case 7:

            #line 116 "..\..\..\Pages\Page1.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuengClick);

            #line default
            #line hidden
                return;

            case 8:
                this.content_magaz = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 9:

            #line 122 "..\..\..\Pages\Page1.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.mail_button_click);

            #line default
            #line hidden
                return;

            case 10:
                this.button_info = ((System.Windows.Controls.Button)(target));

            #line 147 "..\..\..\Pages\Page1.xaml"
                this.button_info.Click += new System.Windows.RoutedEventHandler(this.button_info_Click);

            #line default
            #line hidden
                return;

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

            #line 175 "..\..\..\Pages\Page1.xaml"
                this.carousel_back_button.Click += new System.Windows.RoutedEventHandler(this.carousel_back_Click);

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

            #line 29 "..\..\..\3. WPF Controls UI\EBook.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_4);

            #line default
            #line hidden
                return;

            case 2:

            #line 30 "..\..\..\3. WPF Controls UI\EBook.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;

            case 3:

            #line 31 "..\..\..\3. WPF Controls UI\EBook.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_1);

            #line default
            #line hidden
                return;

            case 4:

            #line 32 "..\..\..\3. WPF Controls UI\EBook.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_2);

            #line default
            #line hidden
                return;

            case 5:

            #line 33 "..\..\..\3. WPF Controls UI\EBook.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_3);

            #line default
            #line hidden
                return;

            case 6:

            #line 34 "..\..\..\3. WPF Controls UI\EBook.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_5);

            #line default
            #line hidden
                return;

            case 7:
                this.book1 = ((WPFMitsuControls.Book)(target));
                return;
            }
            this._contentLoaded = true;
        }