//internal ListView markedList; ////private bool _contentLoaded; public MarkedRecordPage() { ThemeSwitcher.LoadSkin(ThemeEnum.Aero, this); this.InitializeComponent(); this.markedList.Items.Clear(); this.groups = this.dataService.GetEntGroupList(); }
//internal Border OuterBorder; //internal Border InnerBorder; //internal StatusBar topBar; //internal Image imgIcon; //internal ImageButton btnMin; //internal ImageButton btnClose; //internal TextBox txtName; //internal TextBox txtDescription; //internal ListBox lstMember; //internal Button btnSelect; //internal Button btnRemove; //internal ComboBox cboCategory; //internal ListBox lstStaff; //internal Button btnAddAll; //internal Button btnRemoveAll; //internal Button btnEnter; //internal Button btnCancel; //private bool _contentLoaded; public EntGroupManagerWindow() { ThemeSwitcher.LoadSkin(ThemeEnum.Aero, this); this.InitializeComponent(); this.InitData(); base.Closed += new System.EventHandler(this.EntGroupManagerWindow_Closed); }
public EntGroupManagerWindow(EntGroup group) { if (group != null) { ThemeSwitcher.LoadSkin(ThemeEnum.Aero, this); this.InitializeComponent(); this.group = group; this.txtName.Text = group.Name; this.txtDescription.Text = group.Description; long[] memebers = this.group.Member; if (memebers != null && memebers.Length > 0) { long[] array = memebers; for (int i = 0; i < array.Length; i++) { long member = array[i]; Staff staff = this.dataService.GetStaff(member); if (staff != null) { this.AddListMemberItem(staff); } } } this.InitData(); } base.Closed += new System.EventHandler(this.EntGroupManagerWindow_Closed); }
/// <summary> /// 启动 /// </summary> /// <param name="e"></param> protected override async void OnStartup(StartupEventArgs e) { this.DispatcherUnhandledException += App_DispatcherUnhandledException; AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; System.Threading.Tasks.TaskScheduler.UnobservedTaskException += TaskScheduler_UnobservedTaskException; //设置当前程序集 this.ShutdownMode = ShutdownMode.OnMainWindowClose; //初始化当前程序集样式 ThemeSwitcher.SetTheme(ThemeEnum.METRO); //初始化程序 PluginHelper.LoadApplication(); //创建入口程序对象 var launcher = PluginHelper.CreateInstanceByKey("Launcher"); if (launcher != null) { await Task.Factory.StartNew(() => { this.Dispatcher.Invoke(new Action(() => { launcher.Run(); })); }); base.OnStartup(e); return; } System.Environment.Exit(System.Environment.ExitCode); }
private SettingEmailAccountWindow() { ThemeSwitcher.LoadSkin(ThemeEnum.Aero, this); this.InitializeComponent(); this.InitialEmail(); this.AddListenerEvent(); }
//internal SearchRosterWindow searchRosterWindow; //internal Border OuterBorder; //internal Border InnerBorder; //internal StatusBar topBar; //internal Image imgIcon; //internal ImageButton btnMin; //internal ImageButton btnClose; //internal TabControl tab; //internal TabItem tabItem1; //internal RadioButton rbtByin; //internal RadioButton rbtByCondition; //internal TextBlock tbkInid; //internal TextBox tbxInid; //internal Canvas conditionCanvas; //internal ComboBox comboBox1; //internal TextBox comboBox2; //internal TextBox textBox1; //internal ComboBox comboBox3; //internal TextBox textBox2; //internal TextBox textBox3; //internal ComboBox comboBox4; //internal ComboBox textBox4; //internal ComboBox textBox5; //internal TabItem tabItem2; //internal TabItem tabItem3; //internal Button btnSearch; //internal Button btnCancel; //private bool _contentLoaded; public SearchRosterWindow() { ThemeSwitcher.LoadSkin(ThemeEnum.Aero, this); this.InitializeComponent(); this.InitUI(); this.AddEventListener(); }
//private bool _contentLoaded; public SystemSettingWindow() { ThemeSwitcher.LoadSkin(ThemeEnum.Aero, this); this.InitializeComponent(); this.InitData(); this.AddEventListenerHandler(); this.rdoBasic.IsChecked = new bool?(true); }
public MessageCenterWindow() { ThemeSwitcher.LoadSkin(ThemeEnum.Aero, this); this.InitializeComponent(); this.InitEventHandler(); this.messageCenter = new MessageCenterViewModel(); this.groups = this.dataService.GetEntGroupList(); }
//internal ClosingTipWindow closingTipWindow; //internal Border OuterBorder; //internal Border InnerBorder; //internal Grid RootGrid; //internal StatusBar topBar; //internal Image imgIcon; //internal ImageButton btnClose; //internal RadioButton rboHide; //internal RadioButton rboExit; //internal CheckBox chkExitRemind; //private bool _contentLoaded; public ClosingTipWindow() { ThemeSwitcher.LoadSkin(ThemeEnum.Aero, this); this.InitializeComponent(); this.rboHide.IsChecked = new bool?(Settings.Default.SystemSetup_Base_ExitHide); this.rboExit.IsChecked = new bool?(!Settings.Default.SystemSetup_Base_ExitHide); this.chkExitRemind.IsChecked = new bool?(Settings.Default.ExitRemind); }
public Settings() { this.InitializeComponent(); ThemeSwitcher themeSwitcher = new ThemeSwitcher(); themeSwitcherUI.DataContext = themeSwitcher; LanguageSwitcher languageSwitcher = new LanguageSwitcher(); languageSwitcherUI.DataContext = languageSwitcher; }
private void BindData() { var currentTheme = ThemeSwitcher.GetCurrentTheme(); foreach (var theme in ThemeSwitcher.ListThemes()) { var item = new ListItem(theme); item.Selected = theme == currentTheme; ddlThemes.Items.Add(item); } }
public ThemeSwitcherTests() { const string AssetKey = "themeSwitcher"; _httpContext = TestHelper.CreateMockedHttpContext(); _viewContext = new ViewContext { HttpContext = _httpContext.Object, ViewData = new ViewDataDictionary() }; _clientSideObjectWriterFactory = new Mock<IClientSideObjectWriterFactory>(); _themeSwitcher = new ThemeSwitcher(_viewContext, _clientSideObjectWriterFactory.Object) { AssetKey = AssetKey }; }
//internal TextBlock titleName; //internal FlowDocumentScrollViewer ViewMessageBoxViewer; //internal FlowDocument ViewMessageBox; //internal TableRowGroup trgMessageTable; //internal DatePicker DateSelect; //internal Button FirstPage; //internal Button PrePage; //internal TextBox textPage; //internal TextBlock tbkTotal; //internal Button NextPage; //internal Button LastPage; ////private bool _contentLoaded; public MsgRecordPage() { ThemeSwitcher.LoadSkin(ThemeEnum.Aero, this); this.InitializeComponent(); this.ID = 0L; this.IsMark = false; this.IsStaff = false; this.TotalRecord = 0; this.Showpage = 0; this.TotalPage = 0; this.IsDataSearch = false; }
//internal FlowDocumentScrollViewer ViewMessageBoxViewer; //internal FlowDocument ViewMessageBox; //internal TableRowGroup trgMessageTable; //internal DatePicker DateSelect; //internal Button FirstPage; //internal Button PrePage; //internal TextBox textPage; //internal TextBlock tbkTotal; //internal Button NextPage; //internal Button LastPage; ////private bool _contentLoaded; public OANoticeRecordPage() { ThemeSwitcher.LoadSkin(ThemeEnum.Aero, this); this.InitializeComponent(); this.ShowPage = 1; this.MaxPage = 0; this.startTime = null; this.endTime = null; this.textPage.Text = this.ShowPage.ToString(); this.tbkTotal.Text = "页/" + this.MaxPage.ToString() + "页"; this.messageCenter = new MessageCenterViewModel(); }
//internal Border OuterBorder; //internal Border InnerBorder; //internal Image imgIcon; //internal MinButton btnMin; //internal CloseButton btnClose; //internal TextBlock tbRequesterName; //internal TextBlock tbkId; //internal TextBlock tbkSex; //internal TextBlock tbkAge; //internal TextBlock tbkAddress; //internal TextBlock tbkPost; //internal Button btnViewInfo; //internal RadioButton radioButton1; //internal RadioButton radioButton2; //internal RadioButton radioButton3; //internal TextBox tbMessage; //internal Button btnAgree; //internal Button btnForget; //private bool _contentLoaded; public FriendRequestWindow(long uid, long rosterId, string rosterJid, string message, User user, long categotyId) { ThemeSwitcher.LoadSkin(ThemeEnum.Aero, this); this.InitializeComponent(); this.uid = uid; this.rosterId = rosterId; this.rosterJid = rosterJid; this.message = message; this.user = user; this.categotyId = categotyId; this.InitUI(); this.AddEventListener(); }
public PinViewModel(INavigationService navigationService, ThemeSwitcher themeSwitcher, ICommandResolver commandResolver) : base(navigationService) { _pinBuilder = new StringBuilder(); _themeSwitcher = themeSwitcher; Message = Resmgr.Value.GetString(ConstantsHelper.EnterPin, CultureInfo.CurrentCulture); DeleteNumberCommand = commandResolver.CommandWithoutLock(DeletePinNumber); PinCommand = commandResolver.AsyncCommandWithoutLock <string>(CheckPinAsync); InitializeImagesForButtons(); }
//internal Border OuterBorder; //internal Border InnerBorder; //internal StatusBar topBar; //internal Image imgIcon; //internal ImageButton btnMin; //internal ComboBox cboxDeptList; //internal ListBox lstBoxFrom; //internal Label label2; //internal ListBox lstBoxTo; //internal TextBlock lblDeleteAll; //internal TextBlock lblAddAll; //internal Button btnOk; //internal Button btnClose; //private bool _contentLoaded; public AddMemberCustomGroupWindow(string groupid) { ThemeSwitcher.LoadSkin(ThemeEnum.Aero, this); this.InitializeComponent(); this.groupId = groupid; this.viewModel = CustomGroupManagerWindowViewModel.GetInstance(); this.cboxDeptList.SelectionChanged += new SelectionChangedEventHandler(this.cboxDeptList_SelectionChanged); this.InitialDeptList(); this.btnClose.Click += delegate(object s, RoutedEventArgs e) { base.Close(); }; this.InitialToBox(groupid); }
public App() { InitializeComponent(); Bootstrapper.RegisterServices(); InitRepositories(); _navigationService = ComponentFactory.Resolve <INavigationService>(); _themeSwitchService = ComponentFactory.Resolve <ThemeSwitcher>(); _themeService = ComponentFactory.Resolve <IThemeService>(); bool.TryParse(Settings.UsePin, out var shouldUsePin); InitNavigation(shouldUsePin); }
public LoginViewModel(INavigationService navigationService, ThemeSwitcher themeSwitcher, ICommandResolver commandResolver) : base(navigationService) { TogglePasswordImageSource = themeSwitcher.CurrentThemeType == ThemeTypes.Dark ? ConstantsHelper.TogglePasswordLightImage : ConstantsHelper.TogglePasswordDarkImage; SignInCommand = commandResolver.AsyncCommand(SignIn); SwitchPasswordVisibilityCommand = commandResolver.Command(SwitchPasswordVisibility); ToggleRegisterOrLoginViewCommand = commandResolver.Command(ToggleRegisterOrLoginView); SwitchPasswordConfirmVisibilityCommand = commandResolver.Command(SwitchConfirmPasswordVisibility); }
public LogonWindow() { try { ThemeSwitcher.LoadSkin(ThemeEnum.Aero, this); this.InitializeComponent(); this.AddEventListenerHandler(); } catch (System.Exception e) { if (this.logger != null) { this.logger.Error(e.ToString()); } } }
//internal UserHeaderWindow userHeaderWindow; //internal Border OuterBorder; //internal Border InnerBorder; //internal StatusBar topBar; //internal ImageButton btnMin; //internal ImageButton btnClose; //internal Border leftMenuBorder; //internal System.Windows.Controls.Image img40; //internal System.Windows.Controls.Image img110; //internal Button btnSelectFile; //internal Canvas ImageBox; //internal System.Windows.Controls.Image img; //internal System.Windows.Shapes.Rectangle rectangleBox; //private bool _contentLoaded; public UserHeaderWindow(Staff staff) { ThemeSwitcher.LoadSkin(ThemeEnum.Aero, this); this.InitializeComponent(); this.InitUI(); this.imageCanvas.Width = 200.0; this.imageCanvas.Height = 200.0; this.imageCanvas.Visibility = Visibility.Hidden; this.imageCanvas.CacheImage = new CanvasCustom.CacheImageDelegate(this.CacheImageHandler); this.ImageBox.Children.Add(this.imageCanvas); this.size = (int)this.ImageBox.Height; this.img40.Source = staff.HeaderImage; this.img110.Source = staff.HeaderImage; this.img.Width = (double)this.size; this.img.Height = (double)this.size; this.img.Source = staff.HeaderImage; }
public UpdateWindow() { ThemeSwitcher.LoadSkin(ThemeEnum.Aero, this); this.InitializeComponent(); if (ApplicationDeployment.IsNetworkDeployed || this.debug) { this.lblVer.Text = "当前版本:" + AppUtil.Instance.AppVersion(); } else { this.lblMsg.Text = "内部开发版禁止更新!"; this.lblVer.Text = "当前版本:内部开发版"; this.btnCheckUpdate.IsEnabled = false; this.btnCheckUpdate.Content = "禁止更新"; } this.sessionService = ServiceUtil.Instance.SessionService; this.fileService = ServiceUtil.Instance.FileService; this.logger = ServiceUtil.Instance.Logger; }
public MenuMasterViewModel(INavigationService navigationService, ThemeSwitcher themeSwitcher, ICommandResolver commandResolver) : base(navigationService) { _themeSwitcher = themeSwitcher; MessagingCenter.Subscribe <UserProfileViewModel>(this, ConstantsHelper.ProfileUpdated, vm => UpdateProfile()); MessagingCenter.Subscribe <ThemeSwitcher>(this, ConstantsHelper.AppThemeChanged, ts => DrawMenu()); UpdateProfile(); DrawMenu(); NavigateToUserProfileCommand = commandResolver.AsyncCommand(NavigateToUserProfile); ChangeDetailsPageCommand = commandResolver.AsyncCommand <MenuViewIndex>(ChangeDetailsPageAsync); LogoutCommand = commandResolver.AsyncCommand(Logout); }
public void InitializeModule() { themeSwitcher = new ThemeSwitcher(themeResourcePattern, new[] { typeof(Rect), typeof(Brush), typeof(Style), typeof(DataTemplate), typeof(ShaderEffect) }, true); var defaultThemes = new List <string>() { "/ClearMine.Themes;component/Themes/Generic.xaml" }; if (SwitchThemeMessage.CustomThemeKey.Equals(Settings.Default.CurrentTheme, StringComparison.Ordinal)) { defaultThemes.Add(Settings.Default.CustomThemeFile); } else { defaultThemes.Add(String.Format(themeResourcePattern, Settings.Default.CurrentTheme)); } themeSwitcher.DefaultThemes = defaultThemes; MessageManager.SubscribeMessage <UIComponentLoadedMessage>(OnUIComponentLoaded); }
public SettingsViewModel(INavigationService navigationService, ThemeSwitcher themeSwitcher, IThemeService themeService, ICommandResolver commandResolver) : base(navigationService) { _themeService = themeService; _themeSwitcher = themeSwitcher; _savedTheme = (ThemeTypes)Enum.Parse(typeof(ThemeTypes), Settings.ThemeType); bool.TryParse(Settings.UsePin, out bool shouldUsePin); UsePin = shouldUsePin; if ((ThemeTypes)Enum.Parse(typeof(ThemeTypes), Settings.ThemeType) == ThemeTypes.Dark) { IsDarkTheme = true; } SaveSettingsCommand = commandResolver.Command <string>(pin => SaveSettings(pin)); OpenPinViewCommand = commandResolver.AsyncCommand(OpenPinViewAsync); }
public SettingsViewModel( INavigationService navigationService, IFileSystem fileService, IMediaService mediaService, ThemeSwitcher themeSwitcher, IThemeService themeService, IPlatformDocumentPicker documentPicker, ICommandResolver commandResolver) : base(navigationService) { _fileService = fileService; _mediaService = mediaService; _themeService = themeService; _themeSwitcher = themeSwitcher; _documentPicker = documentPicker; _savedTheme = (ThemeTypes)Enum.Parse(typeof(ThemeTypes), Settings.ThemeType); bool.TryParse(Settings.UsePin, out bool shouldUsePin); UsePin = shouldUsePin; if ((ThemeTypes)Enum.Parse(typeof(ThemeTypes), Settings.ThemeType) == ThemeTypes.Dark) { IsDarkTheme = true; } bool.TryParse(Settings.UsePinBackground, out bool shouldUsePinBackground); UsePinPageBackground = shouldUsePinBackground; if (UsePinPageBackground) { PinBackgroundImagePath = Settings.PinBackground; } SaveSettingsCommand = commandResolver.Command(SaveSettings); OpenPinViewCommand = commandResolver.AsyncCommand(OpenPinViewAsync); ChangePinViewBackgroundCommand = commandResolver.AsyncCommand(ChangePinBackground); ResetPinBackgroundCommand = commandResolver.Command(ResetPinBackground); }
public PinViewModel(INavigationService navigationService, ThemeSwitcher themeSwitcher, ICommandResolver commandResolver) : base(navigationService) { _pinBuilder = new StringBuilder(); _themeSwitcher = themeSwitcher; Message = Resmgr.Value.GetString(ConstantsHelper.EnterPin, CultureInfo.CurrentCulture); DeleteNumberCommand = commandResolver.CommandWithoutLock(DeletePinNumber); PinCommand = commandResolver.AsyncCommandWithoutLock <string>(CheckPinAsync); InitializeImagesForButtons(); bool.TryParse(Settings.UsePinBackground, out bool shouldUsePinBackground); UsePinPageBackground = shouldUsePinBackground; if (UsePinPageBackground) { PinBackgroundImagePath = Settings.PinBackground; } }
private void Dark_Theme_Button_Checked(object sender, RoutedEventArgs e) { ThemeSwitcher.Switch("Dark", true, this); }
public MainWindow() { InitializeComponent(); ThemeSwitcher = new ThemeSwitcher(this); }
public ThemeSwitcherBuilderTests() { _themeSwitcher = new ThemeSwitcher(new ViewContext(), new Mock<IClientSideObjectWriterFactory>().Object); _builder = new ThemeSwitcherBuilder(_themeSwitcher); }
private void TapGestureRecognizer_Tapped(object sender, EventArgs e) { ThemeSwitcher.ToggleTheme(); }
protected void ddlThemes_SelectedIndexChanged(object sender, EventArgs e) { ThemeSwitcher.SaveCurrentTheme(ddlThemes.SelectedItem.Value); Response.Redirect("~/default.aspx"); }