本文整理汇总了C#中ProgressIndicator类的典型用法代码示例。如果您正苦于以下问题:C# ProgressIndicator类的具体用法?C# ProgressIndicator怎么用?C# ProgressIndicator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProgressIndicator类属于命名空间,在下文中一共展示了ProgressIndicator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MainPage_Loaded
void MainPage_Loaded(object sender, RoutedEventArgs e)
{
try
{
var progressIndicator = SystemTray.ProgressIndicator;
if (progressIndicator != null)
{
return;
}
progressIndicator = new ProgressIndicator();
SystemTray.SetProgressIndicator(this, progressIndicator);
Binding binding = new Binding("IsLoading") { Source = _viewModel };
BindingOperations.SetBinding(
progressIndicator, ProgressIndicator.IsVisibleProperty, binding);
binding = new Binding("IsLoading") { Source = _viewModel };
BindingOperations.SetBinding(
progressIndicator, ProgressIndicator.IsIndeterminateProperty, binding);
progressIndicator.Text = "Loading games...";
_viewModel.LoadPage(lastPagePulled, PAGE_COUNT);
lastPagePulled += 1;
}
catch (Exception exception)
{
ErrorHandler.Save(exception, MobileTypeEnum.WP8);
}
}
示例2: MainPage
// Constructor
public MainPage()
{
InitializeComponent();
// Set the page DataContext property to the ViewModel.
this.DataContext = App.ViewModel;
Pi = new ProgressIndicator();
Pi.IsIndeterminate = true;
Pi.IsVisible = false;
allPivotItem = new PivotItem();
allPivotItem.Header = new ToDoCategory { Name = "All", IconPath = "/Sticky-Notes-icon.png" };
ListBox listbox = new ListBox();
listbox.Margin = new Thickness(12, 0, 12, 0);
listbox.Width = 440;
listbox.ItemTemplate = ToDoListBoxItemTemplate;
listbox.Tap += Parent_Tap;
allPivotItem.Content = listbox;
searchResult = new PivotItem();
searchResult.Header = new ToDoCategory { Name = "Search result", IconPath = "/Images/CategoryIcons/SearchResult.png" };
ListBox lstbox = new ListBox();
lstbox.Margin = new Thickness(12, 0, 12, 0);
lstbox.Width = 440;
lstbox.ItemTemplate = ToDoListBoxItemTemplate;
lstbox.Tap += Parent_Tap;
searchResult.Content = lstbox;
App.ViewModel.OnDataBaseChange += ViewModel_onDataBaseChanged;
App.ViewModel.ReLoadData();
//TestData();
}
示例3: VkPageBase
protected VkPageBase()
{
SupportedOrientations = SupportedPageOrientation.PortraitOrLandscape;
Orientation = PageOrientation.None;
SystemTray.SetIsVisible(this, true);
TransitionService.SetNavigationInTransition(
this,
new NavigationInTransition
{
Backward = new SlideTransition {Mode = SlideTransitionMode.SlideDownFadeIn},
Forward = new SlideTransition {Mode = SlideTransitionMode.SlideUpFadeIn}
});
TransitionService.SetNavigationOutTransition(
this,
new NavigationOutTransition
{
Backward = new SlideTransition {Mode = SlideTransitionMode.SlideDownFadeOut},
Forward = new SlideTransition {Mode = SlideTransitionMode.SlideUpFadeOut}
});
ProgressIndicator pi = new ProgressIndicator();
SystemTray.SetProgressIndicator(this, pi);
BindingOperations.SetBinding(pi, ProgressIndicator.TextProperty, new Binding(VkViewModelBase.StatusPropertyName));
BindingOperations.SetBinding(pi, ProgressIndicator.IsIndeterminateProperty, new Binding(VkViewModelBase.IsStatusProgressPropertyName));
BindingOperations.SetBinding(pi, ProgressIndicator.IsVisibleProperty, new Binding(VkViewModelBase.StatusPropertyName)
{
Converter = new StringToBoolConverter()
});
}
示例4: GeneratePicture
async void GeneratePicture()
{
if (rendering) return;
ProgressIndicator prog = new ProgressIndicator();
prog.IsIndeterminate = true;
prog.Text = "Rendering";
prog.IsVisible = true;
SystemTray.SetProgressIndicator(this, prog);
var bmp = new WriteableBitmap(480, 800);
try
{
rendering = true;
using (var renderer = new WriteableBitmapRenderer(manager, bmp, OutputOption.PreserveAspectRatio))
{
display.Source = await renderer.RenderAsync();
}
SystemTray.SetProgressIndicator(this, null);
rendering = false;
}
finally
{
}
}
示例5: MainPage_Loaded
void MainPage_Loaded(object sender, RoutedEventArgs e)
{
try {
_viewModel = (EventViewModel)Resources["viewModel"];
var progressIndicator = SystemTray.ProgressIndicator;
if (progressIndicator != null)
{
return;
}
progressIndicator = new ProgressIndicator();
SystemTray.SetProgressIndicator(this, progressIndicator);
Binding binding = new Binding("IsLoading") { Source = _viewModel };
BindingOperations.SetBinding(
progressIndicator, ProgressIndicator.IsVisibleProperty, binding);
binding = new Binding("IsLoading") { Source = _viewModel };
BindingOperations.SetBinding(
progressIndicator, ProgressIndicator.IsIndeterminateProperty, binding);
progressIndicator.Text = "Loading event...";
var skater = (EventJson) (App.Current as App).SecondPageObject;
//var skater = Json.DeserializeObject<EventJson>(json);
_viewModel.EventPublic = skater;
//_viewModel.LoadPage(skater.MemberId);
}
catch (Exception exception)
{
ErrorHandler.Save(exception, MobileTypeEnum.WP8);
}
}
示例6: PageBase
public PageBase()
{
var navInTransition = new NavigationInTransition
{
Backward = new TurnstileTransition { Mode = TurnstileTransitionMode.BackwardIn },
Forward = new TurnstileTransition { Mode = TurnstileTransitionMode.ForwardIn }
};
var navOutTransition = new NavigationOutTransition
{
Backward = new TurnstileTransition { Mode = TurnstileTransitionMode.BackwardOut },
Forward = new TurnstileTransition { Mode = TurnstileTransitionMode.ForwardOut }
};
TransitionService.SetNavigationInTransition(this, navInTransition);
TransitionService.SetNavigationOutTransition(this, navOutTransition);
SetValue(TiltEffect.IsTiltEnabledProperty, true);
Language = System.Windows.Markup.XmlLanguage.GetLanguage(Thread.CurrentThread.CurrentCulture.Name);
Progress = new ProgressIndicator
{
IsIndeterminate = false,
IsVisible = true
};
SystemTray.SetProgressIndicator(this, Progress);
if (!DesignerProperties.IsInDesignTool)
{
Service = App.Service;
}
}
示例7: OnNavigatedTo
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
base.OnNavigatedTo(e);
try
{
ev = new CalendarEventPortable();
var ob = (App.Current as App).SecondPageObject;
if (ob != null)
ev = (CalendarEventPortable)ob;
(App.Current as App).SecondPageObject = null;
progressIndicator = SystemTray.ProgressIndicator;
progressIndicator = new ProgressIndicator();
SystemTray.SetProgressIndicator(this, progressIndicator);
progressIndicator.IsIndeterminate = true;
progressIndicator.Text = "Saving Checkin...";
if (SettingsMobile.Instance.User == null)
{
SqlFactory fact = new SqlFactory();
SettingsMobile.Instance.User = fact.GetProfile();
}
CheckInTypeSelect.ItemsSource = CalendarEventPointTypeEnumHelper.CalendarEventPointTypes;
ev.CalendarItemId = new Guid(this.NavigationContext.QueryString["evId"]);
ev.CalendarId = new Guid(this.NavigationContext.QueryString["calId"]);
ev.Name = this.NavigationContext.QueryString["name"];
if (!String.IsNullOrEmpty(ev.Name))
EventName.Text = ev.Name;
}
catch (Exception exception)
{
ErrorHandler.Save(exception, MobileTypeEnum.WP8);
}
}
示例8: OnNavigatedTo
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
base.OnNavigatedTo(e);
try
{
members = new ObservableCollection<MemberDisplayAPI>();
//(App.Current as App).SecondPageObject = null;
progressIndicator = SystemTray.ProgressIndicator;
progressIndicator = new ProgressIndicator();
SystemTray.SetProgressIndicator(this, progressIndicator);
progressIndicator.IsIndeterminate = true;
progressIndicator.Text = "Pulling Members...";
if (SettingsMobile.Instance.User == null)
{
SqlFactory fact = new SqlFactory();
SettingsMobile.Instance.User = fact.GetProfile();
}
}
catch (Exception exception)
{
ErrorHandler.Save(exception, MobileTypeEnum.WP8);
}
PullMembers();
}
示例9: MainPage
// Constructor
public MainPage()
{
InitializeComponent();
// Set the data context of the listbox control to the sample data
DataContext = App.ViewModel;
this.Loaded += new RoutedEventHandler(MainPage_Loaded);
//Load Europeana API
EuropeanaAPI = new EUPwebclient();
EuropeanaAPI.searchDoneEvent += new EUPwebclient.searchDone(EuropeanaAPI_searchDoneEvent);
//Load GPS
phoneGPS = new GPS();
phoneGPS.posFoundEvent += new GPS.posFound(phoneGPS_posFoundEvent);
//Load city finder
cityFinder = new googleCityLookup();
cityFinder.cityFoundEvent += new googleCityLookup.cityFound(cityFinder_cityFoundEvent);
//Progress bar control
SystemTray.SetIsVisible(this, true);
SystemTray.SetOpacity(this, 0);
prog = new ProgressIndicator();
prog.IsVisible = true;
prog.IsIndeterminate = true;
prog.Text = "Loading...";
SystemTray.SetProgressIndicator(this, prog);
this.BackKeyPress += new EventHandler<System.ComponentModel.CancelEventArgs>(MainPage_BackKeyPress);
}
示例10: OnNavigatedTo
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
if (this.NavigationContext.QueryString.ContainsKey("path"))
{
this.folderPath = NavigationContext.QueryString["path"];
}
if (this.NavigationContext.QueryString.ContainsKey("id"))
{
this.fileID = NavigationContext.QueryString["id"];
}
if (this.NavigationContext.QueryString.ContainsKey("filename"))
{
this.filename = this.NavigationContext.QueryString["filename"];
this.filenameInput.Text = this.filename;
}
if (this.fileID != null)
{ // try to get file contents
this.progressIndicator = new ProgressIndicator();
this.progressIndicator.IsIndeterminate = true;
this.progressIndicator.IsVisible = true;
this.progressIndicator.Text = "Looking for rain...";
SystemTray.SetProgressIndicator(this, this.progressIndicator);
LiveConnectClient client = new LiveConnectClient(App.Current.LiveSession);
client.DownloadCompleted += new EventHandler<LiveDownloadCompletedEventArgs>(OnFileDownloadComplete);
client.DownloadAsync(this.fileID+"/content");
}
else
{
this.contentInput.IsEnabled = true;
this.filenameInput.Focus(); // doesn't work as it is here, maybe because page isn't actually loaded yet?
}
}
示例11: MainPage
// Constructor
public MainPage ()
{
InitializeComponent ();
Utilities.MainPageControl = this;
Unloaded += Page_Unloaded;
InitializeAppBarButtons ();
_saveMenuItem = ApplicationBar.MenuItems[0] as ApplicationBarMenuItem;
_saveMenuItem.IsEnabled = false;
if (!IsolatedStorageSettings.ApplicationSettings.Contains (Constants.TOTAL_SECONDS))
IsolatedStorageSettings.ApplicationSettings.Add (Constants.TOTAL_SECONDS, "60");
if (!IsolatedStorageSettings.ApplicationSettings.Contains (Constants.MINUTE_SECOND_KEY))
IsolatedStorageSettings.ApplicationSettings.Add (Constants.MINUTE_SECOND_KEY, Constants.MINUTE);
IsolatedStorageSettings.ApplicationSettings.Save ();
UpdateButtonState (false, false, true, false, false);
_progressIndicatror = new ProgressIndicator
{
IsVisible = false,
IsIndeterminate = true,
Text = "Stopping..."
};
SystemTray.SetProgressIndicator (this, _progressIndicatror);
}
示例12: TopGamePage_Loaded
private void TopGamePage_Loaded(object sender, RoutedEventArgs e)
{
this.TopStreamsList.ItemsSource = _viewModel.StreamList;
var progressIndicator = SystemTray.ProgressIndicator;
if (progressIndicator != null)
{
return;
}
progressIndicator = new ProgressIndicator();
SystemTray.SetProgressIndicator(this, progressIndicator);
Binding binding = new Binding("IsLoading") { Source = _viewModel };
BindingOperations.SetBinding(
progressIndicator, ProgressIndicator.IsVisibleProperty, binding);
binding = new Binding("IsLoading") { Source = _viewModel };
BindingOperations.SetBinding(
progressIndicator, ProgressIndicator.IsIndeterminateProperty, binding);
progressIndicator.Text = "Loading streams...";
_pageNumber = 0;
_viewModel.LoadPage(App.ViewModel.curTopGame.game.name, _pageNumber++);
}
示例13: TrackList
public TrackList()
{
InitializeComponent();
#if DEBUG
//adDuplexControl.IsTest = true;
#endif
proindicator = new ProgressIndicator();
SystemTray.SetProgressIndicator(this, proindicator);
back_worker = new BackgroundWorker();
search = new BackgroundWorker();
addvideo_worker = new BackgroundWorker();
delvideo_worker = new BackgroundWorker();
delplay_worker = new BackgroundWorker();
back_worker.DoWork += new DoWorkEventHandler(back_worker_DoWork);
back_worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(back_worker_RunWorkerCompleted);
search.DoWork += new DoWorkEventHandler(search_DoWork);
search.RunWorkerCompleted += new RunWorkerCompletedEventHandler(search_RunWorkerCompleted);
addvideo_worker.DoWork += new DoWorkEventHandler(addvideo_worker_DoWork);
addvideo_worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(addvideo_worker_RunWorkerCompleted);
delvideo_worker.DoWork += new DoWorkEventHandler(delvideo_worker_DoWork);
delvideo_worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(delvideo_worker_RunWorkerCompleted);
delplay_worker.DoWork += new DoWorkEventHandler(delplay_worker_DoWork);
delplay_worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(delplay_worker_RunWorkerCompleted);
progrss_report = new ProgressReporter();
}
示例14: OnNavigatedTo
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
base.OnNavigatedTo(e);
try
{
duesModel = new DuesPortableModel();
//(App.Current as App).SecondPageObject = null;
progressIndicator = SystemTray.ProgressIndicator;
progressIndicator = new ProgressIndicator();
SystemTray.SetProgressIndicator(this, progressIndicator);
progressIndicator.IsIndeterminate = true;
progressIndicator.Text = "Pulling Dues...";
if (SettingsMobile.Instance.User == null)
{
SqlFactory fact = new SqlFactory();
SettingsMobile.Instance.User = fact.GetProfile();
}
if (SettingsMobile.Instance.AccountSettings.IsTreasurer)
{
ApplicationBar.IsVisible = true;
}
}
catch (Exception exception)
{
ErrorHandler.Save(exception, MobileTypeEnum.WP8);
}
PullDues();
}
示例15: SearchPage_Loaded
private void SearchPage_Loaded(object sender, RoutedEventArgs e)
{
this.GamesList.ItemsSource = _viewModel.GameList;
this.StreamsList.ItemsSource = _viewModel.StreamList;
this.StreamsList.SelectedItem = null;
this.GamesList.SelectedItem = null;
this.StreamsSearchBox.Text = "Search...";
this.GamesSearchBox.Text = "Search...";
var progressIndicator = SystemTray.ProgressIndicator;
if (progressIndicator != null)
{
return;
}
progressIndicator = new ProgressIndicator();
SystemTray.SetProgressIndicator(this, progressIndicator);
Binding binding = new Binding("IsLoading") { Source = _viewModel };
BindingOperations.SetBinding(
progressIndicator, ProgressIndicator.IsVisibleProperty, binding);
binding = new Binding("IsLoading") { Source = _viewModel };
BindingOperations.SetBinding(
progressIndicator, ProgressIndicator.IsIndeterminateProperty, binding);
progressIndicator.Text = "Loading streams...";
}