From: jjie.choi Date: Thu, 15 Jun 2017 06:52:46 +0000 (+0900) Subject: Add IStatePublisher.cs, IStateSubcriber.cs X-Git-Tag: submit/tizen/20170808.015446~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e87523555c57ae3b7c8730cd6d4905ad3887ca33;p=profile%2Ftv%2Fapps%2Fdotnet%2Fhome.git Add IStatePublisher.cs, IStateSubcriber.cs Change-Id: I46962de12b3dbe22f857249ba9c8349d562a8577 Signed-off-by: jjie.choi --- diff --git a/LibTVRefCommonPortable/LibTVRefCommonPortable.csproj b/LibTVRefCommonPortable/LibTVRefCommonPortable.csproj index 3d010df..aa58c74 100755 --- a/LibTVRefCommonPortable/LibTVRefCommonPortable.csproj +++ b/LibTVRefCommonPortable/LibTVRefCommonPortable.csproj @@ -60,6 +60,8 @@ + + diff --git a/LibTVRefCommonPortable/Utils/IStatePublisher.cs b/LibTVRefCommonPortable/Utils/IStatePublisher.cs new file mode 100644 index 0000000..4600c1a --- /dev/null +++ b/LibTVRefCommonPortable/Utils/IStatePublisher.cs @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LibTVRefCommonPortable.Utils +{ + public enum AppState + { + + } + public interface IStatePublisher + { + AppState CurrentState + { + get; + set; + } + + } +} diff --git a/LibTVRefCommonPortable/Utils/IStateSubscriber.cs b/LibTVRefCommonPortable/Utils/IStateSubscriber.cs new file mode 100644 index 0000000..bb59eb7 --- /dev/null +++ b/LibTVRefCommonPortable/Utils/IStateSubscriber.cs @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LibTVRefCommonPortable.Utils +{ + public interface IStateSubscriber + { + void OnStateChanged(AppState state); + } +} diff --git a/TVApps/TVApps/TVApps.csproj b/TVApps/TVApps/TVApps.csproj index 529330b..d35cf47 100755 --- a/TVApps/TVApps/TVApps.csproj +++ b/TVApps/TVApps/TVApps.csproj @@ -47,7 +47,10 @@ + + + FooterDeleteStatus.xaml diff --git a/TVApps/TVApps/ViewModels/FooterViewModel.cs b/TVApps/TVApps/ViewModels/FooterViewModel.cs new file mode 100644 index 0000000..95d51ac --- /dev/null +++ b/TVApps/TVApps/ViewModels/FooterViewModel.cs @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using LibTVRefCommonPortable.Utils; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TVApps.ViewModels +{ + class FooterViewModel : IStateSubscriber + { + public void OnStateChanged(AppState state) + { + throw new NotImplementedException(); + } + } +} diff --git a/TVApps/TVApps/ViewModels/ItemViewModel.cs b/TVApps/TVApps/ViewModels/ItemViewModel.cs new file mode 100644 index 0000000..362e05e --- /dev/null +++ b/TVApps/TVApps/ViewModels/ItemViewModel.cs @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using LibTVRefCommonPortable.Utils; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TVApps.ViewModels +{ + class ItemViewModel : IStateSubscriber + { + public void OnStateChanged(AppState state) + { + throw new NotImplementedException(); + } + } +} diff --git a/TVApps/TVApps/ViewModels/ListViewModel.cs b/TVApps/TVApps/ViewModels/ListViewModel.cs new file mode 100644 index 0000000..2f75d1f --- /dev/null +++ b/TVApps/TVApps/ViewModels/ListViewModel.cs @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using LibTVRefCommonPortable.Utils; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TVApps.ViewModels +{ + class ListViewModel : IStateSubscriber + { + public void OnStateChanged(AppState state) + { + throw new NotImplementedException(); + } + } +} diff --git a/TVApps/TVApps/ViewModels/MainPageViewModel.cs b/TVApps/TVApps/ViewModels/MainPageViewModel.cs index a61490a..bd30362 100755 --- a/TVApps/TVApps/ViewModels/MainPageViewModel.cs +++ b/TVApps/TVApps/ViewModels/MainPageViewModel.cs @@ -49,7 +49,7 @@ namespace TVApps.ViewModels /// /// A class for ViewModel of TV Apps /// - class MainPageViewModel : INotifyPropertyChanged, IAppsViewModel + class MainPageViewModel : INotifyPropertyChanged, IAppsViewModel, IStatePublisher { /// /// An instance of AppsHolder for getting application list @@ -262,6 +262,8 @@ namespace TVApps.ViewModels } } + public AppState CurrentState { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + /// /// Constructor /// Initialize Commands and EventListeners @@ -457,6 +459,5 @@ namespace TVApps.ViewModels handler(this, new PropertyChangedEventArgs(propertyName)); } } - } }