コード例 #1
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            ShellPage.Current.ShellControl.SelectItem("8292a18d-7b72-4967-88ba-82207bd9fdf2");
            ShellPage.Current.ShellControl.SetCommandBar(commandBar);
            if (e.NavigationMode == NavigationMode.New)
            {
                await this.ViewModel.LoadDataAsync();

                this.ScrollToTop();
            }

            if (ViewModel.Items != null && ViewModel.Items.Count > 0)
            {
                HtmlContent = ViewModel.Items[0].Content;
            }
            _dataTransferManager = DataTransferManager.GetForCurrentView();
            _dataTransferManager.DataRequested += OnDataRequested;

            base.OnNavigatedTo(e);
        }
コード例 #2
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            ShellPage.Current.ShellControl.SelectItem("b475fae9-de27-4242-8db7-4388fef4ca64");
            ShellPage.Current.ShellControl.SetCommandBar(commandBar);
            if (e.NavigationMode == NavigationMode.New)
            {
                await this.ViewModel.LoadDataAsync();

                this.ScrollToTop();
            }

            if (ViewModel.Items != null && ViewModel.Items.Count > 0)
            {
                HtmlContent = ViewModel.Items[0].Content;
            }
            _dataTransferManager = DataTransferManager.GetForCurrentView();
            _dataTransferManager.DataRequested += OnDataRequested;

            base.OnNavigatedTo(e);
        }
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            _dataTransferManager = DataTransferManager.GetForCurrentView();
            _dataTransferManager.DataRequested += OnDataRequested;

            _navigationHelper.OnNavigatedTo(e);

            if (LetsTalkWaterModel != null)
            {
                await LetsTalkWaterModel.LoadItemsAsync();

                if (e.NavigationMode != NavigationMode.Back)
                {
                    LetsTalkWaterModel.SelectItem(e.Parameter);
                }

                LetsTalkWaterModel.ViewType = ViewTypes.Detail;
            }
            DataContext = this;
        }
コード例 #4
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            DataTransferManager.GetForCurrentView().DataRequested += OnShareDataRequested;
            bestSteps = IsolatedStorageHelper.GetObject <double>("bestSteps");

            pairedBands = await BandClientManager.Instance.GetBandsAsync();

            if (pairedBands.Length < 1)
            {
                return;
            }
            _bandClient = await BandClientManager.Instance.ConnectAsync(pairedBands[0]);


            _bandClient.SensorManager.Pedometer.ReadingChanged += PedometerOnReadingChanged;
            await _bandClient.SensorManager.Pedometer.StartReadingsAsync();

            MessageDialog msg = new MessageDialog("Wear your Microsoft Band and walk to count your steps", "Instruction");
            await msg.ShowAsync();
        }
コード例 #5
0
        private void pageRoot_Loaded(object sender, RoutedEventArgs e)
        {
            DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();

            dataTransferManager.DataRequested += new TypedEventHandler <DataTransferManager,

                                                                        DataRequestedEventArgs>(this.ShareTextHandler);

            string text = "There is no doubt that the Internet is one of the greatest humankind's inventions of the last century. It is fast and easy way to get a lot of valuable information. However, some people believe that the Internet creates many problems. From my point of view I think that the Internet brings us advantages as well as disadvantages. First of all, I think that the Internet brings us many benefits. People can have access to the latest news, weather, traffic, bid-and-asked quotations, etc. Another important benefit is that the Internet is a great means of communication. A few years ago it was rather difficult to imagine that it would be possible to communicate with people from all around the world. Students have the opportunity to speak to the professors from prestigious universities, ask their opinions and extend their range of interests. People have the opportunity to communicate with the people from other countries, find out their customs, traditions and even visit each other. I think that the Internet makes our world smaller and friendlier. We' ve got the chance to learn more about the world's history, our forefathers and gain more knowledge. From the other hand, many questions and difficulties arose with the appearance of the Internet. For example, children got the easy access to the information they are not supposed to read. Also, people's security and privacy are often violated through steeling and gathering information about people and then selling it. Many banks had to increase their Internet security because of hacking. During his evolution journey from Neanderthals to H**o erectus and then to H**o sapiens, man has come long way. Because of his continuous quest for more and more amenities and facilities, the nineties have seen a major turn around with the invention of computers. 10 years ago, the term internet was practically anonymous to most of the people. And today internet has become the most ever powerful tool for man throughout the world. The internet is a collection of various services and resources. ";


            //string text = "Money is the most important and essential tool of modern economic life. One cannot imagine modern economic life without money. Barter economies or self-sufficient economies are the thing of past and historical significance. Money is the foundation stone of modern economic life. Money is the pivot around which all economic activities revolve. Money is important in all economies whether it is a socialist economy or a capitalist economy; or a backward economy or a rich economy. In the initial stages of exchange economy, commodities were exchanged with commodities. Such transactions were known as barter transactions. In this stage commodity was the form of money. How­ever, under barter transactions there were difficulties relating to common measure of value, store of value, divisibility of goods etc. Therefore, in place of commodities gold and silver were used as money. But even this system could not continue for long because the available stock of gold and silver was not adequate to meet the demand for the quantity of money. Therefore , it was replaced by paper money where promissory notes arc used as money. Now, besides paper money, credit money is being used exten­sively such as credit cards etc. There are many functions of money such as medium of exchange, basis of store of value, common measure of value, standard of deferred payments etc. However, money as a medium of exchange is the most important function. Therefore, in general, by money we mean such commodities which are ac­cepted as medium of exchange and which have legal sanction and general acceptability.";
            timer          = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(1);
            timer.Tick    += timer_Tick;


            for (int i = 0; i < text.Split(' ').ToList().Count; i++)
            {
                TextBox tb = new TextBox();
                tb.Background       = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.BorderBrush      = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.Width            = 150;
                tb.IsHoldingEnabled = false;
                tb.IsReadOnly       = true;
                tb.IsTapEnabled     = false;


                //tb.FontSize = 60;

                tb.Text = (text.Split(' ').ToList())[i];
                tb.HorizontalAlignment = HorizontalAlignment.Stretch;

                tb.Name = (text.Split(' ').ToList())[i] + i;
                words.Add((text.Split(' ').ToList())[i]);

                //stckpnl.Children.Add(tb);
                lv.Items.Add(tb);
            }
            //stckpnl.FlowDirection = FlowDirection.LeftToRight;
        }
コード例 #6
0
        private void pageRoot_Loaded(object sender, RoutedEventArgs e)
        {
            DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();

            dataTransferManager.DataRequested += new TypedEventHandler <DataTransferManager,

                                                                        DataRequestedEventArgs>(this.ShareTextHandler);

            string text = "Generally, it is the student-community alone leads the fast-changing fashions. Once a thing or style gets in vogue, it is blindly followed by the students, notwithstanding how much inconvenience it entails. These days, boys, who by birth, are expected to be hardy and rough, look pale, tender and delicate.  They apply all sorts of cosmetics which were formerly used by the fair-sex alone. The way they dress their hair or the way they get their tight trousers or gaudy shirts stitched, or the way they walk with their necks craned forward appears ridiculous. But they are indifferent to all sense of decency. They must follow the fashions of film actors whether they can afford them or not.In the race of fashions, girls have not lagged behind. Rather they have gone a step ahead of the boys. They wear ‘sack shirts’  and their trousers do not let them sit properly. Their hair-styles give them an untidy and shabby look. Blindly they indulge in the foot-steps of the film actresses. Every fashion within limits is praise-worthy but when all limits are crossed, it results in many evils. Students should stop such recklessness in imitating fashions. Modesty and simplicity in their dress and habits should be the fashion trend.Going to movie theater indiscriminately has also become a fashion among the students. The theme of a movie may be worthless but they must go to see it even if they have to play truant from college. English movies may be beyond their comprehension but these have become a craze with the student-community. Our society does not allow us to follow certain scenes which are exhibited in these films. As a result, students, in the formative years of their lives, go astray. They while away their own precious time and squander away the money of their parents.Another fashion rampant among students is to go on strike over trifles. They have forgotten that, as students, they should not clamor for ‘rights’ but try to acquire knowledge whole-heartedly and with single minded devotion. Their duty is to amass the wealth of learning and not to flatter themselves about false sense of self-respect.It is a pity that modern students are caught deliberately in the whirl-pool of fashions. To make a noise in functions, to pass remarks on others, to discuss politics and to raise parties are, in a way, their fashionable pastimes. They forget everything else but always remember ‘misleading fashions.’ The sooner they extricate themselves out of these, the better for them and the nation it will be.";


            //string text = "Money is the most important and essential tool of modern economic life. One cannot imagine modern economic life without money. Barter economies or self-sufficient economies are the thing of past and historical significance. Money is the foundation stone of modern economic life. Money is the pivot around which all economic activities revolve. Money is important in all economies whether it is a socialist economy or a capitalist economy; or a backward economy or a rich economy. In the initial stages of exchange economy, commodities were exchanged with commodities. Such transactions were known as barter transactions. In this stage commodity was the form of money. How­ever, under barter transactions there were difficulties relating to common measure of value, store of value, divisibility of goods etc. Therefore, in place of commodities gold and silver were used as money. But even this system could not continue for long because the available stock of gold and silver was not adequate to meet the demand for the quantity of money. Therefore , it was replaced by paper money where promissory notes arc used as money. Now, besides paper money, credit money is being used exten­sively such as credit cards etc. There are many functions of money such as medium of exchange, basis of store of value, common measure of value, standard of deferred payments etc. However, money as a medium of exchange is the most important function. Therefore, in general, by money we mean such commodities which are ac­cepted as medium of exchange and which have legal sanction and general acceptability.";
            timer          = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(1);
            timer.Tick    += timer_Tick;


            for (int i = 0; i < text.Split(' ').ToList().Count; i++)
            {
                TextBox tb = new TextBox();
                tb.Background       = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.BorderBrush      = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.Width            = 150;
                tb.IsHoldingEnabled = false;
                tb.IsReadOnly       = true;
                tb.IsTapEnabled     = false;


                //tb.FontSize = 60;

                tb.Text = (text.Split(' ').ToList())[i];
                tb.HorizontalAlignment = HorizontalAlignment.Stretch;

                tb.Name = (text.Split(' ').ToList())[i] + i;
                words.Add((text.Split(' ').ToList())[i]);

                //stckpnl.Children.Add(tb);
                lv.Items.Add(tb);
            }
            //stckpnl.FlowDirection = FlowDirection.LeftToRight;
        }
コード例 #7
0
        private void pageRoot_Loaded(object sender, RoutedEventArgs e)
        {
            DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();

            dataTransferManager.DataRequested += new TypedEventHandler <DataTransferManager,

                                                                        DataRequestedEventArgs>(this.ShareTextHandler);

            string text = "Games and sports are not only important for success in studio but it is important for success in every walks of our life. Games and sports include all outdoor and indoor games and also athletics. In ancient Greece they formed the principal part of education. In the advanced countries of the present day also they are a regular feature of the school and college curriculum.Games and sports may be of various kinds. Apart from school or college sports, boys and girls may practice races, jumps, discuss throw and javelin throw and thus pass their afternoon in useful activities. They may play various games like football, cricket, hockey, volleyball, basket ball, badminton etc. School and College Games and sports are annual affairs. Sports are generally held in winter months. Students take part in various games like high and long jumps, pole vault, go-as-you like and different kind of races. These annual sports foster competitive spirit and sportsmanship. Sometimes inter class tournaments are held in relation with football, hockey, cricket, tennis, cycling, volleyball, badminton etc. These games foster team spirit among the participants and make them disciplined.For these reasons, every civilized nation values the importance of games and sports and spends large sum of money on improving the standard of games and sports among its players and athletes. The standard of games and sports in India is far from satisfactory. So, the Government should take steps to improve this standard.First of all, they are good exercises and help to build fine, physique for the boys and girls. They make them mentally alert and physically strong.Secondly, students learn to cope with difficult situations. By displaying their feats before many spectators, they can overcome their nervousness.Thirdly, games and sports are good diversions and give them energy to learn their lessons well.Discipline means order or code of behaviour. Self-discipline refers to the ability to control one’s own feeling is very important. Self-Discipline leads to overcome one’s own weaknesses.Life without Self-discipline is no life. We need be guided by rules. We have to be respectful to our elders. We must obey our seniors.Self-Discipline is most needed for success in life. Discipline is a must whether we are at school or at a home. It is equally necessary whether we are in the office or on the playground. Our life, our society, our country or even the world will go astray without Discipline. So some sort of Discipline is required everywhere. There is order in Nature. Even small disorder in the world of Nature leads to chaos.";


            //string text = "Money is the most important and essential tool of modern economic life. One cannot imagine modern economic life without money. Barter economies or self-sufficient economies are the thing of past and historical significance. Money is the foundation stone of modern economic life. Money is the pivot around which all economic activities revolve. Money is important in all economies whether it is a socialist economy or a capitalist economy; or a backward economy or a rich economy. In the initial stages of exchange economy, commodities were exchanged with commodities. Such transactions were known as barter transactions. In this stage commodity was the form of money. How­ever, under barter transactions there were difficulties relating to common measure of value, store of value, divisibility of goods etc. Therefore, in place of commodities gold and silver were used as money. But even this system could not continue for long because the available stock of gold and silver was not adequate to meet the demand for the quantity of money. Therefore , it was replaced by paper money where promissory notes arc used as money. Now, besides paper money, credit money is being used exten­sively such as credit cards etc. There are many functions of money such as medium of exchange, basis of store of value, common measure of value, standard of deferred payments etc. However, money as a medium of exchange is the most important function. Therefore, in general, by money we mean such commodities which are ac­cepted as medium of exchange and which have legal sanction and general acceptability.";
            timer          = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(1);
            timer.Tick    += timer_Tick;


            for (int i = 0; i < text.Split(' ').ToList().Count; i++)
            {
                TextBox tb = new TextBox();
                tb.Background       = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.BorderBrush      = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.Width            = 150;
                tb.IsHoldingEnabled = false;
                tb.IsReadOnly       = true;
                tb.IsTapEnabled     = false;


                //tb.FontSize = 60;

                tb.Text = (text.Split(' ').ToList())[i];
                tb.HorizontalAlignment = HorizontalAlignment.Stretch;

                tb.Name = (text.Split(' ').ToList())[i] + i;
                words.Add((text.Split(' ').ToList())[i]);

                //stckpnl.Children.Add(tb);
                lv.Items.Add(tb);
            }
            //stckpnl.FlowDirection = FlowDirection.LeftToRight;
        }
コード例 #8
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            Frame rootFrame = Window.Current.Content as Frame;

            try // 得到用户的账号,以便得到用户信息
            {
                username = e.Parameter.ToString();
            }
            catch (Exception ex)
            {
            }

            DataTransferManager.GetForCurrentView().DataRequested += OnShareDataRequested;
            if (rootFrame.CanGoBack)
            {
                // Show UI in title bar if opted-in and in-app backstack is not empty.
                Windows.UI.Core.SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility =
                    AppViewBackButtonVisibility.Visible;
            }
            else
            {
                // Remove the UI from the title bar if in-app back stack is empty.
                SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility =
                    AppViewBackButtonVisibility.Collapsed;
            }

            ViewModel = ((ViewModels.SellItemViewModel)e.Parameter);
            if (ViewModel.SelectedItem == null)
            {
            }
            else // 赋值
            {
                title.Text       = ViewModel.SelectedItem.title;
                description.Text = ViewModel.SelectedItem.description;
                age.Text         = ViewModel.SelectedItem.age;
                price.Text       = ViewModel.SelectedItem.price;
                phonenumber.Text = ViewModel.SelectedItem.phonenumber;
                school.Text      = ViewModel.SelectedItem.school;
                image.Source     = ViewModel.SelectedItem.imagesource;
            }
        }
コード例 #9
0
        private void pageRoot_Loaded(object sender, RoutedEventArgs e)
        {
            DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();

            dataTransferManager.DataRequested += new TypedEventHandler <DataTransferManager,

                                                                        DataRequestedEventArgs>(this.ShareTextHandler);

            string text = "One of the earliest machines designed to assist people in calculations was the abacus which is still being used some 5000 years after its invention.In 1642 Blaise Pascal (a famous French mathematician) invented an adding machine based on mechanical gears in which numbers were represented by the cogs on the wheels.Englishman, Charles Babbage, invented in the 1830's a Difference Engine made out of brass and pewter rods and gears, and also designed a further device which he called an Analytical Engine . His design contained the five key characteristics of modern computers An input device - Storage for numbers waiting to be processed - A processor or number calculator - A unit to control the task and the sequence of its calculations - An output device Augusta Ada Byron (later Countess of Lovelace) was an associate of Babbage who has become known as the first computer programmer. An American, Herman Hollerith, developed (around 1890) the first electrically driven device. It utilised punched cards and metal rods which passed through the holes to close an electrical circuit and thus cause a counter to advance. This machine was able to complete the calculation of the 1890 U.S. census in 6 weeks compared with 7 1/2 years for the 1880 census which was manually counted.In 1936 Howard Aiken of Harvard University convinced Thomas Watson of IBM to invest $1 million in the development of an electromechanical version of Babbage's analytical engine. The Harvard Mark 1 was completed in 1944 and was 8 feet high and 55 feet long.At about the same time (the late 1930's) John Atanasoff of Iowa State University and his assistant Clifford Berry built the first digital computer that worked electronically, the ABC (Atanasoff-Berry Computer). This machine was basically a small calculator.In 1943, as part of the British war effort, a series of vacuum tube based computers (named Colossus) were developed to crack German secret codes. The Colossus Mark 2 series (pictured) consisted of 2400 vacuum tubes.John Mauchly and J. Presper Eckert of the University of Pennsylvania developed these ideas further by proposing a huge machine consisting of 18,000 vacuum tubes. ENIAC (Electronic Numerical Integrator And Computer) was born in 1946. It was a huge machine with a huge power requirement and two major disadvantages. Maintenance was extremely difficult as the tubes broke down regularly and had to be replaced, and also there was a big problem with overheating. The most important limitation, however, was that every time a new task needed to be performed the machine need to be rewired. In other words programming was carried out with a soldering iron.";


            //string text = "Money is the most important and essential tool of modern economic life. One cannot imagine modern economic life without money. Barter economies or self-sufficient economies are the thing of past and historical significance. Money is the foundation stone of modern economic life. Money is the pivot around which all economic activities revolve. Money is important in all economies whether it is a socialist economy or a capitalist economy; or a backward economy or a rich economy. In the initial stages of exchange economy, commodities were exchanged with commodities. Such transactions were known as barter transactions. In this stage commodity was the form of money. How­ever, under barter transactions there were difficulties relating to common measure of value, store of value, divisibility of goods etc. Therefore, in place of commodities gold and silver were used as money. But even this system could not continue for long because the available stock of gold and silver was not adequate to meet the demand for the quantity of money. Therefore , it was replaced by paper money where promissory notes arc used as money. Now, besides paper money, credit money is being used exten­sively such as credit cards etc. There are many functions of money such as medium of exchange, basis of store of value, common measure of value, standard of deferred payments etc. However, money as a medium of exchange is the most important function. Therefore, in general, by money we mean such commodities which are ac­cepted as medium of exchange and which have legal sanction and general acceptability.";
            timer          = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(1);
            timer.Tick    += timer_Tick;


            for (int i = 0; i < text.Split(' ').ToList().Count; i++)
            {
                TextBox tb = new TextBox();
                tb.Background       = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.BorderBrush      = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.Width            = 150;
                tb.IsHoldingEnabled = false;
                tb.IsReadOnly       = true;
                tb.IsTapEnabled     = false;


                //tb.FontSize = 60;

                tb.Text = (text.Split(' ').ToList())[i];
                tb.HorizontalAlignment = HorizontalAlignment.Stretch;

                tb.Name = (text.Split(' ').ToList())[i] + i;
                words.Add((text.Split(' ').ToList())[i]);

                //stckpnl.Children.Add(tb);
                lv.Items.Add(tb);
            }
            //stckpnl.FlowDirection = FlowDirection.LeftToRight;
        }
コード例 #10
0
        private void pageRoot_Loaded(object sender, RoutedEventArgs e)
        {
            DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();

            dataTransferManager.DataRequested += new TypedEventHandler <DataTransferManager,

                                                                        DataRequestedEventArgs>(this.ShareTextHandler);

            string text = "The formative days in schools and colleges: Self-Discipline has to be learnt at every walk of life. Childhood is the best period for it. The young mind learns things quickly and easily. At school, the students are taught to behalf well. They are taught to respect their elders. Even on the playground the boys are taught to follow the rules of the games. So the student days are the most formative period in which the value of Self-Discipline can be learnt.Evils of indiscipline: A man is just like an animal without Self-Discipline. His life and actions become aimless. In the present age, in Self-Discipline is a great evil. It is growing in every walk of life. Both the young and the old do lawless acts. Today crimes and thefts are on the increase. People seem to have forgotten the value of Self-Discipline. In India over-crowding in buses and trains is very common. Travelling without tickets is also a normal feature. Student indiscipline is the talk of the town.Causes of indiscipline: Lack of employment is a major cause of indiscipline and unrest. Over population makes the situation still worse. Overcrowding in schools and colleges causes indiscipline. Finally, poverty leads top disorder, unrest and indiscipline.Conclusion: In fact, Self-Discipline is a good thing. It builds character. It develops strength and unity. It creates a sense of co-operation. So Self-Discipline must be aught from the very childhood. It is a key to success in life. The higher is the sense of Self-Discipline, the better it is for the people and the country.There is today a lot of unrest and indiscipline among Students in India. Why so? Well, the world of students is something like a bee-hive. Bees like to produce honey. But honey cannot be produced without juice. Bees move from flower to flower to collect juice. But if they do not get enough of juice, they get angry and sting those who disturb them in their work.In the same way, students are engaged in their studies. But nobody seems to care for their needs. Even their essential needs are not fulfilled. If students are like children, there must be somebody to look after them like their own mother. But what a pity! All our schools and colleges today are very much like step-mothers. The students have every reason to believe that they are neglected. Their feelings and interests are not taken into consideration. They do not have enough to live on. They do not get library facilities. They do not get proper hostel arrangements. Even the courses of studies are not framed to suit their needs and tastes. For instance, they feel they can do better if they are taught through the medium of their own mother tongue. But nobody cares. So, students start crying, as children must do when they feel hungry.";


            //string text = "Money is the most important and essential tool of modern economic life. One cannot imagine modern economic life without money. Barter economies or self-sufficient economies are the thing of past and historical significance. Money is the foundation stone of modern economic life. Money is the pivot around which all economic activities revolve. Money is important in all economies whether it is a socialist economy or a capitalist economy; or a backward economy or a rich economy. In the initial stages of exchange economy, commodities were exchanged with commodities. Such transactions were known as barter transactions. In this stage commodity was the form of money. How­ever, under barter transactions there were difficulties relating to common measure of value, store of value, divisibility of goods etc. Therefore, in place of commodities gold and silver were used as money. But even this system could not continue for long because the available stock of gold and silver was not adequate to meet the demand for the quantity of money. Therefore , it was replaced by paper money where promissory notes arc used as money. Now, besides paper money, credit money is being used exten­sively such as credit cards etc. There are many functions of money such as medium of exchange, basis of store of value, common measure of value, standard of deferred payments etc. However, money as a medium of exchange is the most important function. Therefore, in general, by money we mean such commodities which are ac­cepted as medium of exchange and which have legal sanction and general acceptability.";
            timer          = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(1);
            timer.Tick    += timer_Tick;


            for (int i = 0; i < text.Split(' ').ToList().Count; i++)
            {
                TextBox tb = new TextBox();
                tb.Background       = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.BorderBrush      = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.Width            = 150;
                tb.IsHoldingEnabled = false;
                tb.IsReadOnly       = true;
                tb.IsTapEnabled     = false;


                //tb.FontSize = 60;

                tb.Text = (text.Split(' ').ToList())[i];
                tb.HorizontalAlignment = HorizontalAlignment.Stretch;

                tb.Name = (text.Split(' ').ToList())[i] + i;
                words.Add((text.Split(' ').ToList())[i]);

                //stckpnl.Children.Add(tb);
                lv.Items.Add(tb);
            }
            //stckpnl.FlowDirection = FlowDirection.LeftToRight;
        }
コード例 #11
0
        private void pageRoot_Loaded(object sender, RoutedEventArgs e)
        {
            DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();

            dataTransferManager.DataRequested += new TypedEventHandler <DataTransferManager,

                                                                        DataRequestedEventArgs>(this.ShareTextHandler);

            string text = "Che Guevara (whose real name was Ernesto Guevara) was born in Rosario, Argentina in 1928. After studying medicine at the University of Buenos Aires he worked as a doctor. While in Guatemala in 1954 he witnessed the socialist government of President Jacobo Arbenz overthrown by an American-backed military coup. Disgusted by what he saw, Guevara decided to join the Cuban revolutionary, Fidel Castro, who at the time was in Mexico.In 1956 Che Guevara, Castro and eighty other men and women arrived in Cuba in an attempt to overthrow the government of General Fulgencio Batista. This group became known as the July 26 Movement. The plan was to set up their base in the Sierra Maestra mountains. On the way to the mountains they were attacked by government troops. By the time they reached the Sierra Maestra there were only sixteen men left with twelve weapons between them. For the next few months Castro's guerrilla army raided isolated army garrisons and were gradually able to build-up their stock of weapons.When the guerrillas took control of territory they redistributed the land amongst the peasants. In return, the peasants helped the guerrillas against Batista's soldiers. In some cases the peasants also joined Castro's army, as did students from the cities and occasionally Catholic priests. In an effort to find out information about the rebels people were pulled in for questioning. Many innocent people were tortured. Suspects, including children, were publicly executed and then left hanging in the streets for several days as a warning to others who were considering joining the revolutionaries. The behavior of Batista's forces increased support for the guerrillas. In 1958 forty-five organizations signed an open letter supporting the July 26 Movement. National bodies representing lawyers, architects, dentists, accountants and social workers were amongst those who signed. Castro, who had originally relied on the support of the poor, was now gaining the backing of the influential middle classes. General Fulgencio Batista responded to this by sending more troops to the Sierra Maestra. He now had 10,000 men hunting for Castro and his 300-strong army. Although outnumbered, Castro's guerrillas were able to inflict defeat after defeat on the government's troops. In the summer of 1958 over a thousand of Batista's soldiers were killed or wounded and many more were captured. Unlike Batista's soldiers, Castro's troops had developed a reputation for behaving well towards prisoners. This encouraged Batista's troops to surrender to Castro when things went badly in battle. Complete military units began to join the guerrillas.  ";


            //string text = "Money is the most important and essential tool of modern economic life. One cannot imagine modern economic life without money. Barter economies or self-sufficient economies are the thing of past and historical significance. Money is the foundation stone of modern economic life. Money is the pivot around which all economic activities revolve. Money is important in all economies whether it is a socialist economy or a capitalist economy; or a backward economy or a rich economy. In the initial stages of exchange economy, commodities were exchanged with commodities. Such transactions were known as barter transactions. In this stage commodity was the form of money. How­ever, under barter transactions there were difficulties relating to common measure of value, store of value, divisibility of goods etc. Therefore, in place of commodities gold and silver were used as money. But even this system could not continue for long because the available stock of gold and silver was not adequate to meet the demand for the quantity of money. Therefore , it was replaced by paper money where promissory notes arc used as money. Now, besides paper money, credit money is being used exten­sively such as credit cards etc. There are many functions of money such as medium of exchange, basis of store of value, common measure of value, standard of deferred payments etc. However, money as a medium of exchange is the most important function. Therefore, in general, by money we mean such commodities which are ac­cepted as medium of exchange and which have legal sanction and general acceptability.";
            timer          = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(1);
            timer.Tick    += timer_Tick;


            for (int i = 0; i < text.Split(' ').ToList().Count; i++)
            {
                TextBox tb = new TextBox();
                tb.Background       = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.BorderBrush      = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.Width            = 150;
                tb.IsHoldingEnabled = false;
                tb.IsReadOnly       = true;
                tb.IsTapEnabled     = false;


                //tb.FontSize = 60;

                tb.Text = (text.Split(' ').ToList())[i];
                tb.HorizontalAlignment = HorizontalAlignment.Stretch;

                tb.Name = (text.Split(' ').ToList())[i] + i;
                words.Add((text.Split(' ').ToList())[i]);

                //stckpnl.Children.Add(tb);
                lv.Items.Add(tb);
            }
            //stckpnl.FlowDirection = FlowDirection.LeftToRight;
        }
コード例 #12
0
        private static void ConfigureDataTransferManager()
        {
            if (_configuredDataTransferManager)
            {
                return;
            }

            _configuredDataTransferManager = true;

            try
            {
                // Hook up share handler
                // IsSupported method was added in API contract 3
                bool isSupported = ApiInformation.IsMethodPresent(typeof(DataTransferManager).FullName, nameof(DataTransferManager.IsSupported));
                // If the IsSupported method exists
                if (isSupported)
                {
                    // Use that to determine whether it's supported
                    isSupported = DataTransferManager.IsSupported();
                }
                else
                {
                    // Otherwise, only desktop/mobile before API contract 3 supports it
                    isSupported = !ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 3) &&
                                  (AnalyticsInfo.VersionInfo.DeviceFamily == "Windows.Desktop" || AnalyticsInfo.VersionInfo.DeviceFamily == "Windows.Mobile");
                }

                if (isSupported)
                {
                    var dataTransferManager = DataTransferManager.GetForCurrentView();
                    dataTransferManager.DataRequested += DataTransferManager_DataRequested;

                    IsSharingSupported = true;
                }
            }

            catch (Exception ex)
            {
                TelemetryExtension.Current?.TrackException(ex);
            }
        }
コード例 #13
0
        private void pageRoot_Loaded(object sender, RoutedEventArgs e)
        {
            DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();

            dataTransferManager.DataRequested += new TypedEventHandler <DataTransferManager,

                                                                        DataRequestedEventArgs>(this.ShareTextHandler);

            string text = "Pollution is a serious issue affecting our planet today, yet many people continue to turn a blind eye thinking that it’s not that serious.Pollution as is described is the addition of substances to the environment faster that the environment can dispose, recycle, decompose, or store in a harmless state.There are different types of pollution and includes water, soil, air, and sound pollution and all these continue to cause major problems. In our quest to better, our lives we forget or rather ignore the negative impacts such deeds can have on the environment. Mostly the cities where there is a lot of population are most affected. The fumes that emanate from factories and vehicles not only make it difficult to breathe but affects the ozone layer. The garbage, honking, blaring music are all menaces that we should aim to reduce for a better planetThe biggest paradox is that the more we pollute the environment the riskier it becomes for us to live in it. Pollution affects our health, which lowers our quality of life significantly.Poisonous chemicals emitted in factories are dangerous and exposes us to various elements that cause cancer. Garbage scattered all over increases the chance of us getting a variety of epidemic diseases.The major problem brought about by pollution is global warming which has resulted to changes in the global climate patterns. We can no longer predict on what to expect on the different seasons unlike before. Things are so bad that life on earth in general is under great risk According to scientists, it’s not too late to take action we can take measures to prevent any further damage and adopt better waste disposal measures for a better planet. Each one of us needs to be responsible in protecting the environment. We can all do things better to ensure we safeguard our human race for our benefit and our future generations. Simple things such as saving electricity, fuel, using biodegradable materials, recycling, among others count in reducing pollution.We should all aim to better our planet by the simple things we do. Take action now. ";


            //string text = "Money is the most important and essential tool of modern economic life. One cannot imagine modern economic life without money. Barter economies or self-sufficient economies are the thing of past and historical significance. Money is the foundation stone of modern economic life. Money is the pivot around which all economic activities revolve. Money is important in all economies whether it is a socialist economy or a capitalist economy; or a backward economy or a rich economy. In the initial stages of exchange economy, commodities were exchanged with commodities. Such transactions were known as barter transactions. In this stage commodity was the form of money. How­ever, under barter transactions there were difficulties relating to common measure of value, store of value, divisibility of goods etc. Therefore, in place of commodities gold and silver were used as money. But even this system could not continue for long because the available stock of gold and silver was not adequate to meet the demand for the quantity of money. Therefore , it was replaced by paper money where promissory notes arc used as money. Now, besides paper money, credit money is being used exten­sively such as credit cards etc. There are many functions of money such as medium of exchange, basis of store of value, common measure of value, standard of deferred payments etc. However, money as a medium of exchange is the most important function. Therefore, in general, by money we mean such commodities which are ac­cepted as medium of exchange and which have legal sanction and general acceptability.";
            timer          = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(1);
            timer.Tick    += timer_Tick;


            for (int i = 0; i < text.Split(' ').ToList().Count; i++)
            {
                TextBox tb = new TextBox();
                tb.Background       = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.BorderBrush      = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.Width            = 150;
                tb.IsHoldingEnabled = false;
                tb.IsReadOnly       = true;
                tb.IsTapEnabled     = false;


                //tb.FontSize = 60;

                tb.Text = (text.Split(' ').ToList())[i];
                tb.HorizontalAlignment = HorizontalAlignment.Stretch;

                tb.Name = (text.Split(' ').ToList())[i] + i;
                words.Add((text.Split(' ').ToList())[i]);

                //stckpnl.Children.Add(tb);
                lv.Items.Add(tb);
            }
            //stckpnl.FlowDirection = FlowDirection.LeftToRight;
        }
コード例 #14
0
        private void pageRoot_Loaded(object sender, RoutedEventArgs e)
        {
            DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();

            dataTransferManager.DataRequested += new TypedEventHandler <DataTransferManager,

                                                                        DataRequestedEventArgs>(this.ShareTextHandler);

            string text = "The Third Generation (1965-1970): In 1965 the first integrated circuit (IC) was developed in which a complete circuit of hundreds of components were able to be placed on a single silicon chip 2 or 3 mm square. Computers using these IC's soon replaced transistor based machines. Again, one of the major advantages was size, with computers becoming more powerful and at the same time much smaller and cheaper. Computers thus became accessible to a much larger audience. An added advantage of smaller size is that electrical signals have much shorter distances to travel and so the speed of computers increased. Another feature of this period is that computer software became much more powerful and flexible and for the first time more than one program could share the computer's resources at the same time (multi-tasking). The majority of programming languages used today are often referred to as 3GL's (3rd generation languages) even though some of them originated during the 2nd generation.The Fourth Generation (1971-present): The boundary between the third and fourth generations is not very clear-cut at all. Most of the developments since the mid 1960's can be seen as part of a continuum of gradual miniaturisation. In 1970 large-scale integration was achieved where the equivalent of thousands of integrated circuits were crammed onto a single silicon chip. This development again increased computer performance (especially reliability and speed) whilst reducing computer size and cost. Around this time the first complete general-purpose microprocessor became available on a single chip. In 1975 Very Large Scale Integration (VLSI) took the process one step further. Complete computer central processors could now be built into one chip. The microcomputer was born. Such chips are far more powerful than ENIAC and are only about 1cm square whilst ENIAC filled a large building.During this period Fourth Generation Languages (4GL's) have come into existence. Such languages are a step further removed from the computer hardware in that they use language much like natural language. Many database languages can be described as 4GL's. They are generally much easier to learn than are 3GL's.The Fifth Generation (the future): The fifth generation of computers were defined by the Japanese government in 1980 when they unveiled an optimistic ten-year plan to produce the next generation of computers. This was an interesting plan for two reasons. Firstly, it is not at all really clear what the fourth generation is, or even whether the third generation had finished yet. Secondly, it was an attempt to define a generation of computers before they had come into existence. The main requirements of the 5G machines was that they incorporate the features of Artificial Intelligence, Expert Systems, and Natural Language. The goal was to produce machines that are capable of performing tasks in similar ways to humans, are capable of learning, and are capable of interacting with humans in natural language and preferably using both speech input (speech recognition) and speech output (speech synthesis). Such goals are obviously of interest to linguists and speech scientists as natural language and speech processing are key components of the definition. As you may have guessed, this goal has not yet been fully realised, although significant progress has been made towards various aspects of these goals.";


            //string text = "Money is the most important and essential tool of modern economic life. One cannot imagine modern economic life without money. Barter economies or self-sufficient economies are the thing of past and historical significance. Money is the foundation stone of modern economic life. Money is the pivot around which all economic activities revolve. Money is important in all economies whether it is a socialist economy or a capitalist economy; or a backward economy or a rich economy. In the initial stages of exchange economy, commodities were exchanged with commodities. Such transactions were known as barter transactions. In this stage commodity was the form of money. How­ever, under barter transactions there were difficulties relating to common measure of value, store of value, divisibility of goods etc. Therefore, in place of commodities gold and silver were used as money. But even this system could not continue for long because the available stock of gold and silver was not adequate to meet the demand for the quantity of money. Therefore , it was replaced by paper money where promissory notes arc used as money. Now, besides paper money, credit money is being used exten­sively such as credit cards etc. There are many functions of money such as medium of exchange, basis of store of value, common measure of value, standard of deferred payments etc. However, money as a medium of exchange is the most important function. Therefore, in general, by money we mean such commodities which are ac­cepted as medium of exchange and which have legal sanction and general acceptability.";
            timer          = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(1);
            timer.Tick    += timer_Tick;


            for (int i = 0; i < text.Split(' ').ToList().Count; i++)
            {
                TextBox tb = new TextBox();
                tb.Background       = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.BorderBrush      = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.Width            = 150;
                tb.IsHoldingEnabled = false;
                tb.IsReadOnly       = true;
                tb.IsTapEnabled     = false;


                //tb.FontSize = 60;

                tb.Text = (text.Split(' ').ToList())[i];
                tb.HorizontalAlignment = HorizontalAlignment.Stretch;

                tb.Name = (text.Split(' ').ToList())[i] + i;
                words.Add((text.Split(' ').ToList())[i]);

                //stckpnl.Children.Add(tb);
                lv.Items.Add(tb);
            }
            //stckpnl.FlowDirection = FlowDirection.LeftToRight;
        }
コード例 #15
0
        private void pageRoot_Loaded(object sender, RoutedEventArgs e)
        {
            DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();

            dataTransferManager.DataRequested += new TypedEventHandler <DataTransferManager,

                                                                        DataRequestedEventArgs>(this.ShareTextHandler);

            string text = "There is yet another kind of unrest among Indian students. Students feel that things are not as they should be. There is a lot of corruption in every walk of life. They cannot be blind and deaf to what goes on around them. How can they remain cut off from society? So, it is but natural for them to take interest in the social, political and economic life of their country. Now, to take active interest in the lives of the people and to voice their feelings is not an act of indiscipline. It only shows that the world of students is alive and alert. But to act under the influence of political parties and to join their violent agitations for political ends is, no doubt, an act of indiscipline. And then the government has a right to deal with the problem as a law and order problem.In some cases, however, students alone are not responsibilities for indiscipline. Our school and college committees and university bodies have become hot-beds of politics. Most of the members of these committees are politicians. They have to take the help of both students and teachers to gain their ends. There are, again, teacher-pollutions, too. They all encourage indiscipline among students. This type of indiscipline can go only when politicians quit these temples of learning.There is something wrong with our education system itself. Our schools and colleges aim at manufacturing only job-seekers. They fail to produce good men and women. Education today helps you earn a living. It does not help you learn the art of living well. In other words, it does not try to develop your character. So, our system of education and examination must be changed if we like to drive away the ghost of indiscipline.Fashion refers to the manner of doing something. Fashion also denotes style, a dress and hair and dealings with others. Among students, the word primarily conveys the sense with regard to ‘dress and hair styles.These days, students devote more time to fashions than to studies. Educational institutions and, particularly colleges, present the picture of film studios. As soon as a boy or a girl joins a college, there occurs a marvelous change in him or her. Simplicity takes wings and there comes ostentation in its place. Their gait is changed; their way of conversation assumes a different modulation and their behaviour gets stricken with artificiality. They strut like peacocks and fly like butterflies.Generally, it is the student-community alone leads the fast-changing fashions. Once a thing or style gets in vogue, it is blindly followed by the students, notwithstanding how much inconvenience it entails. These days, boys, who by birth, are expected to be hardy and rough, look pale, tender and delicate.  They apply all sorts of cosmetics which were formerly used by the fair-sex alone. The way they dress their hair or the way they get their tight trousers or gaudy shirts stitched, or the way they walk with their necks craned forward appears ridiculous. But they are indifferent to all sense of decency. They must follow the fashions of film actors whether they can afford them or not.";


            //string text = "Money is the most important and essential tool of modern economic life. One cannot imagine modern economic life without money. Barter economies or self-sufficient economies are the thing of past and historical significance. Money is the foundation stone of modern economic life. Money is the pivot around which all economic activities revolve. Money is important in all economies whether it is a socialist economy or a capitalist economy; or a backward economy or a rich economy. In the initial stages of exchange economy, commodities were exchanged with commodities. Such transactions were known as barter transactions. In this stage commodity was the form of money. How­ever, under barter transactions there were difficulties relating to common measure of value, store of value, divisibility of goods etc. Therefore, in place of commodities gold and silver were used as money. But even this system could not continue for long because the available stock of gold and silver was not adequate to meet the demand for the quantity of money. Therefore , it was replaced by paper money where promissory notes arc used as money. Now, besides paper money, credit money is being used exten­sively such as credit cards etc. There are many functions of money such as medium of exchange, basis of store of value, common measure of value, standard of deferred payments etc. However, money as a medium of exchange is the most important function. Therefore, in general, by money we mean such commodities which are ac­cepted as medium of exchange and which have legal sanction and general acceptability.";
            timer          = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(1);
            timer.Tick    += timer_Tick;


            for (int i = 0; i < text.Split(' ').ToList().Count; i++)
            {
                TextBox tb = new TextBox();
                tb.Background       = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.BorderBrush      = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.Width            = 150;
                tb.IsHoldingEnabled = false;
                tb.IsReadOnly       = true;
                tb.IsTapEnabled     = false;


                //tb.FontSize = 60;

                tb.Text = (text.Split(' ').ToList())[i];
                tb.HorizontalAlignment = HorizontalAlignment.Stretch;

                tb.Name = (text.Split(' ').ToList())[i] + i;
                words.Add((text.Split(' ').ToList())[i]);

                //stckpnl.Children.Add(tb);
                lv.Items.Add(tb);
            }
            //stckpnl.FlowDirection = FlowDirection.LeftToRight;
        }
コード例 #16
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            ApplicationView.GetForCurrentView().SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow);
            openFileParams      = e.Parameter as OpenFileParams;
            FlipView.Visibility = Visibility.Collapsed;
            for (int i = 0; i < openFileParams.FileList.Count; ++i)
            {
                CanvasWrapper wrapper = new CanvasWrapper();
                FlipView.Items.Add(wrapper);
                imagesInfo.Add(null);
                switch (e.NavigationMode)
                {
                case NavigationMode.New:
                    if (openFileParams.ClickedFile != null && openFileParams.FileList[i].Name == openFileParams.ClickedFile.Filename)
                    {
                        FlipView.SelectedIndex = i;
                        await this.LoadCanvas(i);
                    }
                    break;

                case NavigationMode.Back:
                    if (openFileParams.FileList[i].Name == openFileParams.NavigateBackFilename)
                    {
                        FlipView.SelectedIndex = i;
                        await this.LoadCanvas(i);
                    }
                    break;

                case NavigationMode.Refresh:
                    break;
                }
            }
            if (imagesInfo[FlipView.SelectedIndex] != null)
            {
                this.UpdateInfo();
            }

            FlipView.Visibility = Visibility.Visible;
            DataTransferManager.GetForCurrentView().DataRequested += ViewerPage_DataRequested;
            isLoadingCompleted = true;
        }
コード例 #17
0
        private void pageRoot_Loaded(object sender, RoutedEventArgs e)
        {
            DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();

            dataTransferManager.DataRequested += new TypedEventHandler <DataTransferManager,

                                                                        DataRequestedEventArgs>(this.ShareTextHandler);

            string text = "World War  also known as the Second World War, was a global war. It is generally considered to have lasted from 1939 to 1945, although some conflicts in Asia that are commonly viewed as becoming part of the world war had begun earlier than 1939. It involved the vast majority of the world's nations—including all of the great powers—eventually forming two opposing military alliances: the Allies and the Axis. It was the most widespread war in history, and directly involved more than 100 million people, from more than 30 different countries. In a state of total war, the major participants threw their entire economic, industrial, and scientific capabilities behind the war effort, erasing the distinction between civilian and military resources. Marked by mass deaths of civilians, including the Holocaust, the Three Alls Policy, the strategic bombing of enemy industrial and/or population centers, and the first use of nuclear weapons in combat, it resulted in an estimated 50 million to 85 million fatalities. These made World War II the deadliest conflict in human history.The Empire of Japan aimed to dominate East Asia and was already at war with the Republic of China in 1937,but the world war is generally said to have begun on 1 September 1939 with the invasion of Poland by Germany and subsequent declarations of war on Germany by France and the United Kingdom. From late 1939 to early 1941, in a series of campaigns and treaties, Germany formed the Axis alliance with Italy, conquering or subduing much of continental Europe. Following the Molotov–Ribbentrop Pact, Germany and the Soviet Union partitioned and annexed territories between themselves their European neighbours, including Poland, Finland and the Baltic states. The United Kingdom and the other members of the British Commonwealth were the only major Allied forces continuing the fight against the Axis, with battles taking place in North Africa and the Horn of Africa as well as the long-running Battle of the Atlantic. In June 1941, the European Axis powers launched an invasion of the Soviet Union, giving a start to the largest land theatre of war in history, which tied down the major part of the Axis' military forces for the rest of the war. In December 1941, Japan joined the Axis, attacked the United States and European territories in the Pacific Ocean, and quickly conquered much of the Western Pacific. ";


            //string text = "Money is the most important and essential tool of modern economic life. One cannot imagine modern economic life without money. Barter economies or self-sufficient economies are the thing of past and historical significance. Money is the foundation stone of modern economic life. Money is the pivot around which all economic activities revolve. Money is important in all economies whether it is a socialist economy or a capitalist economy; or a backward economy or a rich economy. In the initial stages of exchange economy, commodities were exchanged with commodities. Such transactions were known as barter transactions. In this stage commodity was the form of money. How­ever, under barter transactions there were difficulties relating to common measure of value, store of value, divisibility of goods etc. Therefore, in place of commodities gold and silver were used as money. But even this system could not continue for long because the available stock of gold and silver was not adequate to meet the demand for the quantity of money. Therefore , it was replaced by paper money where promissory notes arc used as money. Now, besides paper money, credit money is being used exten­sively such as credit cards etc. There are many functions of money such as medium of exchange, basis of store of value, common measure of value, standard of deferred payments etc. However, money as a medium of exchange is the most important function. Therefore, in general, by money we mean such commodities which are ac­cepted as medium of exchange and which have legal sanction and general acceptability.";
            timer          = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(1);
            timer.Tick    += timer_Tick;


            for (int i = 0; i < text.Split(' ').ToList().Count; i++)
            {
                TextBox tb = new TextBox();
                tb.Background       = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.BorderBrush      = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.Width            = 150;
                tb.IsHoldingEnabled = false;
                tb.IsReadOnly       = true;
                tb.IsTapEnabled     = false;


                //tb.FontSize = 60;

                tb.Text = (text.Split(' ').ToList())[i];
                tb.HorizontalAlignment = HorizontalAlignment.Stretch;

                tb.Name = (text.Split(' ').ToList())[i] + i;
                words.Add((text.Split(' ').ToList())[i]);

                //stckpnl.Children.Add(tb);
                lv.Items.Add(tb);
            }
            //stckpnl.FlowDirection = FlowDirection.LeftToRight;
        }
コード例 #18
0
        private void pageRoot_Loaded(object sender, RoutedEventArgs e)
        {
            DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();

            dataTransferManager.DataRequested += new TypedEventHandler <DataTransferManager,

                                                                        DataRequestedEventArgs>(this.ShareTextHandler);

            string text = "Of all the natural resources given to us by nature, water is one of the most essential one. We need water for drinking, cooking, irrigation, and transport among other important purposes that support our daily life. The evolvement of life on earth required water, without which life on earth would not have happened.Water is one resource that is important for the existence of all the living things on the planet. From plants, animals, humans, water is heavily depended on for survival. Without water there would no seas, no aquatic life and certainly nothing would be able to exist for a day. Forests depend on water without which we wouldn’t be able to enjoy all the important things that forests provide for our survival. Basically water is the very essential resource that allows us the privilege to enjoy other products that need water to be made As a renewable resource, its uses are listless, from homes, factories, fields among others. Without water all the rivers, oceans, seas, would not be there and we wouldn’t be able to enjoy the various delicacies that are harvested like fish, oysters etc. Water covers over half of the earth. Over 70 percent of the earth is water meaning its one of the most important resources on earth. Our bodies are also made of more than 90 percent of water without which we would be a mass of bones and mass walking around.Water is used to generate electricity and other forms of energy which makes our life better and easier on earth. Without electricity, life would on earth would hard where we do everything manually. From the basic needs such as drinking, bathing, cooking to more complex things such as running machines, generating power water is one thing we can’t live without. But as man continues to advance himself for a better life, he continually dumps waste in the water bodies, use chemicals that pollute water and does other practices that threaten the maintenance of clean water. For our sake and the sake of our future generations, it’s important to preserve this important resource if we want to survive on the planet.";


            //string text = "Money is the most important and essential tool of modern economic life. One cannot imagine modern economic life without money. Barter economies or self-sufficient economies are the thing of past and historical significance. Money is the foundation stone of modern economic life. Money is the pivot around which all economic activities revolve. Money is important in all economies whether it is a socialist economy or a capitalist economy; or a backward economy or a rich economy. In the initial stages of exchange economy, commodities were exchanged with commodities. Such transactions were known as barter transactions. In this stage commodity was the form of money. How­ever, under barter transactions there were difficulties relating to common measure of value, store of value, divisibility of goods etc. Therefore, in place of commodities gold and silver were used as money. But even this system could not continue for long because the available stock of gold and silver was not adequate to meet the demand for the quantity of money. Therefore , it was replaced by paper money where promissory notes arc used as money. Now, besides paper money, credit money is being used exten­sively such as credit cards etc. There are many functions of money such as medium of exchange, basis of store of value, common measure of value, standard of deferred payments etc. However, money as a medium of exchange is the most important function. Therefore, in general, by money we mean such commodities which are ac­cepted as medium of exchange and which have legal sanction and general acceptability.";
            timer          = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(1);
            timer.Tick    += timer_Tick;


            for (int i = 0; i < text.Split(' ').ToList().Count; i++)
            {
                TextBox tb = new TextBox();
                tb.Background       = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.BorderBrush      = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.Width            = 150;
                tb.IsHoldingEnabled = false;
                tb.IsReadOnly       = true;
                tb.IsTapEnabled     = false;


                //tb.FontSize = 60;

                tb.Text = (text.Split(' ').ToList())[i];
                tb.HorizontalAlignment = HorizontalAlignment.Stretch;

                tb.Name = (text.Split(' ').ToList())[i] + i;
                words.Add((text.Split(' ').ToList())[i]);

                //stckpnl.Children.Add(tb);
                lv.Items.Add(tb);
            }
            //stckpnl.FlowDirection = FlowDirection.LeftToRight;
        }
コード例 #19
0
        public LiveDetailPage()
        {
            this.InitializeComponent();
            this.NavigationCacheMode = NavigationCacheMode.Disabled;
            dispRequest = new DisplayRequest();
            DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();

            dataTransferManager.DataRequested += DataTransferManager_DataRequested;
            _config = new FFmpegInteropConfig();
            _config.FFmpegOptions.Add("rtsp_transport", "tcp");
            _config.FFmpegOptions.Add("user_agent", "Mozilla/5.0 BiliDroid/1.12.0 ([email protected])");
            _config.FFmpegOptions.Add("referer", "https://live.bilibili.com/");
            //每过2秒就设置焦点
            timer_focus = new DispatcherTimer()
            {
                Interval = TimeSpan.FromSeconds(2)
            };

            timer_focus.Tick += Timer_focus_Tick;
            controlTimer      = new DispatcherTimer()
            {
                Interval = TimeSpan.FromSeconds(1)
            };
            controlTimer.Tick += ControlTimer_Tick;
            settingVM          = new SettingVM();

            liveRoomVM  = new LiveRoomVM();
            mediaPlayer = new MediaPlayer();
            mediaPlayer.PlaybackSession.PlaybackStateChanged     += PlaybackSession_PlaybackStateChanged;
            mediaPlayer.PlaybackSession.BufferingStarted         += PlaybackSession_BufferingStarted;
            mediaPlayer.PlaybackSession.BufferingProgressChanged += PlaybackSession_BufferingProgressChanged;
            mediaPlayer.PlaybackSession.BufferingEnded           += PlaybackSession_BufferingEnded;
            mediaPlayer.MediaOpened   += MediaPlayer_MediaOpened;
            mediaPlayer.MediaEnded    += MediaPlayer_MediaEnded;;
            mediaPlayer.MediaFailed   += MediaPlayer_MediaFailed;
            liveRoomVM.ChangedPlayUrl += LiveRoomVM_ChangedPlayUrl;
            liveRoomVM.AddNewDanmu    += LiveRoomVM_AddNewDanmu;
            liveRoomVM.LotteryEnd     += LiveRoomVM_LotteryEnd;
            this.Loaded   += LiveDetailPage_Loaded;
            this.Unloaded += LiveDetailPage_Unloaded;
        }
コード例 #20
0
        private void pageRoot_Loaded(object sender, RoutedEventArgs e)
        {
            DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();

            dataTransferManager.DataRequested += new TypedEventHandler <DataTransferManager,

                                                                        DataRequestedEventArgs>(this.ShareTextHandler);

            string text = "In the late 1940's John von Neumann (at the time a special consultant to the ENIAC team) developed the EDVAC (Electronic Discrete Variable Automatic Computer) which pioneered the stored program concept. This allowed programs to be read into the computer and so gave birth to the age of general-purpose computers.It used to be quite popular to refer to computers as belonging to one of several generations of computer. These generations are The First Generation (1943-1958): This generation is often described as starting with the delivery of the first commercial computer to a business client. This happened in 1951 with the delivery of the UNIVAC to the US Bureau of the Census. This generation lasted until about the end of the 1950's (although some stayed in operation much longer than that). The main defining feature of the first generation of computers was that vacuum tubes were used as internal computer components. Vacuum tubes are generally about 5-10 centimeters in length and the large numbers of them required in computers resulted in huge and extremely expensive machines that often broke down (as tubes failed). The Second Generation (1959-1964): In the mid-1950's Bell Labs developed the transistor. Transistors were capable of performing many of the same tasks as vacuum tubes but were only a fraction of the size. The first transistor-based computer was produced in 1959. Transistors were not only smaller, enabling computer size to be reduced, but they were faster, more reliable and consumed less electricity. The other main improvement of this period was the development of computer languages. Assembler languages or symbolic languages allowed programmers to specify instructions in words (albeit very cryptic words) which were then translated into a form that the machines could understand (typically series of 0's and 1's: Binary code). Higher level languages also came into being during this period. Whereas assembler languages had a one-to-one correspondence between their symbols and actual machine functions, higher level language commands often represent complex sequences of machine codes. Two higher-level languages developed during this period (Fortran and Cobol) are still in use today though in a much more developed form.The Third Generation (1965-1970): In 1965 the first integrated circuit (IC) was developed in which a complete circuit of hundreds of components were able to be placed on a single silicon chip 2 or 3 mm square. Computers using these IC's soon replaced transistor based machines. Again, one of the major advantages was size, with computers becoming more powerful and at the same time much smaller and cheaper. Computers thus became accessible to a much larger audience. An added advantage of smaller size is that electrical signals have much shorter distances to travel and so the speed of computers increased. ";


            //string text = "Money is the most important and essential tool of modern economic life. One cannot imagine modern economic life without money. Barter economies or self-sufficient economies are the thing of past and historical significance. Money is the foundation stone of modern economic life. Money is the pivot around which all economic activities revolve. Money is important in all economies whether it is a socialist economy or a capitalist economy; or a backward economy or a rich economy. In the initial stages of exchange economy, commodities were exchanged with commodities. Such transactions were known as barter transactions. In this stage commodity was the form of money. How­ever, under barter transactions there were difficulties relating to common measure of value, store of value, divisibility of goods etc. Therefore, in place of commodities gold and silver were used as money. But even this system could not continue for long because the available stock of gold and silver was not adequate to meet the demand for the quantity of money. Therefore , it was replaced by paper money where promissory notes arc used as money. Now, besides paper money, credit money is being used exten­sively such as credit cards etc. There are many functions of money such as medium of exchange, basis of store of value, common measure of value, standard of deferred payments etc. However, money as a medium of exchange is the most important function. Therefore, in general, by money we mean such commodities which are ac­cepted as medium of exchange and which have legal sanction and general acceptability.";
            timer          = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(1);
            timer.Tick    += timer_Tick;


            for (int i = 0; i < text.Split(' ').ToList().Count; i++)
            {
                TextBox tb = new TextBox();
                tb.Background       = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.BorderBrush      = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.Width            = 150;
                tb.IsHoldingEnabled = false;
                tb.IsReadOnly       = true;
                tb.IsTapEnabled     = false;


                //tb.FontSize = 60;

                tb.Text = (text.Split(' ').ToList())[i];
                tb.HorizontalAlignment = HorizontalAlignment.Stretch;

                tb.Name = (text.Split(' ').ToList())[i] + i;
                words.Add((text.Split(' ').ToList())[i]);

                //stckpnl.Children.Add(tb);
                lv.Items.Add(tb);
            }
            //stckpnl.FlowDirection = FlowDirection.LeftToRight;
        }
コード例 #21
0
        private void pageRoot_Loaded(object sender, RoutedEventArgs e)
        {
            DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();

            dataTransferManager.DataRequested += new TypedEventHandler <DataTransferManager,

                                                                        DataRequestedEventArgs>(this.ShareTextHandler);

            string text = "Money is the most important and essential tool of modern economic life. One cannot imagine modern economic life without money. Barter economies or self-sufficient economies are the thing of past and historical significance. Money is the foundation stone of modern economic life. Money is the pivot around which all economic activities revolve. Money is important in all economies whether it is a socialist economy or a capitalist economy; or a backward economy or a rich economy. In the initial stages of exchange economy, commodities were exchanged with commodities. Such transactions were known as barter transactions. In this stage commodity was the form of money. How­ever, under barter transactions there were difficulties relating to common measure of value, store of value, divisibility of goods etc. Therefore, in place of commodities gold and silver were used as money. But even this system could not continue for long because the available stock of gold and silver was not adequate to meet the demand for the quantity of money. Therefore , it was replaced by paper money where promissory notes arc used as money. Now, besides paper money, credit money is being used exten­sively such as credit cards etc. There are many functions of money such as medium of exchange, basis of store of value, common measure of value, standard of deferred payments etc. However, money as a medium of exchange is the most important function. Therefore, in general, by money we mean such commodities which are ac­cepted as medium of exchange and which have legal sanction and general acceptability. ";


            //string text = "Money is the most important and essential tool of modern economic life. One cannot imagine modern economic life without money. Barter economies or self-sufficient economies are the thing of past and historical significance. Money is the foundation stone of modern economic life. Money is the pivot around which all economic activities revolve. Money is important in all economies whether it is a socialist economy or a capitalist economy; or a backward economy or a rich economy. In the initial stages of exchange economy, commodities were exchanged with commodities. Such transactions were known as barter transactions. In this stage commodity was the form of money. How­ever, under barter transactions there were difficulties relating to common measure of value, store of value, divisibility of goods etc. Therefore, in place of commodities gold and silver were used as money. But even this system could not continue for long because the available stock of gold and silver was not adequate to meet the demand for the quantity of money. Therefore , it was replaced by paper money where promissory notes arc used as money. Now, besides paper money, credit money is being used exten­sively such as credit cards etc. There are many functions of money such as medium of exchange, basis of store of value, common measure of value, standard of deferred payments etc. However, money as a medium of exchange is the most important function. Therefore, in general, by money we mean such commodities which are ac­cepted as medium of exchange and which have legal sanction and general acceptability.";
            timer          = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(1);
            timer.Tick    += timer_Tick;


            for (int i = 0; i < text.Split(' ').ToList().Count; i++)
            {
                TextBox tb = new TextBox();
                tb.Background       = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.BorderBrush      = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.Width            = 150;
                tb.IsHoldingEnabled = false;
                tb.IsReadOnly       = true;
                tb.IsTapEnabled     = false;


                //tb.FontSize = 60;

                tb.Text = (text.Split(' ').ToList())[i];
                tb.HorizontalAlignment = HorizontalAlignment.Stretch;

                tb.Name = (text.Split(' ').ToList())[i] + i;
                words.Add((text.Split(' ').ToList())[i]);

                //stckpnl.Children.Add(tb);
                lv.Items.Add(tb);
            }
            //stckpnl.FlowDirection = FlowDirection.LeftToRight;
        }
コード例 #22
0
        private void pageRoot_Loaded(object sender, RoutedEventArgs e)
        {
            DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();

            dataTransferManager.DataRequested += new TypedEventHandler <DataTransferManager,

                                                                        DataRequestedEventArgs>(this.ShareTextHandler);

            string text = "Babbage’s idea caught the attention of Ada Byron Lovelace who had an undying passion for math. She also saw possibilities that the Analytical Machine could produce graphics and music. She helped Babbage move his project from idea to reality by documenting how the device would calculate Bernoulli numbers. She later received recognition for writing the world’s first computer program. In 1890, Herman Hollerith used the punched card method to process data gathered in the census. The previous census had taken seven years to complete because of the large amount of data collected that needed to be processed. By developing the Hollerith code and a series of machines which could store census data on cards, he was able to accomplish the accounting of the census in two and a half years with an additional two million pieces of data added. His code was able to sort the data according to the needs of the United States Government. He was known for developing the first computer card and accomplishing the largest data processing endeavor undertaken at the time. Hollerith set up the Tabulating Machine Company which manufactured and marketed punched cards and equipment to the railroads. The railroads used the equipment to tabulate freight schedules. In 1911, the Tabulating Machine Company merged with other companies to form the International Business Machine Corporation (IBM).The first time a computer was put into public use was in the service of United States government census of 1890. By now the population had grown to a point where manual tallying was too slow and inefficient to process the information. In true keeping with the country's innovative New-World attitude, a competition was held to find a more effective way to conduct the census. The winner of the competition was Herman Hollerith and his tabulating machine. The machine processed the census information of the city of St. Louise in 5 1/2 hours. What is significant about this event, is that it probably marks a point of realisation that the human population had grown to the extent that machines were now needed to measure its size - computers had entered public life.A rather unlikely place to consider the history of computers is India in 200BC. However, it is there where a mathematician by the name of Pingala produced the earliest reference to the binary number system, the 2 digit numerical code which forms the basis for calculation in modern computers. In his text the Chandas Shastra (chanda) - a study of the rhythmic structure of the Vedas, an ancient Indian text - Pingala describes poetic meters using a fixed number of syllables. The modern binary number system however, which was documented and developed in Germany in the 17th Century by Gottfried Leibniz, is linked to a Chinese numeric system known as I Ching.";


            //string text = "Money is the most important and essential tool of modern economic life. One cannot imagine modern economic life without money. Barter economies or self-sufficient economies are the thing of past and historical significance. Money is the foundation stone of modern economic life. Money is the pivot around which all economic activities revolve. Money is important in all economies whether it is a socialist economy or a capitalist economy; or a backward economy or a rich economy. In the initial stages of exchange economy, commodities were exchanged with commodities. Such transactions were known as barter transactions. In this stage commodity was the form of money. How­ever, under barter transactions there were difficulties relating to common measure of value, store of value, divisibility of goods etc. Therefore, in place of commodities gold and silver were used as money. But even this system could not continue for long because the available stock of gold and silver was not adequate to meet the demand for the quantity of money. Therefore , it was replaced by paper money where promissory notes arc used as money. Now, besides paper money, credit money is being used exten­sively such as credit cards etc. There are many functions of money such as medium of exchange, basis of store of value, common measure of value, standard of deferred payments etc. However, money as a medium of exchange is the most important function. Therefore, in general, by money we mean such commodities which are ac­cepted as medium of exchange and which have legal sanction and general acceptability.";
            timer          = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(1);
            timer.Tick    += timer_Tick;


            for (int i = 0; i < text.Split(' ').ToList().Count; i++)
            {
                TextBox tb = new TextBox();
                tb.Background       = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.BorderBrush      = new SolidColorBrush(Windows.UI.Colors.LightBlue);
                tb.Width            = 150;
                tb.IsHoldingEnabled = false;
                tb.IsReadOnly       = true;
                tb.IsTapEnabled     = false;


                //tb.FontSize = 60;

                tb.Text = (text.Split(' ').ToList())[i];
                tb.HorizontalAlignment = HorizontalAlignment.Stretch;

                tb.Name = (text.Split(' ').ToList())[i] + i;
                words.Add((text.Split(' ').ToList())[i]);

                //stckpnl.Children.Add(tb);
                lv.Items.Add(tb);
            }
            //stckpnl.FlowDirection = FlowDirection.LeftToRight;
        }
コード例 #23
0
        public SignUpPage()
        {
            this.InitializeComponent();
            var viewTitleBar = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().TitleBar;

            viewTitleBar.BackgroundColor       = Windows.UI.Colors.CornflowerBlue;
            viewTitleBar.ButtonBackgroundColor = Windows.UI.Colors.CornflowerBlue;
            this.ViewModel      = new ViewModels.ManagementViewModels();
            NavigationCacheMode = NavigationCacheMode.Enabled;

            SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Collapsed;
            dataTransferManager = DataTransferManager.GetForCurrentView();
            dataTransferManager.DataRequested += new TypedEventHandler <DataTransferManager, DataRequestedEventArgs>(this.OnShareDateRequested);

            ImageBrush imageBrush = new ImageBrush
            {
                ImageSource = new BitmapImage(new Uri("ms-appx:///Assets/mainpage.png", UriKind.Absolute))
            };

            gd_backimage.Background = imageBrush;
        }
コード例 #24
0
        protected override void LoadState(Object navigationParameter, Dictionary <String, Object> pageState)
        {
            DataTransferManager.GetForCurrentView().DataRequested += OnDataRequested;
            ViewModel.QueryParameter = NavigationParameterToSearchParameter(navigationParameter as String);

            // Do we return from a detail page?
            if (pageState != null && pageState.ContainsKey(Constants.SearchResultsPageState))
            {
                string serializedState = pageState[Constants.SearchResultsPageState].ToString();
                var    state           = SerializationHelper.DeserializeFromString <SearchPageState>(serializedState);

                ViewModel.LoadState(state);

                // Will be used in ItemGridViewOnLoaded (that's when the GridView is actually loaded for setting this property)
                _horizontalOffset = state.GridViewHorizontalOffset;
            }
            else
            {
                ViewModel.SearchRisAsync();
            }
        }
コード例 #25
0
        /// <summary>
        /// Raised when the user loads or resumes the page
        /// </summary>
        /// <param name="navigationParameter">Passed navigation parameters</param>
        /// <param name="pageState">Contains saved informations before the page was suspended</param>
        protected override void LoadState(object navigationParameter, Dictionary <string, object> pageState)
        {
            if (navigationParameter is Show)
            {
                Show salon = navigationParameter as Show;
                Messenger.Default.Send(salon);
            }
            else if (navigationParameter is VisualGenericItem)
            {
                VisualGenericItem salon = navigationParameter as VisualGenericItem;
                Messenger.Default.Send(salon.Id);
            }

            // Register to the Share event
            DataTransferManager.GetForCurrentView().DataRequested += ShowDetailsPage_DataRequested;

            // Register to the MVVM Light Messenger
            Messenger.Default.Register <PinnableObject>(this, Pin);
            Messenger.Default.Register <ShareableObject>(this, Share);
            Messenger.Default.Register <Uri>(this, OpenWebBrowser);
        }
コード例 #26
0
ファイル: ShareHelper.cs プロジェクト: arcsinw/BaoZouDaily
        /// <summary>
        /// 系统分享图片
        /// </summary>
        /// <param name="title"></param>
        /// <param name="shareUrl"></param>
        public static void SystemShare(StorageFile thumbnail)
        {
            DataTransferManager.GetForCurrentView().DataRequested += (sender, args) =>
            {
                var deferral = args.Request.GetDeferral();

                List <IStorageItem> imgs = new List <IStorageItem>()
                {
                    thumbnail
                };
                args.Request.Data.SetStorageItems(imgs);

                RandomAccessStreamReference imgRef = RandomAccessStreamReference.CreateFromFile(thumbnail);
                args.Request.Data.Properties.Thumbnail = imgRef;
                args.Request.Data.SetBitmap(imgRef);

                deferral.Complete();
            };

            DataTransferManager.ShowShareUI();
        }
コード例 #27
0
        /// <summary>
        /// Share Location html
        /// </summary>
        /// <param name="html">such as :"<p>Here is a local image: <img src=\"" + localImage + "\">.</p>";</param>
        /// <param name="htmlImages">such as: localImage = "ms-appx:///Assets/Logo.png";</param>
        /// <param name="title"></param>
        /// <param name="description"></param>
        public static void RegisterForShare(this string html, List <string> htmlImages, string title, string description)
        {
            DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();

            dataTransferManager.DataRequested += new TypedEventHandler <DataTransferManager,
                                                                        DataRequestedEventArgs>((s, e) =>
            {
                DataRequest request                 = e.Request;
                request.Data.Properties.Title       = title;
                request.Data.Properties.Description = description;
                string htmlFormat = HtmlFormatHelper.CreateHtmlFormat(html);
                request.Data.SetHtmlFormat(htmlFormat);
                foreach (string imageUri in htmlImages)
                {
                    RandomAccessStreamReference streamRef =
                        RandomAccessStreamReference.CreateFromUri(new Uri(imageUri));
                    request.Data.ResourceMap[imageUri] = streamRef;
                }
            });
            DataTransferManager.ShowShareUI();
        }
コード例 #28
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            _dataTransferManager = DataTransferManager.GetForCurrentView();
            _dataTransferManager.DataRequested += OnDataRequested;

            _navigationHelper.OnNavigatedTo(e);

            await StartersModel.LoadItemsAsync();

            if (e.Parameter is StartersSchema)
            {
                StartersModel.Items.Add(e.Parameter as StartersSchema);
            }
            StartersModel.SelectItem(e.Parameter);

            if (StartersModel != null)
            {
                StartersModel.ViewType = ViewTypes.Detail;
            }
            DataContext = this;
        }
コード例 #29
0
        //进入时注册DataRequested事件
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            ID  = (int)e.Parameter;
            dtm = DataTransferManager.GetForCurrentView();
            SQLiteConnection db = MySQLiteHelper.CreateSQLiteConnection();

            //初始化界面设置
            List <object> query = db.Query(new TableMapping(typeof(ActivityInfo)), "select * from ActivityInfo");

            foreach (ActivityInfo mem in query)
            {
                if (mem.ID == ID)
                {
                    Title.Text       = mem.Theme;
                    TextSource.Text  = mem.Content;
                    MyDate.Date      = mem.Date;
                    isTopSwitch.IsOn = mem.isTop;
                }
            }
            db.Close();
        }
コード例 #30
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            ViewModel.PropertyChanged += ViewModel_PropertyChanged;

            dtm = DataTransferManager.GetForCurrentView();

            if (dtm != null)
            {
                dtm.DataRequested += dtm_DataRequested;
            }

            if (!string.IsNullOrEmpty((string)e.Parameter))
            {
                string search = (string)e.Parameter;
                InputTextBox.Text = search;

                DoSearch(search);
            }
        }