示例#1
0
        private void RadMenuComboItemTheme_ComboBoxElement_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
        {
            if (RadMenuComboItemTheme.ComboBoxElement.SelectedIndex > -1)
            {
                switch (RadMenuComboItemTheme.ComboBoxElement.SelectedIndex)
                {
                case 0:
                    Program.NombreTema = Program.ThemeOffice2007Black.ThemeName;
                    Properties.Settings.Default.NombreTema = Program.ThemeOffice2007Black.ThemeName;
                    break;

                default:
                case 1:
                    Program.NombreTema = Program.ThemeVisualStudio2012Dark.ThemeName;
                    Properties.Settings.Default.NombreTema = Program.ThemeVisualStudio2012Dark.ThemeName;
                    break;
                }

                this.RadMenuComboItemTheme.ComboBoxElement.SelectedIndexChanged -= new Telerik.WinControls.UI.Data.PositionChangedEventHandler(this.RadMenuComboItemTheme_ComboBoxElement_SelectedIndexChanged);

                ArrayList formn = new System.Collections.ArrayList(System.Windows.Forms.Application.OpenForms);

                foreach (Form formu in formn)
                {
                    ThemeResolutionService.ApplyThemeToControlTree(formu, Program.NombreTema);
                }

                this.RadMenuComboItemTheme.ComboBoxElement.SelectedIndexChanged += new Telerik.WinControls.UI.Data.PositionChangedEventHandler(this.RadMenuComboItemTheme_ComboBoxElement_SelectedIndexChanged);
            }
        }
示例#2
0
        public Form1()
        {
            InitializeComponent();

            radColorSelector1.SelectedColor        = Color.Red;
            radColorSelector1.OkButtonClicked     += new ColorChangedEventHandler(radColorSelector1_OkButtonClicked);
            radColorSelector1.CancelButtonClicked += new ColorChangedEventHandler(radColorSelector1_CancelButtonClicked);

            radCheckBox1.ToggleState = radColorSelector1.ShowBasicColors ? ToggleState.On : ToggleState.Off;
            radCheckBox2.ToggleState = radColorSelector1.ShowSystemColors ? ToggleState.On : ToggleState.Off;
            radCheckBox3.ToggleState = radColorSelector1.ShowWebColors ? ToggleState.On : ToggleState.Off;
            radCheckBox4.ToggleState = radColorSelector1.ShowProfessionalColors ? ToggleState.On : ToggleState.Off;

            radCheckBox5.ToggleState = radColorSelector1.ShowHEXColorValue ? ToggleState.On : ToggleState.Off;
            radCheckBox6.ToggleState = radColorSelector1.ShowCustomColors ? ToggleState.On : ToggleState.Off;
            radCheckBox7.ToggleState = radColorSelector1.AllowColorSaving ? ToggleState.On : ToggleState.Off;
            radCheckBox8.ToggleState = radColorSelector1.AllowEditHEXValue ? ToggleState.On : ToggleState.Off;
            radCheckBox9.ToggleState = radColorSelector1.AllowColorPickFromScreen ? ToggleState.On : ToggleState.Off;

            radTextBox1.Text = radColorSelector1.SelectedColorLabelHeading;
            radTextBox2.Text = radColorSelector1.OldColorLabelHeading;
            radTextBox3.Text = radColorSelector1.AddNewColorButtonText;

            this.EnabledQSFButtons = QSFButtons.None;

            ThemeResolutionService.ApplyThemeToControlTree(this.radColorSelector1, THEME);
        }
示例#3
0
        protected void OnThemeChanged()
        {
            Theme theme = ThemeResolutionService.GetTheme(ThemeResolutionService.ApplicationThemeName);

            foreach (StyleGroup styleGroup in theme.StyleGroups)
            {
                foreach (PropertySettingGroup propertySettingGroup in styleGroup.PropertySettingGroups)
                {
                    if (propertySettingGroup.Selector.Value == "RadFormElement")
                    {
                        foreach (PropertySetting propertySetting in propertySettingGroup.PropertySettings)
                        {
                            if (propertySetting.Name == "BackColor")
                            {
                                this.BackColor = (Color)propertySetting.Value;
                                return;
                            }
                        }
                    }
                    if (styleGroup.Registrations[0].ControlType == "Telerik.WinControls.UI.RadForm" && propertySettingGroup.Selector.Value == "Telerik.WinControls.RootRadElement")
                    {
                        foreach (PropertySetting propertySetting in propertySettingGroup.PropertySettings)
                        {
                            if (propertySetting.Name == "BackColor")
                            {
                                this.BackColor = (Color)propertySetting.Value;
                                return;
                            }
                        }
                    }
                }
            }
        }
        private void FillCombos()
        {
            ComboFunctions.FillSecGroupsComboExcRoot(ddlGroups);
            ComboFunctions.FillSubCompanyCombo(ddlSubCompany);

            ThemeList themeList = ThemeResolutionService.GetAvailableThemes();

            if (themeList.Count() > 0)
            {
                ddlThemes.DisplayMember    = "ThemeName";
                ddlThemes.ValueMember      = "ThemeName";
                ddlThemes.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
                ddlThemes.DataSource       = themeList.Distinct().Where(t => !t.ThemeName.EndsWith("*") && t.ThemeName != "BreezeExtended").OrderBy(t => t.ThemeName).ToList();
            }

            ddlThemes.SelectedIndex = -1;
            ddlThemes.NullText      = "Select";
            ddlGroups.SelectedIndex = -1;


            if (ddlSubCompany.Items.Count > 0)
            {
                chkAllowTransferBooking.Visible = true;
            }
        }
示例#5
0
 public Statistic()
 {
     InitializeComponent();
     ThemeResolutionService.ApplyThemeToControlTree(this, theme.ThemeName);
     radButton2.Text += DateTime.Now;
     LoadDrop();
 }
        public static void LoadSchedulerThemes()
        {
            Assembly resourceAssembly = typeof(ExternalControlsThemeHelper).Assembly;

            ThemeResolutionService.RegisterThemeFromStorage(ThemeStorageType.Resource, "Telerik.WinControls.UI.ControlDefault.ControlDefault_Repository.xml");
            ThemeResolutionService.RegisterThemeFromStorage(ThemeStorageType.Resource, resourceAssembly, "Telerik.WinControls.UI.ControlDefault.ControlDefault_Telerik_WinControls_UI_RadScheduler.xml");
        }
示例#7
0
        private void AddUniqueRelations(StyleBuilderRegistration registration, RadStyleSheetRelationList relations, string themeName)
        {
            bool added = false;

            foreach (RadStylesheetRelation relationToCheck in relations)
            {
                bool contains = false;

                foreach (RadStylesheetRelation currentRelation in registration.StylesheetRelations)
                {
                    if (currentRelation.Equals(relationToCheck))
                    {
                        contains = true;
                        break;
                    }
                }

                if (!contains)
                {
                    registration.StylesheetRelations.Add(relationToCheck);
                    added = true;
                }
            }

            if (added)
            {
                //update ThemeResolutionService registrations
                ThemeResolutionService.RegisterStyleBuilder(registration, themeName);
            }
        }
示例#8
0
        void radReminder1_ItemOpened(object sender, RadOpenItemArgs e)
        {
            EditAppointmentDialog editAppointmentDialog = new EditAppointmentDialog((IEvent)e.RemindObject, this.radScheduler1);

            ThemeResolutionService.ApplyThemeToControlTree(editAppointmentDialog, this.radScheduler1.ThemeName);
            editAppointmentDialog.ShowDialog();
        }
示例#9
0
 public frmSplash()
 {
     this.Load += new EventHandler(this.frmSplash_Load);
     this.InitializeComponent();
     ThemeResolutionService.LoadPackageResource("BuilderRED.CustomTelerikAll.tssp");
     ThemeResolutionService.ApplicationThemeName = "CustomTelerikAll";
 }
示例#10
0
        public RadFormUsuarios()
        {
            InitializeComponent();
            ThemeResolutionService.ApplyThemeToControlTree(this, Program.NombreTema);
            RadMessageBox.ThemeName = this.ThemeName;

            //dts = Consulta.ConsultaUsuario();

            //if (dts.Tables[0].Rows[0]["Resultado"].ToString()=="1")
            //{

            //    var roles = from rol in dts.Tables[2].Copy().AsEnumerable()
            //                where rol.Field<int>("RolID") > 1
            //                select rol;

            //    if (roles.Count() > 0)
            //    {
            //        RadDrpRol.DataSource = roles.CopyToDataTable();
            //        RadDrpRol.ValueMember = "RolID";
            //        RadDrpRol.DisplayMember = "Nombre";
            //        RadDrpRol.SelectedIndex = -1;
            //        RadDrpRol.Text = "";
            //    }

            TablaUsuario();
            //}

            RadMenuItemGuardar.Enabled = false;
        }
示例#11
0
 public Powered()
 {
     InitializeComponent();
     ThemeResolutionService.ApplyThemeToControlTree(this, theme.ThemeName);
     MyRussionRadGridLocalizationProvider.CurrentProvider = new MyRussionRadGridLocalizationProvider();
     Grid();
 }
示例#12
0
        public RadFormLogin()
        {
            InitializeComponent();

            ThemeResolutionService.ApplyThemeToControlTree(this, Program.NombreTema);
            RadMessageBox.ThemeName = this.ThemeName;
        }
示例#13
0
        public SocPersonal()
        {
            InitializeComponent();
            ThemeResolutionService.ApplyThemeToControlTree(this, theme.ThemeName);
            MyRussionRadGridLocalizationProvider.CurrentProvider = new MyRussionRadGridLocalizationProvider();
            radGridView2.TableElement.Text  = MyRussionRadGridLocalizationProvider.TableElementText;
            CheckForIllegalCrossThreadCalls = false;

            myBackgroundWorker = new BackgroundWorker();
            myBackgroundWorker.WorkerReportsProgress      = true;
            myBackgroundWorker.WorkerSupportsCancellation = true;
            myBackgroundWorker.DoWork += new DoWorkEventHandler(loadGridSoc);

            myBackgroundWorkerOff = new BackgroundWorker();
            myBackgroundWorkerOff.WorkerReportsProgress      = true;
            myBackgroundWorkerOff.WorkerSupportsCancellation = true;
            myBackgroundWorkerOff.DoWork += new DoWorkEventHandler(LoadGridOff);

            myBackgroundWorkerJoin = new BackgroundWorker();
            myBackgroundWorkerJoin.WorkerReportsProgress      = true;
            myBackgroundWorkerJoin.WorkerSupportsCancellation = true;
            myBackgroundWorkerJoin.DoWork += new DoWorkEventHandler(LoadGridInspector);
            //myBackgroundWorker.DoWork += new DoWorkEventHandler(LoadGridOff);
            //myBackgroundWorker.DoWork += new DoWorkEventHandler(LoadGridInspector);
        }
示例#14
0
        private void tmr_Tick(object sender, EventArgs e)
        {
            this.tmr.Stop();

            var p = Application.StartupPath;

            ServiceLocator.LanguageCatalog.Load(p + "\\locale\\de_DE.mo");

            PluginLoader.AddObject("include", new Action <string>(fn => { PluginLoader.Eval(File.ReadAllText(fn)); }));
            PluginLoader.AddObject("eval", new Func <string, object>(fn => { return(PluginLoader.Eval(fn)); }));
            PluginLoader.AddObject("import", new Action <string>(fn => { ModuleLoader.Load(PluginLoader.GetEngine(), Assembly.LoadFile(fn)); }));

            if (!Directory.Exists(string.Format("{0}\\data", p)))
            {
                Directory.CreateDirectory(string.Format("{0}\\data", p));
            }
            if (!Directory.Exists(string.Format("{0}\\data\\invoices", p)))
            {
                Directory.CreateDirectory(string.Format("{0}\\data\\invoices", p));
            }
            if (!Directory.Exists(string.Format("{0}\\themes", p)))
            {
                Directory.CreateDirectory(string.Format("{0}\\themes", p));
            }

            foreach (var f in Directory.GetFiles(string.Format("{0}\\themes", p), "*.tssp", SearchOption.AllDirectories))
            {
                ThemeResolutionService.LoadPackageFile(f);
            }

            BsonMapper.Global.RegisterAutoId <VoucherID>(
                isEmpty: (value) => VoucherID.IsEmpty(value),
                newId: (collection) => VoucherID.NewID());

            DbContext.Open(p + "\\data.db");

            var pP = new Product {
                Category = new DbRef <ProductCategory>(DbContext.ProductCategoryCollection, 1), ID = "Rose", Price = 0.81, Tax = 0.19, Image = Resources.box.ToBytes(ImageFormat.Png)
            };

            DbContext.ProductCategoryCollection.Insert(new ProductCategory()
            {
                Name = "Pflanze"
            });
            DbContext.ProductCollection.Insert(pP);
            DbContext.Commit();

            var c = DbContext.ProductCollection.Include(cc => cc.Category.Fetch(DbContext.DB)).FindAll();

            var frm = new MainForm();

            var ps = PluginLoader.Load(Application.StartupPath + "\\Plugins");
            var fs = PluginLoader.Call("init");

            frm.Show();

            //hide this form
            this.Hide();
        }
示例#15
0
 private void EnsureRepository()
 {
     if (ThemeResolutionService.GetThemeRepository(ThemeResolutionService.ControlDefaultThemeName, false, false) == null)
     {
         string themeLocation = "Telerik.WinControls.UI.ControlDefault." + RepositoryName;
         ThemeResolutionService.RegisterThemeFromStorage(ThemeStorageType.Resource, themeLocation);
     }
 }
示例#16
0
        public Form1()
        {
            InitializeComponent();

            this.radDock1.DockingGuidesTemplate = PredefinedDockingGuidesTemplate.VS2008;
            ThemeResolutionService.LoadPackageResource("Telerik.Examples.WinControls.Docking.VisualStudioIDE.VisualStudio2008.tssp");
            this.radDock1.ThemeName = "VisualStudio2008";
        }
示例#17
0
        public Form1()
        {
            InitializeComponent();

            this.SelectedControl = this.radRotator1;
            ThemeResolutionService.ApplyThemeToControlTree(this, THEME);
            ThemeResolutionService.ApplyThemeToControlTree(this.settingsPanel, THEME);
        }
        public RadFormAdelantoInsentivo()
        {
            InitializeComponent(); ThemeResolutionService.ApplyThemeToControlTree(this, Program.NombreTema);
            RadMessageBox.ThemeName = this.ThemeName;

            TablaAdelantoInsentivo();
            RadMenuItemGuardar.Enabled = false;
        }
示例#19
0
        void btnOpenCondFormatting_Click(object sender, System.EventArgs e)
        {
            ConditionalFormattingForm cf = new ConditionalFormattingForm(this.radGridView1.MasterTemplate, null);

            cf.Owner = this.FindForm();
            ThemeResolutionService.ApplyThemeToControlTree(cf, this.radGridView1.ThemeName);
            cf.Show();
        }
示例#20
0
        public RadRibbonFormMain()
        {
            InitializeComponent();
            this.RadButtonElementUsuarios.Click += new System.EventHandler(this.RadButtonElementUsuarios_Click);

            ThemeResolutionService.ApplyThemeToControlTree(this, Program.NombreTema);
            this.RadMenuComboItemTheme.ComboBoxElement.SelectedIndexChanged += new Telerik.WinControls.UI.Data.PositionChangedEventHandler(this.RadMenuComboItemTheme_ComboBoxElement_SelectedIndexChanged);
            this.Text += " - [Usuario: " + Program.User.Nombre + " " + Program.User.Apellido + "]";
        }
示例#21
0
文件: Disability.cs 项目: Vla00/alone
 public Disability(string key)
 {
     InitializeComponent();
     ThemeResolutionService.ApplyThemeToControlTree(this, theme.ThemeName);
     _status = false;
     _key    = key;
     ComboBox_every();
     Grid();
 }
示例#22
0
 private static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(defaultValue: false);
     ThemeResolutionService.LoadPackageResource("BannerChurch.CheckInApp.App_Themes.Office2010Silver_Compass.tssp");
     ThemeResolutionService.ApplicationThemeName = "Office2010Silver_Compass";
     LoginForm = new Login();
     Application.Run(LoginForm);
 }
示例#23
0
        protected override void OnLoad(EventArgs e)
        {
            this.radComboAnimation.DataSource    = Enum.GetValues(typeof(RadEasingType));
            this.radCheckEnabled.Checked         = this.radMenuDemo.DropDownAnimationEnabled;
            this.radComboAnimation.SelectedIndex = this.radComboAnimation.FindStringExact(this.radMenuDemo.DropDownAnimationEasing.ToString());
            ThemeResolutionService.ApplyThemeToControlTree(this, THEME);
            ThemeResolutionService.ApplyThemeToControlTree(this.settingsPanel, THEME);

            base.OnLoad(e);
        }
示例#24
0
            private void ThemeDropDown_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
            {
                string strTheme = themeDropDown.Text;
                Theme  theme    = ThemeResolutionService.GetTheme(strTheme);

                if (theme != null)
                {
                    ThemeResolutionService.ApplicationThemeName = theme.Name;
                }
            }
示例#25
0
 protected override void OnLoad(EventArgs e)
 {
     base.OnLoad(e);
     if (string.IsNullOrEmpty(ThemeResolutionService.ApplicationThemeName) && this.imageEditorElement != null)
     {
         ThemeResolutionService.ApplyThemeToControlTree((Control)this, this.imageEditorElement.ElementTree.ThemeName);
     }
     this.LocalizeStrings();
     this.WireEvents();
 }
示例#26
0
 public Form1()
 {
     InitializeComponent();
     this.SelectedControl = this.radAppMenuDemo;
     ThemeResolutionService.ApplyThemeToControlTree(this, THEME);
     this.showDropDownTimeout          = new Timer();
     this.showDropDownTimeout.Tick    += new EventHandler(showDropDownTimeout_Tick);
     this.showDropDownTimeout.Interval = 1000;
     this.SetEnabledQsfbButton(QSFButtons.ChangeTheme, false);
 }
示例#27
0
文件: Dead.cs 项目: Vla00/alone
        public Dead()
        {
            InitializeComponent();
            ThemeResolutionService.ApplyThemeToControlTree(this, theme.ThemeName);

            helpBackgroundWorker = new BackgroundWorker();
            helpBackgroundWorker.WorkerReportsProgress      = true;
            helpBackgroundWorker.WorkerSupportsCancellation = true;
            helpBackgroundWorker.DoWork     += new DoWorkEventHandler(DeadLoad);
            radGridView2.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
        }
示例#28
0
 public RadEvaluationForm()
 {
     this.InitializeComponent();
     ThemeResolutionService.LoadPackageResource("Telerik.WinControls.UI.EvalFormTheme.tssp");
     ThemeResolutionService.ApplyThemeToControlTree((Control)this, "EvalFormTheme");
     this.radLabelVersion.Text   = string.Format("Version {0}", (object)"2018.3.1016.20");
     this.radLabelCopyright.Text = this.SplitCopyrightText("Copyright © 2006-2018 Telerik EAD. All rights reserved.");
     this.FormElement.TitleBar.Children[1].Visibility = ElementVisibility.Collapsed;
     this.Icon = Telerik.WinControls.ResFinder.ProgressIcon;
     this.pictureBoxRadControls.Image = Telerik.WinControls.ResFinder.WinFormsLogoWithText;
 }
示例#29
0
        private void RadPrintPreviewDialog_ThemeNameChanged(
            object source,
            ThemeNameChangedEventArgs args)
        {
            ThemeResolutionService.ApplyThemeToControlTree((Control)this, args.newThemeName);
            ThemeResolutionService.ApplyThemeToControlTree(this.menuItemZoom.HostItem.HostedControl, args.newThemeName);
            Color backColor = this.radMenu.MenuElement.BackColor;

            this.printPreviewControl.BackColor       = Color.FromArgb((int)byte.MaxValue, Math.Max((int)backColor.R - 35, 0), Math.Max((int)backColor.G - 35, 0), Math.Max((int)backColor.B - 35, 0));
            this.printPreviewControl.PageShadowColor = Color.FromArgb((int)byte.MaxValue, Math.Max((int)backColor.R - 70, 0), Math.Max((int)backColor.G - 70, 0), Math.Max((int)backColor.B - 70, 0));
        }
示例#30
0
 private void Form1_Load(object sender, EventArgs e)
 {
     m_customMenu = SystemMenu.FromForm(this);
     m_customMenu.AppendSeparator();
     m_customMenu.AppendMenu(ABOUTMENU, "About Wechoid...");
     RemoveContextMenu(this);
     // Apply skin
     Telerik.WinControls.Themes.DesertTheme thm = new Telerik.WinControls.Themes.DesertTheme();
     ThemeResolutionService.ApplyThemeToControlTree(this, "Desert");
     About1.showAbout();
 }